From 7a29bb49ea1ba2e6e6dbe13f9148a9580eb7a7db Mon Sep 17 00:00:00 2001 From: Marijn Doeve Date: Mon, 1 Dec 2025 09:59:01 +0100 Subject: [PATCH] Try with services.yaml --- config/services.yaml | 10 ++++++++++ src/DataFixtures/TestFixtures.php | 1 + tests/Repository/UserRepositoryTest.php | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/config/services.yaml b/config/services.yaml index 42179f2..3fdbec8 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -22,3 +22,13 @@ services: # add more service definitions when explicit configuration is needed # please note that last definitions always *replace* previous ones + +when@prod: + services: + Tvdt\: + resource: '../src/' + exclude: + - '../src/DependencyInjection/' + - '../src/Entity/' + - '../src/Kernel.php' + - '../src/DataFixtures' diff --git a/src/DataFixtures/TestFixtures.php b/src/DataFixtures/TestFixtures.php index 0c5be0a..7db4b3e 100644 --- a/src/DataFixtures/TestFixtures.php +++ b/src/DataFixtures/TestFixtures.php @@ -9,6 +9,7 @@ use Doctrine\Bundle\FixturesBundle\FixtureGroupInterface; use Doctrine\Common\DataFixtures\DependentFixtureInterface; use Doctrine\Persistence\ObjectManager; use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; +use Tvdt\DataFixtures\KrtekFixtures; use Tvdt\Entity\Season; use Tvdt\Entity\User; diff --git a/tests/Repository/UserRepositoryTest.php b/tests/Repository/UserRepositoryTest.php index 8770e5b..7ff8d69 100644 --- a/tests/Repository/UserRepositoryTest.php +++ b/tests/Repository/UserRepositoryTest.php @@ -6,8 +6,8 @@ namespace Tvdt\Tests\Repository; use PHPUnit\Framework\Attributes\CoversClass; use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; -use Tvdt\DataFixtures\TestFixtures; use Tvdt\Repository\UserRepository; +use Tvdt\DataFixtures\TestFixtures; use function PHPUnit\Framework\assertEmpty;