From 29d924b5a137a6d50870ff2676622baa592c9ede Mon Sep 17 00:00:00 2001 From: Mateusz Zalewski Date: Mon, 25 Mar 2019 12:02:16 +0100 Subject: [PATCH] [BuildFix] Ignore psalm annotations --- .../Compiler/IgnoreAnnotationsPass.php | 22 +++++++++++++++++++ .../Bundle/CoreBundle/SyliusCoreBundle.php | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/IgnoreAnnotationsPass.php diff --git a/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/IgnoreAnnotationsPass.php b/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/IgnoreAnnotationsPass.php new file mode 100644 index 0000000000..ae60cbb319 --- /dev/null +++ b/src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/IgnoreAnnotationsPass.php @@ -0,0 +1,22 @@ +getDefinition('annotations.reader'); + + $annotationsReader->addMethodCall('addGlobalIgnoredName', ['template']); + $annotationsReader->addMethodCall('addGlobalIgnoredName', ['psalm']); + } +} diff --git a/src/Sylius/Bundle/CoreBundle/SyliusCoreBundle.php b/src/Sylius/Bundle/CoreBundle/SyliusCoreBundle.php index 24a520bb94..da1478dc5e 100644 --- a/src/Sylius/Bundle/CoreBundle/SyliusCoreBundle.php +++ b/src/Sylius/Bundle/CoreBundle/SyliusCoreBundle.php @@ -13,6 +13,7 @@ declare(strict_types=1); namespace Sylius\Bundle\CoreBundle; +use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\IgnoreAnnotationsPass; use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\LazyCacheWarmupPass; use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\RegisterTaxCalculationStrategiesPass; use Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\TranslatableEntityLocalePass; @@ -42,6 +43,7 @@ final class SyliusCoreBundle extends AbstractResourceBundle $container->addCompilerPass(new LazyCacheWarmupPass()); $container->addCompilerPass(new RegisterTaxCalculationStrategiesPass()); $container->addCompilerPass(new TranslatableEntityLocalePass()); + $container->addCompilerPass(new IgnoreAnnotationsPass()); } /**