bug #10259 [BuildFix] Ignore psalm annotations (Zales0123)

This PR was merged into the 1.1 branch.

Discussion
----------

| Q               | A
| --------------- | -----
| Branch?         | 1.1
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | 
| License         | MIT

According to recent changes in `doctrine/collections` (specifically in `1.6.0` version), we need to ignore psalm-related annotations to make usage of `ArrayCollection` possible 🚀 

Commits
-------

29d924b5a1 [BuildFix] Ignore psalm annotations
This commit is contained in:
Mateusz Zalewski 2019-03-25 12:56:58 +01:00 committed by GitHub
commit 883e2431d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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());
}
/**