/usr/share/php/Symfony/Component/DependencyInjection/Compiler
NameSizeModeActions
AbstractRecursivePass.php93310644editdlrm
AliasDeprecatedPublicServicesPass.php25590644editdlrm
AnalyzeServiceReferencesPass.php63260644editdlrm
AttributeAutoconfigurationPass.php76220644editdlrm
AutoAliasServicePass.php19080644editdlrm
AutowirePass.php252190644editdlrm
AutowireRequiredMethodsPass.php38670644editdlrm
AutowireRequiredPropertiesPass.php22860644editdlrm
CheckArgumentsValidityPass.php43860644editdlrm
CheckCircularReferencesPass.php24480644editdlrm
CheckDefinitionValidityPass.php47410644editdlrm
CheckExceptionOnInvalidReferenceBehaviorPass.php36630644editdlrm
CheckReferenceValidityPass.php14770644editdlrm
CheckTypeDeclarationsPass.php123690644editdlrm
Compiler.php27240644editdlrm
CompilerPassInterface.php6680644editdlrm
DecoratorServicePass.php52570644editdlrm
DefinitionErrorExceptionPass.php18700644editdlrm
ExtensionCompilerPass.php8920644editdlrm
InlineServiceDefinitionsPass.php75850644editdlrm
MergeExtensionConfigurationPass.php85630644editdlrm
PassConfig.php75470644editdlrm
PriorityTaggedServiceTrait.php68110644editdlrm
RegisterAutoconfigureAttributesPass.php33530644editdlrm
RegisterEnvVarProcessorsPass.php30040644editdlrm
RegisterReverseContainerPass.php24220644editdlrm
RegisterServiceSubscribersPass.php66510644editdlrm
RemoveAbstractDefinitionsPass.php9080644editdlrm
RemovePrivateAliasesPass.php11140644editdlrm
RemoveUnusedDefinitionsPass.php28600644editdlrm
ReplaceAliasByActualDefinitionPass.php44910644editdlrm
ResolveBindingsPass.php92330644editdlrm
ResolveChildDefinitionsPass.php75380644editdlrm
ResolveClassPass.php15610644editdlrm
ResolveDecoratorStackPass.php46100644editdlrm
ResolveEnvPlaceholdersPass.php13570644editdlrm
ResolveFactoryClassPass.php12170644editdlrm
ResolveHotPathPass.php25530644editdlrm
ResolveInstanceofConditionalsPass.php71710644editdlrm
ResolveInvalidReferencesPass.php53320644editdlrm
ResolveNamedArgumentsPass.php55810644editdlrm
ResolveNoPreloadPass.php33640644editdlrm
ResolveParameterPlaceHoldersPass.php29690644editdlrm
ResolvePrivatesPass.php11780644editdlrm
ResolveReferencesToAliasesPass.php27580644editdlrm
ResolveServiceSubscribersPass.php16370644editdlrm
ResolveTaggedIteratorArgumentPass.php9520644editdlrm
ServiceLocatorTagPass.php52730644editdlrm
ServiceReferenceGraph.php26440644editdlrm
ServiceReferenceGraphEdge.php21840644editdlrm
ServiceReferenceGraphNode.php22990644editdlrm
ValidateEnvPlaceholdersPass.php38840644editdlrm
Edit: /usr/share/php/Symfony/Component/DependencyInjection/Compiler/PassConfig.php (7547B)
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; /** * Compiler Pass Configuration. * * This class has a default configuration embedded. * * @author Johannes M. Schmitt */ class PassConfig { public const TYPE_AFTER_REMOVING = 'afterRemoving'; public const TYPE_BEFORE_OPTIMIZATION = 'beforeOptimization'; public const TYPE_BEFORE_REMOVING = 'beforeRemoving'; public const TYPE_OPTIMIZE = 'optimization'; public const TYPE_REMOVE = 'removing'; private $mergePass; private $afterRemovingPasses = []; private $beforeOptimizationPasses = []; private $beforeRemovingPasses = []; private $optimizationPasses; private $removingPasses; public function __construct() { $this->mergePass = new MergeExtensionConfigurationPass(); $this->beforeOptimizationPasses = [ 100 => [ new ResolveClassPass(), new RegisterAutoconfigureAttributesPass(), new AttributeAutoconfigurationPass(), new ResolveInstanceofConditionalsPass(), new RegisterEnvVarProcessorsPass(), ], -1000 => [new ExtensionCompilerPass()], ]; $this->optimizationPasses = [[ $autoAliasServicePass = new AutoAliasServicePass(), new ValidateEnvPlaceholdersPass(), new ResolveDecoratorStackPass(), new ResolveChildDefinitionsPass(), new RegisterServiceSubscribersPass(), new ResolveParameterPlaceHoldersPass(false, false), new ResolveFactoryClassPass(), new ResolveNamedArgumentsPass(), new AutowireRequiredMethodsPass(), new AutowireRequiredPropertiesPass(), new ResolveBindingsPass(), new ServiceLocatorTagPass(), new DecoratorServicePass(), new CheckDefinitionValidityPass(), new AutowirePass(false), new ServiceLocatorTagPass(), new ResolveTaggedIteratorArgumentPass(), new ResolveServiceSubscribersPass(), new ResolveReferencesToAliasesPass(), new ResolveInvalidReferencesPass(), new AnalyzeServiceReferencesPass(true), new CheckCircularReferencesPass(), new CheckReferenceValidityPass(), new CheckArgumentsValidityPass(false), ]]; $this->removingPasses = [[ new RemovePrivateAliasesPass(), (new ReplaceAliasByActualDefinitionPass())->setAutoAliasServicePass($autoAliasServicePass), new RemoveAbstractDefinitionsPass(), new RemoveUnusedDefinitionsPass(), new AnalyzeServiceReferencesPass(), new CheckExceptionOnInvalidReferenceBehaviorPass(), new InlineServiceDefinitionsPass(new AnalyzeServiceReferencesPass()), new AnalyzeServiceReferencesPass(), new DefinitionErrorExceptionPass(), ]]; $this->afterRemovingPasses = [[ new ResolveHotPathPass(), new ResolveNoPreloadPass(), new AliasDeprecatedPublicServicesPass(), ]]; } /** * Returns all passes in order to be processed. * * @return CompilerPassInterface[] */ public function getPasses() { return array_merge( [$this->mergePass], $this->getBeforeOptimizationPasses(), $this->getOptimizationPasses(), $this->getBeforeRemovingPasses(), $this->getRemovingPasses(), $this->getAfterRemovingPasses() ); } /** * Adds a pass. * * @throws InvalidArgumentException when a pass type doesn't exist */ public function addPass(CompilerPassInterface $pass, string $type = self::TYPE_BEFORE_OPTIMIZATION, int $priority = 0) { $property = $type.'Passes'; if (!isset($this->$property)) { throw new InvalidArgumentException(sprintf('Invalid type "%s".', $type)); } $passes = &$this->$property; if (!isset($passes[$priority])) { $passes[$priority] = []; } $passes[$priority][] = $pass; } /** * Gets all passes for the AfterRemoving pass. * * @return CompilerPassInterface[] */ public function getAfterRemovingPasses() { return $this->sortPasses($this->afterRemovingPasses); } /** * Gets all passes for the BeforeOptimization pass. * * @return CompilerPassInterface[] */ public function getBeforeOptimizationPasses() { return $this->sortPasses($this->beforeOptimizationPasses); } /** * Gets all passes for the BeforeRemoving pass. * * @return CompilerPassInterface[] */ public function getBeforeRemovingPasses() { return $this->sortPasses($this->beforeRemovingPasses); } /** * Gets all passes for the Optimization pass. * * @return CompilerPassInterface[] */ public function getOptimizationPasses() { return $this->sortPasses($this->optimizationPasses); } /** * Gets all passes for the Removing pass. * * @return CompilerPassInterface[] */ public function getRemovingPasses() { return $this->sortPasses($this->removingPasses); } /** * Gets the Merge pass. * * @return CompilerPassInterface */ public function getMergePass() { return $this->mergePass; } public function setMergePass(CompilerPassInterface $pass) { $this->mergePass = $pass; } /** * Sets the AfterRemoving passes. * * @param CompilerPassInterface[] $passes */ public function setAfterRemovingPasses(array $passes) { $this->afterRemovingPasses = [$passes]; } /** * Sets the BeforeOptimization passes. * * @param CompilerPassInterface[] $passes */ public function setBeforeOptimizationPasses(array $passes) { $this->beforeOptimizationPasses = [$passes]; } /** * Sets the BeforeRemoving passes. * * @param CompilerPassInterface[] $passes */ public function setBeforeRemovingPasses(array $passes) { $this->beforeRemovingPasses = [$passes]; } /** * Sets the Optimization passes. * * @param CompilerPassInterface[] $passes */ public function setOptimizationPasses(array $passes) { $this->optimizationPasses = [$passes]; } /** * Sets the Removing passes. * * @param CompilerPassInterface[] $passes */ public function setRemovingPasses(array $passes) { $this->removingPasses = [$passes]; } /** * Sort passes by priority. * * @param array $passes CompilerPassInterface instances with their priority as key * * @return CompilerPassInterface[] */ private function sortPasses(array $passes): array { if (0 === \count($passes)) { return []; } krsort($passes); // Flatten the array return array_merge(...$passes); } }