schmittjoh / JMSDiExtraBundle

Provides Advanced Dependency Injection Features for Symfony2
http://jmsyst.com/bundles/JMSDiExtraBundle
330 stars 130 forks source link

Honor bundles configuration in controller injectors warmer #269

Open gremo opened 7 years ago

gremo commented 7 years ago

Controller injectors warmer does not honor the locations configuration.

jms_di_extra:
    locations:
        all_bundles: false
        bundles: [AppBundle]
        directories: ["%kernel.root_dir%/../src"]

All directories are scanned (see this line) and this may causes issues with annotations, see SonataUserBundle #686 and SonataClassificationBundle #258.

May be the solution is injecting the locations configuration and filter out the bundles.

AlmogBaku commented 7 years ago

any update?

gremo commented 7 years ago

Ping @schmittjoh this problem also affect many Sonata project bundles.