180 lines
6.1 KiB
YAML
180 lines
6.1 KiB
YAML
|
name: PassConfig
|
||
|
class_comment: '# * Compiler Pass Configuration.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * This class has a default configuration embedded.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @author Johannes M. Schmitt <schmittjoh@gmail.com>'
|
||
|
dependencies:
|
||
|
- name: InvalidArgumentException
|
||
|
type: class
|
||
|
source: Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
|
||
|
properties: []
|
||
|
methods:
|
||
|
- name: getPasses
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: "# * Compiler Pass Configuration.\n# *\n# * This class has a default configuration\
|
||
|
\ embedded.\n# *\n# * @author Johannes M. Schmitt <schmittjoh@gmail.com>\n# */\n\
|
||
|
# class PassConfig\n# {\n# public const TYPE_AFTER_REMOVING = 'afterRemoving';\n\
|
||
|
# public const TYPE_BEFORE_OPTIMIZATION = 'beforeOptimization';\n# public const\
|
||
|
\ TYPE_BEFORE_REMOVING = 'beforeRemoving';\n# public const TYPE_OPTIMIZE = 'optimization';\n\
|
||
|
# public const TYPE_REMOVE = 'removing';\n# \n# private MergeExtensionConfigurationPass\
|
||
|
\ $mergePass;\n# private array $afterRemovingPasses;\n# private array $beforeOptimizationPasses;\n\
|
||
|
# private array $beforeRemovingPasses = [];\n# private array $optimizationPasses;\n\
|
||
|
# private array $removingPasses;\n# \n# public function __construct()\n# {\n#\
|
||
|
\ $this->mergePass = new MergeExtensionConfigurationPass();\n# \n# $this->beforeOptimizationPasses\
|
||
|
\ = [\n# 100 => [\n# new ResolveClassPass(),\n# new RegisterAutoconfigureAttributesPass(),\n\
|
||
|
# new AutowireAsDecoratorPass(),\n# new AttributeAutoconfigurationPass(),\n# new\
|
||
|
\ ResolveInstanceofConditionalsPass(),\n# new RegisterEnvVarProcessorsPass(),\n\
|
||
|
# ],\n# -1000 => [new ExtensionCompilerPass()],\n# ];\n# \n# $this->optimizationPasses\
|
||
|
\ = [[\n# new AutoAliasServicePass(),\n# new ValidateEnvPlaceholdersPass(),\n\
|
||
|
# new ResolveDecoratorStackPass(),\n# new ResolveAutowireInlineAttributesPass(),\n\
|
||
|
# new ResolveChildDefinitionsPass(),\n# new RegisterServiceSubscribersPass(),\n\
|
||
|
# new ResolveParameterPlaceHoldersPass(false, false),\n# new ResolveFactoryClassPass(),\n\
|
||
|
# new ResolveNamedArgumentsPass(),\n# new AutowireRequiredMethodsPass(),\n# new\
|
||
|
\ AutowireRequiredPropertiesPass(),\n# new ResolveBindingsPass(),\n# new ServiceLocatorTagPass(),\n\
|
||
|
# new DecoratorServicePass(),\n# new CheckDefinitionValidityPass(),\n# new AutowirePass(false),\n\
|
||
|
# new ServiceLocatorTagPass(),\n# new ResolveTaggedIteratorArgumentPass(),\n#\
|
||
|
\ new ResolveServiceSubscribersPass(),\n# new ResolveReferencesToAliasesPass(),\n\
|
||
|
# new ResolveInvalidReferencesPass(),\n# new AnalyzeServiceReferencesPass(true),\n\
|
||
|
# new CheckCircularReferencesPass(),\n# new CheckReferenceValidityPass(),\n# new\
|
||
|
\ CheckArgumentsValidityPass(false),\n# ]];\n# \n# $this->removingPasses = [[\n\
|
||
|
# new RemovePrivateAliasesPass(),\n# new ReplaceAliasByActualDefinitionPass(),\n\
|
||
|
# new RemoveAbstractDefinitionsPass(),\n# new RemoveUnusedDefinitionsPass(),\n\
|
||
|
# new AnalyzeServiceReferencesPass(),\n# new CheckExceptionOnInvalidReferenceBehaviorPass(),\n\
|
||
|
# new InlineServiceDefinitionsPass(new AnalyzeServiceReferencesPass()),\n# new\
|
||
|
\ AnalyzeServiceReferencesPass(),\n# new DefinitionErrorExceptionPass(),\n# ]];\n\
|
||
|
# \n# $this->afterRemovingPasses = [\n# 0 => [\n# new ResolveHotPathPass(),\n\
|
||
|
# new ResolveNoPreloadPass(),\n# new AliasDeprecatedPublicServicesPass(),\n# ],\n\
|
||
|
# // Let build parameters be available as late as possible\n# -2048 => [new RemoveBuildParametersPass()],\n\
|
||
|
# ];\n# }\n# \n# /**\n# * Returns all passes in order to be processed.\n# *\n\
|
||
|
# * @return CompilerPassInterface[]"
|
||
|
- name: addPass
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: pass
|
||
|
- name: type
|
||
|
default: self::TYPE_BEFORE_OPTIMIZATION
|
||
|
- name: priority
|
||
|
default: '0'
|
||
|
comment: '# * Adds a pass.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @throws InvalidArgumentException when a pass type doesn''t exist'
|
||
|
- name: getAfterRemovingPasses
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Gets all passes for the AfterRemoving pass.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return CompilerPassInterface[]'
|
||
|
- name: getBeforeOptimizationPasses
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Gets all passes for the BeforeOptimization pass.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return CompilerPassInterface[]'
|
||
|
- name: getBeforeRemovingPasses
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Gets all passes for the BeforeRemoving pass.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return CompilerPassInterface[]'
|
||
|
- name: getOptimizationPasses
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Gets all passes for the Optimization pass.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return CompilerPassInterface[]'
|
||
|
- name: getRemovingPasses
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Gets all passes for the Removing pass.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return CompilerPassInterface[]'
|
||
|
- name: getMergePass
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Gets the Merge pass.'
|
||
|
- name: setMergePass
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: pass
|
||
|
comment: null
|
||
|
- name: setAfterRemovingPasses
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: passes
|
||
|
comment: '# * Sets the AfterRemoving passes.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param CompilerPassInterface[] $passes'
|
||
|
- name: setBeforeOptimizationPasses
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: passes
|
||
|
comment: '# * Sets the BeforeOptimization passes.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param CompilerPassInterface[] $passes'
|
||
|
- name: setBeforeRemovingPasses
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: passes
|
||
|
comment: '# * Sets the BeforeRemoving passes.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param CompilerPassInterface[] $passes'
|
||
|
- name: setOptimizationPasses
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: passes
|
||
|
comment: '# * Sets the Optimization passes.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param CompilerPassInterface[] $passes'
|
||
|
- name: setRemovingPasses
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: passes
|
||
|
comment: '# * Sets the Removing passes.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param CompilerPassInterface[] $passes'
|
||
|
- name: sortPasses
|
||
|
visibility: private
|
||
|
parameters:
|
||
|
- name: passes
|
||
|
comment: '# * Sort passes by priority.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param array $passes CompilerPassInterface instances with their priority as
|
||
|
key
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return CompilerPassInterface[]'
|
||
|
traits:
|
||
|
- Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
|
||
|
interfaces: []
|