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

4.9.0 version doesn't load the correct DBAL Platform #730

Closed
jdecool opened this issue Jun 16, 2023 · 6 comments · Fixed by #731
Closed

4.9.0 version doesn't load the correct DBAL Platform #730

jdecool opened this issue Jun 16, 2023 · 6 comments · Fixed by #731

Comments

@jdecool
Copy link
Contributor

jdecool commented Jun 16, 2023

Environment

  • PHP 8.1.20
  • Symfony 5.4
  • DBAL 3.6.3 / ORM 2.14.3
  • Sentry Symfony 4.9.0

Steps to Reproduce

On a project I work, I've updated sentry/sentry-symfony from 4.8.0 to 4.9.0.

After the update I've this exception when trying to interact with the database:

In AbstractPlatform.php line 441:
                                                                               
  Unknown database type json requested, Doctrine\DBAL\Platforms\MySQLPlatform  
   may not support it.  

It seems that #723 change the AbstractPlaform loaded instance.
In my configuration I specify the serverVersion in the Doctrine DSN.

With the 4.8.0 I've the Doctrine\DBAL\Platforms\MySQL80Platform which is loaded whereas when I update dependency to 4.9.0 load Doctrine\DBAL\Platforms\MySQLPlatform which not implement the json type mapping.

@jdecool jdecool changed the title 4.9.0 release doesn't load the correct DBAL Platform 4.9.0 version doesn't load the correct DBAL Platform Jun 16, 2023
@ste93cry
Copy link
Collaborator

I bet the problem is that we're not implementing the createDatabasePlatformForVersion() method in the driver's class. As the fix seems rather easy, would you mind opening a PR?

@jdecool
Copy link
Contributor Author

jdecool commented Jun 16, 2023

Sure.

I've test and it fix the bug.

I'm going to create the PR.

@jdecool
Copy link
Contributor Author

jdecool commented Jun 16, 2023

I've just created #731

@kov-lucas
Copy link

I think this is also breaking the bin/console doctrine:migrations:diff command, this is the only dependency that i've recently updated and now it is completely broken, i had to roll it back to 4.8.0

@cleptric
Copy link
Member

Version 4.9.1 was released which contains a fix for this issue.

@jdecool
Copy link
Contributor Author

jdecool commented Jun 19, 2023

Thanks 🙏🏼

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

Successfully merging a pull request may close this issue.

4 participants