mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-15 09:30:58 +00:00
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:
commit
883e2431d4
2 changed files with 24 additions and 0 deletions
|
|
@ -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']);
|
||||
}
|
||||
}
|
||||
|
|
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue