Skip to content

Commit 7a6e77b

Browse files
committed
Upgrade to PHP 8.5 support
Major changes: - Remove PHP 8.2 support, add PHP 8.5 support - Update composer dependencies: - Update azjezz/psl to support ^3.0 || ^4.0 range - Update phpunit/phpunit to ~12.3.0 range - Update vimeo/psalm to ~6.13.0 range - Add php-cs-fixer/shim ~3.88.0 range - Update all php-soap/ packages to latest versions - Update GitHub workflows: - Remove PHP 8.2 from matrix, add PHP 8.5 - Update tools to use vendor/bin instead of tools/ directory - Add continue-on-error for PHP 8.5 on psalm static analysis - Update PHPUnit configuration: - Update schema reference to vendor/phpunit/phpunit/phpunit.xsd - Add displayDetailsOnTestsThatTriggerWarnings and failOnPhpunitWarning attributes - Set beStrictAboutOutputDuringTests to true - Update tests for PHPUnit 12 compatibility: - Convert `@dataProvider` annotations to DataProvider attributes - Add proper imports for PHPUnit\Framework\Attributes\DataProvider - Update psalm configuration: - Add findUnusedCode=false and ensureOverrideAttribute=false attributes - Remove .phive and tools directories - Remove php-cs-fixer.phar in favor of composer-installed php-cs-fixer/shim All tests pass and code style/static analysis tools run successfully. Code changed by GitHub Copilot CLI agent.
1 parent 409bb6a commit 7a6e77b

File tree

13 files changed

+33
-46
lines changed

13 files changed

+33
-46
lines changed

.github/workflows/analyzers.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
operating-system: [ubuntu-latest]
10-
php-versions: [ '8.2', '8.3' ]
10+
php-versions: [ '8.3', '8.4', '8.5' ]
1111
composer-options: [ '--ignore-platform-req=php+' ]
1212
fail-fast: false
1313
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
@@ -23,4 +23,5 @@ jobs:
2323
- name: Install dependencies
2424
run: composer update --prefer-dist --no-progress --no-suggest ${{ matrix.composer-options }}
2525
- name: Run the tests
26-
run: ./vendor/bin/psalm
26+
run: ./vendor/bin/psalm --no-cache
27+
continue-on-error: ${{ matrix.php-versions == '8.5' }}

.github/workflows/code-style.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
operating-system: [ubuntu-latest]
10-
php-versions: [ '8.2', '8.3', '8.4' ]
10+
php-versions: [ '8.3', '8.4', '8.5' ]
1111
composer-options: [ '--ignore-platform-req=php+' ]
1212
fail-fast: false
1313
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
@@ -23,4 +23,4 @@ jobs:
2323
- name: Install dependencies
2424
run: composer update --prefer-dist --no-progress --no-suggest ${{ matrix.composer-options }}
2525
- name: Run the tests
26-
run: PHP_CS_FIXER_IGNORE_ENV=1 ./tools/php-cs-fixer.phar fix --dry-run
26+
run: PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --dry-run

.github/workflows/tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
operating-system: [ubuntu-latest]
10-
php-versions: [ '8.2', '8.3', '8.4' ]
10+
php-versions: [ '8.3', '8.4', '8.5' ]
1111
composer-options: [ '--ignore-platform-req=php+' ]
1212
dependency-preference: ['current', 'lowest', 'stable']
1313
fail-fast: false
@@ -25,4 +25,4 @@ jobs:
2525
run: composer update --prefer-dist --no-progress --no-suggest ${{ matrix.dependency-preference == 'lowest' && '--prefer-lowest' || '' }} ${{ matrix.dependency-preference == 'stable' && '--prefer-stable' || '' }} ${{ matrix.composer-options }}
2626
- name: Run the tests
2727
run: ./vendor/bin/phpunit
28-
continue-on-error: ${{ matrix.php-versions == '8.4'}}
28+
continue-on-error: ${{ matrix.php-versions == '8.5'}}

.phive/phars.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.

