Skip to content

Commit 22fa78f

Browse files
committed
CI: test with Symfony 6.2
1 parent d0a5bee commit 22fa78f

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
strategy:
1919
matrix:
20-
php-version: ['7.4', '8.0', '8.1']
20+
php-version: ['7.4', '8.0', '8.1', '8.2']
2121
include:
2222
- php-version: '7.4'
2323
sf-version: '4.4.*'
@@ -29,8 +29,10 @@ jobs:
2929
sf-version: '6.0.*'
3030
- php-version: '8.1'
3131
sf-version: '6.1.*'
32+
- php-version: '8.2'
33+
sf-version: '6.2.*'
3234

33-
name: integration-tests (PHP ${{ matrix.php-version }})
35+
name: integration-tests (PHP ${{ matrix.php-version }}) (Symfony ${{ matrix.sf-version }})
3436
steps:
3537
- uses: actions/checkout@v3
3638
- name: Install PHP
@@ -58,7 +60,7 @@ jobs:
5860
- name: Install PHP
5961
uses: shivammathur/setup-php@v2
6062
with:
61-
php-version: '8.0'
63+
php-version: '8.1'
6264

6365
- name: Validate composer.json and composer.lock
6466
run: composer validate

tests/Unit/SerializationTest.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,19 @@
99
use Meilisearch\Bundle\Test\Entity\Comment;
1010
use Meilisearch\Bundle\Test\Entity\Post;
1111
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
12-
use Symfony\Component\Serializer\Exception\ExceptionInterface;
13-
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
14-
use Symfony\Component\Serializer\Serializer;
1512

1613
/**
1714
* Class SerializationTest.
1815
*/
1916
class SerializationTest extends KernelTestCase
2017
{
21-
/**
22-
* @throws ExceptionInterface
23-
*/
2418
public function testSimpleEntityToSearchableArray(): void
2519
{
2620
$datetime = new \DateTime();
27-
$dateSerializer = new Serializer([new DateTimeNormalizer()]);
21+
$dateNormalizer = static::getContainer()->get('serializer.normalizer.datetime');
2822
// This way we can test that DateTime's are serialized with DateTimeNormalizer
2923
// And not the default ObjectNormalizer
30-
$serializedDateTime = $dateSerializer->normalize($datetime, Searchable::NORMALIZATION_FORMAT);
24+
$serializedDateTime = $dateNormalizer->normalize($datetime, Searchable::NORMALIZATION_FORMAT);
3125

3226
$post = new Post(
3327
[

tests/config/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
framework:
22
test: true
33
secret: 67d829bf61dc5f87a73fd814e2c9f629
4+
annotations: true
45

56
doctrine:
67
dbal:

0 commit comments

Comments
 (0)