symfony-docker icon indicating copy to clipboard operation
symfony-docker copied to clipboard

Large number of entities cause ORM mapping to break

Open aelfannir opened this issue 1 year ago • 9 comments

I'm facing a weird issue 2 days ago, everything was working fine until last week, when I create any file inside Entity folder, and try to generate migration, the migration drops all tables and kept only one, I thought It's a Doctrine ORM issue and opened a ticket, also the debug:router don't return any entity route (using api-platform)

Today, I created a fresh docker-based project and put my entities to it, the same issue appears, then I tried to launch project without docker, and it worked.

aelfannir avatar May 06 '24 15:05 aelfannir

I've tried another project with older version of symfony-docker, the same thing happened after I created 48 Entity

aelfannir avatar May 06 '24 16:05 aelfannir

The first issue is probably linked to the doctrine/migration project.

The second is probably linked to the docker volume. We've already had reports of behavior like this here:

  • https://github.com/dunglas/symfony-docker/issues/226#issuecomment-1106150198
  • https://github.com/dunglas/symfony-docker/issues/241#issuecomment-1116334681

maxhelias avatar May 06 '24 18:05 maxhelias

Both issues caused by same problem, even api-platform entity ressources not showing when the issue appears

aelfannir avatar May 06 '24 21:05 aelfannir

Fixed by Switching to Debian, Thank you

aelfannir avatar May 07 '24 14:05 aelfannir

So it's another musl issue

maxhelias avatar May 07 '24 20:05 maxhelias

This issue appears again, I must rebuild docker whenever it appears

aelfannir avatar Jun 07 '24 13:06 aelfannir

@aelfannir have you switch to Debian?

dunglas avatar Jun 07 '24 16:06 dunglas

@aelfannir have you switch to Debian?

I just overridden symfony-docker old skeleton (Alpine) by the new one (Debian).

aelfannir avatar Jun 07 '24 19:06 aelfannir

I temporary fix it by rebuilding fresh images whenever it happens

aelfannir avatar Jun 07 '24 19:06 aelfannir