{"action":"created","issue":{"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/4292","repository_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle","labels_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/4292/labels{/name}","comments_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/4292/comments","events_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/4292/events","html_url":"https://github.com/sonata-project/SonataAdminBundle/issues/4292","id":203346675,"number":4292,"title":"Conflict with DI extra bundle","user":{"login":"Nightbr","id":4228646,"avatar_url":"https://avatars.githubusercontent.com/u/4228646?v=3","gravatar_id":"","url":"https://api.github.com/users/Nightbr","html_url":"https://github.com/Nightbr","followers_url":"https://api.github.com/users/Nightbr/followers","following_url":"https://api.github.com/users/Nightbr/following{/other_user}","gists_url":"https://api.github.com/users/Nightbr/gists{/gist_id}","starred_url":"https://api.github.com/users/Nightbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nightbr/subscriptions","organizations_url":"https://api.github.com/users/Nightbr/orgs","repos_url":"https://api.github.com/users/Nightbr/repos","events_url":"https://api.github.com/users/Nightbr/events{/privacy}","received_events_url":"https://api.github.com/users/Nightbr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2017-01-26T11:16:30Z","updated_at":"2017-01-27T09:27:33Z","closed_at":null,"body":"Hi !\r\n\r\nI have an issue with the last release of SonataAdminBundle (3.11.*). \r\n\r\n### Environment\r\n\r\n* Environment dev\r\n* Debug enabled\r\n* PHP version 5.6.29-0+deb8u1\r\n\r\n#### Sonata packages\r\n\r\n```bash\r\n$ composer show sonata-project/*\r\nsonata-project/admin-bundle              3.10.3             The missing Symfony Admin Generator\r\nsonata-project/block-bundle              3.3.0              Symfony SonataBlockBundle\r\nsonata-project/cache                     1.0.7              Cache library\r\nsonata-project/core-bundle               3.2.0              Symfony SonataCoreBundle\r\nsonata-project/datagrid-bundle           dev-master 9c6f293 Symfony SonataDatagridBundle\r\nsonata-project/doctrine-extensions       1.0.2              Doctrine2 behavioral extensions\r\nsonata-project/doctrine-orm-admin-bundle 3.0.0              Symfony Sonata / Integrate Doctrine...\r\nsonata-project/easy-extends-bundle       2.1.10             Symfony SonataEasyExtendsBundle\r\nsonata-project/exporter                  1.7.0              Lightweight Exporter library\r\nsonata-project/intl-bundle               dev-master d2eab1c Symfony SonataIntlBundle\r\nsonata-project/media-bundle              dev-master master  \r\n\r\n```\r\n\r\n#### Symfony packages\r\n\r\n```bash\r\n$ composer show symfony/*\r\nsymfony/assetic-bundle     v2.8.1  Integrates Assetic into Symfony2\r\nsymfony/monolog-bundle     v2.12.1 Symfony MonologBundle\r\nsymfony/polyfill-apcu      v1.3.0  Symfony polyfill backporting apcu_* functions to lower PHP v...\r\nsymfony/polyfill-intl-icu  v1.3.0  Symfony polyfill for intl's ICU-related data and classes\r\nsymfony/polyfill-mbstring  v1.3.0  Symfony polyfill for the Mbstring extension\r\nsymfony/polyfill-php54     v1.3.0  Symfony polyfill backporting some PHP 5.4+ features to lower...\r\nsymfony/polyfill-php55     v1.3.0  Symfony polyfill backporting some PHP 5.5+ features to lower...\r\nsymfony/polyfill-php56     v1.3.0  Symfony polyfill backporting some PHP 5.6+ features to lower...\r\nsymfony/polyfill-php70     v1.3.0  Symfony polyfill backporting some PHP 7.0+ features to lower...\r\nsymfony/polyfill-util      v1.3.0  Symfony utilities for portability of PHP codes\r\nsymfony/security-acl       v3.0.0  Symfony Security Component - ACL (Access Control List)\r\nsymfony/swiftmailer-bundle v2.4.2  Symfony SwiftmailerBundle\r\nsymfony/symfony            v2.8.16 The Symfony PHP framework\r\n\r\n```\r\n\r\n#### PHP version\r\n\r\nPHP version 5.6.29-0+deb8u1\r\n\r\n## Subject\r\n\r\nWith the last release of SonataAdmin, I have some issues with DI Extra Bundle see this issue https://github.com/schmittjoh/JMSDiExtraBundle/issues/266\r\n\r\nAll services are not found with basic service annotation:\r\n\r\n```\r\n/**\r\n * @DI\\Service(\"app.indexer.category\")\r\n */\r\nclass CategoryIndexer\r\n```\r\n\r\nAlso, it could be a conflict with my JMS configuration:\r\n\r\n```\r\njms_di_extra:\r\n    locations:\r\n        all_bundles: false\r\n        bundles: [AppBundle, ApiBundle]\r\n        directories: [\"%kernel.root_dir%/../src\"]\r\n```\r\n\r\nI tried to use `\"jms/di-extra-bundle\": \"^1.7\"` but the problem still persists...\r\n\r\nMy workaround so far: rollback to SonataAdminBundle 3.10.* :confused: \r\n\r\n## Steps to reproduce\r\n\r\n1. Update to SonataAdminBundle 3.11.*\r\n2. Declare services with JMSDiExtraBundle @DI\\service()\r\n3. Try to get the service (dep injection or get from container)\r\n\r\n## Expected results\r\n\r\nAll services in AppBundle which uses DI annotation must be found as service.\r\n\r\n## Actual results\r\n\r\nServices declared with DI annotation are not found.\r\n\r\n```\r\n[Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException]                                           \r\n  The service \"fos_elastica.listener.app.category\" has a dependency on a non-existent service \"app.indexer.category\". \r\n```\r\n\r\nAny idea ?\r\n\r\nThanks for your amazing work and your help !\r\n\r\nIf you need anything ask for it ! ;)"},"comment":{"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/comments/275622991","html_url":"https://github.com/sonata-project/SonataAdminBundle/issues/4292#issuecomment-275622991","issue_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/4292","id":275622991,"user":{"login":"greg0ire","id":657779,"avatar_url":"https://avatars.githubusercontent.com/u/657779?v=3","gravatar_id":"","url":"https://api.github.com/users/greg0ire","html_url":"https://github.com/greg0ire","followers_url":"https://api.github.com/users/greg0ire/followers","following_url":"https://api.github.com/users/greg0ire/following{/other_user}","gists_url":"https://api.github.com/users/greg0ire/gists{/gist_id}","starred_url":"https://api.github.com/users/greg0ire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greg0ire/subscriptions","organizations_url":"https://api.github.com/users/greg0ire/orgs","repos_url":"https://api.github.com/users/greg0ire/repos","events_url":"https://api.github.com/users/greg0ire/events{/privacy}","received_events_url":"https://api.github.com/users/greg0ire/received_events","type":"User","site_admin":false},"created_at":"2017-01-27T09:27:33Z","updated_at":"2017-01-27T09:27:33Z","body":"If there is no native way I think your fix might be the best course of action… can you check if `cannotBeOverwritten` works? I have some doubts, I think it might mean that the first thing to configure the bundle wins, not sure it has anything to do with defaults."}}
{"actor":{"display_login":"greg0ire"}}