Skip to content

Commit

Permalink
Run tests on PHP 8.4 (#240)
Browse files Browse the repository at this point in the history
* Run tests on PHP 8.4

* Upgrade Psalm version

* Fix Psalm version

* Set infection version explicitly

* Set infection version explicitly

* Set infection version explicitly

* Fix implicitly nullable type

* Fix implicit nullable type

* Fix implicit nullable type
  • Loading branch information
viktorprogger authored Feb 9, 2025
1 parent 2732619 commit 0b72669
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bechmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
os: >-
['ubuntu-latest', 'windows-latest']
php: >-
['8.1', '8.2', '8.3']
['8.1', '8.2', '8.3', '8.4']
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.1', '8.2', '8.3']
['8.1', '8.2', '8.3', '8.4']
2 changes: 1 addition & 1 deletion .github/workflows/composer-require-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.1', '8.2', '8.3']
['8.1', '8.2', '8.3', '8.4']
2 changes: 1 addition & 1 deletion .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.3']
['8.4']
secrets:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
2 changes: 1 addition & 1 deletion .github/workflows/rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.3']
['8.4']
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.1', '8.2', '8.3']
['8.1', '8.2', '8.3', '8.4']
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@
"phpunit/phpunit": "^10.5",
"rector/rector": "^2.0",
"roave/infection-static-analysis-plugin": "^1.34",
"infection/infection": "^0.27.8||^0.29.0",
"spatie/phpunit-watcher": "^1.23",
"vimeo/psalm": "^5.20",
"vimeo/psalm": "^5.20||^6.0",
"yiisoft/test-support": "^3.0",
"yiisoft/yii-debug": "dev-master"
},
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Middleware/Consume/MiddlewareDispatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public function handleConsume(ConsumeRequest $request): ConsumeRequest
}

private function createDispatcher(
ContainerInterface $container = null,
?ContainerInterface $container = null,
): ConsumeMiddlewareDispatcher {
$container ??= $this->createContainer([AdapterInterface::class => new FakeAdapter()]);
$callableFactory = new CallableFactory($container);
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Middleware/Consume/MiddlewareFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function testInvalidMiddlewareWithWrongController(): void
);
}

private function getMiddlewareFactory(ContainerInterface $container = null): MiddlewareFactoryConsumeInterface
private function getMiddlewareFactory(?ContainerInterface $container = null): MiddlewareFactoryConsumeInterface
{
$container ??= $this->getContainer([AdapterInterface::class => new FakeAdapter()]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public function handleFailure(FailureHandlingRequest $request): FailureHandlingR
}

private function createDispatcher(
ContainerInterface $container = null,
?ContainerInterface $container = null,
): FailureMiddlewareDispatcher {
$container ??= $this->createContainer([AdapterInterface::class => new FakeAdapter()]);
$callableFactory = new CallableFactory($container);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function testInvalidMiddlewareWithWrongController(): void
);
}

private function getMiddlewareFactory(ContainerInterface $container = null): MiddlewareFactoryFailureInterface
private function getMiddlewareFactory(?ContainerInterface $container = null): MiddlewareFactoryFailureInterface
{
$container ??= $this->getContainer([AdapterInterface::class => new FakeAdapter()]);

Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Middleware/Push/MiddlewareDispatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function handlePush(PushRequest $request): PushRequest
}

private function createDispatcher(
ContainerInterface $container = null,
?ContainerInterface $container = null,
): PushMiddlewareDispatcher {
$container ??= $this->createContainer([AdapterInterface::class => new FakeAdapter()]);
$callableFactory = new CallableFactory($container);
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Middleware/Push/MiddlewareFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function testInvalidMiddlewareWithWrongController(): void
);
}

private function getMiddlewareFactory(ContainerInterface $container = null): MiddlewareFactoryPushInterface
private function getMiddlewareFactory(?ContainerInterface $container = null): MiddlewareFactoryPushInterface
{
$container ??= $this->getContainer([AdapterInterface::class => new FakeAdapter()]);

Expand Down

0 comments on commit 0b72669

Please sign in to comment.