Closed compains closed 6 years ago
It looks like SonataAdminBundle injects the matcher inside the voter, thus creating a circular reference. The fact that it was working in 2.1.3 was pure luck (there was still a circular reference, but as it was involving setters and not constructors, it was working).
The good news is that sonata.admin.menu.matcher.voter.children
should actually not exist for their need, and https://github.com/sonata-project/SonataAdminBundle/pull/4639 is refactoring the code dealing with it, which would fix the issue.
The workaround in the meantime is to stay on the 2.1 version of the bundle.
Note that projects using Symfony 3.3+ should not be affected by this issue btw, due to the lazy-loading of voters.
Issue was fixed by https://github.com/sonata-project/SonataAdminBundle/pull/4806 (not released yet, but merged in the dev version), so I'm closing this issue).
Environment
Sonata packages
Symfony packages
PHP version
Subject
Steps to reproduce
Run composer install
Expected results
Normal install process
Actual results
Circular reference detected for service "knp_menu.matcher", path: "knp_menu.matcher -> sonata.admin.menu.matcher.voter.children -> knp_menu.matcher".
Quick workarroud
Intsall "knplabs/knp-menu-bundle": "2.1.3" even when I not use that bundle. So it seems it could be a knp-menu-bundle issue
This issue is a copy of this one as I'm not sure about the real cause of it.