Mercurial > hg > isophonics-drupal-site
diff vendor/symfony/dependency-injection/Compiler/PassConfig.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
line wrap: on
line diff
--- a/vendor/symfony/dependency-injection/Compiler/PassConfig.php Mon Apr 23 09:33:26 2018 +0100 +++ b/vendor/symfony/dependency-injection/Compiler/PassConfig.php Mon Apr 23 09:46:53 2018 +0100 @@ -39,21 +39,44 @@ { $this->mergePass = new MergeExtensionConfigurationPass(); + $this->beforeOptimizationPasses = array( + 100 => array( + $resolveClassPass = new ResolveClassPass(), + new ResolveInstanceofConditionalsPass(), + new RegisterEnvVarProcessorsPass(), + ), + -1000 => array(new ExtensionCompilerPass()), + ); + $this->optimizationPasses = array(array( - new ExtensionCompilerPass(), - new ResolveDefinitionTemplatesPass(), + new ResolveChildDefinitionsPass(), + new ServiceLocatorTagPass(), new DecoratorServicePass(), - new ResolveParameterPlaceHoldersPass(), - new FactoryReturnTypePass(), + new ResolveParameterPlaceHoldersPass(false), + new ResolveFactoryClassPass(), + new FactoryReturnTypePass($resolveClassPass), new CheckDefinitionValidityPass(), + new RegisterServiceSubscribersPass(), + new ResolveNamedArgumentsPass(), + new AutowireRequiredMethodsPass(), + new ResolveBindingsPass(), + new AutowirePass(false), + new ResolveTaggedIteratorArgumentPass(), + new ResolveServiceSubscribersPass(), new ResolveReferencesToAliasesPass(), new ResolveInvalidReferencesPass(), - new AutowirePass(), new AnalyzeServiceReferencesPass(true), new CheckCircularReferencesPass(), new CheckReferenceValidityPass(), + new CheckArgumentsValidityPass(false), )); + $this->beforeRemovingPasses = array( + -100 => array( + new ResolvePrivatesPass(), + ), + ); + $this->removingPasses = array(array( new RemovePrivateAliasesPass(), new ReplaceAliasByActualDefinitionPass(), @@ -64,7 +87,9 @@ new AnalyzeServiceReferencesPass(), new RemoveUnusedDefinitionsPass(), )), + new DefinitionErrorExceptionPass(), new CheckExceptionOnInvalidReferenceBehaviorPass(), + new ResolveHotPathPass(), )); } @@ -94,7 +119,7 @@ * * @throws InvalidArgumentException when a pass type doesn't exist */ - public function addPass(CompilerPassInterface $pass, $type = self::TYPE_BEFORE_OPTIMIZATION/*, $priority = 0*/) + public function addPass(CompilerPassInterface $pass, $type = self::TYPE_BEFORE_OPTIMIZATION/*, int $priority = 0*/) { if (func_num_args() >= 3) { $priority = func_get_arg(2); @@ -102,7 +127,7 @@ if (__CLASS__ !== get_class($this)) { $r = new \ReflectionMethod($this, __FUNCTION__); if (__CLASS__ !== $r->getDeclaringClass()->getName()) { - @trigger_error(sprintf('Method %s() will have a third `$priority = 0` argument in version 4.0. Not defining it is deprecated since 3.2.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', __METHOD__), E_USER_DEPRECATED); } } @@ -182,11 +207,6 @@ return $this->mergePass; } - /** - * Sets the Merge Pass. - * - * @param CompilerPassInterface $pass The merge pass - */ public function setMergePass(CompilerPassInterface $pass) { $this->mergePass = $pass;