Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Bridge\PhpUnit] Disable broken auto-require mechanism of phpunit#25032
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
af081f3 to0577d20Comparenicolas-grekas commentedNov 19, 2017
moved to 3.3 to prevent conflicts between local and vendor phpunit bridges |
…phpunit (nicolas-grekas)This PR was merged into the 3.3 branch.Discussion----------[Bridge\PhpUnit] Disable broken auto-require mechanism of phpunit| Q | A| ------------- | ---| Branch? | 3.4| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#25017| License | MIT| Doc PR | -It took me all the flight back from Cluj to figure out this is the only way to solve this nasty issue created by phpunit generating inlined `require_once` in the global scope for isolated tests.This mechanism predates the autoloading mechanism, and it's behavior is just hardcoded.Needs to be merged in 3.4, where the split container triggers this situation very quickly.Will allow removing the `function_exists('__phpunit_run_isolated_test')` workarounds already in place in the code base (2.7 up to master.)Commits-------0577d20 [Bridge\PhpUnit] Disable broken auto-require mechanism of phpunit
…ks (nicolas-grekas)This PR was merged into the 2.7 branch.Discussion----------Remove function_exists(__phpunit_run_isolated_test) checks| Q | A| ------------- | ---| Branch? | 2.7| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -As now permitted by#25032Commits-------a512217 Remove function_exists(__phpunit_run_isolated_test) checks
greg0ire commentedNov 19, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I'm getting since upgrading to the latest 3.4. Not entirely sure it's related yet. UPDATE: I have the same issue with 3.x, I'll try bisecting. |
greg0ire commentedNov 19, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
0577d20 is the first bad commit |
nicolas-grekas commentedNov 19, 2017
did you remove the |
greg0ire commentedNov 19, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I just tried removing |
greg0ire commentedNov 19, 2017
Here is a simple reproducer: |
nicolas-grekas commentedNov 19, 2017
@greg0ire can you try again? could/should be fixed. |
greg0ire commentedNov 19, 2017
No luck it seems, with both the phar and simple-phpunit (with |
nicolas-grekas commentedNov 19, 2017
ok, then I need a reproducer that actually works :) |
greg0ire commentedNov 19, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Here you go: Not sure why this can't be reproduced easily 😅 |
nicolas-grekas commentedNov 20, 2017
@greg0ire OK, actually that's a bug in Sonata's tests/bootstrap.php: |
greg0ire commentedNov 20, 2017
Thanks a lot for the diagnosis, sorry we had that weird stuff, we're going to simplify. Cc@soullivaneuh@core23@OskarStark@jordisala1991@jlamur |
teohhanhui commentedOct 19, 2018
So there is no other way than to use |
It took me all the flight back from Cluj to figure out this is the only way to solve this nasty issue created by phpunit generating inlined
require_oncein the global scope for isolated tests.This mechanism predates the autoloading mechanism, and it's behavior is just hardcoded.
Needs to be merged in 3.4, where the split container triggers this situation very quickly.
Will allow removing the
function_exists('__phpunit_run_isolated_test')workarounds already in place in the code base (2.7 up to master.)