mirror of
https://github.com/slawkens/myaac.git
synced 2026-04-25 11:53:31 +02:00
feat: debugbar backtrace (#360)
* feat: debugbar backtrace * chore(copilot): cleanup stmt reference Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: ignoring debug namespace --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
26
system/src/Debug/TraceablePDOWithBacktrace.php
Normal file
26
system/src/Debug/TraceablePDOWithBacktrace.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace MyAAC\Debug;
|
||||
|
||||
use DebugBar\DataCollector\PDO\TraceablePDO;
|
||||
use DebugBar\DataCollector\PDO\TracedStatement;
|
||||
|
||||
class TraceablePDOWithBacktrace extends TraceablePDO
|
||||
{
|
||||
/** @var array[] */
|
||||
protected array $backtraces = [];
|
||||
|
||||
public function addExecutedStatement(TracedStatement $stmt): void
|
||||
{
|
||||
$this->backtraces[] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
|
||||
parent::addExecutedStatement($stmt);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array[]
|
||||
*/
|
||||
public function getBacktraces(): array
|
||||
{
|
||||
return $this->backtraces;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user