-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Clean up MySQL version detection logic #5779
Clean up MySQL version detection logic #5779
Conversation
@morozov is it intentional that |
No but those don't seem to be valid versions. |
This commit introduces a huge bug: #5794 |
We used In doctrine/dbal
Are you open to pull requets to fix the behavior for |
Can you replace |
Yes, but every user would now have to alter the existing settings then.
Yes, that is why we explicitly store the version in the connection settings to avoid this unnecessary connection in production. (and because of other issues too) |
I'm sorry that it causes extra work on your end but your connection configuration is invalid and you need to fix it. |
So a pull request to support
In this case updating the documentation might help others to avoid this issue in the future, by specifying that a specific format needs to be used here. As previously ordinary version strings were supported, I think supporting them at least until version 4.0.0 would be very helpful to many users. The docs even mention the version |
We should keep the compatibility. |
No, given my current understanding of the problem.
This documentation focuses on supported platforms, not the connection configuration. |
I think I’m not fully understanding this so far. |
I don't want to annoy anyone but couldn't this simply be solved by comparing against the literal - version_compare($version, '8.0.0', '>=')
+ version_compare($version, '8', '>=') Unfortunately this change leads to a lot of trouble on our side if left as is. Would you be open for a PR @morozov? |
This also affected me today. My Oracle MySQL but now is taken as a version < Also note that the docs referenced above (https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/platforms.html#mysql) only mention MySQLPlatform for >= 5.7.9 where it should be MySQLPlatform / 5.7.0 - 5.7.8 and MySQL57Platform / 5.7.9+ |
That's because those are the docs for v4.0 (that's what latest refers to). |
Reverted in #5795. Everyone who has commented here: Can you please verify that updating DBAL to |
Can confirm that |
|
The logic of MySQL or MariaDB version detection is unnecessarily complicated:
version_compare()
is sufficient.