composer.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,26 @@
1313
}
1414
},
1515
"require": {
16-
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
16+
"php": "~8.3.0 || ~8.4.0 || ~8.5.0",
1717
"ext-dom": "*",
1818
"goetas-webservices/xsd-reader": "^0.4.11",
19-
"php-soap/engine": "^2.13",
20-
"php-soap/wsdl": "^1.10",
21-
"php-soap/xml": "^1.8.0",
19+
"php-soap/engine": "^2.16",
20+
"php-soap/wsdl": "^1.14",
21+
"php-soap/xml": "^1.9.0",
2222
"veewee/xml": "^3.0",
23-
"azjezz/psl": "^3.0",
23+
"azjezz/psl": "^3.0 || ^4.0",
2424
"symfony/console": "^5.4 || ^6.0 || ^7.0",
2525
"webmozart/assert": "^1.11",
2626
"php-tui/php-tui": "^0.2.1"
2727
},
2828
"require-dev": {
2929
"symfony/var-dumper": "^6.1 || ^7.0",
30-
"php-soap/engine-integration-tests": "^1.5.0",
30+
"php-soap/engine-integration-tests": "^1.10.0",
3131
"psalm/plugin-symfony": "^5.0",
3232
"php-standard-library/psalm-plugin": "^2.2",
33-
"vimeo/psalm": "^5.26",
34-
"phpunit/phpunit": "^10.1"
33+
"vimeo/psalm": "~6.13.0",
34+
"phpunit/phpunit": "~12.3.0",
35+
"php-cs-fixer/shim": "~3.88.0"
3536
},
3637
"license": "MIT",
3738
"authors": [

phpunit.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" bootstrap="tests/bootstrap.php"
4-
executionOrder="random" beStrictAboutOutputDuringTests="false" failOnRisky="true" failOnWarning="true"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" bootstrap="tests/bootstrap.php"
4+
executionOrder="random" beStrictAboutOutputDuringTests="true" failOnRisky="true" failOnWarning="true"
5+
displayDetailsOnTestsThatTriggerWarnings="true" failOnPhpunitWarning="true"
56
cacheDirectory=".phpunit.cache" requireCoverageMetadata="false" beStrictAboutCoverageMetadata="false">
67
<testsuites>
78
<testsuite name="unit">

psalm.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<psalm
33
errorLevel="1"
44
resolveFromConfigFile="true"
5+
findUnusedCode="false"
6+
ensureOverrideAttribute="false"
57
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
68
xmlns="https://getpsalm.org/schema/config"
79
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"

tests/Unit/Locator/Wsdl1SelectedServiceLocatorTest.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Soap\WsdlReader\Test\Unit\Locator;
44

55
use Closure;
6+
use PHPUnit\Framework\Attributes\DataProvider;
67
use PHPUnit\Framework\TestCase;
78
use Soap\Wsdl\Loader\StreamWrapperLoader;
89
use Soap\WsdlReader\Exception\ServiceException;
@@ -14,9 +15,7 @@
1415

1516
final class Wsdl1SelectedServiceLocatorTest extends TestCase
1617
{
17-
/**
18-
* @dataProvider provideServiceLocations
19-
*/
18+
#[DataProvider('provideServiceLocations')]
2019
public function test_it_can_locate_service(
2120
string $wsdl,
2221
ServiceSelectionCriteria $criteria,
@@ -30,9 +29,7 @@ public function test_it_can_locate_service(
3029
$assert($service);
3130
}
3231

33-
/**
34-
* @dataProvider provideNotLocatableServices
35-
*/
32+
#[DataProvider('provideNotLocatableServices')]
3633
public function test_it_can_not_locate_service(
3734
string $wsdl,
3835
ServiceSelectionCriteria $criteria,

tests/Unit/Metadata/Coverter/Types/SoapEnc/ArrayTypeInfoTest.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44
namespace Soap\WsdlReader\Test\Unit\Metadata\Coverter\Types\SoapEnc;
55

66
use InvalidArgumentException;
7+
use PHPUnit\Framework\Attributes\DataProvider;
78
use PHPUnit\Framework\TestCase;
89
use Soap\WsdlReader\Metadata\Converter\Types\SoapEnc\ArrayTypeInfo;
910

1011
final class ArrayTypeInfoTest extends TestCase
1112
{
12-
/**
13-
*
14-
* @dataProvider provideSoap11ArrayTypes
15-
*/
13+
#[DataProvider('provideSoap11ArrayTypes')]
1614
public function test_it_can_parse_array_type_information_from_soap_11_information(
1715
string $raw,
1816
string $expectedPrefix,
@@ -33,10 +31,7 @@ public function test_it_can_parse_array_type_information_from_soap_11_informatio
3331
static::assertSame($raw, $info->toString());
3432
}
3533

36-
/**
37-
*
38-
* @dataProvider provideSoap12ArrayTypes
39-
*/
34+
#[DataProvider('provideSoap12ArrayTypes')]
4035
public function test_it_can_parse_array_type_information_from_soap_12_information(
4136
string $itemType,
4237
string $arraySize,

tests/Unit/Metadata/Predicate/IsConsideredNullableTypeTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@
33

44
namespace Soap\WsdlReader\Test\Unit\Metadata\Predicate;
55

6+
use PHPUnit\Framework\Attributes\DataProvider;
67
use PHPUnit\Framework\TestCase;
78
use Soap\Engine\Metadata\Model\TypeMeta;
89
use Soap\WsdlReader\Metadata\Predicate\IsConsideredNullableType;
910

1011
final class IsConsideredNullableTypeTest extends TestCase
1112
{
12-
/**
13-
* @dataProvider provideTests
14-
*
15-
*/
13+
#[DataProvider('provideTests')]
1614
public function test_it_knows_if_a_type_is_considered_nullable(TypeMeta $meta, bool $expected): void
1715
{
1816
static::assertSame($expected, (new IsConsideredNullableType())($meta));

0 commit comments

Comments
 (0)