Skip to content

Commit 20ffbb5

Browse files
committed
Upgrade dependencies to support Symfony 8
- Switch Dockerfile to php 8.4 - Add symfony || ^8.0 to composer.json - Update PHP_VERSION_ID limit to 80100 into one test to avoid issue - Fix use of Groups Annotation to Attribute in some tests entities => test:unit success except 1 skipped (proxy)
1 parent ae6fe92 commit 20ffbb5

File tree

7 files changed

+24
-23
lines changed

7 files changed

+24
-23
lines changed

Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
FROM php:8.0-fpm as php
1+
FROM php:8.4-fpm as php
22

33
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
44
# https://getcomposer.org/doc/03-cli.md#composer-allow-superuser
55
ENV COMPOSER_ALLOW_SUPERUSER=1
66

77
RUN apt-get update && apt-get install -y \
8-
libfcgi0ldbl \
9-
zlib1g-dev \
10-
gettext \
11-
libzip-dev \
12-
unzip \
13-
git
8+
libfcgi0ldbl \
9+
zlib1g-dev \
10+
gettext \
11+
libzip-dev \
12+
unzip \
13+
git
1414

1515
RUN docker-php-ext-install zip
1616

composer.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
"ext-json": "*",
2323
"doctrine/doctrine-bundle": "^2.10 || ^3.0",
2424
"meilisearch/meilisearch-php": "^1.16",
25-
"symfony/config": "^5.4 || ^6.0 || ^7.0",
26-
"symfony/dependency-injection": "^5.4.17 || ^6.0 || ^7.0",
27-
"symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0",
28-
"symfony/http-kernel": "^5.4 || ^6.0 || ^7.0",
25+
"symfony/config": "^5.4 || ^6.0 || ^7.0 || ^8.0",
26+
"symfony/dependency-injection": "^5.4.17 || ^6.0 || ^7.0 || ^8.0",
27+
"symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0 || ^8.0",
28+
"symfony/http-kernel": "^5.4 || ^6.0 || ^7.0 || ^8.0",
2929
"symfony/polyfill-php80": "^1.27",
30-
"symfony/property-access": "^5.4 || ^6.0 || ^7.0",
31-
"symfony/serializer": "^5.4 || ^6.0 || ^7.0"
30+
"symfony/property-access": "^5.4 || ^6.0 || ^7.0 || ^8.0",
31+
"symfony/serializer": "^5.4 || ^6.0 || ^7.0 || ^8.0"
3232
},
3333
"require-dev": {
3434
"doctrine/annotations": "^2.0.0",
@@ -45,13 +45,13 @@
4545
"phpstan/phpstan-phpunit": "^2.0.7",
4646
"phpstan/phpstan-symfony": "^2.0.8",
4747
"phpunit/php-code-coverage": "^9.2.32",
48-
"symfony/doctrine-bridge": "^5.4.19 || ^6.0.7 || ^7.0",
49-
"symfony/filesystem": "^5.4 || ^6.0 || ^7.0",
50-
"symfony/framework-bundle": "^5.4.17 || ^6.0 || ^7.0",
48+
"symfony/doctrine-bridge": "^5.4.19 || ^6.0.7 || ^7.0 || ^8.0",
49+
"symfony/filesystem": "^5.4 || ^6.0 || ^7.0 || ^8.0",
50+
"symfony/framework-bundle": "^5.4.17 || ^6.0 || ^7.0 || ^8.0",
5151
"symfony/http-client": "^5.4.47 || ^6.4.15 || ^7.1.8",
5252
"symfony/phpunit-bridge": "^7.3",
53-
"symfony/yaml": "^5.4 || ^6.0 || ^7.0",
54-
"symfony/var-exporter": "^5.4 || ^6.0 || ^7.0"
53+
"symfony/yaml": "^5.4 || ^6.0 || ^7.0 || ^8.0",
54+
"symfony/var-exporter": "^5.4 || ^6.0 || ^7.0 || ^8.0"
5555
},
5656
"autoload": {
5757
"psr-4": {

tests/Entity/Comment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
use Doctrine\DBAL\Types\Types;
88
use Doctrine\ORM\Mapping as ORM;
9-
use Symfony\Component\Serializer\Annotation\Groups;
9+
use Symfony\Component\Serializer\Attribute\Groups;
1010

1111
/**
1212
* @ORM\Entity

tests/Entity/DummyCustomGroups.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
use Doctrine\DBAL\Types\Types;
88
use Doctrine\ORM\Mapping as ORM;
9-
use Symfony\Component\Serializer\Annotation\Groups;
9+
use Symfony\Component\Serializer\Attribute\Groups;
1010

1111
/**
1212
* @ORM\Entity

tests/Entity/Page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Doctrine\DBAL\Types\Types;
88
use Doctrine\ORM\Mapping as ORM;
99
use Meilisearch\Bundle\Tests\Entity\ObjectId\DummyObjectId;
10-
use Symfony\Component\Serializer\Annotation\Groups;
10+
use Symfony\Component\Serializer\Attribute\Groups;
1111

1212
/**
1313
* @ORM\Entity

tests/Entity/Post.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Doctrine\Common\Collections\Collection;
99
use Doctrine\DBAL\Types\Types;
1010
use Doctrine\ORM\Mapping as ORM;
11-
use Symfony\Component\Serializer\Annotation\Groups;
11+
use Symfony\Component\Serializer\Attribute\Groups;
1212

1313
/**
1414
* @ORM\Entity

tests/Unit/SerializationTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ final class SerializationTest extends BaseKernelTestCase
1515
public function testSimpleEntityToSearchableArray(): void
1616
{
1717
$post = new Post('a simple post', 'some text', $datetime = new \DateTimeImmutable('@1728994403'));
18+
$this->waitForAllTasks();
1819
$idReflection = (new \ReflectionObject($post))->getProperty('id');
19-
if (PHP_VERSION_ID < 80000) {
20+
if (PHP_VERSION_ID < 80100) {
2021
$idReflection->setAccessible(true);
2122
}
2223
$idReflection->setValue($post, 12);

0 commit comments

Comments
 (0)