Skip to content

Commit 85e5f10

Browse files
authored
Drop compatibility with PHP < 8.1 and Symfony < 5.4 (#57)
* Drop compatibility with PHP < 8.1 and Symfony < 5.4 * Fixed PhpStan --------- Co-authored-by: Yann Eugoné <[email protected]>
1 parent 5f85ac1 commit 85e5f10

File tree

4 files changed

+5
-19
lines changed

4 files changed

+5
-19
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
include:
16-
- php-version: '7.4'
17-
symfony-version: '4.4.*'
18-
- php-version: '8.2'
19-
symfony-version: '4.4.*'
20-
- php-version: '7.4'
16+
- php-version: '8.1'
2117
symfony-version: '5.4.*'
2218
- php-version: '8.2'
2319
symfony-version: '5.4.*'

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99
}
1010
],
1111
"require": {
12-
"php": "^7.4|^8.0",
12+
"php": "^8.1",
1313
"ext-openssl": "*",
14-
"symfony/framework-bundle": "^4.4|^5.0|^6.0",
14+
"symfony/framework-bundle": "^5.4|^6.0",
1515
"doctrine/orm": "^2.7",
1616
"doctrine/doctrine-bundle": "^2.0",
1717
"yokai/dependency-injection": "^1.0"
1818
},
1919
"require-dev": {
2020
"phpunit/phpunit": "^9.5",
2121
"phpspec/prophecy-phpunit": "^2.0",
22-
"symfony/yaml": "^4.4|^5.2|^6.0",
22+
"symfony/yaml": "^5.4|^6.0",
2323
"phpstan/phpstan": "^1.7",
2424
"symplify/easy-coding-standard": "^11.3"
2525
},

phpstan-baseline.neon

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ parameters:
3535
count: 1
3636
path: src/Entity/TokenUsage.php
3737

38-
-
39-
message: "#^Call to an undefined method Symfony\\\\Component\\\\HttpFoundation\\\\RequestStack\\:\\:getMasterRequest\\(\\)\\.$#"
40-
count: 1
41-
path: src/InformationGuesser/InformationGuesser.php
42-
4338
-
4439
message: "#^Cannot cast mixed to string\\.$#"
4540
count: 1

src/InformationGuesser/InformationGuesser.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,7 @@ public function __construct(RequestStack $requestStack)
2828

2929
public function get(): array
3030
{
31-
if (\method_exists($this->requestStack, 'getMainRequest')) {
32-
$request = $this->requestStack->getMainRequest();
33-
} else {
34-
$request = $this->requestStack->getMasterRequest();
35-
}
36-
31+
$request = $this->requestStack->getMainRequest();
3732
if (!$request) {
3833
return [];
3934
}

0 commit comments

Comments
 (0)