Closed mmarton closed 3 years ago
Hi,
thanks for reporting. Having Symfony 5.2 in CI would help to keep eyes on it.
Any ideas where that gets stuck?
I'm not an expert of the DI container build process, but seemd like the getdoctrineentitymanager and get***subscriber called each other. I'll check out tomorrow
I see. That might a be a good lead.
Thank you for looking into it
It seems like the problem it with the Blameable and SluggableSubscribers that take EntityManager az a constructor argument You can get the entitiymanager from the events.
public function prePersist(LifecycleEventArgs $lifecycleEventArgs): void
{
$em = $lifecycleEventArgs->getEntityManager();
...
}
Thanks for finding the spot.
How could we fix this place to avoid circular loops?
https://github.com/symfony/symfony/issues/39015
This looks similar, so maybe nothing, maybe what I suggested in the earlier comment
You can test this pull request: https://github.com/KnpLabs/DoctrineBehaviors/pull/609 composer require diabelb/doctrine-behaviors
You can test this pull request:
609
composer require diabelb/doctrine-behaviors
Works perfectly for me in 5.2 with your patch, had infinite loop before on cache:clear
Tested with 5.2.0-RC2 and the problen mo longer exists. (still not nice to inject entitymanager to a subscriber, but thats another story)
Works with the 5.2.0 release
Thank you
Hi!
if the bundle is installed symfony's boot process got into an infinite loop and dies with memory out.
UPDATE: works with 5.2.0-RC2. I'll wait the final release and close it after.