php-debugbar icon indicating copy to clipboard operation
php-debugbar copied to clipboard

Doctrine integration outdated

Open bchubb-web opened this issue 7 months ago • 4 comments

The current doctrine collector requires a DebugStack, this isnt in the latest version of Doctrine/DBAL which now uses middleware rather than logging stacks, the only other method of getting it to work is with an entityManager, which is provided with the ORM, but im only using the DBAL

bchubb-web avatar Apr 17 '25 13:04 bchubb-web

Feel free to create a new collector based on the updates, and share it with a PR

cesarreyes3 avatar Apr 17 '25 13:04 cesarreyes3

I don't use Doctrine, but I asked ChatGPT and it generated a middleware that would replicate the original functionality, I wouldn't know if it's the best method, it looks quite hacky, anyway I'll upload the code in case it helps you

UPDATE: #770

erikn69 avatar Apr 21 '25 14:04 erikn69

@erikn69 @bchubb-web I added a Doctrine middleware a while ago for Laravel Debugbar – https://github.com/cheack/debugbar-doctrine Not sure, but maybe it works with php-debugbar as well.

cheack avatar Apr 22 '25 05:04 cheack