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()); } /**