Skip to content

Commit 558c038

Browse files
authored
Update to Symfony 8.1 (#243)
1 parent bb77041 commit 558c038

5 files changed

Lines changed: 51 additions & 47 deletions

File tree

.github/workflows/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ jobs:
77
strategy:
88
matrix:
99
php: ["8.2", "8.5"]
10-
symfony: ["5.4", "6.4", "7.4", "8.0"]
10+
symfony: ["5.4", "6.4", "7.4", "8.1"]
1111
exclude:
1212
- php: "8.2"
13-
symfony: "8.0"
13+
symfony: "8.1"
1414

1515
steps:
1616
- uses: actions/checkout@v6
@@ -35,15 +35,15 @@ jobs:
3535

3636
- name: Install dependencies
3737
run: |
38-
sed -i "s/\^5.4 | \^6.4 | \^7.4 | \^8.0/${{ matrix.symfony }}.*/g" composer.json
38+
sed -i "s/\^5.4 | \^6.4 | \^7.4 | \^8.1/${{ matrix.symfony }}.*/g" composer.json
3939
composer install --prefer-dist --no-progress
4040
4141
- name: Quality checks
42-
if: matrix.symfony == '8.0'
42+
if: matrix.symfony == '8.1'
4343
run: composer validate --strict && composer audit && composer cs-check && composer phpstan
4444

4545
- name: Run module tests
46-
run: vendor/bin/phpunit tests ${{ matrix.symfony == '8.0' && '--coverage-text --coverage-filter src' || '' }}
46+
run: vendor/bin/phpunit tests ${{ matrix.symfony == '8.1' && '--coverage-text --coverage-filter src' || '' }}
4747

4848
- name: Prepare Symfony app & run tests
4949
run: |

composer.json

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -33,46 +33,46 @@
3333
"friendsofphp/php-cs-fixer": "^3.94",
3434
"phpstan/phpstan": "^2.2",
3535
"phpunit/phpunit": "^11.0 | ^12.0",
36-
"symfony/browser-kit": "^5.4 | ^6.4 | ^7.4 | ^8.0",
37-
"symfony/cache": "^5.4 | ^6.4 | ^7.4 | ^8.0",
38-
"symfony/clock": "^6.4 | ^7.4 | ^8.0",
39-
"symfony/config": "^5.4 | ^6.4 | ^7.4 | ^8.0",
40-
"symfony/console": "^5.4 | ^6.4 | ^7.4 | ^8.0",
41-
"symfony/css-selector": "^5.4 | ^6.4 | ^7.4 | ^8.0",
42-
"symfony/dependency-injection": "^5.4 | ^6.4 | ^7.4 | ^8.0",
43-
"symfony/dom-crawler": "^5.4 | ^6.4 | ^7.4 | ^8.0",
44-
"symfony/dotenv": "^5.4 | ^6.4 | ^7.4 | ^8.0",
45-
"symfony/error-handler": "^5.4 | ^6.4 | ^7.4 | ^8.0",
46-
"symfony/event-dispatcher": "^5.4 | ^6.4 | ^7.4 | ^8.0",
47-
"symfony/filesystem": "^5.4 | ^6.4 | ^7.4 | ^8.0",
48-
"symfony/finder": "^5.4 | ^6.4 | ^7.4 | ^8.0",
49-
"symfony/form": "^5.4 | ^6.4 | ^7.4 | ^8.0",
50-
"symfony/framework-bundle": "^5.4 | ^6.4 | ^7.4 | ^8.0",
51-
"symfony/http-client": "^5.4 | ^6.4 | ^7.4 | ^8.0",
52-
"symfony/http-foundation": "^5.4 | ^6.4 | ^7.4 | ^8.0",
53-
"symfony/http-kernel": "^5.4 | ^6.4 | ^7.4 | ^8.0",
54-
"symfony/mailer": "^5.4 | ^6.4 | ^7.4 | ^8.0",
55-
"symfony/messenger": "^5.4 | ^6.4 | ^7.4 | ^8.0",
56-
"symfony/mime": "^5.4 | ^6.4 | ^7.4 | ^8.0",
57-
"symfony/notifier": "^5.4 | ^6.4 | ^7.4 | ^8.0",
58-
"symfony/options-resolver": "^5.4 | ^6.4 | ^7.4 | ^8.0",
59-
"symfony/password-hasher": "^5.4 | ^6.4 | ^7.4 | ^8.0",
60-
"symfony/process": "^5.4 | ^6.4 | ^7.4 | ^8.0",
61-
"symfony/property-access": "^5.4 | ^6.4 | ^7.4 | ^8.0",
62-
"symfony/property-info": "^5.4 | ^6.4 | ^7.4 | ^8.0",
63-
"symfony/routing": "^5.4 | ^6.4 | ^7.4 | ^8.0",
64-
"symfony/security-bundle": "^5.4 | ^6.4 | ^7.4 | ^8.0",
65-
"symfony/security-core": "^5.4 | ^6.4 | ^7.4 | ^8.0",
66-
"symfony/security-csrf": "^5.4 | ^6.4 | ^7.4 | ^8.0",
67-
"symfony/security-http": "^5.4 | ^6.4 | ^7.4 | ^8.0",
68-
"symfony/stopwatch": "^5.4 | ^6.4 | ^7.4 | ^8.0",
69-
"symfony/string": "^5.4 | ^6.4 | ^7.4 | ^8.0",
70-
"symfony/translation": "^5.4 | ^6.4 | ^7.4 | ^8.0",
71-
"symfony/twig-bundle": "^5.4 | ^6.4 | ^7.4 | ^8.0",
72-
"symfony/validator": "^5.4 | ^6.4 | ^7.4 | ^8.0",
73-
"symfony/var-dumper": "^5.4 | ^6.4 | ^7.4 | ^8.0",
74-
"symfony/var-exporter": "^5.4 | ^6.4 | ^7.4",
75-
"symfony/yaml": "^5.4 | ^6.4 | ^7.4 | ^8.0",
36+
"symfony/browser-kit": "^5.4 | ^6.4 | ^7.4 | ^8.1",
37+
"symfony/cache": "^5.4 | ^6.4 | ^7.4 | ^8.1",
38+
"symfony/clock": "^6.4 | ^7.4 | ^8.1",
39+
"symfony/config": "^5.4 | ^6.4 | ^7.4 | ^8.1",
40+
"symfony/console": "^5.4 | ^6.4 | ^7.4 | ^8.1",
41+
"symfony/css-selector": "^5.4 | ^6.4 | ^7.4 | ^8.1",
42+
"symfony/dependency-injection": "^5.4 | ^6.4 | ^7.4 | ^8.1",
43+
"symfony/dom-crawler": "^5.4 | ^6.4 | ^7.4 | ^8.1",
44+
"symfony/dotenv": "^5.4 | ^6.4 | ^7.4 | ^8.1",
45+
"symfony/error-handler": "^5.4 | ^6.4 | ^7.4 | ^8.1",
46+
"symfony/event-dispatcher": "^5.4 | ^6.4 | ^7.4 | ^8.1",
47+
"symfony/filesystem": "^5.4 | ^6.4 | ^7.4 | ^8.1",
48+
"symfony/finder": "^5.4 | ^6.4 | ^7.4 | ^8.1",
49+
"symfony/form": "^5.4 | ^6.4 | ^7.4 | ^8.1",
50+
"symfony/framework-bundle": "^5.4 | ^6.4 | ^7.4 | ^8.1",
51+
"symfony/http-client": "^5.4 | ^6.4 | ^7.4 | ^8.1",
52+
"symfony/http-foundation": "^5.4 | ^6.4 | ^7.4 | ^8.1",
53+
"symfony/http-kernel": "^5.4 | ^6.4 | ^7.4 | ^8.1",
54+
"symfony/mailer": "^5.4 | ^6.4 | ^7.4 | ^8.1",
55+
"symfony/messenger": "^5.4 | ^6.4 | ^7.4 | ^8.1",
56+
"symfony/mime": "^5.4 | ^6.4 | ^7.4 | ^8.1",
57+
"symfony/notifier": "^5.4 | ^6.4 | ^7.4 | ^8.1",
58+
"symfony/options-resolver": "^5.4 | ^6.4 | ^7.4 | ^8.1",
59+
"symfony/password-hasher": "^5.4 | ^6.4 | ^7.4 | ^8.1",
60+
"symfony/process": "^5.4 | ^6.4 | ^7.4 | ^8.1",
61+
"symfony/property-access": "^5.4 | ^6.4 | ^7.4 | ^8.1",
62+
"symfony/property-info": "^5.4 | ^6.4 | ^7.4 | ^8.1",
63+
"symfony/routing": "^5.4 | ^6.4 | ^7.4 | ^8.1",
64+
"symfony/security-bundle": "^5.4 | ^6.4 | ^7.4 | ^8.1",
65+
"symfony/security-core": "^5.4 | ^6.4 | ^7.4 | ^8.1",
66+
"symfony/security-csrf": "^5.4 | ^6.4 | ^7.4 | ^8.1",
67+
"symfony/security-http": "^5.4 | ^6.4 | ^7.4 | ^8.1",
68+
"symfony/stopwatch": "^5.4 | ^6.4 | ^7.4 | ^8.1",
69+
"symfony/string": "^5.4 | ^6.4 | ^7.4 | ^8.1",
70+
"symfony/translation": "^5.4 | ^6.4 | ^7.4 | ^8.1",
71+
"symfony/twig-bundle": "^5.4 | ^6.4 | ^7.4 | ^8.1",
72+
"symfony/validator": "^5.4 | ^6.4 | ^7.4 | ^8.1",
73+
"symfony/var-dumper": "^5.4 | ^6.4 | ^7.4 | ^8.1",
74+
"symfony/var-exporter": "^6.4 | ^7.4 | ^8.1",
75+
"symfony/yaml": "^5.4 | ^6.4 | ^7.4 | ^8.1",
7676
"vlucas/phpdotenv": "^4.2 | ^5.6"
7777
},
7878
"suggest": {

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A Codeception module for Symfony framework.
99

1010
## Requirements
1111

12-
* `Symfony` `5.4.x`, `6.4.x`, `7.4.x` or `8.0.x`, as per the [Symfony supported versions](https://symfony.com/releases).
12+
* `Symfony` `5.4.x`, `6.4.x`, `7.4.x` or `8.1.x`, as per the [Symfony supported versions](https://symfony.com/releases).
1313
* `PHP 8.2` or higher.
1414

1515
## Installation

src/Codeception/Module/Symfony.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
*
8181
* ## Config
8282
*
83-
* ### Symfony 5.4, 6.4, 7.4 or 8.0
83+
* ### Symfony 5.4, 6.4, 7.4 or 8.1
8484
*
8585
* * `app_path`: 'src' - Specify custom path to your app dir, where the kernel interface is located.
8686
* * `environment`: 'local' - Environment used for load kernel

tests/_app/Doctrine/DoctrineSetup.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ public static function createEntityManager(): EntityManagerInterface
4242
$config->setProxyNamespace('TestsProxies');
4343
$config->setAutoGenerateProxyClasses(true);
4444

45+
if (PHP_VERSION_ID >= 80400 && method_exists($config, 'enableNativeLazyObjects')) {
46+
$config->enableNativeLazyObjects(true);
47+
}
48+
4549
$connection = DriverManager::getConnection(['driver' => 'pdo_sqlite', 'memory' => true]);
4650

4751
if (method_exists(EntityManager::class, 'create')) {

0 commit comments

Comments
 (0)