Fix version variables in Contao recipe #3735
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes default values of config variables
contao_version
andsymfony_version
.Context:
When installed, Contao overrides output of Symfony's console command
bin/console --version
, so that it returns Contao's version instead of Symfony's. The only way the get Symfony's version in this case is to runbin/console about
.In addition,
bin/console contao:version
command is deprecated since Contao 4.13 (current LTS), and no longer works in Contao 5.2 (current latest). Thus, in Contao 4.13 bothconsole --version
andconsole contao:version
show Contao's version and neither of them shows Symfony's. In Contao 5.2,console --version
shows Contao's version, andconsole contao:version
fails.This PR fixes it by parsing output of
bin/console --version
intocontao_version
variable, andbin/console about
– intosymfony_version
. The fix works for both Contao 4.13 and Contao 5.2 versions. The parsing is done in the same way as in the bare Symfony's recipe:deployer/recipe/symfony.php
Lines 8 to 12 in a0a21e2