foundry: Invalid service "App\Foundry\PostFactory": class "Zenstruck\Foundry\ModelFactory" not found while loading "App\Foundry\PostFactory"

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?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (11 by maintainers)

Most upvoted comments

But I am going to close this one as this is a Symfony specific issue