X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fsymfony%2Fdependency-injection%2FCompiler%2FPassConfig.php;fp=vendor%2Fsymfony%2Fdependency-injection%2FCompiler%2FPassConfig.php;h=d1a308328a26007685f09fb6ad2f110d4e3aaeee;hp=fefd5af36ce05b85274abc9695354fa191125e6e;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/symfony/dependency-injection/Compiler/PassConfig.php b/vendor/symfony/dependency-injection/Compiler/PassConfig.php index fefd5af36..d1a308328 100644 --- a/vendor/symfony/dependency-injection/Compiler/PassConfig.php +++ b/vendor/symfony/dependency-injection/Compiler/PassConfig.php @@ -39,21 +39,44 @@ class PassConfig { $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 @@ class PassConfig new AnalyzeServiceReferencesPass(), new RemoveUnusedDefinitionsPass(), )), + new DefinitionErrorExceptionPass(), new CheckExceptionOnInvalidReferenceBehaviorPass(), + new ResolveHotPathPass(), )); } @@ -94,7 +119,7 @@ class PassConfig * * @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 @@ class PassConfig 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 @@ class PassConfig return $this->mergePass; } - /** - * Sets the Merge Pass. - * - * @param CompilerPassInterface $pass The merge pass - */ public function setMergePass(CompilerPassInterface $pass) { $this->mergePass = $pass;