Skip to content

Conversation

StaffNowa
Copy link

Q A
Type bug
Fixed issues

Summary

  1. Open my own project where I have .env.local mariadb-10.9.3 according documentation https://symfony.com/doc/current/reference/configuration/doctrine.html
  2. composer up
  3. Got validation error "The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue."

No issue on version 3.4.6 only on new 3.5.x version

@StaffNowa
Copy link
Author

Another possible match MariaDB-(\d+.\d+.\d+) and not needed validation of parth 2 :)

@morozov
Copy link
Member

morozov commented Oct 23, 2022

"mariadb-10.9.3" doesn't seem to be a valid MariaDB version.

MariaDB [(none)]> SELECT VERSION();
+---------------------------------------+
| VERSION()                             |
+---------------------------------------+
| 10.9.3-MariaDB-1:10.9.3+maria~ubu2204 |
+---------------------------------------+
1 row in set (0.000 sec)

The valid version passes the test.

@bohanyang
Copy link

bohanyang commented Oct 23, 2022

@morozov What about this, the official doc:

https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#automatic-platform-version-detection

If you are running a MariaDB database, you should prefix the serverVersion with mariadb- (ex: mariadb-10.2.12).

Everyone using this format (which is suggested in the official doc) is forced to change their serverVersion to 10.9.3-MariaDB for things to work.

"mariadb-10.9.3" doesn't seem to be a valid MariaDB version.

What we need is just a version string x[.x[.x]] for comparison.
We should not care it may or may not actually exists, it's real, or fake.

@StaffNowa
Copy link
Author

StaffNowa commented Oct 23, 2022

@morozov After the composer update, I should not research why it does not work anymore. I think a lot of old projects will have the same issue.

@jan-egert
Copy link

jan-egert commented Oct 23, 2022

MySQL 8 detection also not working well after 68576ab#diff-28b47b91b6b91252a7758495476fc8b338019cccae59cbbd67bd0fe6c87529a5 ... using connection string in symfony like mysql://user:password@host:3306/database?serverVersion=8.0&charset=utf8mb4 worked well before commit, now it requires serverVersion=8.0.0 because version_compare('8.0', '8.0.0', '>=') = FALSE

@derrabus
Copy link
Member

Everyone who has commented here: Can you please verify that updating DBAL to "~3.5.1@dev" in your composer.json fixes the regression for you?

@StaffNowa
Copy link
Author

StaffNowa commented Oct 24, 2022

Everyone who has commented here: Can you please verify that updating DBAL to "~3.5.1@dev" in your composer.json fixes the regression for you?

mariadb-10.9.3 success no any errors anymore

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants