Symfony 6.2 infinite dependency-injection loop error #48515
-
I am trying to update my project from Symfony 6.1 to 6.2, but after composer finishes installing updated bundles, console starts throwing up following error.
These are files, which are causing this error
Any symfony command (e.g. php bin/console assets:install public or php bin/console cache:clear) throws same error I even tried to clear the cache suspecting some old class is causing this issue, but no success. All recipes are up to date. Even removing vendor folder and re-installing 6.2 bundles hasn't fixed this issue. Has anyone experienced this issue while updating Symfony? I am really not sure where to start looking up for the solution For more info about the error, please refer to this SO question https://stackoverflow.com/questions/74652270/symfony-6-2-infinite-dependency-injection-loop |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Does it also happen if you increase the max recursion from 256 to 1000 ? In my experience, it is possible to have some deep recursion depending on your service graph, but it is still not infinite. |
Beta Was this translation helpful? Give feedback.
-
We're also suddenly running into this in a project that uses API Platform. Container won't compile with 275, will with 300. I think @derickr should consider raising the default from 256 to 512 if standard frameworks with standard libraries start running into this. |
Beta Was this translation helpful? Give feedback.
-
Stop making your code so complicated :-þ — I saw you filed a ticket, @curry684, I'll get that into Xdebug 3.3. |
Beta Was this translation helpful? Give feedback.
Does it also happen if you increase the max recursion from 256 to 1000 ? In my experience, it is possible to have some deep recursion depending on your service graph, but it is still not infinite.