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
Invalid service "App\Foundry\PostFactory": class "Zenstruck\Foundry\ModelFactory" not found while loading "App\Foundry\PostFactory" #593
Comments
The library must be within
I think you called |
I think it runs with prod env, because in dunglas/symfony-docker there is |
can you send your services.yaml ? |
|
You should exclude Factory path for all environments and include into the test/dev |
That's what |
I don't see When attribute in your config |
Because attributes are declared on the factories itself |
bin/console debug:container —env=production | grep SomeFactory |
This does feel like a Symfony issue especially if it just started happening... Did you upgrade Symfony recently? |
Possibly related: symfony/symfony#51106 & symfony/symfony#32995 |
Sorry, forgot to reply.
it does not return it
Thanks, that must be it.. |
But still I don't understand why it started to occur randomly 😞 |
This already happened to me already in 2 projects.
Factories are basically set stone and not changing, maybe adding only new ones.
And just randomly with one project this started to occur on the docker image building step.
In the second project with deployer now I'm seeing this also on the cache:clear.
Current workaround is to move this library requirement to non-dev? I've defined on all factories
#[When('dev')]
and#[When('test')]
and don't use them in production code.. So I don't understand why it fails, or this is something that should be fixed in Symfony?The text was updated successfully, but these errors were encountered: