Open kaiwa opened 8 years ago
This happening here:
Cache warmer try to find all controllers in all bundles. After this it create injector for every controller class, including controllers with @Nelmio\ApiDocBundle\Annotation\ApiDoc
annotation.
Good spot @covex-nn ! Thank you.
So there is at least a possible workaround by adding the affected controllers to
jms_di_extra.cache_warmer.controller_file_blacklist
I think i have found a problem. And it is not possible to ignore @ApiDoc annotation right now: doctrine/annotations
package does not allow to ignore valid annotations =(
Also i have found PR in doctrine/annotations
repo: DocParser can now ignore whole namespaces. But in that PR @BreiteSeite tried to ignore non-valid annotations. So, it will not help to solve this problem yet.
Hi,
not sure if this is a bug or a configuration problem on my side.
When using SonataUserBundle and JMSDiExtraBundle, Sonata's code triggers an annotation exception (because of a missing optional dependency only needed if the api controllers are used).
The routing for those api controllers is added optionally by SonataUserBundle, depending on if some other bundles are available. But SonataUserBundle is definitely not loading the api controllers by itself in this case.
Somehow JMSDiExtraBundle seems to cause their api controllers to load, despite I have configured:
Is there anything else to configure so that DiExtraBundle does not cause loading other vendor classes?
I have set up a minimal project here for demonstrating the issue.