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
......@@ -4,20 +4,20 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "dfe92bb550e5262b0f3b07f17b99964a",
"content-hash": "472fe5bd83d98e8ce14043b863c18ace",
"packages": [
{
"name": "beberlei/assert",
"version": "v2.9.6",
"version": "v2.9.9",
"source": {
"type": "git",
"url": "https://github.com/beberlei/assert.git",
"reference": "ec9e4cf0b63890edce844ee3922e2b95a526e936"
"reference": "124317de301b7c91d5fce34c98bba2c6925bec95"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/beberlei/assert/zipball/ec9e4cf0b63890edce844ee3922e2b95a526e936",
"reference": "ec9e4cf0b63890edce844ee3922e2b95a526e936",
"url": "https://api.github.com/repos/beberlei/assert/zipball/124317de301b7c91d5fce34c98bba2c6925bec95",
"reference": "124317de301b7c91d5fce34c98bba2c6925bec95",
"shasum": ""
},
"require": {
......@@ -59,7 +59,7 @@
"assertion",
"validation"
],
"time": "2018-06-11T17:15:25+00:00"
"time": "2019-05-28T15:27:37+00:00"
},
{
"name": "container-interop/container-interop",
......@@ -94,16 +94,16 @@
},
{
"name": "doctrine/annotations",
"version": "v1.6.1",
"version": "v1.7.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/annotations.git",
"reference": "53120e0eb10355388d6ccbe462f1fea34ddadb24"
"reference": "fa4c4e861e809d6a1103bd620cce63ed91aedfeb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/annotations/zipball/53120e0eb10355388d6ccbe462f1fea34ddadb24",
"reference": "53120e0eb10355388d6ccbe462f1fea34ddadb24",
"url": "https://api.github.com/repos/doctrine/annotations/zipball/fa4c4e861e809d6a1103bd620cce63ed91aedfeb",
"reference": "fa4c4e861e809d6a1103bd620cce63ed91aedfeb",
"shasum": ""
},
"require": {
......@@ -112,12 +112,12 @@
},
"require-dev": {
"doctrine/cache": "1.*",
"phpunit/phpunit": "^6.4"
"phpunit/phpunit": "^7.5@dev"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.6.x-dev"
"dev-master": "1.7.x-dev"
}
},
"autoload": {
......@@ -130,6 +130,10 @@
"MIT"
],
"authors": [
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
......@@ -138,10 +142,6 @@
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com"
......@@ -158,7 +158,7 @@
"docblock",
"parser"
],
"time": "2019-03-25T19:12:02+00:00"
"time": "2019-08-08T18:11:40+00:00"
},
{
"name": "doctrine/cache",
......@@ -237,16 +237,16 @@
},
{
"name": "doctrine/collections",
"version": "v1.6.1",
"version": "v1.6.2",
"source": {
"type": "git",
"url": "https://github.com/doctrine/collections.git",
"reference": "d2ae4ef05e25197343b6a39bae1d3c427a2f6956"
"reference": "c5e0bc17b1620e97c968ac409acbff28b8b850be"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/collections/zipball/d2ae4ef05e25197343b6a39bae1d3c427a2f6956",
"reference": "d2ae4ef05e25197343b6a39bae1d3c427a2f6956",
"url": "https://api.github.com/repos/doctrine/collections/zipball/c5e0bc17b1620e97c968ac409acbff28b8b850be",
"reference": "c5e0bc17b1620e97c968ac409acbff28b8b850be",
"shasum": ""
},
"require": {
......@@ -303,20 +303,20 @@
"iterators",
"php"
],
"time": "2019-03-25T19:03:48+00:00"
"time": "2019-06-09T13:48:14+00:00"
},
{
"name": "doctrine/common",
"version": "v2.10.0",
"version": "v2.11.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/common.git",
"reference": "30e33f60f64deec87df728c02b107f82cdafad9d"
"reference": "b8ca1dcf6b0dc8a2af7a09baac8d0c48345df4ff"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/common/zipball/30e33f60f64deec87df728c02b107f82cdafad9d",
"reference": "30e33f60f64deec87df728c02b107f82cdafad9d",
"url": "https://api.github.com/repos/doctrine/common/zipball/b8ca1dcf6b0dc8a2af7a09baac8d0c48345df4ff",
"reference": "b8ca1dcf6b0dc8a2af7a09baac8d0c48345df4ff",
"shasum": ""
},
"require": {
......@@ -332,14 +332,16 @@
},
"require-dev": {
"doctrine/coding-standard": "^1.0",
"phpunit/phpunit": "^6.3",
"phpstan/phpstan": "^0.11",
"phpstan/phpstan-phpunit": "^0.11",
"phpunit/phpunit": "^7.0",
"squizlabs/php_codesniffer": "^3.0",
"symfony/phpunit-bridge": "^4.0.5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.10.x-dev"
"dev-master": "2.11.x-dev"
}
},
"autoload": {
......@@ -352,6 +354,10 @@
"MIT"
],
"authors": [
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
......@@ -360,10 +366,6 @@
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com"
......@@ -384,7 +386,7 @@
"doctrine",
"php"
],
"time": "2018-11-21T01:24:55+00:00"
"time": "2019-09-10T10:10:14+00:00"
},
{
"name": "doctrine/dbal",
......@@ -571,16 +573,16 @@
},
{
"name": "doctrine/doctrine-orm-module",
"version": "2.1.4",
"version": "2.1.5",
"source": {
"type": "git",
"url": "https://github.com/doctrine/DoctrineORMModule.git",
"reference": "24cb652646e73eeb790228cb35bc45b2ad1dfc7a"
"reference": "652d8aa636333b6b3f39a2f079c1565b5a9f5a6e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/DoctrineORMModule/zipball/24cb652646e73eeb790228cb35bc45b2ad1dfc7a",
"reference": "24cb652646e73eeb790228cb35bc45b2ad1dfc7a",
"url": "https://api.github.com/repos/doctrine/DoctrineORMModule/zipball/652d8aa636333b6b3f39a2f079c1565b5a9f5a6e",
"reference": "652d8aa636333b6b3f39a2f079c1565b5a9f5a6e",
"shasum": ""
},
"require": {
......@@ -615,6 +617,7 @@
"type": "library",
"extra": {
"zf": {
"config-provider": "DoctrineORMModule\\ConfigProvider",
"module": "DoctrineORMModule"
}
},
......@@ -659,7 +662,7 @@
"orm",
"zf"
],
"time": "2019-01-22T08:03:01+00:00"
"time": "2019-07-10T21:59:42+00:00"
},
{
"name": "doctrine/event-manager",
......@@ -860,30 +863,35 @@
},
{
"name": "doctrine/lexer",
"version": "v1.0.1",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/lexer.git",
"reference": "83893c552fd2045dd78aef794c31e694c37c0b8c"
"reference": "e17f069ede36f7534b95adec71910ed1b49c74ea"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c",
"reference": "83893c552fd2045dd78aef794c31e694c37c0b8c",
"url": "https://api.github.com/repos/doctrine/lexer/zipball/e17f069ede36f7534b95adec71910ed1b49c74ea",
"reference": "e17f069ede36f7534b95adec71910ed1b49c74ea",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
"php": "^7.2"
},
"require-dev": {
"doctrine/coding-standard": "^6.0",
"phpstan/phpstan": "^0.11.8",
"phpunit/phpunit": "^8.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
"dev-master": "1.1.x-dev"
}
},
"autoload": {
"psr-0": {
"Doctrine\\Common\\Lexer\\": "lib/"
"psr-4": {
"Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer"
}
},
"notification-url": "https://packagist.org/downloads/",
......@@ -891,26 +899,29 @@
"MIT"
],
"authors": [
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com"
}
],
"description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.",
"homepage": "http://www.doctrine-project.org",
"description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.",
"homepage": "https://www.doctrine-project.org/projects/lexer.html",
"keywords": [
"annotations",
"docblock",
"lexer",
"parser"
"parser",
"php"
],
"time": "2014-09-09T13:34:57+00:00"
"time": "2019-07-30T19:33:28+00:00"
},
{
"name": "doctrine/orm",
......@@ -996,16 +1007,16 @@
},
{
"name": "doctrine/persistence",
"version": "v1.1.0",
"version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/persistence.git",
"reference": "c0f1c17602afc18b4cbd8e1c8125f264c9cf7d38"
"reference": "3da7c9d125591ca83944f477e65ed3d7b4617c48"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/persistence/zipball/c0f1c17602afc18b4cbd8e1c8125f264c9cf7d38",
"reference": "c0f1c17602afc18b4cbd8e1c8125f264c9cf7d38",
"url": "https://api.github.com/repos/doctrine/persistence/zipball/3da7c9d125591ca83944f477e65ed3d7b4617c48",
"reference": "3da7c9d125591ca83944f477e65ed3d7b4617c48",
"shasum": ""
},
"require": {
......@@ -1074,7 +1085,7 @@
"orm",
"persistence"
],
"time": "2018-11-21T00:33:13+00:00"
"time": "2019-04-23T08:28:24+00:00"
},
{
"name": "doctrine/reflection",
......@@ -1153,16 +1164,16 @@
},
{
"name": "jasig/phpcas",
"version": "1.3.6",
"version": "1.3.8",
"source": {
"type": "git",
"url": "https://github.com/apereo/phpCAS.git",
"reference": "7972833e84f6ee5fa41f1479eab5d855109627f5"
"reference": "40c0769ce05a30c8172b36ceab11124375c8366e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/apereo/phpCAS/zipball/7972833e84f6ee5fa41f1479eab5d855109627f5",
"reference": "7972833e84f6ee5fa41f1479eab5d855109627f5",
"url": "https://api.github.com/repos/apereo/phpCAS/zipball/40c0769ce05a30c8172b36ceab11124375c8366e",
"reference": "40c0769ce05a30c8172b36ceab11124375c8366e",
"shasum": ""
},
"require": {
......@@ -1204,7 +1215,7 @@
"cas",
"jasig"
],
"time": "2018-10-25T20:22:09+00:00"
"time": "2019-08-18T20:01:55+00:00"
},
{
"name": "mpdf/mpdf",
......@@ -1276,16 +1287,16 @@
},
{
"name": "myclabs/deep-copy",
"version": "1.8.1",
"version": "1.9.3",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8"
"reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8",
"reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea",
"reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea",
"shasum": ""
},
"require": {
......@@ -1320,38 +1331,39 @@
"object",
"object graph"
],
"time": "2018-06-11T23:09:50+00:00"
"time": "2019-08-09T12:45:53+00:00"
},
{
"name": "ocramius/package-versions",
"version": "1.4.0",
"version": "1.5.1",
"source": {
"type": "git",
"url": "https://github.com/Ocramius/PackageVersions.git",
"reference": "a4d4b60d0e60da2487bd21a2c6ac089f85570dbb"
"reference": "1d32342b8c1eb27353c8887c366147b4c2da673c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/a4d4b60d0e60da2487bd21a2c6ac089f85570dbb",
"reference": "a4d4b60d0e60da2487bd21a2c6ac089f85570dbb",
"url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/1d32342b8c1eb27353c8887c366147b4c2da673c",
"reference": "1d32342b8c1eb27353c8887c366147b4c2da673c",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.0.0",
"php": "^7.1.0"
"php": "^7.3.0"
},
"require-dev": {
"composer/composer": "^1.6.3",
"doctrine/coding-standard": "^5.0.1",
"composer/composer": "^1.8.6",
"doctrine/coding-standard": "^6.0.0",
"ext-zip": "*",
"infection/infection": "^0.7.1",
"phpunit/phpunit": "^7.0.0"
"infection/infection": "^0.13.4",
"phpunit/phpunit": "^8.2.5",
"vimeo/psalm": "^3.4.9"
},
"type": "composer-plugin",
"extra": {
"class": "PackageVersions\\Installer",
"branch-alias": {