Skip to content
This repository has been archived by the owner on Sep 14, 2018. It is now read-only.

sensiolabs.doctrinequerystatistics.data_collector problem #4

Open
adrav opened this issue Mar 4, 2013 · 7 comments
Open

sensiolabs.doctrinequerystatistics.data_collector problem #4

adrav opened this issue Mar 4, 2013 · 7 comments

Comments

@adrav
Copy link

adrav commented Mar 4, 2013

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ł

@denderello
Copy link
Contributor

Sounds like something changed inside Doctrine. Which version of Symfony are you using?

@adrav
Copy link
Author

adrav commented Mar 4, 2013

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"

@denderello
Copy link
Contributor

Hmm... maybe @stof can help with that?

@stof
Copy link

stof commented Mar 6, 2013

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)

@denderello
Copy link
Contributor

I have to look into this again. I try to make some time for this next week

@stedekay
Copy link

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.

@jaymecd
Copy link

jaymecd commented Jun 11, 2014

any update on this issue? I have totally the same behaviour as @adrav has mentioned.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants