From ab6831759bee063081820ddabe78de30853f7681 Mon Sep 17 00:00:00 2001 From: Arne De Smedt Date: Thu, 19 Nov 2026 14:07:55 +0100 Subject: [PATCH 1/3] Add PHP 8.6 support Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .github/workflows/analyzers.yaml | 4 ++-- .github/workflows/benchmarks.yaml | 2 +- .github/workflows/code-style.yaml | 2 +- .github/workflows/tests.yaml | 2 +- composer.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/analyzers.yaml b/.github/workflows/analyzers.yaml index f8f7ef5..1bc3c49 100644 --- a/.github/workflows/analyzers.yaml +++ b/.github/workflows/analyzers.yaml @@ -7,7 +7,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest] - php-versions: [ '8.4', '8.5' ] + php-versions: ['8.4', '8.5', '8.6'] composer-options: [ '--ignore-platform-req=php+' ] fail-fast: false name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }} @@ -24,4 +24,4 @@ jobs: run: composer update --prefer-dist --no-progress --no-suggest ${{ matrix.composer-options }} - name: Run the tests run: ./vendor/bin/psalm --no-cache - continue-on-error: ${{ matrix.php-versions == '8.5' }} + continue-on-error: ${{ matrix.php-versions == '8.6' }} diff --git a/.github/workflows/benchmarks.yaml b/.github/workflows/benchmarks.yaml index 027e757..55dacfa 100644 --- a/.github/workflows/benchmarks.yaml +++ b/.github/workflows/benchmarks.yaml @@ -13,7 +13,7 @@ jobs: - name: Install PHP uses: shivammathur/setup-php@master with: - php-version: '8.5' + php-version: '8.6' tools: 'composer:v2' extensions: mbstring, dom, soap coverage: none diff --git a/.github/workflows/code-style.yaml b/.github/workflows/code-style.yaml index d05c7ee..4a9a8a8 100644 --- a/.github/workflows/code-style.yaml +++ b/.github/workflows/code-style.yaml @@ -7,7 +7,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest] - php-versions: [ '8.4', '8.5' ] + php-versions: ['8.4', '8.5', '8.6'] composer-options: [ '--ignore-platform-req=php+' ] fail-fast: false name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }} diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ec74651..b18c0d4 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -7,7 +7,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest] - php-versions: [ '8.4', '8.5' ] + php-versions: ['8.4', '8.5', '8.6'] composer-options: [ '--ignore-platform-req=php+' ] dependency-preference: ['current', 'lowest', 'stable'] fail-fast: false diff --git a/composer.json b/composer.json index 9baf5a1..1c56e9c 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ } ], "require": { - "php": "~8.4.0 || ~8.5.0", + "php": "~8.4.0 || ~8.5.0 || ~8.6.0", "php-standard-library/collection": "^6.1", "php-standard-library/dict": "^6.1", "php-standard-library/encoding": "^6.1", From 246efd71fe93b7d9ccbfa4e0818ef9d4f6f326de Mon Sep 17 00:00:00 2001 From: Toon Verwerft Date: Fri, 20 Nov 2026 10:55:40 +0100 Subject: [PATCH 2/3] Upgrade to psalm 7 and run CI on PHP 8.6 without overrides Reads ApacheMapDetector::NAMESPACE_URI, which replaces the NAMESPACE constant PHP 8.6 deprecates, so it requires wsdl-reader 0.35. --- .github/workflows/analyzers.yaml | 4 +--- .github/workflows/code-style.yaml | 3 +-- .github/workflows/tests.yaml | 3 +-- composer.json | 10 +++++----- src/Encoder/MatchingValueEncoder.php | 3 ++- src/Encoder/ObjectEncoder.php | 7 +++---- src/EncoderRegistry.php | 2 +- 7 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/analyzers.yaml b/.github/workflows/analyzers.yaml index 1bc3c49..b351e15 100644 --- a/.github/workflows/analyzers.yaml +++ b/.github/workflows/analyzers.yaml @@ -8,7 +8,6 @@ jobs: matrix: operating-system: [ubuntu-latest] php-versions: ['8.4', '8.5', '8.6'] - composer-options: [ '--ignore-platform-req=php+' ] fail-fast: false name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }} steps: @@ -21,7 +20,6 @@ jobs: tools: 'composer:v2' extensions: pcov, mbstring, posix, dom, soap - name: Install dependencies - run: composer update --prefer-dist --no-progress --no-suggest ${{ matrix.composer-options }} + run: composer update --prefer-dist --no-progress --no-suggest - name: Run the tests run: ./vendor/bin/psalm --no-cache - continue-on-error: ${{ matrix.php-versions == '8.6' }} diff --git a/.github/workflows/code-style.yaml b/.github/workflows/code-style.yaml index 4a9a8a8..c24627a 100644 --- a/.github/workflows/code-style.yaml +++ b/.github/workflows/code-style.yaml @@ -8,7 +8,6 @@ jobs: matrix: operating-system: [ubuntu-latest] php-versions: ['8.4', '8.5', '8.6'] - composer-options: [ '--ignore-platform-req=php+' ] fail-fast: false name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }} steps: @@ -21,6 +20,6 @@ jobs: tools: 'composer:v2' extensions: pcov, mbstring, posix, dom, soap - name: Install dependencies - run: composer update --prefer-dist --no-progress --no-suggest ${{ matrix.composer-options }} + run: composer update --prefer-dist --no-progress --no-suggest - name: Run the tests run: PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --dry-run --diff diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index b18c0d4..f326681 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -8,7 +8,6 @@ jobs: matrix: operating-system: [ubuntu-latest] php-versions: ['8.4', '8.5', '8.6'] - composer-options: [ '--ignore-platform-req=php+' ] dependency-preference: ['current', 'lowest', 'stable'] fail-fast: false name: PHP ${{ matrix.php-versions }} ${{ matrix.dependency-preference }} deps @ ${{ matrix.operating-system }} @@ -22,6 +21,6 @@ jobs: tools: 'composer:v2' extensions: pcov, mbstring, posix, dom, soap - name: Install dependencies - run: composer update --prefer-dist --no-progress --no-suggest ${{ matrix.dependency-preference == 'lowest' && '--prefer-lowest' || '' }} ${{ matrix.dependency-preference == 'stable' && '--prefer-stable' || '' }} ${{ matrix.composer-options }} + run: composer update --prefer-dist --no-progress --no-suggest ${{ matrix.dependency-preference == 'lowest' && '--prefer-lowest' || '' }} ${{ matrix.dependency-preference == 'stable' && '--prefer-stable' || '' }} - name: Run the tests run: ./vendor/bin/phpunit diff --git a/composer.json b/composer.json index 1c56e9c..2752484 100644 --- a/composer.json +++ b/composer.json @@ -39,14 +39,14 @@ "php-soap/engine": "^2.21", "php-soap/wsdl": "^1.19", "php-soap/xml": "^1.10", - "php-soap/wsdl-reader": "~0.34" + "php-soap/wsdl-reader": "~0.35" }, "require-dev": { - "vimeo/psalm": "~6.13", - "phpunit/phpunit": "~12.4", - "php-cs-fixer/shim": "~3.88", + "vimeo/psalm": "^7.12", + "phpunit/phpunit": "^12.4", + "php-cs-fixer/shim": "^3.88", "symfony/var-dumper": "^7.0 || ^6.4 || ^8.0", - "php-standard-library/psalm-plugin": "^2.3", + "php-standard-library/psalm-plugin": "^2.5", "php-soap/engine-integration-tests": "^1.12", "php-soap/psr18-transport": "^2.0", "guzzlehttp/guzzle": "^7.8 || ^8.0", diff --git a/src/Encoder/MatchingValueEncoder.php b/src/Encoder/MatchingValueEncoder.php index 56becf2..1d9eb55 100644 --- a/src/Encoder/MatchingValueEncoder.php +++ b/src/Encoder/MatchingValueEncoder.php @@ -51,9 +51,10 @@ private function to(Context $context, mixed $value): string default => [$matchedEncoderInfo[0], $matchedEncoderInfo[1] ?? $this->defaultEncoder], }; - /** @psalm-suppress RedundantConditionGivenDocblockType - This gives better feedback to people using this encoder */ // Ensure that the encoderDetector returns valid data. + /** @psalm-suppress RedundantConditionGivenDocblockType - This gives better feedback to people using this encoder */ invariant($context instanceof Context, 'The MatchingValueEncoder::$encoderDetector callable must return a Context or an array with a Context as first element.'); + /** @psalm-suppress RedundantConditionGivenDocblockType - This gives better feedback to people using this encoder */ invariant($encoder instanceof XmlEncoder, 'The MatchingValueEncoder::$encoderDetector callable must return a Context or an array with a Context as first element and an optional XmlEncoder as second element.'); return $encoder->iso($context)->to($value); diff --git a/src/Encoder/ObjectEncoder.php b/src/Encoder/ObjectEncoder.php index 9d68be3..82335ca 100644 --- a/src/Encoder/ObjectEncoder.php +++ b/src/Encoder/ObjectEncoder.php @@ -11,7 +11,7 @@ use Soap\Encoding\Xml\Writer\XsdTypeXmlElementWriter; use Soap\Encoding\Xml\Writer\XsiAttributeBuilder; use VeeWee\Reflecta\Iso\Iso; -use function is_array; +use function is_object; use function Psl\Fun\lazy; use function VeeWee\Reflecta\Iso\object_data; use function VeeWee\Reflecta\Reflect\property_is_initialized; @@ -20,7 +20,7 @@ use function VeeWee\Xml\Writer\Builder\value as buildValue; /** - * @template TObj extends object + * @template TObj of object * * @implements XmlEncoder */ @@ -70,8 +70,7 @@ function (string|Element $value) use ($context, $objectAccess) : object { */ private function to(Context $context, ObjectAccess $objectAccess, object|array $data): string { - /** @var object $data */ - $data = is_array($data) ? (object) $data : $data; + $data = is_object($data) ? $data : (object) $data; $defaultAction = writeChildren([]); $children = [ diff --git a/src/EncoderRegistry.php b/src/EncoderRegistry.php index f90272a..05853c9 100644 --- a/src/EncoderRegistry.php +++ b/src/EncoderRegistry.php @@ -159,7 +159,7 @@ public static function default(): self ), // Apache Map - $qNameFormatter(ApacheMapDetector::NAMESPACE, 'Map') => new SoapEnc\ApacheMapEncoder(), + $qNameFormatter(ApacheMapDetector::NAMESPACE_URI, 'Map') => new SoapEnc\ApacheMapEncoder(), // Special XSD cases $qNameFormatter($xsd, 'any') => new AnyElementEncoder(), From 8fb427f801f7c8da1e9a07fbce320765927f828a Mon Sep 17 00:00:00 2001 From: Toon Verwerft Date: Fri, 20 Nov 2026 16:30:53 +0100 Subject: [PATCH 3/3] Run the benchmark baseline on PHP 8.5 The benchmark job installs the base branch before the PR branch, on the same PHP version. A base branch that does not allow PHP 8.6 yet cannot install on 8.6, so the job failed before it recorded a baseline. --- .github/workflows/benchmarks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/benchmarks.yaml b/.github/workflows/benchmarks.yaml index 55dacfa..027e757 100644 --- a/.github/workflows/benchmarks.yaml +++ b/.github/workflows/benchmarks.yaml @@ -13,7 +13,7 @@ jobs: - name: Install PHP uses: shivammathur/setup-php@master with: - php-version: '8.6' + php-version: '8.5' tools: 'composer:v2' extensions: mbstring, dom, soap coverage: none