Skip to content
Snippets Groups Projects
Commit 6eebac8a authored by jurgenhaas's avatar jurgenhaas
Browse files

#26 Check for correct PHP version when starting the L3D container

parent 491ca670
No related branches found
No related tags found
No related merge requests found
......@@ -189,6 +189,13 @@ function initialSetup {
}
readEnv
# Validate PHP version
INSTALLED_PHP_VERSION=$(php -r "echo(substr(phpversion(),0,3));")
if [[ "$INSTALLED_PHP_VERSION" != "$PHP_VERSION" ]]; then
echo -e "\\033[31m" ============================================= "\\033[0m"
echo -e "\\033[31m" ERROR: PHP $INSTALLED_PHP_VERSION installed but $PHP_VERSION expected !!! "\\033[0m"
echo -e "\\033[31m" ============================================= "\\033[0m"
fi
if [[ "$COMPOSER_DOWNGRADE" == "1" ]]; then
composer self-update --1
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment