Skip to content

Commit 1a2ebc1

Browse files
committed
Add Symfony 8 support and fix deprecations/incompatibilities
1 parent 420bfe7 commit 1a2ebc1

File tree

4 files changed

+33
-15
lines changed

4 files changed

+33
-15
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,34 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
php: [8.1, 8.2, 8.3]
24-
symfony: [6.4.*, 7.0.*]
25-
phpunit: [^9.0, ^10.0, ^11.0]
23+
php: [8.1, 8.2, 8.3, 8.4]
24+
symfony: [6.4.*, 7.3.*, 8.0.*]
25+
phpunit: [^10.0, ^11.0]
2626
php-matcher: [^6.0]
2727
orm: [^2.5, ^3.0]
2828
exclude:
2929
- php: 8.1
30-
symfony: 7.0.*
30+
symfony: 7.3.*
3131
- php: 8.1
3232
phpunit: ^11.0
33+
- php: 8.1
34+
symfony: 8.0.*
35+
- php: 8.2
36+
symfony: 8.0.*
37+
- php: 8.3
38+
symfony: 8.0.*
39+
- php: 8.1
40+
symfony: 8.0.*
41+
orm: ^2.5
42+
- php: 8.2
43+
symfony: 8.0.*
44+
orm: ^2.5
45+
- php: 8.3
46+
symfony: 8.0.*
47+
orm: ^2.5
48+
- php: 8.4
49+
symfony: 8.0.*
50+
orm: ^2.5
3351

3452
steps:
3553
- uses: "actions/checkout@v4"

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,26 @@
2424
}
2525
],
2626
"require": {
27-
"php": "^8.0",
27+
"php": "^8.1",
2828
"ext-json": "*",
2929

3030
"coduo/php-matcher": "^6.0",
3131
"openlss/lib-array2xml": "^1.0",
32-
"doctrine/data-fixtures": "^1.2",
33-
"doctrine/doctrine-bundle": "^2.0",
32+
"doctrine/data-fixtures": "^2.1",
33+
"doctrine/doctrine-bundle": "^2.0 || ^3.0",
3434
"doctrine/orm": "^2.5 || ^3.0",
3535
"nelmio/alice": "^3.6",
3636
"phpspec/php-diff": "^1.1",
37-
"phpunit/phpunit": "^9.0 || ^10.0 || ^11.0",
38-
"symfony/browser-kit": "^6.4 || ^7.0",
39-
"symfony/finder": "^6.4 || ^7.0",
40-
"symfony/framework-bundle": "^6.4 || ^7.0",
37+
"phpunit/phpunit": "^10.0 || ^11.0",
38+
"symfony/browser-kit": "^6.4 || ^7.3 || ^8.0",
39+
"symfony/finder": "^6.4 || ^7.3 || ^8.0",
40+
"symfony/framework-bundle": "^6.4 || ^7.3 || ^8.0",
4141
"theofidry/alice-data-fixtures": "^1.0"
4242
},
4343
"require-dev": {
4444
"phpstan/phpstan-strict-rules": "^1.0",
4545
"phpstan/phpstan-webmozart-assert": "^1.0",
46-
"symfony/serializer": "^5.4 || ^6.0",
46+
"symfony/serializer": "^6.4 || ^7.3 || ^8.0",
4747
"phpstan/phpstan": "^1.8"
4848
},
4949
"scripts": {

test/app/AppKernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function getProjectDir(): string
4444
/**
4545
* {@inheritdoc}
4646
*/
47-
public function registerContainerConfiguration(LoaderInterface $loader)
47+
public function registerContainerConfiguration(LoaderInterface $loader): void
4848
{
4949
$loader->load(static function (ContainerBuilder $container): void {
5050
$container->loadFromExtension('framework', [

test/src/Controller/SampleController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ public function categoryIndexAction(Request $request): Response
7676
return $this->respond($request, $categories);
7777
}
7878

79-
public function showAction(Request $request): Response
79+
public function showAction(Request $request, int $id): Response
8080
{
8181
$productRepository = $this->objectManager->getRepository(Product::class);
82-
$product = $productRepository->find($request->get('id'));
82+
$product = $productRepository->find($id);
8383

8484
if (!$product) {
8585
throw new NotFoundHttpException();

0 commit comments

Comments
 (0)