Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/bc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.0']
['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.2']
['8.4']
secrets:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 2.2.2 under development

- no changes in this release.
- Bug #79: Explicitly marking parameters as nullable (@Tigrov)

## 2.2.1 March 05, 2025

Expand Down
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}
],
"require": {
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
"php": "~7.4.0 || 8.0 - 8.4",
"ext-hash": "*",
"psr/http-factory": "^1.0",
"psr/http-factory-implementation": "1.0",
Expand All @@ -48,8 +48,8 @@
"require-dev": {
"maglnet/composer-require-checker": "^3.8 || ^4.2",
"nyholm/psr7": "^1.8.2",
"phpunit/phpunit": "^9.6.22",
"rector/rector": "^2.0.9",
"phpunit/phpunit": "^9.6.23",
"rector/rector": "^2.0.16",
"roave/infection-static-analysis-plugin": "^1.18",
"spatie/phpunit-watcher": "^1.23.6",
"vimeo/psalm": "^4.30 || ^5.26.1 || ^6.8.8",
Expand All @@ -76,7 +76,6 @@
},
"config": {
"sort-packages": true,
"bump-after-update": "dev",
"allow-plugins": {
"infection/extension-installer": true,
"composer/package-versions-deprecated": true
Expand Down
2 changes: 1 addition & 1 deletion src/CsrfHeaderMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ final class CsrfHeaderMiddleware implements MiddlewareInterface

public function __construct(
ResponseFactoryInterface $responseFactory,
RequestHandlerInterface $failureHandler = null
?RequestHandlerInterface $failureHandler = null
) {
$this->responseFactory = $responseFactory;
$this->failureHandler = $failureHandler;
Expand Down
2 changes: 1 addition & 1 deletion src/CsrfMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ final class CsrfMiddleware implements MiddlewareInterface
public function __construct(
ResponseFactoryInterface $responseFactory,
CsrfTokenInterface $token,
RequestHandlerInterface $failureHandler = null
?RequestHandlerInterface $failureHandler = null
) {
$this->responseFactory = $responseFactory;
$this->token = $token;
Expand Down
2 changes: 1 addition & 1 deletion src/CsrfTokenMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ final class CsrfTokenMiddleware implements MiddlewareInterface
public function __construct(
ResponseFactoryInterface $responseFactory,
CsrfTokenInterface $token,
RequestHandlerInterface $failureHandler = null
?RequestHandlerInterface $failureHandler = null
) {
$this->responseFactory = $responseFactory;
$this->token = $token;
Expand Down
2 changes: 1 addition & 1 deletion tests/CsrfHeaderMiddlewareProcessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function handle(ServerRequestInterface $request): ResponseInterface
}

private function createMiddleware(
RequestHandlerInterface $failureHandler = null
?RequestHandlerInterface $failureHandler = null
): CsrfHeaderMiddleware {
return new CsrfHeaderMiddleware(new Psr17Factory(), $failureHandler);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/CsrfTokenMiddlewareProcessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ private function getBodyRequestParamsByToken(string $token): array

protected function createCsrfTokenMiddleware(
?CsrfTokenInterface $csrfToken = null,
RequestHandlerInterface $failureHandler = null
?RequestHandlerInterface $failureHandler = null
): CsrfTokenMiddleware {
$csrfToken = new MaskedCsrfToken($csrfToken ?? $this->createCsrfToken());
$this->token = $csrfToken->getValue();
Expand Down
2 changes: 1 addition & 1 deletion tests/DeprecatedTokenCsrfMiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ private function getBodyRequestParamsByToken(string $token): array

protected function createCsrfMiddleware(
?CsrfTokenInterface $csrfToken = null,
RequestHandlerInterface $failureHandler = null
?RequestHandlerInterface $failureHandler = null
): CsrfMiddleware {
$csrfToken = new MaskedCsrfToken($csrfToken ?? $this->createCsrfToken());
$this->token = $csrfToken->getValue();
Expand Down
2 changes: 1 addition & 1 deletion tests/MaskedCsrfTokenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function testBase(): void
$this->assertSame('test_token', TokenMask::remove($csrfToken->getValue()));
}

private function createCsrfToken(string $token = null): MaskedCsrfToken
private function createCsrfToken(?string $token = null): MaskedCsrfToken
{
$mock = $this->createMock(MockCsrfTokenStorage::class);
if ($token !== null) {
Expand Down