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

feat: add support for dbal 4 #299

Open
wants to merge 3 commits into
base: 2.x
Choose a base branch
from

Conversation

Chris53897
Copy link
Contributor

#298

Maybe the only problem is this change.
https://github.com/doctrine/dbal/blob/4.0.x/UPGRADE.md#bc-break-renamed-sqlite-platform-classes

TODO: I know there must be a bc layer for dbal < 4

composer.json Outdated Show resolved Hide resolved
Co-authored-by: Alexis Lefebvre <alexislefebvre@gmail.com>
@Chris53897
Copy link
Contributor Author

Solving #300 would help development.

@alexislefebvre
Copy link
Collaborator

alexislefebvre commented Apr 14, 2024

On the 3.x branch, with doctrine/dbal 4, this line is not working:

$databaseTool = $this->items[$registry->getName()][$driverName] ?? $this->items[$registry->getName()]['default'];

$this->items[$registry->getName()][$driverName] is evaluated as false, null or whatever and it switch to the statement after ??.

Update: you found the issue: DatabaseToolCollection registers an item with key Doctrine\DBAL\Platforms\SqlitePlatform then later the key Doctrine\DBAL\Platforms\SQLitePlatform is searched.

@alexislefebvre
Copy link
Collaborator

Please check this:

Feel free to backport it to the 2.x branch.

@alexislefebvre
Copy link
Collaborator

alexislefebvre commented May 4, 2024

Tests were OK on local environment but not on CI, because the versions of databases used on GitHub Actions were outdated: bf29b7d

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

Successfully merging this pull request may close these issues.

None yet

3 participants