Skip to content

Commit f8260c0

Browse files
kbondchapterjason
andauthored
feat: Symfony 7 support (#83)
* feat: Symfony 7 support * Update minimum PHP and Symfony requirements The minimum PHP version supported has been updated to 7.2.5, and Symfony's versions to 5.4, 6.3, and 7.0. Also, auto-testing for PHP versions 8.2 and 8.3 has been added in the .github/workflows/ci.yml file. The conditions for some excluded combinations were simplified in the process. * Update phpstan-baseline.neon * Remove deprecated code and configuration Deleted framework-52.yml and framework-53.yml as they are no longer needed. Also removed unnecessary conditions and deprecated router configuration in parameters.php. The PHPStan baseline has been updated to reflect these changes. * Remove unused ConfigBuilderCacheWarmer import * Update CHANGELOG * Update CHANGELOG * Update Symfony support * Update CI * Update CI * Remove specific OS from exclude list in README --------- Co-authored-by: chapterjason <[email protected]>
1 parent 0a83997 commit f8260c0

File tree

9 files changed

+58
-75
lines changed

9 files changed

+58
-75
lines changed

.github/workflows/ci.yml

Lines changed: 41 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,48 +13,68 @@ jobs:
1313
- '7.4'
1414
- '8.0'
1515
- '8.1'
16+
- '8.2'
17+
- '8.3'
1618
dependency:
1719
- ''
1820
- 'lowest'
1921
symfony:
20-
- '4.4.*'
21-
- '5.3.*'
2222
- '5.4.*'
2323
- '6.0.*'
2424
- '6.1.*'
25+
- '6.2.*'
26+
- '6.3.*'
27+
- '6.4.*'
28+
- '7.0.*'
2529
exclude:
26-
- php: '7.2'
27-
symfony: '4.4.*'
28-
dependency: 'lowest'
2930
- php: '7.2'
3031
symfony: '6.0.*'
31-
- php: '7.2'
32-
symfony: '6.1.*'
33-
- php: '7.3'
34-
symfony: '4.4.*'
3532
- php: '7.3'
3633
symfony: '6.0.*'
34+
- php: '7.4'
35+
symfony: '6.0.*'
36+
- php: '7.2'
37+
symfony: '6.1.*'
3738
- php: '7.3'
3839
symfony: '6.1.*'
3940
- php: '7.4'
40-
symfony: '4.4.*'
41+
symfony: '6.1.*'
42+
- php: '8.0'
43+
symfony: '6.1.*'
44+
- php: '7.2'
45+
symfony: '6.2.*'
46+
- php: '7.3'
47+
symfony: '6.2.*'
4148
- php: '7.4'
42-
symfony: '6.0.*'
49+
symfony: '6.2.*'
50+
- php: '8.0'
51+
symfony: '6.2.*'
52+
- php: '7.2'
53+
symfony: '6.3.*'
54+
- php: '7.3'
55+
symfony: '6.3.*'
4356
- php: '7.4'
44-
symfony: '6.1.*'
57+
symfony: '6.3.*'
4558
- php: '8.0'
46-
symfony: '4.4.*'
59+
symfony: '6.3.*'
60+
- php: '7.2'
61+
symfony: '6.4.*'
62+
- php: '7.3'
63+
symfony: '6.4.*'
64+
- php: '7.4'
65+
symfony: '6.4.*'
4766
- php: '8.0'
48-
symfony: '6.1.*'
67+
symfony: '6.4.*'
68+
- php: '7.2'
69+
symfony: '7.0.*'
70+
- php: '7.3'
71+
symfony: '7.0.*'
72+
- php: '7.4'
73+
symfony: '7.0.*'
4974
- php: '8.0'
50-
symfony: '6.1.*'
51-
dependency: 'lowest'
52-
- php: '8.1'
53-
symfony: '4.4.*'
54-
dependency: 'lowest'
75+
symfony: '7.0.*'
5576
- php: '8.1'
56-
symfony: '5.3.*'
57-
dependency: 'lowest'
77+
symfony: '7.0.*'
5878
fail-fast: false
5979
steps:
6080
- name: Checkout
@@ -70,10 +90,6 @@ jobs:
7090
- name: Configure Symfony
7191
run: composer config extra.symfony.require "${{ matrix.symfony }}"
7292

73-
- name: Prefer unstable Composer dependencies if Symfony 6.1
74-
if: matrix.symfony == '6.1.*'
75-
run: composer config prefer-stable false
76-
7793
- name: Get Composer Cache Directory
7894
id: composer-cache
7995
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.
44

5+
## 3.0.0
6+
7+
### Added
8+
9+
- Support for Symfony 7.0
10+
11+
### Removed
12+
13+
- Drop support for Symfony 4.4
14+
- Drop support for Symfony 5.3
15+
516
## 2.0.0
617

718
### Added

README.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -107,34 +107,14 @@ jobs:
107107
exclude:
108108
- php: '7.4'
109109
symfony: '6.4.*'
110-
operating-system: 'ubuntu-22.04'
111110
- php: '8.0'
112111
symfony: '6.4.*'
113-
operating-system: 'ubuntu-22.04'
114112
- php: '7.4'
115113
symfony: '7.0.*'
116-
operating-system: 'ubuntu-22.04'
117114
- php: '8.0'
118115
symfony: '7.0.*'
119-
operating-system: 'ubuntu-22.04'
120116
- php: '8.1'
121117
symfony: '7.0.*'
122-
operating-system: 'ubuntu-22.04'
123-
- php: '7.4'
124-
symfony: '6.4.*'
125-
operating-system: 'windows-2022'
126-
- php: '8.0'
127-
symfony: '6.4.*'
128-
operating-system: 'windows-2022'
129-
- php: '7.4'
130-
symfony: '7.0.*'
131-
operating-system: 'windows-2022'
132-
- php: '8.0'
133-
symfony: '7.0.*'
134-
operating-system: 'windows-2022'
135-
- php: '8.1'
136-
symfony: '7.0.*'
137-
operating-system: 'windows-2022'
138118

139119
steps:
140120
- uses: actions/checkout@v4

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
}
1111
],
1212
"require": {
13-
"php": "^7.2 || ^8.0",
14-
"symfony/dependency-injection": "^4.4 || ^5.3 || ^6.0",
15-
"symfony/filesystem": "^4.4 || ^5.3 || ^6.0",
16-
"symfony/framework-bundle": "^4.4 || ^5.3 || ^6.0",
17-
"symfony/http-kernel": "^4.4 || ^5.3 || ^6.0",
18-
"symfony/yaml": "^4.4 || ^5.3 || ^6.0"
13+
"php": "^7.2.5 || ^8.0",
14+
"symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0",
15+
"symfony/filesystem": "^5.4 || ^6.0 || ^7.0",
16+
"symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0",
17+
"symfony/http-kernel": "^5.4 || ^6.0 || ^7.0",
18+
"symfony/yaml": "^5.4 || ^6.0 || ^7.0"
1919
},
2020
"require-dev": {
2121
"phpunit/phpunit": "^8.5 || ^9.4"

phpstan-baseline.neon

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ parameters:
1010
count: 1
1111
path: src/TestKernel.php
1212

13-
-
14-
message: "#^Comparison operation \"\\>\\=\" between 600.. and 50100 is always true\\.$#"
15-
count: 1
16-
path: src/config/parameters.php
17-
1813
-
1914
message: "#^Variable \\$container might not be defined\\.$#"
2015
count: 3

src/TestKernel.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Nyholm\BundleTest;
44

5-
use Symfony\Bundle\FrameworkBundle\CacheWarmer\ConfigBuilderCacheWarmer;
65
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
76
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
87
use Symfony\Component\Config\Loader\LoaderInterface;
@@ -66,11 +65,6 @@ public function __construct(string $environment, bool $debug)
6665

6766
$this->addTestBundle(FrameworkBundle::class);
6867
$this->addTestConfig(__DIR__.'/config/framework.yml');
69-
if (class_exists(ConfigBuilderCacheWarmer::class)) {
70-
$this->addTestConfig(__DIR__.'/config/framework-53.yml');
71-
} else {
72-
$this->addTestConfig(__DIR__.'/config/framework-52.yml');
73-
}
7468
}
7569

7670
/**

src/config/framework-52.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/config/framework-53.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/config/parameters.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,3 @@
1010
'annotations' => ['cache' => 'none'],
1111
]);
1212
}
13-
14-
// Not setting the router to utf8 is deprecated in symfony 5.1
15-
if (\Symfony\Component\HttpKernel\Kernel::VERSION_ID >= 50100) {
16-
$container->loadFromExtension('framework', [
17-
'router' => ['utf8' => true],
18-
]);
19-
}

0 commit comments

Comments
 (0)