Depreciation to fix
bastien70 opened this issue ยท 12 comments
Hello, when launching my tests from Symfony 5.4 (PHP 8.0) app, I've a depreciation :
The "DAMA\DoctrineTestBundle\Doctrine\DBAL\AbstractStaticDriver" class implements "Doctrine\DBAL\VersionAwarePlatformDriver" that is deprecated All drivers will have to be aware of the server version in the next major release.
Right, you have to implement this interface.
Does it mean that it will be impossible to update this bundle for Symfony 6 ?
Does it mean that it will be impossible to update this bundle for Symfony 6 ?
No. The deprecation is coming from doctrine/dbal
. This bundle is compatible with Symfony 6.
Closing as there is nothing we can do here to get rid of the deprecation.
Did anyone find a solution on how to silence this error? (Symfony 6, PHP 8.1)
Or is there "official" recommendation on how to avoid it?
Did anyone find a solution on how to silence this error? (Symfony 6, PHP 8.1)
Or is there "official" recommendation on how to avoid it?
From this StackOverflow thread:
https://stackoverflow.com/questions/35897550/remove-remaining-deprecation-notices-in-symfony-2-8
you can add this lines to the phpunit.xml file:
<php>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
</php>
you can add this lines to the phpunit.xml file:
yes, it works for PHPUnit execution.
However, the same deprecation message is displayed for example when you run:
bin/console doctrine:database:create --env=test
upgrading to "dama/doctrine-test-bundle": "v7.2.*" fixed
upgrading to "dama/doctrine-test-bundle": "v7.2.*" fixed
Unfortunately it doesn't, 7.2.1 still implements VersionAwarePlatformDriver
:
https://github.com/dmaicher/doctrine-test-bundle/blob/v7.2.1/src/DAMA/DoctrineTestBundle/Doctrine/DBAL/VersionAwarePlatformStaticDriver.php#L11C67-L11C104
It was fixed in 629d385 which will be part of 8.0