Compare commits
5 Commits
pkg/stable
...
master
Author | SHA1 | Date | |
---|---|---|---|
a3f54b2f11 | |||
386d639151 | |||
a2899ee93b | |||
efe978130c | |||
9c752523b4 |
@@ -6,8 +6,10 @@
|
||||
|
||||
<containers>
|
||||
<container name='web'>
|
||||
<package>schedule-apps</package>
|
||||
|
||||
<!--
|
||||
<package>schedule-apps</package>
|
||||
-->
|
||||
|
||||
<!-- service de configuration apache -->
|
||||
<service method="apache" servicelist="schedule">schedule</service>
|
||||
|
||||
|
@@ -51,7 +51,10 @@
|
||||
"preferred-install": {
|
||||
"*": "dist"
|
||||
},
|
||||
"sort-packages": true
|
||||
"sort-packages": true,
|
||||
"allow-plugins": {
|
||||
"symfony/flex": true
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@@ -72,6 +75,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/schedule-2.0/scripts/checkcomposer.php
Normal file
13
src/schedule-2.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
|
||||
}
|
@@ -6,12 +6,13 @@ cd /var/www/html/schedule
|
||||
. scripts/proxy.sh
|
||||
|
||||
# Mise en place du fichier d'environnement model
|
||||
if [ ! -f /var/www/html/schedule/.env ]; then
|
||||
mv /var/www/html/schedule/scripts/.env.model /var/www/html/schedule/.env
|
||||
fi
|
||||
yes 2>/dev/null | cp /var/www/html/schedule/scripts/.env.model $DIR/.env
|
||||
|
||||
# Installation des dépendances composer
|
||||
composer install
|
||||
echo COMPOSER = Install
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
composer self-update --1 --quiet
|
||||
composer install --quiet
|
||||
|
||||
php bin/console app:AppInit --env=prod
|
||||
php bin/console app:CronInit --env=prod
|
||||
|
@@ -64,14 +64,10 @@ class RestController extends AbstractFOSRestController
|
||||
}
|
||||
|
||||
// On formate le tableau de jour
|
||||
$mini=new \Datetime('2022-03-07 00:00');
|
||||
$start=new \Datetime('00:00');
|
||||
$start->modify("monday this week");
|
||||
$start=new \Datetime('2022-03-07 00:00');
|
||||
$end=new \Datetime('00:00');
|
||||
$end->modify("last day of this month");
|
||||
$end->modify("next sunday");
|
||||
$start->modify("previous month");
|
||||
if($start<$mini) $start=clone $mini;
|
||||
|
||||
$events = $em
|
||||
->createQueryBuilder('event')
|
||||
|
@@ -227,6 +227,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"
|
||||
},
|
||||
|
Reference in New Issue
Block a user