X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=vendor%2Fsymfony%2Fdependency-injection%2FCompiler%2FPassConfig.php;h=31104fb1fe82069dc011a8c03d1c62ed24bd80d5;hb=4e1bfbf98b844da83b18aca92ef00f11a4735806;hp=fefd5af36ce05b85274abc9695354fa191125e6e;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website diff --git a/vendor/symfony/dependency-injection/Compiler/PassConfig.php b/vendor/symfony/dependency-injection/Compiler/PassConfig.php index fefd5af36..31104fb1f 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,15 +119,15 @@ 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) { + if (\func_num_args() >= 3) { $priority = func_get_arg(2); } else { - if (__CLASS__ !== get_class($this)) { + 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; @@ -251,13 +271,13 @@ class PassConfig */ private function sortPasses(array $passes) { - if (0 === count($passes)) { + if (0 === \count($passes)) { return array(); } krsort($passes); // Flatten the array - return call_user_func_array('array_merge', $passes); + return \call_user_func_array('array_merge', $passes); } }