You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My application collects data not only from MariaDB, but also from ElasticSearch, Drupal (via GraphQL), Microsoft Dynamics CRM and Microsoft PowerAutomate.
Debugbar's query logs are incredible helpful, so I integrated all the adapters into Debugbar's "queries" tab by logging queries by dispatching \Illuminate\Database\Events\QueryExecuted objects. I only needed a small dummy connection class that returned the database and driver names for that to work:
Now I'm upgrading from Laravel 8 to 9, and with it laravel-debugbar from v3.7.0 to v3.14.10, and I am seeing javascript errors in the debugbar code:
data.statements is undefined
The reason is that an exception happens during debugbar processing:
Debugbar exception: Database connection [graphql] not configured.
While previously the connection's name was simply taken from $query['connection'] in QueryCollector::collect(), it asks Laravel's DatabaseManager for the connection and gets its name from there since commit ed37d1a.
This requires me to configure and register the connection within laravel's database management code, which is pretty complex.
I'd like to see that the code is changed, so that the connection name is taken from the connection object that's provided by the query.
The text was updated successfully, but these errors were encountered:
cweiske
added a commit
to mogic-le/laravel-debugbar
that referenced
this issue
Apr 9, 2025
Instead directly use the query's own connection object.
This makes it possible to log queries for custom non-sql connections
into debugbar relatively easily.
Related: ed37d1a
This commit introduced the usage of DB::connection().
Resolves: barryvdh#1778
Instead directly use the query's own connection object.
This makes it possible to log queries for custom non-sql connections
into debugbar relatively easily.
Related: ed37d1a
This commit introduced the usage of DB::connection().
Resolves: barryvdh#1778
My application collects data not only from MariaDB, but also from ElasticSearch, Drupal (via GraphQL), Microsoft Dynamics CRM and Microsoft PowerAutomate.

Debugbar's query logs are incredible helpful, so I integrated all the adapters into Debugbar's "queries" tab by logging queries by dispatching
\Illuminate\Database\Events\QueryExecuted
objects. I only needed a small dummy connection class that returned the database and driver names for that to work:Now I'm upgrading from Laravel 8 to 9, and with it
laravel-debugbar
from v3.7.0 to v3.14.10, and I am seeing javascript errors in the debugbar code:The reason is that an exception happens during debugbar processing:
While previously the connection's name was simply taken from
$query['connection']
inQueryCollector::collect()
, it asks Laravel's DatabaseManager for the connection and gets its name from there since commit ed37d1a.This requires me to configure and register the connection within laravel's database management code, which is pretty complex.
I'd like to see that the code is changed, so that the connection name is taken from the connection object that's provided by the query.
The text was updated successfully, but these errors were encountered: