Skip to content

Commit 8b27af9

Browse files
committed
Only support Symfony 6
1 parent 7a198ec commit 8b27af9

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010

1111
strategy:
1212
matrix:
13-
php: [8.0, 7.4, 7.3, 7.2, 7.1, 7.0]
13+
php: [8.0, 8.1]
1414
dependency-version: [prefer-lowest, prefer-stable]
1515
os: [ubuntu-latest]
1616

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ phpunit.xml
22
composer.lock
33
composer.phar
44
/vendor/
5+
.phpunit.result.cache

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
}
1313
],
1414
"require": {
15-
"php": "^7.0|^8.0",
16-
"symfony/http-foundation": "~2.7|~3.0|~4.0|~5.0|~6.0",
17-
"symfony/http-kernel": "~2.7|~3.0|~4.0|~5.0|~6.0"
15+
"php": "^8.0",
16+
"symfony/http-foundation": "^6",
17+
"symfony/http-kernel": "^6"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "^6|^7|^8|^9",
20+
"phpunit/phpunit": "^9",
2121
"squizlabs/php_codesniffer": "^3.5"
2222
},
2323
"autoload": {
@@ -37,7 +37,7 @@
3737
},
3838
"extra": {
3939
"branch-alias": {
40-
"dev-master": "2.0-dev"
40+
"dev-master": "2.1-dev"
4141
}
4242
}
4343
}

src/Cors.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Asm89\Stack;
1313

14+
use Symfony\Component\HttpFoundation\Response;
1415
use Symfony\Component\HttpKernel\HttpKernelInterface;
1516
use Symfony\Component\HttpFoundation\Request;
1617

@@ -36,13 +37,13 @@ class Cors implements HttpKernelInterface
3637
'supportsCredentials' => false,
3738
];
3839

39-
public function __construct(HttpKernelInterface $app, array $options = [])
40+
public function __construct(HttpKernelInterface $app, array $options = null)
4041
{
4142
$this->app = $app;
4243
$this->cors = new CorsService(array_merge($this->defaultOptions, $options));
4344
}
4445

45-
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
46+
public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response
4647
{
4748
if ($this->cors->isPreflightRequest($request)) {
4849
$response = $this->cors->handlePreflightRequest($request);

tests/MockApp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function __construct(array $responseHeaders)
1616
$this->responseHeaders = $responseHeaders;
1717
}
1818

19-
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
19+
public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response
2020
{
2121
$response = new Response();
2222

0 commit comments

Comments
 (0)