Skip to content

Commit e166138

Browse files
n-valverdefabpot
authored andcommitted
[DependencyInjection] Add CheckAliasValidityPass to check interface compatibility
1 parent 6ccc82d commit e166138

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CHANGELOG
44
7.1
55
---
66

7+
* Add `CheckAliasValidityPass` to `lint:container` command
78
* Add `private_ranges` as a shortcut for private IP address ranges to the `trusted_proxies` option
89
* Mark classes `ConfigBuilderCacheWarmer`, `Router`, `SerializerCacheWarmer`, `TranslationsCacheWarmer`, `Translator` and `ValidatorCacheWarmer` as `final`
910
* Move the Router `cache_dir` to `kernel.build_dir`

Command/ContainerLintCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use Symfony\Component\Console\Input\InputInterface;
2020
use Symfony\Component\Console\Output\OutputInterface;
2121
use Symfony\Component\Console\Style\SymfonyStyle;
22+
use Symfony\Component\DependencyInjection\Compiler\CheckAliasValidityPass;
2223
use Symfony\Component\DependencyInjection\Compiler\CheckTypeDeclarationsPass;
2324
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
2425
use Symfony\Component\DependencyInjection\Compiler\ResolveFactoryClassPass;
@@ -107,6 +108,7 @@ private function getContainerBuilder(): ContainerBuilder
107108
$container->setParameter('container.build_hash', 'lint_container');
108109
$container->setParameter('container.build_id', 'lint_container');
109110

111+
$container->addCompilerPass(new CheckAliasValidityPass(), PassConfig::TYPE_BEFORE_REMOVING, -100);
110112
$container->addCompilerPass(new CheckTypeDeclarationsPass(true), PassConfig::TYPE_AFTER_REMOVING, -100);
111113

112114
return $this->container = $container;

0 commit comments

Comments
 (0)