Commit d374478c authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Merge branch 'develop'

parents 5dac33b6 d2e8f398
Pipeline #5222 failed with stage
in 9 seconds
......@@ -3,7 +3,7 @@
## Build et lancement du container Docker
$ docker-compose up --build -d
$ docker-compose up --build
## Installation des dépendances PHP :
......@@ -33,15 +33,13 @@ cp vendor/unicaen/app/config/unicaen-app.global.php.dist config/autoload/unica
cp vendor/unicaen/app/config/unicaen-app.local.php.dist config/autoload/unicaen-app.local.php
cp vendor/unicaen/auth/config/unicaen-auth.global.php.dist config/autoload/unicaen-auth.global.php
cp vendor/unicaen/auth/config/unicaen-auth.local.php.dist config/autoload/unicaen-auth.local.php
cp vendor/unicaen/code/config/unicaen-code.global.php.dist config/autoload/unicaen-code.global.php
```
- Le cas échéant, reportez-vous aux docs des modules concernés pour adapter ces fichiers de configuration à vos besoins :
- [unicaen/app](https://git.unicaen.fr/lib/unicaen/app)
- [unicaen/auth](https://git.unicaen.fr/lib/unicaen/auth)
- [unicaen/code](https://git.unicaen.fr/lib/unicaen/code)
## Test de l'application
Théoriquement, l'application devrait être accessible à l'adresse [https://localhost:8843](https://localhost:8843).
Théoriquement, l'application devrait être accessible à l'adresse [https://localhost:8443](https://localhost:8443).
Le port utilisé dépend des redirections configurées dans le fichier [docker-compose.yml](docker-compose.yml).
# check-compat
Tester la compatibilité des bibliothèques `unicaen/*` avec une version précise de PHP.
## PHP 7.0
```bash
docker run \
--rm \
-v ${PWD}:/app \
--workdir /app \
unicaen-dev-php7.0-apache \
./bin/check-compat.sh 7.0
```
## PHP 7.1
```bash
docker run \
--rm \
-v ${PWD}:/app \
--workdir /app \
unicaen-dev-php7.0-apache \
./bin/check-compat.sh 7.1
```
## PHP 7.2
```bash
docker run \
--rm \
-v ${PWD}:/app \
--workdir /app \
unicaen-dev-php7.0-apache \
./bin/check-compat.sh 7.2
```
## PHP 7.3
```bash
docker run \
--rm \
-v ${PWD}:/app \
--workdir /app \
unicaen-dev-php7.0-apache \
./bin/check-compat.sh 7.3
```
#!/usr/bin/env bash
[[ -z $1 ]] && echo "Veuillez spécifier les versions de PHP désirées (ex: 7.1 7.2 7.3)." && exit 1
DIR=$(cd `dirname $0` && pwd)
DIRNAME=$(basename ${DIR})
cd ${DIR}/..
versions=$1
phpcs="./vendor/bin/phpcs"
libdir="./vendor/unicaen"
outdir="./${DIRNAME}/reports"
mkdir -p ${outdir} #&& rm -rf ${outdir}/*
for path in ${libdir}/*
do
dirname=$(basename -- "$path")
for ver in "$1"
do
reportpath="${outdir}/compat-unicaen-${dirname}-${ver}.txt"
echo "Processing '${path}' against PHP version ${ver}"
echo "=> reporting into '${reportpath}'"
${phpcs} \
-p \
--standard=PHPCompatibility \
--runtime-set testVersion ${ver} \
--report-full=${reportpath} \
${path}
done
done
#!/usr/bin/env bash
DIR=$(cd `dirname $0` && pwd)
cd ${DIR}/..
v=7.0 ; docker build --rm -t skeleton-app-${v} -f Dockerfile-${v} .
v=7.0 ; docker rm -f skeleton-app-${v}-container
v=7.0 ; docker run -d -p 8070:80 -p 8470:443 -v ${PWD}/composer.json:/app/composer.json -v ${PWD}/.phan:/app/.phan --name skeleton-app-${v}-container skeleton-app-${v}
v=7.0 ; docker exec skeleton-app-${v}-container composer update --no-suggest --optimize-autoloader
v=7.1 ; docker build --rm -t skeleton-app-${v} -f Dockerfile-${v} .
v=7.1 ; docker rm -f skeleton-app-${v}-container
v=7.1 ; docker run -d -p 8071:80 -p 8471:443 -v ${PWD}/composer.json:/app/composer.json -v ${PWD}/.phan:/app/.phan --name skeleton-app-${v}-container skeleton-app-7.1
v=7.1 ; docker exec skeleton-app-${v}-container composer update --no-suggest --optimize-autoloader
v=7.2 ; docker build --rm -t skeleton-app-${v} -f Dockerfile-${v} .
v=7.2 ; docker rm -f skeleton-app-${v}-container
v=7.2 ; docker run -d -p 8072:80 -p 8472:443 -v ${PWD}/composer.json:/app/composer.json -v ${PWD}/.phan:/app/.phan --name skeleton-app-${v}-container skeleton-app-${v}
v=7.2 ; docker exec skeleton-app-${v}-container composer update --no-suggest --optimize-autoloader
v=7.3 ; docker build --rm -t skeleton-app-${v} -f Dockerfile-${v} .
v=7.3 ; docker rm -f skeleton-app-${v}-container
v=7.3 ; docker run -d -p 8073:80 -p 8473:443 -v ${PWD}/composer.json:/app/composer.json -v ${PWD}/.phan:/app/.phan --name skeleton-app-${v}-container skeleton-app-${v}
v=7.3 ; docker exec skeleton-app-${v}-container composer update --no-suggest --optimize-autoloader
# analyse des modules unicaen/* :
# v=7.0 ; docker exec skeleton-app-$v-container vendor/bin/phan --config-file .phan/config-unicaen.php --target-php-version $v > /tmp/phan-unicaen-$v.log
# v=7.1 ; docker exec skeleton-app-$v-container vendor/bin/phan --config-file .phan/config-unicaen.php --target-php-version $v > /tmp/phan-unicaen-$v.log
# v=7.2 ; docker exec skeleton-app-$v-container vendor/bin/phan --config-file .phan/config-unicaen.php --target-php-version $v > /tmp/phan-unicaen-$v.log
# v=7.3 ; docker exec skeleton-app-$v-container vendor/bin/phan --config-file .phan/config-unicaen.php --target-php-version $v > /tmp/phan-unicaen-$v.log
# analyse des vendors :
# v=7.0 ; docker exec skeleton-app-$v-container vendor/bin/phan --config-file .phan/config-vendor.php --target-php-version $v > /tmp/phan-vendor-$v.log
# v=7.1 ; docker exec skeleton-app-$v-container vendor/bin/phan --config-file .phan/config-vendor.php --target-php-version $v > /tmp/phan-vendor-$v.log
# v=7.2 ; docker exec skeleton-app-$v-container vendor/bin/phan --config-file .phan/config-vendor.php --target-php-version $v > /tmp/phan-vendor-$v.log
# v=7.3 ; docker exec skeleton-app-$v-container vendor/bin/phan --config-file .phan/config-vendor.php --target-php-version $v > /tmp/phan-vendor-$v.log
#!/usr/bin/env bash
[[ -z $1 ]] && echo "Veuillez spécifier la version de PHP désirée (ex: 7.1)." && exit 1
DIR=$(cd `dirname $0` && pwd)
DIRNAME=$(basename ${DIR})
cd ${DIR}/..
version=$1
# conversion de la version spécifiée au format PHP_VERSION_ID, ex: "7.2" devien "70200"
a=(${version//./ })
PHP_VERSION_ID=$((a[0]*10000+a[1]*100+a[2]))
phpcs="./vendor/bin/phpcs"
libdir="./vendor/unicaen"
outdir="./${DIRNAME}/reports"
mkdir -p ${outdir} #&& rm -rf ${outdir}/*
for path in ${libdir}/*
do
dirname=$(basename -- "$path")
reportpath="${outdir}/phpcs-unicaen-${dirname}-${version}.txt"
echo "Processing '${path}' against PHP version ${version} (PHP_VERSION_ID=${PHP_VERSION_ID})"
echo "=> reporting into '${reportpath}'"
${phpcs} \
-p \
--standard=ruleset.xml \
--runtime-set php_version ${PHP_VERSION_ID} \
--report-full=${reportpath} \
${path}
done
This diff is collapsed.
......@@ -28,6 +28,22 @@ $settings = [
'enabled' => false,
],
/**
* Configuration de l'authentification Shibboleth.
*/
'shibboleth' => [
/**
* Affichage ou non du formulaire d'authentification via l'annuaire LDAP.
* NB: en réalité cela permet aussi l'authentification avec un compte local.
*/
'enable' => false,
/**
* URL de déconnexion.
*/
'logout_url' => '/Shibboleth.sso/Logout?return=', // NB: '?return=' semble obligatoire!
],
/**
* Flag indiquant si l'utilisateur authenitifié avec succès via l'annuaire LDAP doit
* être enregistré/mis à jour dans la table des utilisateurs de l'appli.
......
......@@ -7,10 +7,10 @@ services:
build:
context: .
args:
PHP_VERSION: 7.0
PHP_VERSION: 7.3
ports:
- "8880:80"
- "8843:443"
- "8080:80"
- "8443:443"
volumes:
- .:/app
working_dir: /app
#!/usr/bin/env bash
[[ -z $1 ]] && echo "Veuillez spécifier le message de commit en argument, svp." && exit 1
cd vendor/unicaen/app
echo "############## app ################" ; cd ../app && git add . && git commit -m "$1" ; git push ; \
echo "############## auth ################" ; cd ../auth && git add . && git commit -m "$1" ; git push ; \
echo "############## bjy-authorize ################" ; cd ../bjy-authorize && git add . && git commit -m "$1" ; git push ; \
echo "############## faq ################" ; cd ../faq && git add . && git commit -m "$1" ; git push ; \
echo "############## import ################" ; cd ../import && git add . && git commit -m "$1" ; git push ; \
echo "############## ldap ################" ; cd ../ldap && git add . && git commit -m "$1" ; git push ; \
echo "############## leocarte ################" ; cd ../leocarte && git add . && git commit -m "$1" ; git push ;
#!/usr/bin/env bash
cd vendor/unicaen/app
echo "" ; echo "####### app ###########" ; cd ../app && git status -s ; \
echo "" ; echo "####### auth ##########" ; cd ../auth && git status -s ; \
echo "" ; echo "####### bjy-authorize ##########" ; cd ../bjy-authorize && git status -s ; \
echo "" ; echo "####### faq ##########" ; cd ../faq && git status -s ; \
echo "" ; echo "####### import ##########" ; cd ../import && git status -s ; \
echo "" ; echo "####### ldap ##########" ; cd ../ldap && git status -s ; \
echo "" ; echo "####### leocarte ##########" ; cd ../leocarte && git status -s ;
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php" colors="true">
<testsuites>
<testsuite name="app">
<directory>vendor/unicaen/app/tests/UnicaenAppTest</directory>
<!--<directory>vendor/unicaen/app/tests/UnicaenAppTest/Controller</directory>-->
<!--<directory>vendor/unicaen/app/tests/UnicaenAppTest/Entity</directory>-->
<!--<directory>vendor/unicaen/app/tests/UnicaenAppTest/Exporter</directory>-->
<!--<directory>vendor/unicaen/app/tests/UnicaenAppTest/Form</directory>-->
<!--NOK <directory>vendor/unicaen/app/tests/UnicaenAppTest/Mapper</directory>-->
<!--<directory>vendor/unicaen/app/tests/UnicaenAppTest/Message</directory>-->
<!--<directory>vendor/unicaen/app/tests/UnicaenAppTest/Options</directory>-->
<!--NOK <directory>vendor/unicaen/app/tests/UnicaenAppTest/Service</directory>-->
<!--NOK<directory>vendor/unicaen/app/tests/UnicaenAppTest/Session</directory>-->
<!--<directory>vendor/unicaen/app/tests/UnicaenAppTest/Test</directory>-->
<!--<directory>vendor/unicaen/app/tests/UnicaenAppTest/Validator</directory>-->
<!--NOK<directory>vendor/unicaen/app/tests/UnicaenAppTest/View</directory>-->
</testsuite>
</testsuites>
</phpunit>
unicaen/
\ No newline at end of file
<?xml version="1.0"?>
<ruleset name="unicaen-skeleton-application">
<!-- relative path from PHPCS source location -->
<config name="installed_paths" value="vendor/slevomat/coding-standard"/>
<!-- specific sniffs to include -->
<rule ref="vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/TypeHints/DeclareStrictTypesSniff.php" />
</ruleset>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment