Codeception / module-doctrine

Next gen Doctrine module for Codeception
MIT License
2 stars 1 forks source link

Issue after updating symfony dependencyInjection from 6.2 to 6.3 #3

Closed SylvainBreton closed 4 months ago

SylvainBreton commented 9 months ago

Hi, I updated our project from symfony 6.2 to 6.3.

Functionnal tests fail after this update with the error " Multiple non-persisted new entities were found through the given association graph".

After some investigation the instance of the entity manager of the test (using grabFromRepository) is different from the one used in services in scr.

The issue started exactly after updating those 3 libraries:

I strongly suspect that the upgrade causing the issue is symfony/dependency-injection because of the above mentioned issue of entity manager.

Here is our project repository : https://gitlab.com/eternaltwin/mush/mush (dependency update has not been pushed though)

I am new at this so if you need more information feel free to ask as well as clarification of what I wrote. Also if this is a stupid error on our side sorry for opening this issue.

cmnemoi commented 9 months ago

Here is our project repository : https://gitlab.com/eternaltwin/mush/mush (dependency update has not been pushed though)

You can checkout to the relevant branch if needed : https://gitlab.com/eternaltwin/mush/mush/-/tree/update-dependancies?ref_type=heads

SylvainBreton commented 9 months ago

After looking deeper in the project I think this is a symfony issue and not codeception. It look very similar to this old issue : https://github.com/symfony/symfony/issues/28869

Feel free to close this issue

TavoNiievez commented 4 months ago

Closing as there is no evidence that it is a bug in the module code.

Thank you @SylvainBreton