-
Notifications
You must be signed in to change notification settings - Fork 236
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
Trigger the standard autoloader as the last resort #271
Conversation
shouldn't it check for both |
@stof fair, please see if it is any better now |
👍 for this, as it means that not registering anything anymore will produce the behavior available in doctrine/annotations 2 (but without forcing anything on existing projects until they remove their explicit registration) |
there is actually still 1 case changing the behavior for existing projects: when only |
Well, we can toggle a flag when |
Isn't you pre-load a class when you use |
Well, if you used |
@sanmai I've rebased this against the new master after making some changes to our branches. Do you still want to work on this patch? If we can get registerFile behaviour sorted out properly, we can include this in the 1.9 release. |
Yes, I will at least try to remember what's going on here. |
@alcaeus please let me know if this is a passable workaround |
As v2 isn't here yet, and looking at doctrine#232 it is unclear if will, and as we have to put up with annoying deprecated functions, here I propose to fall back to the standard autoloader if nothing else worked, and if there's no custom loader defined. Fixes doctrine#270
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self::$registerFileUsed
must be reset to false
when resetting the registry to me.
@stof done |
Thanks @sanmai! |
It seems like this PR didn't get into 1.9, even though mentioned in the changelog. Please confirm. |
All clear. Thank you. |
As v2 isn't here yet, and looking at #232 it is unclear if it will be coming anytime soon, and as we have to put up with annoying deprecated functions, here I propose to fall back to the standard autoloader if nothing else worked, and if there's no custom loader defined.
Fixes #270
I intentionally did not add any tests as this is a PoC. Please tell me if this makes any sence, and then I'll make a try with tests.