clockwork icon indicating copy to clipboard operation
clockwork copied to clipboard

Compatibility with Doctrine DBAL 3

Open DominicDetta opened this issue 1 year ago • 1 comments

With Doctrine DBAL 3.0.0 the current DBALDataSource does not work because the method LoggerChain::addLogger has been removed and the class SQLLogger is deprecated. The new way to implement logging is using Middleware.

The error obtained:

Fatal error: Uncaught Error: Call to undefined method Doctrine\DBAL\Logging\LoggerChain::addLogger() in /var/www/html/vendor/itsgoingd/clockwork/Clockwork/DataSource/DBALDataSource.php:39

I will try to create a working example in my project and create a PR if possible

DominicDetta avatar Feb 09 '24 10:02 DominicDetta

This error appears only if there is already a SQLLogger configured

DominicDetta avatar Feb 09 '24 13:02 DominicDetta