Skip to content

Commit 4c9b889

Browse files
bors[bot]norkunas
andauthored
Merge #223
223: CI: test with Symfony 6.2 r=brunoocasali a=norkunas # Pull Request ## Related issue Fixes #<issue_number> ## What does this PR do? - Adds Symfony 6.2 to CI ## PR checklist Please check if your PR fulfills the following requirements: - [ ] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - [x] Have you read the contributing guidelines? - [x] Have you made sure that the title is accurate and descriptive of the changes? Co-authored-by: Tomas <[email protected]>
2 parents d0a5bee + 78546cb commit 4c9b889

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
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

bors.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
status = [
2-
'integration-tests (PHP 7.4)',
3-
'integration-tests (PHP 8.0)',
4-
'integration-tests (PHP 8.1)',
2+
'integration-tests (PHP 7.4) (Symfony 5.4.*)',
3+
'integration-tests (PHP 8.0) (Symfony 6.0.*)',
4+
'integration-tests (PHP 8.1) (Symfony 6.1.*)',
5+
'integration-tests (PHP 8.2) (Symfony 6.2.*)',
56
'Code style'
67
]
78
# 1 hour timeout

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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
framework:
22
test: true
33
secret: 67d829bf61dc5f87a73fd814e2c9f629
4+
annotations: true
5+
serializer:
6+
enable_annotations: true
47

58
doctrine:
69
dbal:

0 commit comments

Comments
 (0)