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

[Feature Request]: Upgrading doctrine/dbal Connection handling #259

Open
sven-ahrens opened this issue Jan 23, 2024 · 5 comments
Open

[Feature Request]: Upgrading doctrine/dbal Connection handling #259

sven-ahrens opened this issue Jan 23, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@sven-ahrens
Copy link
Contributor

Is your feature request related to a problem? Please describe.

When I use this package and run my tests, I'm getting mutliple deprecation messages by the package: doctrine/dbal

34x: Subscribing to onSchemaCreateTable events is deprecated. (AbstractPlatform.php:2145 called by AbstractPlatform.php:2064, doctrine/dbal#5784, package doctrine/dbal)

1x: Not configuring a schema manager factory is deprecated. Use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory which is going to be the default in DBAL 4. (Connection.php:221 called by DriverManager.php:197, doctrine/dbal#5812, package doctrine/dbal)

1x: Public access to Connection::connect() is deprecated. (Connection.php:366 called by ORMDatabaseTool.php:180, doctrine/dbal#4966, package doctrine/dbal)

1x: Connection::getSchemaManager() is deprecated, use Connection::createSchemaManager() instead. (Connection.php:1697 called by ORMDatabaseTool.php:182, doctrine/dbal#4515, package doctrine/dbal)

This only ocurrs when I use stuff made by this package like:

$databaseTool = static::getContainer()->get(DatabaseToolCollection::class)->get();

        $databaseTool->loadAliceFixture(

Describe alternatives you've considered

Additional context

  • Symfony Version: 7.0.*
  • liip/test-fixtures-bundle: 2.7.2
  • liip/functional-test-bundle: 4.11.0
  • PHPUnit: 9.5
  • doctrine/doctrine-bundle 2.11
  • PHP Version 8.3
  • MariaDB: 10.6.16

Hope this helps as additional context.

The test itself did nothing in this case. I purged everything and just run the code like I mentioned above and then got those deprecation messages.

@sven-ahrens sven-ahrens added the enhancement New feature or request label Jan 23, 2024
@alexislefebvre
Copy link
Collaborator

Thanks for the report.

Would you be able to open a PR?

@sven-ahrens
Copy link
Contributor Author

Thanks for the report.

Would you be able to open a PR?

I'm new to Symfony and this package, but I'm willing to give it a shot this weekend. :)

@Chris53897
Copy link
Contributor

My solution in another PR is like this.
But of course a PR should support multiple versions of doctrine/dbal

$tmpConnection = DriverManager::getConnection($params);

@Chris53897
Copy link
Contributor

@sven-ahrens Can this be closed as implemented? https://github.com/liip/LiipTestFixturesBundle/releases/tag/2.7.3

@PromedPromed
Copy link

Still an issue with liip/test-fixtures-bundle 2.9.0.

  • Subscribing to onSchemaCreateTable events is deprecated. (AbstractPlatform.php:2145 called by AbstractPlatform.php:2064, https://github.com/doctrine/dbal/issues/5784, package doctrine/dbal)
  • Not configuring a schema manager factory is deprecated. Use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory which is going to be the default in DBAL 4. (Connection.php:221 called by DriverManager.php:197, https://github.com/doctrine/dbal/issues/5812, package doctrine/dbal)

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

No branches or pull requests

4 participants