diff --git a/composer.lock b/composer.lock index 609426a..4aa88c4 100644 --- a/composer.lock +++ b/composer.lock @@ -9,30 +9,30 @@ "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.5.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^11", + "doctrine/coding-standard": "^11", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.30 || ^5.4" + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" }, "type": "library", "autoload": { @@ -59,7 +59,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" }, "funding": [ { @@ -75,20 +75,20 @@ "type": "tidelift" } ], - "time": "2022-12-30T00:15:36+00:00" + "time": "2022-12-30T00:23:10+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", "shasum": "" }, "require": { @@ -96,11 +96,12 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", @@ -126,7 +127,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" }, "funding": [ { @@ -134,20 +135,20 @@ "type": "tidelift" } ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2024-06-12T14:39:25+00:00" }, { "name": "nikic/php-parser", - "version": "v5.0.2", + "version": "v5.3.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13" + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13", - "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b", "shasum": "" }, "require": { @@ -158,7 +159,7 @@ }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^9.0" }, "bin": [ "bin/php-parse" @@ -190,9 +191,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1" }, - "time": "2024-03-05T20:51:40+00:00" + "time": "2024-10-08T18:51:32+00:00" }, { "name": "nulib/tests", @@ -200,7 +201,7 @@ "source": { "type": "git", "url": "https://git.univ-reunion.fr/sda-php/nulib-tests.git", - "reference": "6758a43c241cf51ab3ecff3d2260a583f20c0b19" + "reference": "6ce8257560b42e8fb3eea03eba84d3877c9648ca" }, "require": { "php": ">=7.3", @@ -224,7 +225,7 @@ } ], "description": "fonctions et classes pour les tests", - "time": "2023-10-20T06:17:30+00:00" + "time": "2024-03-26T10:56:17+00:00" }, { "name": "phar-io/manifest", @@ -346,35 +347,35 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.31", + "version": "9.2.32", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.18 || ^5.0", + "nikic/php-parser": "^4.19.1 || ^5.1.0", "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-text-template": "^2.0.4", + "sebastian/code-unit-reverse-lookup": "^2.0.3", + "sebastian/complexity": "^2.0.3", + "sebastian/environment": "^5.1.5", + "sebastian/lines-of-code": "^1.0.4", + "sebastian/version": "^3.0.2", + "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.6" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -383,7 +384,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "9.2.x-dev" } }, "autoload": { @@ -412,7 +413,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" }, "funding": [ { @@ -420,7 +421,7 @@ "type": "github" } ], - "time": "2024-03-02T06:37:42+00:00" + "time": "2024-08-22T04:23:01+00:00" }, { "name": "phpunit/php-file-iterator", @@ -665,45 +666,45 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.19", + "version": "9.6.21", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8" + "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1a54a473501ef4cdeaae4e06891674114d79db8", - "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", + "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", + "doctrine/instantiator": "^1.5.0 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", + "myclabs/deep-copy": "^1.12.0", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.28", - "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-code-coverage": "^9.2.32", + "phpunit/php-file-iterator": "^3.0.6", "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", + "phpunit/php-text-template": "^2.0.4", + "phpunit/php-timer": "^5.0.3", + "sebastian/cli-parser": "^1.0.2", + "sebastian/code-unit": "^1.0.8", "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", + "sebastian/diff": "^4.0.6", + "sebastian/environment": "^5.1.5", + "sebastian/exporter": "^4.0.6", + "sebastian/global-state": "^5.0.7", + "sebastian/object-enumerator": "^4.0.4", + "sebastian/resource-operations": "^3.0.4", + "sebastian/type": "^3.2.1", "sebastian/version": "^3.0.2" }, "suggest": { @@ -748,7 +749,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.19" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.21" }, "funding": [ { @@ -764,7 +765,7 @@ "type": "tidelift" } ], - "time": "2024-04-05T04:35:58+00:00" + "time": "2024-09-19T10:50:18+00:00" }, { "name": "sebastian/cli-parser", diff --git a/runphp/runphp b/runphp/runphp index 127f6ca..45c3fec 100755 --- a/runphp/runphp +++ b/runphp/runphp @@ -285,7 +285,7 @@ if [ "$RUNPHP_MODE" != docker ]; then fi Chdir= - Verbose= + Verbose="$RUNPHP_VERBOSE" if [ -n "$Bootstrap" ]; then ## Mode bootstrap de l'image ########################################### # Ici, on a déterminé que l'image doit être construite @@ -423,8 +423,8 @@ OPTIONS ## Mode exécution de commande ########################################## # Ici, on a déterminé qu'il faut lancer une commande - SOPTS=+w:v - LOPTS=help,chdir:,verbose,no-use-rslave + SOPTS=+w: + LOPTS=help,chdir:,no-use-rslave args="$(getopt -n "$MYNAME" -o "$SOPTS" -l "$LOPTS" -- "$@")" || exit 1; eval "set -- $args" while [ $# -gt 0 ]; do @@ -432,17 +432,17 @@ OPTIONS --) shift; break;; --help) eecho "\ -runphp: lancer une commande dans docker +runphp: lancer une commande dans un environnement PHP déterminé USAGE $MYNAME ci|cu|composer - $MYNAME command [args...] + $MYNAME [options] command [args...] COMMANDES COMPOSER ci cu installer/mettre à jour les dépendances du projet avec composer - composer (args...] + composer [args...] lancer composer avec les arguments spécifiés. pour les commandes ci-dessus, l'option --chdir est ignorée: le répertoire @@ -450,13 +450,10 @@ courant est forcé au répertoire du projet composer OPTIONS -w, --chdir CHDIR - aller dans le répertoire spécifié avant de lancer la commande - -v, --verbose - afficher plus d'informations" + aller dans le répertoire spécifié avant de lancer la commande" exit 0 ;; -w|--chdir) shift; Chdir="$1";; - -v|--verbose) Verbose=1;; --no-use-rslave) UseRslave=;; *) die "$1: option non configurée";; esac @@ -481,7 +478,7 @@ OPTIONS done if [ -n "$RUNPHP_STANDALONE" ]; then args+=( - -e "RUNPHP_STANDALONE=1" + -e "RUNPHP_STANDALONE=$RUNPHP_STANDALONE" -e "RUNPHP_PROJDIR=$PROJDIR" ) fi @@ -491,18 +488,26 @@ OPTIONS # monter le répertoire qui contient $PROJDIR mount_composer= + mount_runphp=1 if [ "${PROJDIR#$HOME/}" != "$PROJDIR" -o "$PROJDIR" == "$HOME" ]; then # bind mount $HOME args+=(-v "$HOME:$HOME${UseRslave:+:rslave}") + [ -n "$RUNPHP_STANDALONE" ] && + [ "${RUNPHP_STANDALONE#$HOME/}" != "$RUNPHP_STANDALONE" ] && + mount_runphp= else # bind mount uniquement le répertoire du projet args+=(-v "$PROJDIR:$PROJDIR${UseRslave:+:rslave}") mount_composer=1 + [ "$RUNPHP_STANDALONE" == "$PROJDIR" ] && mount_runphp= fi if [ -n "$mount_composer" -a -d "$HOME/.composer" ]; then # monter la configuration de composer args+=(-v "$HOME/.composer:$HOME/.composer") fi + if [ -n "$RUNPHP_STANDALONE" -a -n "$mount_runphp" ]; then + args+=(-v "$RUNPHP_STANDALONE:$RUNPHP_STANDALONE") + fi args+=(-w "$(pwd)") # lancer avec l'utilisateur courant diff --git a/runphp/runphp.2postamble b/runphp/runphp.2postamble index 48b8048..e486c93 100644 --- a/runphp/runphp.2postamble +++ b/runphp/runphp.2postamble @@ -236,7 +236,7 @@ if [ "$RUNPHP_MODE" != docker ]; then fi Chdir= - Verbose= + Verbose="$RUNPHP_VERBOSE" if [ -n "$Bootstrap" ]; then ## Mode bootstrap de l'image ########################################### # Ici, on a déterminé que l'image doit être construite @@ -374,8 +374,8 @@ OPTIONS ## Mode exécution de commande ########################################## # Ici, on a déterminé qu'il faut lancer une commande - SOPTS=+w:v - LOPTS=help,chdir:,verbose,no-use-rslave + SOPTS=+w: + LOPTS=help,chdir:,no-use-rslave args="$(getopt -n "$MYNAME" -o "$SOPTS" -l "$LOPTS" -- "$@")" || exit 1; eval "set -- $args" while [ $# -gt 0 ]; do @@ -383,17 +383,17 @@ OPTIONS --) shift; break;; --help) eecho "\ -runphp: lancer une commande dans docker +runphp: lancer une commande dans un environnement PHP déterminé USAGE $MYNAME ci|cu|composer - $MYNAME command [args...] + $MYNAME [options] command [args...] COMMANDES COMPOSER ci cu installer/mettre à jour les dépendances du projet avec composer - composer (args...] + composer [args...] lancer composer avec les arguments spécifiés. pour les commandes ci-dessus, l'option --chdir est ignorée: le répertoire @@ -401,13 +401,10 @@ courant est forcé au répertoire du projet composer OPTIONS -w, --chdir CHDIR - aller dans le répertoire spécifié avant de lancer la commande - -v, --verbose - afficher plus d'informations" + aller dans le répertoire spécifié avant de lancer la commande" exit 0 ;; -w|--chdir) shift; Chdir="$1";; - -v|--verbose) Verbose=1;; --no-use-rslave) UseRslave=;; *) die "$1: option non configurée";; esac @@ -432,7 +429,7 @@ OPTIONS done if [ -n "$RUNPHP_STANDALONE" ]; then args+=( - -e "RUNPHP_STANDALONE=1" + -e "RUNPHP_STANDALONE=$RUNPHP_STANDALONE" -e "RUNPHP_PROJDIR=$PROJDIR" ) fi @@ -442,18 +439,26 @@ OPTIONS # monter le répertoire qui contient $PROJDIR mount_composer= + mount_runphp=1 if [ "${PROJDIR#$HOME/}" != "$PROJDIR" -o "$PROJDIR" == "$HOME" ]; then # bind mount $HOME args+=(-v "$HOME:$HOME${UseRslave:+:rslave}") + [ -n "$RUNPHP_STANDALONE" ] && + [ "${RUNPHP_STANDALONE#$HOME/}" != "$RUNPHP_STANDALONE" ] && + mount_runphp= else # bind mount uniquement le répertoire du projet args+=(-v "$PROJDIR:$PROJDIR${UseRslave:+:rslave}") mount_composer=1 + [ "$RUNPHP_STANDALONE" == "$PROJDIR" ] && mount_runphp= fi if [ -n "$mount_composer" -a -d "$HOME/.composer" ]; then # monter la configuration de composer args+=(-v "$HOME/.composer:$HOME/.composer") fi + if [ -n "$RUNPHP_STANDALONE" -a -n "$mount_runphp" ]; then + args+=(-v "$RUNPHP_STANDALONE:$RUNPHP_STANDALONE") + fi args+=(-w "$(pwd)") # lancer avec l'utilisateur courant