From 44ec79eba2aa415484a053cd4bd9ca6aa157857a Mon Sep 17 00:00:00 2001 From: Michael Kramer Date: Sun, 31 Mar 2024 14:55:17 +0200 Subject: [PATCH 1/6] Mount run.sh into Docker container for tests This allows easy modification for development. --- bin/run-tests-in-docker.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/run-tests-in-docker.sh b/bin/run-tests-in-docker.sh index f88c0a0..1c67034 100755 --- a/bin/run-tests-in-docker.sh +++ b/bin/run-tests-in-docker.sh @@ -26,6 +26,7 @@ docker run \ --mount type=bind,src="${PWD}/tests",dst=/opt/test-runner/tests \ --mount type=tmpfs,dst=/tmp \ --volume "${PWD}/bin/run-tests.sh:/opt/test-runner/bin/run-tests.sh" \ + --volume "${PWD}/bin/run.sh:/opt/test-runner/bin/run.sh" \ --workdir /opt/test-runner \ --entrypoint /opt/test-runner/bin/run-tests.sh \ exercism/php-test-runner From ac86f034bac7090b860c02733a1317385ef10407 Mon Sep 17 00:00:00 2001 From: Michael Kramer Date: Sun, 31 Mar 2024 15:22:28 +0200 Subject: [PATCH 2/6] Update to PHP 8.3.4 and PHPUnit 10 --- .gitignore | 4 ++-- Dockerfile | 12 ++++++------ README.md | 4 ++-- bin/run.sh | 5 +++-- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 03da585..4c3305e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # Ignore PHPUnit bin download and run cache artifact -bin/phpunit-9.phar +bin/phpunit-* .phpunit*.cache # Ignore run artifacts @@ -10,4 +10,4 @@ output.json results.xml results.json -*.scratch \ No newline at end of file +*.scratch diff --git a/Dockerfile b/Dockerfile index c117a0f..14fab31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.2.7-cli-alpine3.18 AS build +FROM php:8.3.4-cli-alpine3.19 AS build RUN apk update && \ apk add --no-cache ca-certificates curl jo zip unzip @@ -7,10 +7,10 @@ WORKDIR /usr/local/bin RUN curl -L -o install-php-extensions https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions && \ chmod +x install-php-extensions && \ - install-php-extensions ds-1.4.0 intl + install-php-extensions ds-1.5.0 intl -RUN curl -L -o phpunit-9.phar https://phar.phpunit.de/phpunit-9.phar && \ - chmod +x phpunit-9.phar +RUN curl -L -o phpunit-10.phar https://phar.phpunit.de/phpunit-10.phar && \ + chmod +x phpunit-10.phar WORKDIR /usr/local/bin/junit-handler/ COPY --from=composer:2.5.8 /usr/bin/composer /usr/local/bin/composer @@ -18,11 +18,11 @@ COPY junit-handler/ . # We need PHPUnit from junit-handler/ to run test-runner tests in CI / locally RUN composer install --no-interaction -FROM php:8.2.7-cli-alpine3.18 AS runtime +FROM php:8.3.4-cli-alpine3.19 AS runtime COPY --from=build /usr/bin/jo /usr/bin/jo COPY --from=build /usr/local/lib/php/extensions /usr/local/lib/php/extensions -COPY --from=build /usr/local/bin/phpunit-9.phar /opt/test-runner/bin/phpunit-9.phar +COPY --from=build /usr/local/bin/phpunit-10.phar /opt/test-runner/bin/phpunit-10.phar COPY --from=build /usr/local/bin/junit-handler /opt/test-runner/junit-handler # Use the default production configuration diff --git a/README.md b/README.md index 2a5ea5c..1a7f9cf 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ It meets the complete spec for testing all exercises. ### Docker image -The website uses isolated docker images to run untrusted code in a sandbox. -The image provided by this repository consists of PHP 8.2.7 (PHPUnit 9/10). +The website uses isolated Docker images to run untrusted code in a sandbox. +The image provided by this repository consists of PHP 8.3.4 (PHPUnit 10). All final assets are built into the image, because the image does not have network access once in use. Includes PHP extensions: ds, intl diff --git a/bin/run.sh b/bin/run.sh index b7fd569..dc3db0e 100755 --- a/bin/run.sh +++ b/bin/run.sh @@ -2,9 +2,11 @@ set -euo pipefail -PHPUNIT_BIN="./bin/phpunit-9.phar" +PHPUNIT_BIN="./bin/phpunit-10.phar" XML_RESULTS='results.xml' JSON_RESULTS='results.json' +# shellcheck disable=SC2034 # Modifies XDebug behaviour when invoking PHP +XDEBUG_MODE='off' function main { local output="" @@ -25,7 +27,6 @@ function main { output=$(eval "${PHPUNIT_BIN}" \ -d memory_limit=300M \ --log-junit "${output_dir%/}/${XML_RESULTS}" \ - --verbose \ --no-configuration \ --do-not-cache-result \ "${test_files%%*( )}" 2>&1) From e35aaff4838fe5e52d5b5c2a388da1e5b25f1084 Mon Sep 17 00:00:00 2001 From: Michael Kramer Date: Sun, 31 Mar 2024 15:27:07 +0200 Subject: [PATCH 3/6] Update junit-handler dependencies --- junit-handler/composer.lock | 262 +++++++++++++++++++----------------- 1 file changed, 136 insertions(+), 126 deletions(-) diff --git a/junit-handler/composer.lock b/junit-handler/composer.lock index 960f4fd..554d057 100644 --- a/junit-handler/composer.lock +++ b/junit-handler/composer.lock @@ -67,25 +67,27 @@ }, { "name": "nikic/php-parser", - "version": "v4.16.0", + "version": "v5.0.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17" + "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13", + "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -93,7 +95,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -117,26 +119,27 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2" }, - "time": "2023-06-25T14:52:30+00:00" + "time": "2024-03-05T20:51:40+00:00" }, { "name": "phar-io/manifest", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-phar": "*", "ext-xmlwriter": "*", "phar-io/version": "^3.0.1", @@ -177,9 +180,15 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" + "source": "https://github.com/phar-io/manifest/tree/2.0.4" }, - "time": "2021-07-20T11:28:43+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" }, { "name": "phar-io/version", @@ -390,23 +399,23 @@ }, { "name": "phpunit/php-code-coverage", - "version": "10.1.2", + "version": "10.1.14", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "db1497ec8dd382e82c962f7abbe0320e4882ee4e" + "reference": "e3f51450ebffe8e0efdf7346ae966a656f7d5e5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/db1497ec8dd382e82c962f7abbe0320e4882ee4e", - "reference": "db1497ec8dd382e82c962f7abbe0320e4882ee4e", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/e3f51450ebffe8e0efdf7346ae966a656f7d5e5b", + "reference": "e3f51450ebffe8e0efdf7346ae966a656f7d5e5b", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.15", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=8.1", "phpunit/php-file-iterator": "^4.0", "phpunit/php-text-template": "^3.0", @@ -456,7 +465,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/10.1.2" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.14" }, "funding": [ { @@ -464,20 +473,20 @@ "type": "github" } ], - "time": "2023-05-22T09:04:27+00:00" + "time": "2024-03-12T15:33:41+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "4.0.2", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "5647d65443818959172645e7ed999217360654b6" + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/5647d65443818959172645e7ed999217360654b6", - "reference": "5647d65443818959172645e7ed999217360654b6", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", "shasum": "" }, "require": { @@ -517,7 +526,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.0.2" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" }, "funding": [ { @@ -525,7 +534,7 @@ "type": "github" } ], - "time": "2023-05-07T09:13:23+00:00" + "time": "2023-08-31T06:24:48+00:00" }, { "name": "phpunit/php-invoker", @@ -592,16 +601,16 @@ }, { "name": "phpunit/php-text-template", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d" + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/9f3d3709577a527025f55bcf0f7ab8052c8bb37d", - "reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", "shasum": "" }, "require": { @@ -639,7 +648,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.0" + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" }, "funding": [ { @@ -647,7 +657,7 @@ "type": "github" } ], - "time": "2023-02-03T06:56:46+00:00" + "time": "2023-08-31T14:07:24+00:00" }, { "name": "phpunit/php-timer", @@ -710,16 +720,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.2.3", + "version": "10.5.16", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "35c8cac1734ede2ae354a6644f7088356ff5b08e" + "reference": "18f8d4a5f52b61fdd9370aaae3167daa0eeb69cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/35c8cac1734ede2ae354a6644f7088356ff5b08e", - "reference": "35c8cac1734ede2ae354a6644f7088356ff5b08e", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/18f8d4a5f52b61fdd9370aaae3167daa0eeb69cd", + "reference": "18f8d4a5f52b61fdd9370aaae3167daa0eeb69cd", "shasum": "" }, "require": { @@ -733,7 +743,7 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=8.1", - "phpunit/php-code-coverage": "^10.1.1", + "phpunit/php-code-coverage": "^10.1.5", "phpunit/php-file-iterator": "^4.0", "phpunit/php-invoker": "^4.0", "phpunit/php-text-template": "^3.0", @@ -743,8 +753,8 @@ "sebastian/comparator": "^5.0", "sebastian/diff": "^5.0", "sebastian/environment": "^6.0", - "sebastian/exporter": "^5.0", - "sebastian/global-state": "^6.0", + "sebastian/exporter": "^5.1", + "sebastian/global-state": "^6.0.1", "sebastian/object-enumerator": "^5.0", "sebastian/recursion-context": "^5.0", "sebastian/type": "^4.0", @@ -759,7 +769,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "10.2-dev" + "dev-main": "10.5-dev" } }, "autoload": { @@ -791,7 +801,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.2.3" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.16" }, "funding": [ { @@ -807,20 +817,20 @@ "type": "tidelift" } ], - "time": "2023-06-30T06:17:38+00:00" + "time": "2024-03-28T10:08:10+00:00" }, { "name": "sebastian/cli-parser", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae" + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/efdc130dbbbb8ef0b545a994fd811725c5282cae", - "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084", "shasum": "" }, "require": { @@ -855,7 +865,8 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.0" + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1" }, "funding": [ { @@ -863,7 +874,7 @@ "type": "github" } ], - "time": "2023-02-03T06:58:15+00:00" + "time": "2024-03-02T07:12:49+00:00" }, { "name": "sebastian/code-unit", @@ -978,16 +989,16 @@ }, { "name": "sebastian/comparator", - "version": "5.0.0", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "72f01e6586e0caf6af81297897bd112eb7e9627c" + "reference": "2db5010a484d53ebf536087a70b4a5423c102372" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/72f01e6586e0caf6af81297897bd112eb7e9627c", - "reference": "72f01e6586e0caf6af81297897bd112eb7e9627c", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372", + "reference": "2db5010a484d53ebf536087a70b4a5423c102372", "shasum": "" }, "require": { @@ -998,7 +1009,7 @@ "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^10.3" }, "type": "library", "extra": { @@ -1042,7 +1053,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.0" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1" }, "funding": [ { @@ -1050,24 +1062,24 @@ "type": "github" } ], - "time": "2023-02-03T07:07:16+00:00" + "time": "2023-08-14T13:18:12+00:00" }, { "name": "sebastian/complexity", - "version": "3.0.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6" + "reference": "68ff824baeae169ec9f2137158ee529584553799" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/e67d240970c9dc7ea7b2123a6d520e334dd61dc6", - "reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799", + "reference": "68ff824baeae169ec9f2137158ee529584553799", "shasum": "" }, "require": { - "nikic/php-parser": "^4.10", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=8.1" }, "require-dev": { @@ -1076,7 +1088,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.2-dev" } }, "autoload": { @@ -1099,7 +1111,8 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/3.0.0" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0" }, "funding": [ { @@ -1107,20 +1120,20 @@ "type": "github" } ], - "time": "2023-02-03T06:59:47+00:00" + "time": "2023-12-21T08:37:17+00:00" }, { "name": "sebastian/diff", - "version": "5.0.3", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b" + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b", - "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e", + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e", "shasum": "" }, "require": { @@ -1128,12 +1141,12 @@ }, "require-dev": { "phpunit/phpunit": "^10.0", - "symfony/process": "^4.2 || ^5" + "symfony/process": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -1166,7 +1179,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1" }, "funding": [ { @@ -1174,20 +1187,20 @@ "type": "github" } ], - "time": "2023-05-01T07:48:21+00:00" + "time": "2024-03-02T07:15:17+00:00" }, { "name": "sebastian/environment", - "version": "6.0.1", + "version": "6.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951" + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/43c751b41d74f96cbbd4e07b7aec9675651e2951", - "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984", + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984", "shasum": "" }, "require": { @@ -1202,7 +1215,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "6.1-dev" } }, "autoload": { @@ -1230,7 +1243,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/6.0.1" + "source": "https://github.com/sebastianbergmann/environment/tree/6.1.0" }, "funding": [ { @@ -1238,20 +1251,20 @@ "type": "github" } ], - "time": "2023-04-11T05:39:26+00:00" + "time": "2024-03-23T08:47:14+00:00" }, { "name": "sebastian/exporter", - "version": "5.0.0", + "version": "5.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0" + "reference": "955288482d97c19a372d3f31006ab3f37da47adf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0", - "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf", + "reference": "955288482d97c19a372d3f31006ab3f37da47adf", "shasum": "" }, "require": { @@ -1265,7 +1278,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -1307,7 +1320,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/5.0.0" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2" }, "funding": [ { @@ -1315,20 +1329,20 @@ "type": "github" } ], - "time": "2023-02-03T07:06:49+00:00" + "time": "2024-03-02T07:17:12+00:00" }, { "name": "sebastian/global-state", - "version": "6.0.0", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "aab257c712de87b90194febd52e4d184551c2d44" + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/aab257c712de87b90194febd52e4d184551c2d44", - "reference": "aab257c712de87b90194febd52e4d184551c2d44", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", "shasum": "" }, "require": { @@ -1362,13 +1376,14 @@ } ], "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.0" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2" }, "funding": [ { @@ -1376,24 +1391,24 @@ "type": "github" } ], - "time": "2023-02-03T07:07:38+00:00" + "time": "2024-03-02T07:19:19+00:00" }, { "name": "sebastian/lines-of-code", - "version": "2.0.0", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130" + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/17c4d940ecafb3d15d2cf916f4108f664e28b130", - "reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0", + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0", "shasum": "" }, "require": { - "nikic/php-parser": "^4.10", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=8.1" }, "require-dev": { @@ -1425,7 +1440,8 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.0" + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2" }, "funding": [ { @@ -1433,7 +1449,7 @@ "type": "github" } ], - "time": "2023-02-03T07:08:02+00:00" + "time": "2023-12-21T08:38:20+00:00" }, { "name": "sebastian/object-enumerator", @@ -1721,16 +1737,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", "shasum": "" }, "require": { @@ -1744,9 +1760,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -1784,7 +1797,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" }, "funding": [ { @@ -1800,20 +1813,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.27.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" + "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/c565ad1e63f30e7477fc40738343c62b40bc672d", + "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d", "shasum": "" }, "require": { @@ -1821,9 +1834,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -1863,7 +1873,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.29.0" }, "funding": [ { @@ -1879,20 +1889,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -1921,7 +1931,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, "funding": [ { @@ -1929,7 +1939,7 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2024-03-03T12:36:25+00:00" } ], "packages-dev": [], @@ -1940,5 +1950,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } From 3f9f65c26916e01fab0d32d52055b207153f3ef3 Mon Sep 17 00:00:00 2001 From: Michael Kramer Date: Sun, 31 Mar 2024 15:31:25 +0200 Subject: [PATCH 4/6] Adjust expected data provider test result PHPUnit 10 no longer includes data of data sets in its output. --- tests/table-test/expected_results.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/table-test/expected_results.json b/tests/table-test/expected_results.json index c2f6c7c..e06d4f5 100644 --- a/tests/table-test/expected_results.json +++ b/tests/table-test/expected_results.json @@ -1 +1 @@ -{"version":3,"status":"fail","tests":[{"name":"testFrom with data set #0","status":"error","test_code":"$date = $this->dateSetup($inputDate);\n$gs = from($date);\n\n$this->assertSame($expected, $gs->format('Y-m-d H:i:s'));\n","message":"GigasecondTest::testFrom with data set #0 ('2011-04-25', '2043-01-01 01:46:40')\nBadFunctionCallException: Implement the from function\n\nGigasecond.php:29\nGigasecondTest.php:70"},{"name":"testFrom with data set #1","status":"error","test_code":"$date = $this->dateSetup($inputDate);\n$gs = from($date);\n\n$this->assertSame($expected, $gs->format('Y-m-d H:i:s'));\n","message":"GigasecondTest::testFrom with data set #1 ('1977-06-13', '2009-02-19 01:46:40')\nBadFunctionCallException: Implement the from function\n\nGigasecond.php:29\nGigasecondTest.php:70"},{"name":"testFrom with data set #2","status":"error","test_code":"$date = $this->dateSetup($inputDate);\n$gs = from($date);\n\n$this->assertSame($expected, $gs->format('Y-m-d H:i:s'));\n","message":"GigasecondTest::testFrom with data set #2 ('1959-07-19', '1991-03-27 01:46:40')\nBadFunctionCallException: Implement the from function\n\nGigasecond.php:29\nGigasecondTest.php:70"},{"name":"testFrom with data set #3","status":"error","test_code":"$date = $this->dateSetup($inputDate);\n$gs = from($date);\n\n$this->assertSame($expected, $gs->format('Y-m-d H:i:s'));\n","message":"GigasecondTest::testFrom with data set #3 ('2015-01-24 22:00:00', '2046-10-02 23:46:40')\nBadFunctionCallException: Implement the from function\n\nGigasecond.php:29\nGigasecondTest.php:70"},{"name":"testFrom with data set #4","status":"error","test_code":"$date = $this->dateSetup($inputDate);\n$gs = from($date);\n\n$this->assertSame($expected, $gs->format('Y-m-d H:i:s'));\n","message":"GigasecondTest::testFrom with data set #4 ('2015-01-24 23:59:59', '2046-10-03 01:46:39')\nBadFunctionCallException: Implement the from function\n\nGigasecond.php:29\nGigasecondTest.php:70"},{"name":"testFromReturnType with data set #0","status":"error","test_code":"$date = $this->dateSetup($inputDate);\n$this->assertInstanceOf(DateTimeImmutable::class, from($date));\n","message":"GigasecondTest::testFromReturnType with data set #0 ('2011-04-25')\nBadFunctionCallException: Implement the from function\n\nGigasecond.php:29\nGigasecondTest.php:82"},{"name":"testFromReturnType with data set #1","status":"error","test_code":"$date = $this->dateSetup($inputDate);\n$this->assertInstanceOf(DateTimeImmutable::class, from($date));\n","message":"GigasecondTest::testFromReturnType with data set #1 ('1977-06-13')\nBadFunctionCallException: Implement the from function\n\nGigasecond.php:29\nGigasecondTest.php:82"},{"name":"testFromReturnType with data set #2","status":"error","test_code":"$date = $this->dateSetup($inputDate);\n$this->assertInstanceOf(DateTimeImmutable::class, from($date));\n","message":"GigasecondTest::testFromReturnType with data set #2 ('1959-07-19')\nBadFunctionCallException: Implement the from function\n\nGigasecond.php:29\nGigasecondTest.php:82"},{"name":"testFromReturnType with data set #3","status":"error","test_code":"$date = $this->dateSetup($inputDate);\n$this->assertInstanceOf(DateTimeImmutable::class, from($date));\n","message":"GigasecondTest::testFromReturnType with data set #3 ('2015-01-24 22:00:00')\nBadFunctionCallException: Implement the from function\n\nGigasecond.php:29\nGigasecondTest.php:82"},{"name":"testFromReturnType with data set #4","status":"error","test_code":"$date = $this->dateSetup($inputDate);\n$this->assertInstanceOf(DateTimeImmutable::class, from($date));\n","message":"GigasecondTest::testFromReturnType with data set #4 ('2015-01-24 23:59:59')\nBadFunctionCallException: Implement the from function\n\nGigasecond.php:29\nGigasecondTest.php:82"},{"name":"testRegularTest","status":"pass","test_code":"$this->assertEquals(1, 1);\n"}]} +{"version":3,"status":"fail","tests":[{"name":"testFrom with data set #0","status":"error","test_code":"$date = $this->dateSetup($inputDate);\n$gs = from($date);\n\n$this->assertSame($expected, $gs->format('Y-m-d H:i:s'));\n","message":"GigasecondTest::testFrom with data set #0\nBadFunctionCallException: Implement the from function\n\nGigasecond.php:29\nGigasecondTest.php:70"},{"name":"testFrom with data set #1","status":"error","test_code":"$date = $this->dateSetup($inputDate);\n$gs = from($date);\n\n$this->assertSame($expected, $gs->format('Y-m-d H:i:s'));\n","message":"GigasecondTest::testFrom with data set #1\nBadFunctionCallException: Implement the from function\n\nGigasecond.php:29\nGigasecondTest.php:70"},{"name":"testFrom with data set #2","status":"error","test_code":"$date = $this->dateSetup($inputDate);\n$gs = from($date);\n\n$this->assertSame($expected, $gs->format('Y-m-d H:i:s'));\n","message":"GigasecondTest::testFrom with data set #2\nBadFunctionCallException: Implement the from function\n\nGigasecond.php:29\nGigasecondTest.php:70"},{"name":"testFrom with data set #3","status":"error","test_code":"$date = $this->dateSetup($inputDate);\n$gs = from($date);\n\n$this->assertSame($expected, $gs->format('Y-m-d H:i:s'));\n","message":"GigasecondTest::testFrom with data set #3\nBadFunctionCallException: Implement the from function\n\nGigasecond.php:29\nGigasecondTest.php:70"},{"name":"testFrom with data set #4","status":"error","test_code":"$date = $this->dateSetup($inputDate);\n$gs = from($date);\n\n$this->assertSame($expected, $gs->format('Y-m-d H:i:s'));\n","message":"GigasecondTest::testFrom with data set #4\nBadFunctionCallException: Implement the from function\n\nGigasecond.php:29\nGigasecondTest.php:70"},{"name":"testFromReturnType with data set #0","status":"error","test_code":"$date = $this->dateSetup($inputDate);\n$this->assertInstanceOf(DateTimeImmutable::class, from($date));\n","message":"GigasecondTest::testFromReturnType with data set #0\nBadFunctionCallException: Implement the from function\n\nGigasecond.php:29\nGigasecondTest.php:82"},{"name":"testFromReturnType with data set #1","status":"error","test_code":"$date = $this->dateSetup($inputDate);\n$this->assertInstanceOf(DateTimeImmutable::class, from($date));\n","message":"GigasecondTest::testFromReturnType with data set #1\nBadFunctionCallException: Implement the from function\n\nGigasecond.php:29\nGigasecondTest.php:82"},{"name":"testFromReturnType with data set #2","status":"error","test_code":"$date = $this->dateSetup($inputDate);\n$this->assertInstanceOf(DateTimeImmutable::class, from($date));\n","message":"GigasecondTest::testFromReturnType with data set #2\nBadFunctionCallException: Implement the from function\n\nGigasecond.php:29\nGigasecondTest.php:82"},{"name":"testFromReturnType with data set #3","status":"error","test_code":"$date = $this->dateSetup($inputDate);\n$this->assertInstanceOf(DateTimeImmutable::class, from($date));\n","message":"GigasecondTest::testFromReturnType with data set #3\nBadFunctionCallException: Implement the from function\n\nGigasecond.php:29\nGigasecondTest.php:82"},{"name":"testFromReturnType with data set #4","status":"error","test_code":"$date = $this->dateSetup($inputDate);\n$this->assertInstanceOf(DateTimeImmutable::class, from($date));\n","message":"GigasecondTest::testFromReturnType with data set #4\nBadFunctionCallException: Implement the from function\n\nGigasecond.php:29\nGigasecondTest.php:82"},{"name":"testRegularTest","status":"pass","test_code":"$this->assertEquals(1, 1);\n"}]} From 345554475c862524ee96150d54bc66dd85e3151e Mon Sep 17 00:00:00 2001 From: Michael Kramer Date: Sun, 31 Mar 2024 15:41:15 +0200 Subject: [PATCH 5/6] Update composer to latest --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 14fab31..ba98756 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,10 +13,11 @@ RUN curl -L -o phpunit-10.phar https://phar.phpunit.de/phpunit-10.phar && \ chmod +x phpunit-10.phar WORKDIR /usr/local/bin/junit-handler/ -COPY --from=composer:2.5.8 /usr/bin/composer /usr/local/bin/composer +COPY --from=composer:2.7.2 /usr/bin/composer /usr/local/bin/composer COPY junit-handler/ . # We need PHPUnit from junit-handler/ to run test-runner tests in CI / locally -RUN composer install --no-interaction +# composer warns about missing a "root version" to resolve dependencies. Fake to stop warning +RUN COMPOSER_ROOT_VERSION=1.0.0 composer install --no-interaction FROM php:8.3.4-cli-alpine3.19 AS runtime From 98bb8480ecf7e92c84b76a2ed48fce0cf4516f4c Mon Sep 17 00:00:00 2001 From: Michael Kramer Date: Tue, 16 Apr 2024 09:58:40 +0200 Subject: [PATCH 6/6] Remove volume for run.sh --- bin/run-tests-in-docker.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/run-tests-in-docker.sh b/bin/run-tests-in-docker.sh index 1c67034..f88c0a0 100755 --- a/bin/run-tests-in-docker.sh +++ b/bin/run-tests-in-docker.sh @@ -26,7 +26,6 @@ docker run \ --mount type=bind,src="${PWD}/tests",dst=/opt/test-runner/tests \ --mount type=tmpfs,dst=/tmp \ --volume "${PWD}/bin/run-tests.sh:/opt/test-runner/bin/run-tests.sh" \ - --volume "${PWD}/bin/run.sh:/opt/test-runner/bin/run.sh" \ --workdir /opt/test-runner \ --entrypoint /opt/test-runner/bin/run-tests.sh \ exercism/php-test-runner