Open adrav opened 11 years ago
Sounds like something changed inside Doctrine. Which version of Symfony are you using?
Here is my composer.json file:
"php": ">=5.3.3",
"symfony/symfony": "2.1.*",
"doctrine/orm": "2.3.*",
"doctrine/doctrine-bundle": "1.0.*",
"jdorn/sql-formatter": "dev-master",
"twig/extensions": "1.*",
"twig/twig": "1.*",
"symfony/assetic-bundle": "2.1.*",
"symfony/swiftmailer-bundle": "2.1.*",
"symfony/monolog-bundle": "2.1.*",
"sensio/distribution-bundle": "2.1.*",
"sensio/framework-extra-bundle": "2.1.*",
"sensio/generator-bundle": "2.1.*",
"doctrine/doctrine-migrations-bundle": "dev-master",
"stof/doctrine-extensions-bundle": "1.1.*",
"symfony/console": "2.1.*",
"friendsofsymfony/user-bundle": "1.3.*",
"vich/uploader-bundle": "dev-master",
"knplabs/gaufrette" : "dev-master",
"knplabs/knp-gaufrette-bundle" : "dev-master",
"knplabs/knp-paginator-bundle": "dev-master",
"knplabs/knp-components": "dev-master",
"pss/doctrine-extensions-bundle": "2.3",
"liip/functional-test-bundle": "dev-master",
"doctrine/doctrine-fixtures-bundle": "dev-master",
"psliwa/pdf-bundle": "dev-master",
"sensiolabs/doctrine-query-statistics-bundle": "dev-master",
"knplabs/knp-menu-bundle": "dev-master",
"knplabs/knp-menu": "dev-master",
"icode4food/flot-bundle": "dev-master",
"genemu/form-bundle": "2.1.*@dev"
Hmm... maybe @stof can help with that?
Hmm, if running the command as no-debug, the profiling will indeed be disabled by default in the connection, so the service will not be defined. and as you are running it as dev and no-debug, the query statistics bundle is registered. @denderello you should handle the case of connections for which the profiling is disabled (the bundle will probably fail also if the profiling is always disabled for a connection, breaking the dev environment entirely)
I have to look into this again. I try to make some time for this next week
Just a little ping for this issue :) But we only experience this problem when this bundle is added into the array for all environments in registerBundles(). The error occurs for example when we call php app/console cache:clear --env=prod. But not when we call it for the dev environment.
So if you move the registration into the if-statement at the end of the registerBundles() it should be fine.
any update on this issue? I have totally the same behaviour as @adrav has mentioned.
Hi,
when I add this bundle: "sensiolabs/doctrine-query-statistics-bundle": "dev-master",
to my composher.json, everytime when I use: php app\console --no-debug
I get: [Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException] The service "sensiolabs.doctrinequerystatistics.data_collector" has a dependency on a non-existent service "doctrine.dbal.logger.profiling.default".
Please tell me what I am doing wrong.
Rafał