snapshotpl / ZfSnapPhpDebugBar

PHP Debug Bar module for Zend Framework 2 & 3
29 stars 11 forks source link

Showing Doctrine database queries #2

Closed personman closed 10 years ago

personman commented 10 years ago

I'm using DoctrineModule to interact with my database. Any tips on how to show those db queries in the toolbar?

snapshotpl commented 10 years ago

@personman You need to write own collector for Doctrine. Look at existing PDO collector (doc: http://phpdebugbar.com/docs/base-collectors.html#pdo and source https://github.com/maximebf/php-debugbar/blob/master/src/DebugBar/DataCollector/PDO/PDOCollector.php) and write implementation for Doctrine. I'm waiting for your PR :-)

personman commented 10 years ago

@snapshotpl I really appreciate your super quick responses to my questions and issues. I'll take a look at the files you suggested and try to get you a PR if I can.

snapshotpl commented 10 years ago

@personman OK. I have plan to create collector for Zend\Db, but Doctrine will be also great feature.

barryvdh commented 10 years ago

Can't you just use the DoctrineCollector? https://github.com/maximebf/php-debugbar/blob/master/src/DebugBar/Bridge/DoctrineCollector.php

snapshotpl commented 10 years ago

I've totally missed this collector, thanks @barryvdh. Ping @personman

a-h-abid commented 9 years ago

@snapshotpl Hey. I'm trying to log the db queries with doctrine. I see the DoctrineCollector but can't understand how to use it with your debugbar. Can you help?