Description
Doctrine DBAL 3.6.0 deprecated incomplete version numbers for the serverVersion
value (for example 8
or 8.0
for MySQL):
While the deprecation warnings are no longer there in DBAL 4, the DBAL documentation (updated in doctrine/dbal#5971) states that serverVersion
should contain a full version number:
Please specify the full server version as the database server would report it. This is especially important for MySQL and MariaDB where the full version string is taken into account when determining the platform.
This is also supported by the UPGRADE.md:
The
serverVersion
connection parameter must consist of 3 numbers:-'serverVersion' => '8.0' +'serverVersion' => '8.0.31'
However, most of the Symfony documentation I found still contains examples which configure the DATABASE_URL
like this:
DATABASE_URL="mysql://db_user:[email protected]:3306/db_name?serverVersion=5.7"
...which seems to conflict with the Doctrine DBAL documentation.
For example:
- https://symfony.com/doc/current/doctrine.html#configuring-the-database
- https://symfony.com/doc/current/doctrine/dbal.html
- https://symfony.com/doc/current/reference/configuration/doctrine.html#doctrine-dbal-configuration
Should we update these examples to contain a full version number? It seems like the more recent Flex recipes for DoctrineBundle are already using full version numbers, compared to the older recipes.
I'm happy to send a PR, but I wanted to discuss this in an issue before submitting a PR.
This could be related to the following issues / PRs: