Skip to content
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

Proxy Autoloader: autoloader assumes $notFoundCallback always creates the proxy file #870

Open
alcaeus opened this issue Apr 11, 2019 · 0 comments
Labels

Comments

@alcaeus
Copy link
Member

alcaeus commented Apr 11, 2019

I saw this while trying to figure out doctrine/DoctrineBundle#848. In this case, the autoloader was called to load a proxy for a mapped superclass. Since the file didn't exist, the $notFoundCallback was called to generate a proxy class. However, the ProxyFactory in ORM will skip over mapped superclasses and didn't create a class, but neither threw an exception.

This causes an error because the autoloader wrongly assumes that the file will be present, at least after invoking the $notFoundCallback: https://github.com/doctrine/common/blob/master/lib/Doctrine/Common/Proxy/Autoloader.php#L74. However, this assumption is wrong and should probably be checked, with an exception being thrown if no file was generated/found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant