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

Generated classes does not autoload when composer installed with --classmap-authoritative #8

Open
ossinkine opened this issue Feb 5, 2018 · 1 comment

Comments

@ossinkine
Copy link
Contributor

This flag is highly recommended on production environment.
Is there any ways to use it on production and generated classes are autoloaded?

@morticue
Copy link
Contributor

I believe that would be difficult. From the composer documentation
https://getcomposer.org/doc/articles/autoloader-optimization.md#optimization-level-2-a-authoritative-class-maps

"On the flipside it also means that in case a class is generated at runtime for some reason, it will not be allowed to be autoloaded. If your project or any of your dependencies does that then you might experience "class not found" issues in production"

So I guess the way to achieve this would be to build away from the need to use generated classes in the bundle. Your PR #7 is moving towards that, since the generated form types aren't needed any longer.
The need for the generated doctrine types remains unchanged however.

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

No branches or pull requests

2 participants