liip / liip/LiipTestFixturesBundle

[Feature Request]: Upgrading doctrine/dbal Connection handling

Open
#259 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
178
Forks
48
PR merge metrics
No merged PRs in 30d

Description

### 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, https://github.com/doctrine/dbal/issues/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, https://github.com/doctrine/dbal/issues/5812, package doctrine/dbal)

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

> 1x: Connection::getSchemaManager() is deprecated, use Connection::createSchemaManager() instead. (Connection.php:1697 called by ORMDatabaseTool.php:182, https://github.com/doctrine/dbal/issues/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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the deprecations with DatabaseToolCollection::get() and loadAliceFixture(), then inspect the call sites named in the report: Connection.php, DriverManager.php, AbstractPlatform.php, and ORMDatabaseTool.php. Check how the bundle configures Doctrine DBAL and verify that the listed deprecations no longer appear with Symfony 7, DBAL, and doctrine/doctrine-bundle versions supported by the project.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
databases, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.