Skip to content

Commit 297a7dc

Browse files
authored
Allow PHP 8.1 and Symfony 6.1 (#66)
* feat: Allow php 8.1 and symfony 6.1 * ci: Set php to 8.1 for static workflow * ci: Add php 8.1 and symfony 6.1 to test workflow * Revert "ci: Set php to 8.1 for static workflow" This reverts commit 94932d0. * ci: Update phpstan * ci: Update phpstan baseline * ci: Update psalm baseline * ci: Add symfony 5.4 * fix: Add conflict with phpunit lower or equal to 8.5.14 Cause of GLOBALS access and compatibility with PHP 8.1 * chore: fix order in composer * chore: Update readme and changelog * docs: Update pipeline example in README * fix: Update constraints in composer file * fix: Normalize composer json * chore: Fix phpstan baseline
1 parent aa4e05d commit 297a7dc

File tree

7 files changed

+45
-10
lines changed

7 files changed

+45
-10
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,44 @@ jobs:
1212
- '7.3'
1313
- '7.4'
1414
- '8.0'
15+
- '8.1'
1516
dependency:
1617
- ''
1718
- 'lowest'
1819
symfony:
1920
- '4.4.*'
2021
- '5.3.*'
22+
- '5.4.*'
2123
- '6.0.*'
24+
- '6.1.*'
2225
exclude:
2326
- php: '7.2'
2427
symfony: '4.4.*'
2528
dependency: 'lowest'
2629
- php: '7.2'
2730
symfony: '6.0.*'
31+
- php: '7.2'
32+
symfony: '6.1.*'
2833
- php: '7.3'
2934
symfony: '4.4.*'
3035
- php: '7.3'
3136
symfony: '6.0.*'
37+
- php: '7.3'
38+
symfony: '6.1.*'
3239
- php: '7.4'
3340
symfony: '4.4.*'
3441
- php: '7.4'
3542
symfony: '6.0.*'
43+
- php: '7.4'
44+
symfony: '6.1.*'
3645
- php: '8.0'
3746
symfony: '4.4.*'
47+
- php: '8.1'
48+
symfony: '4.4.*'
49+
dependency: 'lowest'
50+
- php: '8.1'
51+
symfony: '5.3.*'
52+
dependency: 'lowest'
3853
fail-fast: false
3954
steps:
4055
- name: Checkout
@@ -50,8 +65,8 @@ jobs:
5065
- name: Configure Symfony
5166
run: composer config extra.symfony.require "${{ matrix.symfony }}"
5267

53-
- name: Prefer unstable Composer dependencies if Symfony 6.0
54-
if: matrix.symfony == '6.0.*'
68+
- name: Prefer unstable Composer dependencies if Symfony 6.1
69+
if: matrix.symfony == '6.1.*'
5570
run: composer config prefer-stable false
5671

5772
- name: Get Composer Cache Directory

.github/workflows/static.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
with:
1616
php-version: 8.0
1717
coverage: none
18-
tools: phpstan:0.12.94, cs2pr
18+
tools: phpstan:1.2.0, cs2pr
1919

2020
- name: Download dependencies
2121
uses: ramsey/composer-install@v1

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee
99
- Support for multiple routing files via `TestKernel::addRoutingFile`
1010
- Support for a fully functional symfony kernel with the usage of the `Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait`
1111
- Cleanup of the cache and log directory after kernel shutdown
12+
- Support for PHP 8.1
13+
- Support for Symfony 6.1
1214

1315
### Removed
1416

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ jobs:
102102
strategy:
103103
matrix:
104104
operating-system: [ ubuntu-latest, windows-latest ]
105-
php: [ '7.4', '8.0' ]
106-
symfony: ['^4.4', '^5.3']
105+
php: [ '7.4', '8.0', '8.1' ]
106+
symfony: ['4.4.*', '5.3.*', '5.4.*', '6.0.*', '6.1.*']
107107

108108
steps:
109109
- uses: actions/checkout@master

composer.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "nyholm/symfony-bundle-test",
3-
"type": "library",
43
"description": "",
54
"license": "MIT",
5+
"type": "library",
66
"authors": [
77
{
88
"name": "Tobias Nyholm",
99
"email": "[email protected]"
1010
}
1111
],
1212
"require": {
13-
"php": "^7.2 || ^8.0",
13+
"php": "^7.2 || ^8.0 || ^8.1",
1414
"symfony/dependency-injection": "^4.4 || ^5.3 || ^6.0",
1515
"symfony/filesystem": "^4.4 || ^5.3 || ^6.0",
1616
"symfony/framework-bundle": "^4.4 || ^5.3 || ^6.0",
@@ -20,6 +20,11 @@
2020
"require-dev": {
2121
"phpunit/phpunit": "^8.5 || ^9.4"
2222
},
23+
"conflict": {
24+
"phpunit/phpunit": "<=8.5.14"
25+
},
26+
"minimum-stability": "dev",
27+
"prefer-stable": true,
2328
"autoload": {
2429
"psr-4": {
2530
"Nyholm\\BundleTest\\": "src/"
@@ -30,8 +35,6 @@
3035
"Nyholm\\BundleTest\\Tests\\": "tests/"
3136
}
3237
},
33-
"minimum-stability": "dev",
34-
"prefer-stable": true,
3538
"scripts": {
3639
"test": "vendor/bin/phpunit",
3740
"test-ci": "vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml"

phpstan-baseline.neon

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
parameters:
22
ignoreErrors:
33
-
4-
message: "#^Comparison operation \"\\>\\=\" between 50306 and 50100 is always true\\.$#"
4+
message: "#^Call to method import\\(\\) on an unknown class Symfony\\\\Component\\\\Routing\\\\RouteCollectionBuilder\\.$#"
5+
count: 1
6+
path: src/TestKernel.php
7+
8+
-
9+
message: "#^Parameter \\$routes of method Nyholm\\\\BundleTest\\\\TestKernel\\:\\:configureRoutes\\(\\) has invalid type Symfony\\\\Component\\\\Routing\\\\RouteCollectionBuilder\\.$#"
10+
count: 1
11+
path: src/TestKernel.php
12+
13+
-
14+
message: "#^Comparison operation \"\\>\\=\" between 60001 and 50100 is always true\\.$#"
515
count: 1
616
path: src/config/parameters.php
717

psalm.baseline.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<files psalm-version="4.x-dev@">
3+
<file src="src/TestKernel.php">
4+
<UndefinedDocblockClass occurrences="1">
5+
<code>RoutingConfigurator|RouteCollectionBuilder</code>
6+
</UndefinedDocblockClass>
7+
</file>
38
<file src="src/config/parameters.php">
49
<UndefinedGlobalVariable occurrences="3">
510
<code>$container</code>

0 commit comments

Comments
 (0)