doctrine-dbal icon indicating copy to clipboard operation
doctrine-dbal copied to clipboard

Tracy doesn't show any SQL queries in bar

Open petrparolek opened this issue 1 year ago • 2 comments

Version: master 26b53be916586e87b772050f32986168e55f8e48

Bug Description

Tracy doesn't show any SQL queries in bar

obrazek

Steps To Reproduce

Run sqls with doctrine

Expected Behavior

showing every queries

Possible Solution

N/A

petrparolek avatar Feb 06 '24 23:02 petrparolek

I tried dev-master and I have the same problem, looks like it's wasn't implemented

https://github.com/contributte/doctrine-dbal/blob/master/src/Logger/SnapshotLogger.php#L32

after refactoring loggers https://github.com/contributte/doctrine-dbal/commit/364501364120536618dd891d929dc8c762e7301c

I have dumped SnapshotLogger snapshot item, and it doesn't look like we can get timings queries from the data that are in snapshots array.

["level"] => string(5) "debug"
["message"] => string(65) "Executing statement: {sql} (parameters: {params}, types: {types})"
["context"] =>
  array(3) {
	["sql"]=>
	string(41) "SELECT data FROM `session` WHERE hash = ?"
	["params"]=>
	array(1) {
		[1]=> string(26) "123456"
	}
	["types"]=>
	array(1) {
		[1]=> int(2)
	}
  }
["timestamp"] => int(1711987812)

cc @f3l1x

rixafy avatar Apr 01 '24 16:04 rixafy

Yep, I need to rewrite it using middlewares.

f3l1x avatar Apr 01 '24 16:04 f3l1x