sentry-symfony: Fatal error with `doctrine/dbal` 4.x
How do you use Sentry?
Sentry SaaS (sentry.io)
SDK version
3.6.0
Steps to reproduce
Install "sentry/sentry-symfony": "^4.0" along "doctrine/dbal": "^4.0"
Expected result
composer install works with no error
Actual result
composer install (more specifically composer hook script cache:clear) crash with
!!
!! Fatal error: Declaration of Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingStatementForV3::bindValue($param, $value, $type = Doctrine\DBAL\ParameterType::STRING): bool must be compatible with Doctrine\DBAL\Driver\Statement::bindValue(string|int $param, mixed $value, Doctrine\DBAL\ParameterType $type): void in /Users/ddebin/Dropbox (Personal)/Dev/VM/com.refurb-tracker.symfony4/vendor/sentry/sentry-symfony/src/Tracing/Doctrine/DBAL/TracingStatementForV3.php on line 20
!! PHP Fatal error: Declaration of Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingStatementForV3::bindValue($param, $value, $type = Doctrine\DBAL\ParameterType::STRING): bool must be compatible with Doctrine\DBAL\Driver\Statement::bindValue(string|int $param, mixed $value, Doctrine\DBAL\ParameterType $type): void in /Users/ddebin/Dropbox (Personal)/Dev/VM/com.refurb-tracker.symfony4/vendor/sentry/sentry-symfony/src/Tracing/Doctrine/DBAL/TracingStatementForV3.php on line 20
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Reactions: 14
- Comments: 18 (3 by maintainers)
Support for
doctrine/dbalv4.0 was added in 4.14.0.It is being worked on.
We’ll add support for DBAL v4; I can’t give you a timeline at this point.
Unfortunately, since Doctrine is an optional dependency of this package, we don’t require it in
composer.jsonbesides for development purposes, hence we have no way to prevent the installation of an unsupported version. This is one of the reasons for which I strongly believe that:composer.jsonUntil resolved I solved that by going with orm 3.* but constraining dbal.
@ste93cry What about declaring a conflict with the unsupported version, until it is supported?
That would prevent users to use the whole bundle if they use DBAL 4, which is an issue only if you enable tracing.