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
After upgrading Symfony and Sentry ("sentry/sentry-symfony": "^4.3.0") I got the message that I needed to also upgrade doctrine/dbal ("doctrine/dbal": "^2.13.9",) , which then subsequently broke my use of MySQLMutex.
<b>Fatal error</b>: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Argument 1
passed to malkusch\lock\mutex\MySQLMutex::__construct() must be an instance of PDO, instance of
Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingServerInfoAwareDriverConnection given, called in
/var/www/html/src/ApiBundle/Controller/Invoicing/InvoiceController.php on line 533 in
/var/www/html/vendor/malkusch/lock/classes/mutex/MySQLMutex.php:27
The MySQLMutex class only expects an instance of PDO to be provided, and in my case this is actually an instance of the Doctrine\DBAL\Connection interface with the updated Sentry package.
I think you should just call \Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingServerInfoAwareDriverConnection::getNativeConnection or \Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingServerInfoAwareDriverConnection::getWrappedConnection again on the object until you get the PDO object. Can you give it a shot?
After upgrading Symfony and Sentry (
"sentry/sentry-symfony": "^4.3.0"
) I got the message that I needed to also upgradedoctrine/dbal
("doctrine/dbal": "^2.13.9",
) , which then subsequently broke my use ofMySQLMutex
.The
MySQLMutex
class only expects an instance ofPDO
to be provided, and in my case this is actually an instance of theDoctrine\DBAL\Connection
interface with the updated Sentry package.A solution would be to adapt the package so that the MySQLMutex class accepts both an instance of
PDO
andDoctrine\DBAL\Connection
.Might make a PR for this in the coming week.
The text was updated successfully, but these errors were encountered: