Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Depreciation to fix #188

Closed
bastien70 opened this issue Dec 27, 2021 · 12 comments
Closed

Depreciation to fix #188

bastien70 opened this issue Dec 27, 2021 · 12 comments

Comments

@bastien70
Copy link

bastien70 commented Dec 27, 2021

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.
@dmaicher
Copy link
Owner

Yes I also noticed this deprecation on one of my projects. Unfortunately I don't think there is a way to fix this deprecation.

@morozov maybe you have an idea? I saw you deprecated that interface here.

@morozov
Copy link

morozov commented Dec 27, 2021

@dmaicher what exactly is the problem?

@dmaicher
Copy link
Owner

@morozov this bundle comes with a driver that currently implements Doctrine\DBAL\VersionAwarePlatformDriver. Now that this interface is deprecated: Is there a way to stop implementing this interface and get rid of the reported deprecation? I guess not.

@morozov
Copy link

morozov commented Dec 28, 2021

Right, you have to implement this interface.

@bastien70
Copy link
Author

Does it mean that it will be impossible to update this bundle for Symfony 6 ?

@dmaicher
Copy link
Owner

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.

@dmaicher
Copy link
Owner

Closing as there is nothing we can do here to get rid of the deprecation.

@maks-rafalko
Copy link

maks-rafalko commented Feb 25, 2022

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?

@pjehan
Copy link

pjehan commented Mar 8, 2022

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>

@maks-rafalko
Copy link

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

@wassimbkd
Copy link

upgrading to "dama/doctrine-test-bundle": "v7.2.*" fixed

@fmonts
Copy link
Contributor

fmonts commented Jul 16, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants