[BuildFix] Ignore psalm annotations

This commit is contained in:
Mateusz Zalewski 2019-03-25 12:02:16 +01:00
parent 39a7d40ad2
commit 29d924b5a1
No known key found for this signature in database
GPG key ID: 0545A7503DD474B8
2 changed files with 24 additions and 0 deletions

View file

@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace Sylius\Bundle\CoreBundle\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
* @internal
*/
final class IgnoreAnnotationsPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container): void
{
$annotationsReader = $container->getDefinition('annotations.reader');
$annotationsReader->addMethodCall('addGlobalIgnoredName', ['template']);
$annotationsReader->addMethodCall('addGlobalIgnoredName', ['psalm']);
}
}

View file

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