platformsh / symfonyflex-bridge

Bridge library for running Symfony Flex on Platform.sh
MIT License
30 stars 15 forks source link

Issue with using mariadb:10.4 #29

Closed andrerom closed 4 years ago

andrerom commented 5 years ago

Had this issue on MariaDB 10.4:

console.ERROR: Error thrown while running command "--env=prod doctrine:database:create --if-not-exists". Message: "Invalid platform version "mariadb-10.4" specified. The platform version has to be specified in the format: "^(?:5.5.5-)?(mariadb-)?.."." {"exception":"[object] (Doctrine\DBAL\DBALException(code: 0): Invalid platform version \"mariadb-10.4\" specified. The platform version has to be specified in the format: \"^(?:5\.5\.5-)?(mariadb-)?..\". at /app/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:76)","command":"--env=prod doctrine:database:create --if-not-exists","message":"Invalid platform version \"mariadb-10.4\" specified. The platform version has to be specified in the format: \"^(?:5\.5\.5-)?(mariadb-)?..\"."} []

DBAL Source: https://github.com/doctrine/dbal/blob/2.9/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php#L173-L187

So by looks of the code here I guess it's also the case if using 10.0, 10.1 and 10.3 with symfonyflex-bridge, ref: https://github.com/platformsh/symfonyflex-bridge/blob/master/platformsh-flex-env.php#L124-L141

Proposal

  1. Seems like Doctrine is expecting the string to always contain patch version.
  2. A. Besides the special case for 10.2, should we always default to add 0 as patch version? B. Or is there some way to get full version from platform.sh relation?