From 0719b035c2da0c0200fedb2fa44f259c8a8f2908 Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Tue, 16 Dec 2025 22:02:51 +0100 Subject: [PATCH 01/11] Add ext-sodium for linux as well --- .github/workflows/php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 863028d..8a6806f 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -53,7 +53,7 @@ jobs: with: php-version: ${{ matrix.php-versions }} extensions: ctype, date, dom, fileinfo, filter, hash, json, mbstring, mysql, openssl, pcre,\ - pdo, pdo_sqlite, posix, soap, spl, xdebug, xml + pdo, pdo_sqlite, posix, soap, sodium, spl, xdebug, xml tools: composer ini-values: error_reporting=E_ALL, pcov.directory=. coverage: pcov From 35ae212cf5174fe95869ed0cdc127f7bd71213da Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Wed, 17 Dec 2025 22:44:35 +0100 Subject: [PATCH 02/11] Add codecov config --- codecov.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 codecov.yml diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..4affc05 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,20 @@ +--- + +coverage: + status: + project: + default: + target: 0% + threshold: 2% + patch: false +comment: + layout: "diff" + behavior: once + require_changes: true + require_base: false + require_head: true + branches: null +github_checks: + annotations: false +ignore: + - 'classes/element.registry.php' From 6b3600874a7731d984ed5e913dbd78d30926a569 Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Sun, 15 Feb 2026 22:56:35 +0100 Subject: [PATCH 03/11] Add AbstractTestContainer class --- composer.json | 3 ++- src/AbstractTestContainer.php | 12 ++++++++++++ src/TestContainerSingleton.php | 29 +++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 src/AbstractTestContainer.php create mode 100644 src/TestContainerSingleton.php diff --git a/composer.json b/composer.json index a2073af..ae4bab7 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,8 @@ ], "autoload": { "psr-4": { - "SimpleSAML\\TestUtils\\": "lib/" + "SimpleSAML\\TestUtils\\": "lib/", + "SimpleSAML\\TestUtils\\": "src/" } }, "autoload-dev": { diff --git a/src/AbstractTestContainer.php b/src/AbstractTestContainer.php new file mode 100644 index 0000000..a550701 --- /dev/null +++ b/src/AbstractTestContainer.php @@ -0,0 +1,12 @@ + Date: Mon, 16 Feb 2026 00:08:42 +0100 Subject: [PATCH 04/11] revert --- src/AbstractTestContainer.php | 12 ------------ src/TestContainerSingleton.php | 29 ----------------------------- 2 files changed, 41 deletions(-) delete mode 100644 src/AbstractTestContainer.php delete mode 100644 src/TestContainerSingleton.php diff --git a/src/AbstractTestContainer.php b/src/AbstractTestContainer.php deleted file mode 100644 index a550701..0000000 --- a/src/AbstractTestContainer.php +++ /dev/null @@ -1,12 +0,0 @@ - Date: Mon, 2 Mar 2026 23:55:16 +0000 Subject: [PATCH 05/11] Bump the all-actions group with 2 updates Bumps the all-actions group with 2 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact) and [actions/download-artifact](https://github.com/actions/download-artifact). Updates `actions/upload-artifact` from 6 to 7 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v6...v7) Updates `actions/download-artifact` from 7 to 8 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v7...v8) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: all-actions - dependency-name: actions/download-artifact dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major dependency-group: all-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/php.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 8a6806f..a43e140 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -94,7 +94,7 @@ jobs: - name: Save coverage data if: ${{ matrix.php-versions == '8.5' }} - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: coverage-data path: ${{ github.workspace }}/build @@ -264,7 +264,7 @@ jobs: steps: - uses: actions/checkout@v6 - - uses: actions/download-artifact@v7 + - uses: actions/download-artifact@v8 with: name: coverage-data path: ${{ github.workspace }}/build From 720ccf7bd9febbb53b3e54eb92121d97230ca930 Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Thu, 5 Mar 2026 14:22:31 +0100 Subject: [PATCH 06/11] Complain about unresolved merge conflicts --- .github/workflows/php.yml | 4 ++-- phpcs-simplesamlphp.xml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index a43e140..84b4a86 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -20,7 +20,7 @@ jobs: matrix: php-version: ['8.3', '8.4', '8.5'] - uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_phplinter.yml@v1.11.0 + uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_phplinter.yml@v1.11.1 with: php-version: ${{ matrix.php-version }} @@ -29,7 +29,7 @@ jobs: strategy: fail-fast: false - uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_linter.yml@v1.11.0 + uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_linter.yml@v1.11.1 with: enable_eslinter: false enable_jsonlinter: true diff --git a/phpcs-simplesamlphp.xml b/phpcs-simplesamlphp.xml index 97c4617..91d63e3 100644 --- a/phpcs-simplesamlphp.xml +++ b/phpcs-simplesamlphp.xml @@ -9,6 +9,9 @@ + + + From a6e6d49700d0e4ec015d86c693b9400dd3acae0d Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Fri, 6 Mar 2026 18:17:48 +0100 Subject: [PATCH 07/11] Add support for PHPunit 13 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ae4bab7..a7179ee 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "phpstan/phpstan": "^2.1", "phpstan/phpstan-mockery": "^2.0", "phpstan/phpstan-phpunit": "^2.0", - "phpunit/phpunit": "^12.3", + "phpunit/phpunit": "^12.3 || ^13.0", "psr/log": "^3.0", "slevomat/coding-standard": "^8.25", "squizlabs/php_codesniffer": "^4.0", From e0061f5ede496096f440276d432fc3a87ac3b872 Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Fri, 6 Mar 2026 19:14:37 +0100 Subject: [PATCH 08/11] Move contents of lib-dir to src-dir --- .php_cs.dist | 2 +- composer.json | 1 - phpcs.xml | 1 - phpunit.xml | 1 - {lib => src}/ArrayLogger.php | 0 {lib => src}/BuiltInServer.php | 0 {lib => src}/ClearStateTestCase.php | 0 {lib => src}/InMemoryStore.php | 0 {lib => src}/ReduceSpillOverTest.php | 0 {lib => src}/SigningTestCase.php | 0 {lib => src}/SimpleTestLogger.php | 0 {lib => src}/StateClearer.php | 0 12 files changed, 1 insertion(+), 4 deletions(-) rename {lib => src}/ArrayLogger.php (100%) rename {lib => src}/BuiltInServer.php (100%) rename {lib => src}/ClearStateTestCase.php (100%) rename {lib => src}/InMemoryStore.php (100%) rename {lib => src}/ReduceSpillOverTest.php (100%) rename {lib => src}/SigningTestCase.php (100%) rename {lib => src}/SimpleTestLogger.php (100%) rename {lib => src}/StateClearer.php (100%) diff --git a/.php_cs.dist b/.php_cs.dist index d2968e5..4d8ae39 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -2,8 +2,8 @@ $finder = PhpCsFixer\Finder::create() ->in([ - __DIR__ . '/lib', __DIR__ . '/metadata/simplesamlphp', + __DIR__ . '/src', __DIR__ . '/stubs', __DIR__ . '/tests', ]) diff --git a/composer.json b/composer.json index a7179ee..315d45f 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,6 @@ ], "autoload": { "psr-4": { - "SimpleSAML\\TestUtils\\": "lib/", "SimpleSAML\\TestUtils\\": "src/" } }, diff --git a/phpcs.xml b/phpcs.xml index c2aa8fb..6c0268e 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -6,7 +6,6 @@ - lib metadata/simplesamlphp src diff --git a/phpunit.xml b/phpunit.xml index 6971499..8da00da 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -15,7 +15,6 @@ - ./lib ./src diff --git a/lib/ArrayLogger.php b/src/ArrayLogger.php similarity index 100% rename from lib/ArrayLogger.php rename to src/ArrayLogger.php diff --git a/lib/BuiltInServer.php b/src/BuiltInServer.php similarity index 100% rename from lib/BuiltInServer.php rename to src/BuiltInServer.php diff --git a/lib/ClearStateTestCase.php b/src/ClearStateTestCase.php similarity index 100% rename from lib/ClearStateTestCase.php rename to src/ClearStateTestCase.php diff --git a/lib/InMemoryStore.php b/src/InMemoryStore.php similarity index 100% rename from lib/InMemoryStore.php rename to src/InMemoryStore.php diff --git a/lib/ReduceSpillOverTest.php b/src/ReduceSpillOverTest.php similarity index 100% rename from lib/ReduceSpillOverTest.php rename to src/ReduceSpillOverTest.php diff --git a/lib/SigningTestCase.php b/src/SigningTestCase.php similarity index 100% rename from lib/SigningTestCase.php rename to src/SigningTestCase.php diff --git a/lib/SimpleTestLogger.php b/src/SimpleTestLogger.php similarity index 100% rename from lib/SimpleTestLogger.php rename to src/SimpleTestLogger.php diff --git a/lib/StateClearer.php b/src/StateClearer.php similarity index 100% rename from lib/StateClearer.php rename to src/StateClearer.php From 92a71aefab47f103c230c1f6d2feaacecd18d0f9 Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Sun, 8 Mar 2026 19:56:10 +0100 Subject: [PATCH 09/11] Fix CI --- .github/workflows/php.yml | 14 ++---------- 1 | 35 +++++++++++++++++++++++++++++ composer.json | 13 ++++++----- lib/Bogus.php | 14 ++++++++++++ lib/README.md | 1 + tools/composer-require-checker.json | 9 -------- 6 files changed, 60 insertions(+), 26 deletions(-) create mode 100644 1 create mode 100644 lib/Bogus.php create mode 100644 lib/README.md diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 84b4a86..4ca7e0a 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -188,20 +188,10 @@ jobs: run: composer install --no-progress --prefer-dist --optimize-autoloader - name: Check code for hard dependencies missing in composer.json - run: composer-require-checker check --config-file tools/composer-require-checker.json composer.json + run: composer-require-checker check composer.json - name: Check code for unused dependencies in composer.json - run: | - composer-unused \ - --excludePackage=icanhazstring/composer-unused \ - --excludePackage=maglnet/composer-require-checker \ - --excludePackage=phpstan/phpstan \ - --excludePackage=phpstan/extension-installer \ - --excludePackage=phpstan/phpstan-mockery \ - --excludePackage=phpstan/phpstan-phpunit \ - --excludePackage=slevomat/coding-standard \ - --excludePackage=squizlabs/php_codesniffer \ - --excludePackage=symfony/phpunit-bridge + run: composer-unused - name: PHP Code Sniffer run: vendor/bin/phpcs diff --git a/1 b/1 new file mode 100644 index 0000000..f13d063 --- /dev/null +++ b/1 @@ -0,0 +1,35 @@ +pick a6e6d49 Add support for PHPunit 13 +pick e0061f5 Move contents of lib-dir to src-dir +pick 61fddec Fix CI +s 08712a5 Fix CI + +# Rebase 720ccf7..08712a5 onto 720ccf7 (4 commands) +# +# Commands: +# p, pick = use commit +# r, reword = use commit, but edit the commit message +# e, edit = use commit, but stop for amending +# s, squash = use commit, but meld into previous commit +# f, fixup [-C | -c] = like "squash" but keep only the previous +# commit's log message, unless -C is used, in which case +# keep only this commit's message; -c is same as -C but +# opens the editor +# x, exec = run command (the rest of the line) using shell +# b, break = stop here (continue rebase later with 'git rebase --continue') +# d, drop = remove commit +# l, label