gestion composer 1 & 2
This commit is contained in:
parent
a5b6ef51a4
commit
69bbd8b6a3
@ -74,6 +74,9 @@
|
||||
"symfony/polyfill-php56": "*"
|
||||
},
|
||||
"scripts": {
|
||||
"pre-install-cmd": [
|
||||
"php scripts/checkcomposer.php"
|
||||
],
|
||||
"auto-scripts": {
|
||||
"cache:clear": "symfony-cmd",
|
||||
"cache:clear --env=prod": "symfony-cmd",
|
||||
|
13
src/ninegitea-1.0/scripts/checkcomposer.php
Normal file
13
src/ninegitea-1.0/scripts/checkcomposer.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
$requiredVersion = 'version 1'; // La version interdite
|
||||
|
||||
$composerVersion = trim(shell_exec('COMPOSER_ALLOW_SUPERUSER=1 composer --version --no-ansi'));
|
||||
echo $composerVersion."\n";
|
||||
|
||||
if (stripos($composerVersion,$requiredVersion)===false ) {
|
||||
echo "La version de Composer $requiredVersion n'est pas autorisée" . PHP_EOL;
|
||||
echo "Veuillez mettre à jour Composer avec 'composer self-update --1'." . PHP_EOL;
|
||||
echo "Ou executez le scripts/reconfigure.sh" . PHP_EOL;
|
||||
exit(1); // Quitte avec un code d'erreur
|
||||
}
|
@ -28,6 +28,8 @@ fi
|
||||
|
||||
# Installation des dépendances composer
|
||||
echo COMPOSER = Install
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
composer self-update --1 --quiet
|
||||
composer install --quiet
|
||||
|
||||
php bin/console app:AppInit --env=prod
|
||||
|
@ -197,6 +197,20 @@
|
||||
"phpdocumentor/type-resolver": {
|
||||
"version": "1.1.0"
|
||||
},
|
||||
"phpunit/phpunit": {
|
||||
"version": "8.5",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "4.7",
|
||||
"ref": "db276258424d15e572d35a4eb834b8f815662b25"
|
||||
},
|
||||
"files": [
|
||||
".env.test",
|
||||
"phpunit.xml.dist",
|
||||
"tests/bootstrap.php"
|
||||
]
|
||||
},
|
||||
"psr/cache": {
|
||||
"version": "1.0.1"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user