Closed ghost closed 12 years ago
See the config options to enable the toolbar. I recommend copying zenddevelopertools.local.php.dist
to your application's config autoload directory.
If you need more help, please give me more information about what you did.
I just copied zenddevelopertools.local.php.dist to config/autoload/zenddevelopertools.local.php. profiler : 'enabled' => false,
toolbar : 'enabled' => true,
That's all i did
I did not set any matcher,collector (for profiler) nor entries (for toolbar)
The profiler must be enabled, too.
If i do that i've got : Fatal error: Uncaught exception 'Zend\Di\Exception\MissingPropertyException' with message 'Missing instance/object for parameter driver for Zend\Db\Adapter\Adapter::__construct'
I use Doctrine2 ,not Zend\Db.
Based on the Exception I assume that you use DI, which I have not manually tested so far. Try to disable the Zend\Db collector:
'zenddevelopertools' => array('profiler' => array('collectors' => array('db' => null)))
Not sure why the Di tries to instantiate a Zend\Db\Adapter\Adapter
object, because ZDT checks if a service with that name exists, before trying to retrieve it.
What ZF2 version do you use?
I'm using lastest (Zf2.1.0) I don't use Di but maybe some of vendor/modules do.
Problem is resolved with:
'collectors' =>array('db' => null),
Thank you very much @coss
Is it possible to profile Doctrine2 with zenddeveloppertools?
You could a) disable module after module to identify which module does not play nice and/or b) remove the DbCollector service in the Module.php as quick and dirty work around.
I'll ask @Ocramius if the error makes sense to him, because he most certainly knows more about Di than me.
Yes, the DoctrineORMModule provides a collector for Doctrine2. See the docs.
Thank you very much! Everything works now perfectly fine and with Doctrine2 profiling too.
@coss the defaults of ZDT assume a Zend\Db\Adapter\Adapter
, that has to be disabled when using DoctrineORMModule without an adapter. It may be better to not set a Zend\Db
profiler as a default.
This also happens when enabling ZDT with a clean skeleton AFAIK.
@Ocramius It does not – or better it did not, the last time I checked it. If it breaks now then something must have changed between RC5 and RC7.
But I'm still not sure, why checking for Zend\Db\Adapter\Adapter
in the
ServiceManager breaks something. Does the Di fallback instantiate an object
when using $sm->has('SomeClass')
?
Nonetheless, removing the database collector from the default list might be a good idea.
@coss well, yes, if the Di fallback is active (happens when you have di
config) it will attempt to fetch something.
Using $sm->has('SomeClass')
also returns true if there's a definition in
Di for the requested item
Marco Pivetta
On 5 September 2012 05:20, Eric Boh notifications@github.com wrote:
@Ocramius https://github.com/Ocramius It does not – or better it did not, the last time I checked it. If it breaks now then something must have changed between RC5 and RC7.
But I'm still not sure, why checking for Zend\Db\Adapter\Adapter in the ServiceManager breaks something. Does the Di fallback instantiate an object when using $sm->has('SomeClass')?
Nonetheless, removing the database collector from the default list might be a good idea.
— Reply to this email directly or view it on GitHubhttps://github.com/zendframework/ZendDeveloperTools/issues/28#issuecomment-8286544.
Hi there, I don't know why but no toolbar appears