Skip to content

CI: test with Symfony 6.2 #223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.4', '8.0', '8.1']
php-version: ['7.4', '8.0', '8.1', '8.2']
include:
- php-version: '7.4'
sf-version: '4.4.*'
Expand All @@ -29,8 +29,10 @@ jobs:
sf-version: '6.0.*'
- php-version: '8.1'
sf-version: '6.1.*'
- php-version: '8.2'
sf-version: '6.2.*'

name: integration-tests (PHP ${{ matrix.php-version }})
name: integration-tests (PHP ${{ matrix.php-version }}) (Symfony ${{ matrix.sf-version }})
steps:
- uses: actions/checkout@v3
- name: Install PHP
Expand Down Expand Up @@ -58,7 +60,7 @@ jobs:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: '8.1'

- name: Validate composer.json and composer.lock
run: composer validate
Expand Down
7 changes: 4 additions & 3 deletions bors.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
status = [
'integration-tests (PHP 7.4)',
'integration-tests (PHP 8.0)',
'integration-tests (PHP 8.1)',
'integration-tests (PHP 7.4) (Symfony 5.4.*)',
'integration-tests (PHP 8.0) (Symfony 6.0.*)',
'integration-tests (PHP 8.1) (Symfony 6.1.*)',
'integration-tests (PHP 8.2) (Symfony 6.2.*)',
'Code style'
]
# 1 hour timeout
Expand Down
10 changes: 2 additions & 8 deletions tests/Unit/SerializationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,19 @@
use Meilisearch\Bundle\Test\Entity\Comment;
use Meilisearch\Bundle\Test\Entity\Post;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\Serializer\Exception\ExceptionInterface;
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
use Symfony\Component\Serializer\Serializer;

/**
* Class SerializationTest.
*/
class SerializationTest extends KernelTestCase
{
/**
* @throws ExceptionInterface
*/
public function testSimpleEntityToSearchableArray(): void
{
$datetime = new \DateTime();
$dateSerializer = new Serializer([new DateTimeNormalizer()]);
$dateNormalizer = static::getContainer()->get('serializer.normalizer.datetime');
// This way we can test that DateTime's are serialized with DateTimeNormalizer
// And not the default ObjectNormalizer
$serializedDateTime = $dateSerializer->normalize($datetime, Searchable::NORMALIZATION_FORMAT);
$serializedDateTime = $dateNormalizer->normalize($datetime, Searchable::NORMALIZATION_FORMAT);

$post = new Post(
[
Expand Down
3 changes: 3 additions & 0 deletions tests/config/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
framework:
test: true
secret: 67d829bf61dc5f87a73fd814e2c9f629
annotations: true
serializer:
enable_annotations: true

doctrine:
dbal:
Expand Down