From 36ca59bc4d8cef142b340862797b940d03083b3c Mon Sep 17 00:00:00 2001 From: Baptiste Leduc Date: Thu, 14 Mar 2024 14:18:05 +0100 Subject: [PATCH] Fix CI --- .github/workflows/ci.yaml | 2 +- src/DependencyInjection/Compiler/TransformerFactoryPass.php | 1 - tests/Resources/App/AppKernel.php | 5 +---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0b66e79..90c3d72 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -52,4 +52,4 @@ jobs: env: SYMFONY_REQUIRE: "${{ matrix.symfony-versions }}" - name: tests - run: vendor/bin/phpunit + run: vendor/bin/simple-phpunit diff --git a/src/DependencyInjection/Compiler/TransformerFactoryPass.php b/src/DependencyInjection/Compiler/TransformerFactoryPass.php index fd02ce9..49c900d 100644 --- a/src/DependencyInjection/Compiler/TransformerFactoryPass.php +++ b/src/DependencyInjection/Compiler/TransformerFactoryPass.php @@ -4,7 +4,6 @@ use AutoMapper\Generator\Generator; use AutoMapper\Transformer\ChainTransformerFactory; -use AutoMapper\Transformer\CustomTransformer\CustomTransformerFactory; use AutoMapper\Transformer\CustomTransformer\CustomTransformerInterface; use AutoMapper\Transformer\CustomTransformer\CustomTransformersRegistry; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; diff --git a/tests/Resources/App/AppKernel.php b/tests/Resources/App/AppKernel.php index 329522a..35135ae 100644 --- a/tests/Resources/App/AppKernel.php +++ b/tests/Resources/App/AppKernel.php @@ -13,8 +13,6 @@ use AutoMapper\Bundle\Tests\Fixtures\UserDTO; use AutoMapper\MapperGeneratorMetadataInterface; use AutoMapper\MapperMetadata; -use AutoMapper\Transformer\CustomTransformer\CustomModelTransformer; -use AutoMapper\Transformer\CustomTransformer\CustomModelTransformerInterface; use AutoMapper\Transformer\CustomTransformer\CustomPropertyTransformerInterface; use Symfony\Bundle\FrameworkBundle\FrameworkBundle; use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; @@ -67,7 +65,7 @@ class YearOfBirthTransformer implements CustomPropertyTransformerInterface { public function transform(object|array $user): mixed { - assert($user instanceof User); + \assert($user instanceof User); return ((int) date('Y')) - ((int) $user->age); } @@ -80,7 +78,6 @@ public function supports(string $source, string $target, string $propertyName): class UserMapperConfiguration { - } } else { class UserMapperConfiguration implements MapperConfigurationInterface