Skip to content

[DoctrineBundle] Use a full version number in examples with serverVersion #19876

Closed
@nicwortel

Description

@nicwortel

Doctrine DBAL 3.6.0 deprecated incomplete version numbers for the serverVersion value (for example 8 or 8.0 for MySQL):

afbeelding

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:

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    DoctrinehasPRA Pull Request has already been submitted for this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions