72 lines
2.7 KiB
YAML
72 lines
2.7 KiB
YAML
|
name: AddAnnotatedClassesToCachePass
|
||
|
class_comment: '# * Sets the classes to compile in the cache for the container.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @author Fabien Potencier <fabien@symfony.com>
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @deprecated since Symfony 7.1, to be removed in 8.0'
|
||
|
dependencies:
|
||
|
- name: ClassLoader
|
||
|
type: class
|
||
|
source: Composer\Autoload\ClassLoader
|
||
|
- name: CompilerPassInterface
|
||
|
type: class
|
||
|
source: Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
|
||
|
- name: ContainerBuilder
|
||
|
type: class
|
||
|
source: Symfony\Component\DependencyInjection\ContainerBuilder
|
||
|
- name: DebugClassLoader
|
||
|
type: class
|
||
|
source: Symfony\Component\ErrorHandler\DebugClassLoader
|
||
|
- name: Kernel
|
||
|
type: class
|
||
|
source: Symfony\Component\HttpKernel\Kernel
|
||
|
properties: []
|
||
|
methods:
|
||
|
- name: expandClasses
|
||
|
visibility: private
|
||
|
parameters:
|
||
|
- name: patterns
|
||
|
- name: classes
|
||
|
comment: "# * Sets the classes to compile in the cache for the container.\n# *\n\
|
||
|
# * @author Fabien Potencier <fabien@symfony.com>\n# *\n# * @deprecated since\
|
||
|
\ Symfony 7.1, to be removed in 8.0\n# */\n# class AddAnnotatedClassesToCachePass\
|
||
|
\ implements CompilerPassInterface\n# {\n# public function __construct(\n# private\
|
||
|
\ Kernel $kernel,\n# ) {\n# }\n# \n# public function process(ContainerBuilder\
|
||
|
\ $container): void\n# {\n# $annotatedClasses = [];\n# foreach ($container->getExtensions()\
|
||
|
\ as $extension) {\n# if ($extension instanceof Extension) {\n# $annotatedClasses[]\
|
||
|
\ = $extension->getAnnotatedClassesToCompile();\n# }\n# }\n# \n# $annotatedClasses\
|
||
|
\ = array_merge($this->kernel->getAnnotatedClassesToCompile(), ...$annotatedClasses);\n\
|
||
|
# \n# $existingClasses = $this->getClassesInComposerClassMaps();\n# \n# $annotatedClasses\
|
||
|
\ = $container->getParameterBag()->resolveValue($annotatedClasses);\n# $this->kernel->setAnnotatedClassCache($this->expandClasses($annotatedClasses,\
|
||
|
\ $existingClasses));\n# }\n# \n# /**\n# * Expands the given class patterns using\
|
||
|
\ a list of existing classes.\n# *\n# * @param array $patterns The class patterns\
|
||
|
\ to expand\n# * @param array $classes The existing classes to match against\
|
||
|
\ the patterns"
|
||
|
- name: getClassesInComposerClassMaps
|
||
|
visibility: private
|
||
|
parameters: []
|
||
|
comment: null
|
||
|
- name: patternsToRegexps
|
||
|
visibility: private
|
||
|
parameters:
|
||
|
- name: patterns
|
||
|
comment: null
|
||
|
- name: matchAnyRegexps
|
||
|
visibility: private
|
||
|
parameters:
|
||
|
- name: class
|
||
|
- name: regexps
|
||
|
comment: null
|
||
|
traits:
|
||
|
- Composer\Autoload\ClassLoader
|
||
|
- Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
|
||
|
- Symfony\Component\DependencyInjection\ContainerBuilder
|
||
|
- Symfony\Component\ErrorHandler\DebugClassLoader
|
||
|
- Symfony\Component\HttpKernel\Kernel
|
||
|
interfaces:
|
||
|
- CompilerPassInterface
|