diff --git a/composer.json b/composer.json index 8d47f359..58693170 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,7 @@ "twig/twig": "^3.0" }, "require-dev": { - "doctrine/data-fixtures": "^1.4", + "doctrine/data-fixtures": "^1.6", "friendsofphp/php-cs-fixer": "^3.4", "matthiasnoback/symfony-config-test": "^4.2", "matthiasnoback/symfony-dependency-injection-test": "^4.1", diff --git a/tests/App/AppKernel.php b/tests/App/AppKernel.php index 9cfde43d..f92a56dd 100644 --- a/tests/App/AppKernel.php +++ b/tests/App/AppKernel.php @@ -79,6 +79,8 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa if (!class_exists(IsGranted::class)) { $loader->load(__DIR__.'/config/config_symfony_v5.yaml'); + } else { + $loader->load(__DIR__.'/config/config_symfony_v6.yaml'); } if (class_exists(HttpCacheHandler::class)) { diff --git a/tests/App/DataFixtures/MongoDB/BookFixtures.php b/tests/App/DataFixtures/MongoDB/BookFixtures.php index 7fcd8226..39ee655e 100644 --- a/tests/App/DataFixtures/MongoDB/BookFixtures.php +++ b/tests/App/DataFixtures/MongoDB/BookFixtures.php @@ -24,15 +24,11 @@ final class BookFixtures extends Fixture implements DependentFixtureInterface { public function load(ObjectManager $manager): void { - $author = $this->getReference(AuthorFixtures::AUTHOR); - - \assert($author instanceof Author); + $author = $this->getReference(AuthorFixtures::AUTHOR, Author::class); $book = new Book('book_id', 'Don Quixote', $author); - $category = $this->getReference(CategoryFixtures::CATEGORY); - - \assert($category instanceof Category); + $category = $this->getReference(CategoryFixtures::CATEGORY, Category::class); $book->addCategory($category); diff --git a/tests/App/config/config_symfony_v6.yaml b/tests/App/config/config_symfony_v6.yaml new file mode 100644 index 00000000..09970396 --- /dev/null +++ b/tests/App/config/config_symfony_v6.yaml @@ -0,0 +1,11 @@ +framework: + annotations: false + handle_all_throwables: true + php_errors: + log: true + session: + cookie_secure: auto + cookie_samesite: lax + handler_id: null + validation: + email_validation_mode: html5