Skip to content

Commit 59f6e8b

Browse files
Merge pull request #1 from SBSEDV/symfony8
Add Symfony 8 support
2 parents fefffce + 7194428 commit 59f6e8b

File tree

6 files changed

+19
-24
lines changed

6 files changed

+19
-24
lines changed

.github/workflows/phpcsfixer.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,24 @@ permissions:
99

1010
jobs:
1111
phpcsfixer:
12-
runs-on: ${{ matrix.operating-system }}
12+
runs-on: ubuntu-latest
1313

1414
strategy:
1515
matrix:
16-
operating-system: [ubuntu-latest]
17-
php-versions: ["8.2"]
16+
php_version: ["8.2"]
1817

19-
name: PHPCSFixer with PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
18+
name: PHPCSFixer with PHP ${{ matrix.php_version }}
2019

2120
steps:
2221
- uses: actions/checkout@v3
2322

2423
- name: Setup PHP
2524
uses: shivammathur/setup-php@v2
2625
with:
27-
php-version: ${{ matrix.php-versions }}
26+
php-version: ${{ matrix.php_version }}
2827

2928
- name: Install Composer packages
30-
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
29+
run: composer install -q --no-ansi --no-interaction --prefer-dist
3130

3231
- name: Run PHPCSFixer
3332
run: $GITHUB_WORKSPACE/vendor/bin/php-cs-fixer fix --dry-run

.github/workflows/phpstan.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,24 @@ permissions:
99

1010
jobs:
1111
phpstan:
12-
runs-on: ${{ matrix.operating-system }}
12+
runs-on: ubuntu-latest
1313

1414
strategy:
1515
matrix:
16-
operating-system: [ubuntu-latest]
17-
php-versions: ["8.2", "8.3", "8.4"]
16+
php_version: ["8.2", "8.3", "8.4", "8.5"]
1817

19-
name: PHPStan with PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
18+
name: PHPStan with PHP ${{ matrix.php_version }}
2019

2120
steps:
2221
- uses: actions/checkout@v3
2322

2423
- name: Setup PHP
2524
uses: shivammathur/setup-php@v2
2625
with:
27-
php-version: ${{ matrix.php-versions }}
26+
php-version: ${{ matrix.php_version }}
2827

2928
- name: Install Composer packages
30-
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
29+
run: composer install -q --no-ansi --no-interaction --prefer-dist
3130

32-
- name: Run PHPSTAN
31+
- name: Run PHPStan
3332
run: $GITHUB_WORKSPACE/vendor/bin/phpstan --error-format=github

composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,18 @@
1616
},
1717
"require": {
1818
"php": "^8.2",
19-
"symfony/framework-bundle": "^7.0"
19+
"symfony/framework-bundle": "^7.0 || ^8.0"
2020
},
2121
"require-dev": {
2222
"friendsofphp/php-cs-fixer": "^3.89",
23+
"monolog/monolog": "^3.5",
2324
"phpstan/extension-installer": "^1.4",
2425
"phpstan/phpstan": "^2.1",
2526
"phpstan/phpstan-symfony": "^2.0",
26-
"symfony/http-client": "^7.0",
27-
"symfony/monolog-bundle": "^3.6",
28-
"symfony/twig-bundle": "^7.0",
29-
"symfony/uid": "^7.0",
27+
"symfony/http-client": "^7.0 || ^8.0",
28+
"symfony/monolog-bundle": "^3.6 || ^4.0",
29+
"symfony/twig-bundle": "^7.0 || ^8.0",
30+
"symfony/uid": "^7.0 || ^8.0",
3031
"twig/twig": "^3.3"
3132
},
3233
"extra": {

src/Generator/RequestIdGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ public function __construct(
1111

1212
public function createNewRequestId(): string
1313
{
14-
return \substr(\bin2hex(\random_bytes((int) \ceil($this->length / 2))), 0, $this->length); // @phpstan-ignore-line
14+
return \substr(\bin2hex(\random_bytes((int) \ceil($this->length / 2))), 0, $this->length); // @phpstan-ignore-line argument.type
1515
}
1616
}

src/Provider/RequestIdProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function getCurrentRequestId(): string
1919
$this->reset();
2020
}
2121

22-
return $this->requestId; // @phpstan-ignore-line
22+
return $this->requestId; // @phpstan-ignore-line return.type
2323
}
2424

2525
public function setRequestId(string $requestId): void

src/Twig/HtmlErrorRendererDecorator.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ public function render(\Throwable $exception): FlattenException
2020

2121
$html = $e->getAsString();
2222

23-
if (!\str_contains($html, '<body>')) {
24-
return $e;
25-
}
26-
2723
$pos = \stripos($html, '</body>');
2824
if (false === $pos) {
2925
return $e;

0 commit comments

Comments
 (0)