Skip to content

Fix for broken paths introduced after Symfony upgraded to 2.7.5. #2478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 24, 2015
Merged

Fix for broken paths introduced after Symfony upgraded to 2.7.5. #2478

merged 3 commits into from
Oct 24, 2015

Conversation

supre
Copy link
Contributor

@supre supre commented Oct 23, 2015

We upgraded our symfony package to 2.7.5, only to find out that our codeception is broken.
After a whole day of debugging it turns out the issue was related to the recent modifications made to the Finder component for Symfony (#15826, #15802, #15803).

In the path to the test in the suite (in our case, we have a test for each bundle), an additional / is added between the test and the suite, thus causing an issue in GroupLoader. i.e.:

Line 109 of file Lib/GroupManager:

if ($filename == $testPattern) {
    $groups[] = $group;
}

We were getting the following scenario:
$filename: /path/to/suite//path/to/test
$testPattern: /path/to/suite/path/to/test

And, the if condition was failing in all cases, which meant that none of our groups was working.

The provided fix will fix the path in case it's broken but will leave it unchanged in case it's fine.

@raistlin
Copy link
Member

Looks good to me.

@DavertMik
Copy link
Member

I didn't understand where actually this additional / is added to path.
To merge this PR I need clearly understand what this fix does and is that the optimal one. From what I see it is better to find where // is added and remove this redundant / in place

@raistlin
Copy link
Member

The additional "/" seems to be added by Syfmony, I've also seen this in earlier versions of Syfmony, but never caused a problem to me.

@DavertMik
Copy link
Member

Ok, @raistlin then we are merging it.

Thanks

DavertMik added a commit that referenced this pull request Oct 24, 2015
Fix for broken paths introduced after Symfony upgraded to 2.7.5.
@DavertMik DavertMik merged commit 98330ce into Codeception:2.1 Oct 24, 2015
@supre supre deleted the Fix-#Broken-Filenames-In-Groups branch October 24, 2015 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy