-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Not automatically using the autoloader in GlobalState.php during class_exists #754
Conversation
We found this need because: 1. We do now have PHP_Invoker installed. 2. We have multiple autoloaders registered 3. When the class_exists was checking for "PHP_Invoker" it was automatically trying to autoload it and failing in a way that fatally ended our phpunit tests.
While we don't grantee that PHPUnit never ever calls the autoloader and suggest to not have a autoloader that Thanks for the PR! |
We're interested in this fix, too. Does that mean this pull request will be accepted? |
@tohann I currently don't oversee the implications of this and don't have time to regression test it so my plan was to leave it for Sebastian to decide. If it doesn't break anything or cause other issues I don't see why it shouldn't be merged. We already try to avoid autoloader calls where possible. |
Cool, thanks for the update! |
I am interested in having this pull request accepted too. |
I too would like to see this pull request accepted. I've been writing some phpunit tests and came across this issue when I'm using the spl autoloader to autoload classes. thanks, |
I am against this. Autoloaders are stackable (as in: you can have more than one registered). An autoloader should do NOTHING when it is not responsible for a class. |
Come on Sebastian. Invoker is an optional package (according to the documentation) but you are making it a prerequisite. This is breaking lots of developers if its not loaded (and if you do load it you then have to muck about installing an optional php extension locally and on integration servers.) |
I agree that the current situation is not ideal and am open to suggestion for how to improve it. Messing with the autoloader, however, because of broken autoloaders (see my comment in #754 (comment)) is not an option. |
We found this need because:
automatically trying to autoload it and failing in a way that fatally
ended our phpunit tests.