Skip to content

Commit 190b722

Browse files
authored
Merge pull request #589 from veewee/php-85-upgrade
Upgrade to PHP 8.5 support
2 parents e0527cf + ef0a79d commit 190b722

File tree

60 files changed

+266
-471
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+266
-471
lines changed

.github/workflows/grumphp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
matrix:
1010
operating-system: ['ubuntu-latest']
11-
php-versions: ['8.2', '8.3', '8.4']
11+
php-versions: ['8.3', '8.4', '8.5']
1212
composer-options: ['', '--prefer-lowest']
1313
fail-fast: false
1414
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }} with ${{ matrix.composer-options }}

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
}
1313
],
1414
"require": {
15-
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
16-
"azjezz/psl": "^3.0",
15+
"php": "~8.3.0 || ~8.4.0 || ~8.5.0",
16+
"azjezz/psl": "^3.0 || ^4.0",
1717
"laminas/laminas-code": "^4.14.0",
1818
"php-soap/cached-engine": "~0.3",
1919
"php-soap/engine": "^2.14.0",
@@ -32,12 +32,12 @@
3232
"nyholm/psr7": "^1.5",
3333
"php-http/vcr-plugin": "^1.2",
3434
"php-parallel-lint/php-parallel-lint": "^1.3",
35-
"phpro/grumphp-shim": "^2.9",
35+
"phpro/grumphp-shim": "^2.17",
3636
"phpspec/phpspec": "~7.2",
3737
"phpspec/prophecy-phpunit": "^2.0.1",
38-
"phpstan/phpstan": "^1.12.7",
39-
"phpunit/phpunit": "~10.5.37",
40-
"squizlabs/php_codesniffer": "^3.7.1",
38+
"phpstan/phpstan": "^2.1",
39+
"phpunit/phpunit": "~12.4",
40+
"squizlabs/php_codesniffer": "^4.0",
4141
"symfony/cache": "^6.4 || ^7.0"
4242
},
4343
"config": {

phpstan.neon

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
parameters:
22
level: max
3+
treatPhpDocTypesAsCertain: false
4+
paths:
5+
- src
36
ignoreErrors:
47
# This is something we hope to fix in PHP 7.4
58
# https://wiki.php.net/rfc/covariant-returns-and-contravariant-parameters

phpunit.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
44
displayDetailsOnPhpunitDeprecations="true"
5+
displayDetailsOnTestsThatTriggerWarnings="true"
6+
failOnWarning="true"
7+
failOnPhpunitWarning="true"
58
bootstrap="./test/bootstrap.php"
69
colors="true"
710
>

src/Phpro/SoapClient/CodeGenerator/ClientGenerator.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public function __construct(RuleSetInterface $ruleSet)
4343
public function generate(FileGenerator $file, $client): string
4444
{
4545
try {
46-
// @phpstan-ignore-next-line
4746
$class = $file->getClass() ?: new ClassGenerator();
4847
} catch (ClassNotFoundException $exception) {
4948
$class = new ClassGenerator();

src/Phpro/SoapClient/CodeGenerator/Config/Config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ final class Config
4444
protected $clientNamespace = '';
4545

4646
/**
47-
* @var Engine
47+
* @var Engine|null
4848
*/
49-
protected $engine;
49+
protected $engine = null;
5050

5151
/**
5252
* @var string

src/Phpro/SoapClient/CodeGenerator/TypeGenerator.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ public function __construct(RuleSetInterface $ruleSet)
4040
public function generate(FileGenerator $file, $type): string
4141
{
4242
try {
43-
// @phpstan-ignore-next-line
4443
$class = $file->getClass() ?: new ClassGenerator();
4544
} catch (ClassNotFoundException $exception) {
4645
$class = new ClassGenerator();

test/PhproTest/SoapClient/Functional/Client/ClientTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Phpro\SoapClient\Type\MixedResult;
1717
use Phpro\SoapClient\Type\MultiArgumentRequest;
1818
use PHPUnit\Framework\TestCase;
19+
use PHPUnit\Framework\Attributes\Test;
1920
use Soap\Psr18Transport\Psr18Transport;
2021

2122
class ClientTest extends TestCase
@@ -56,7 +57,7 @@ public function add(MultiArgumentRequest $request): MixedResult
5657
};
5758
}
5859

59-
/** @test */
60+
#[Test]
6061
public function it_can_request_soap_endpoint(): void
6162
{
6263
$response = $this->client->add(new MultiArgumentRequest([

test/PhproTest/SoapClient/Unit/Caller/EngineCallerTest.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Phpro\SoapClient\Type\ResultInterface;
1212
use Phpro\SoapClient\Type\ResultProviderInterface;
1313
use PHPUnit\Framework\TestCase;
14+
use PHPUnit\Framework\Attributes\Test;
1415
use Prophecy\PhpUnit\ProphecyTrait;
1516
use Prophecy\Prophecy\ObjectProphecy;
1617
use Soap\Engine\Engine;
@@ -32,7 +33,7 @@ protected function setUp(): void
3233
$this->caller = new EngineCaller($this->engine->reveal());
3334
}
3435

35-
/** @test */
36+
#[Test]
3637
public function it_can_handle_simple_request_and_response(): void
3738
{
3839
$request = $this->prophesize(RequestInterface::class)->reveal();
@@ -44,7 +45,7 @@ public function it_can_handle_simple_request_and_response(): void
4445
self::assertSame($response, $result);
4546
}
4647

47-
/** @test */
48+
#[Test]
4849
public function it_can_handle_multi_argument_request(): void
4950
{
5051
$request = new MultiArgumentRequest($args = [1, 2, 3]);
@@ -56,7 +57,7 @@ public function it_can_handle_multi_argument_request(): void
5657
self::assertSame($response, $result);
5758
}
5859

59-
/** @test */
60+
#[Test]
6061
public function it_can_handle_result_providers(): void
6162
{
6263
$request = $this->prophesize(RequestInterface::class)->reveal();
@@ -70,7 +71,7 @@ public function it_can_handle_result_providers(): void
7071
self::assertSame($response, $result);
7172
}
7273

73-
/** @test */
74+
#[Test]
7475
public function it_can_handle_mixed_results(): void
7576
{
7677
$request = $this->prophesize(RequestInterface::class)->reveal();
@@ -82,7 +83,7 @@ public function it_can_handle_mixed_results(): void
8283
self::assertSame(132, $result->getResult());
8384
}
8485

85-
/** @test */
86+
#[Test]
8687
public function it_can_handle_exceptions(): void
8788
{
8889
$request = $this->prophesize(RequestInterface::class)->reveal();

test/PhproTest/SoapClient/Unit/Caller/EventDispatchingCallerTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Phpro\SoapClient\Type\RequestInterface;
1313
use Phpro\SoapClient\Type\ResultInterface;
1414
use PHPUnit\Framework\TestCase;
15+
use PHPUnit\Framework\Attributes\Test;
1516
use Prophecy\Argument;
1617
use Prophecy\PhpUnit\ProphecyTrait;
1718
use Prophecy\Prophecy\ObjectProphecy;
@@ -32,7 +33,7 @@ protected function setUp(): void
3233
}
3334

3435

35-
/** @test */
36+
#[Test]
3637
public function it_triggers_events_for_successfull_requests(): void
3738
{
3839
$request = $this->prophesize(RequestInterface::class)->reveal();
@@ -53,7 +54,7 @@ public function it_triggers_events_for_successfull_requests(): void
5354
self::assertSame($result, $actual);
5455
}
5556

56-
/** @test */
57+
#[Test]
5758
public function it_triggers_events_for_failing_requests(): void
5859
{
5960
$request = $this->prophesize(RequestInterface::class)->reveal();

0 commit comments

Comments
 (0)