platform/api/symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.yaml
2024-09-02 10:44:11 -07:00

55 lines
1.9 KiB
YAML

name: CheckCircularReferencesPass
class_comment: '# * Checks your services for circular references.
# *
# * References from method calls are ignored since we might be able to resolve
# * these references depending on the order in which services are called.
# *
# * Circular reference from method calls will only be detected at run-time.
# *
# * @author Johannes M. Schmitt <schmittjoh@gmail.com>'
dependencies:
- name: ContainerBuilder
type: class
source: Symfony\Component\DependencyInjection\ContainerBuilder
- name: ServiceCircularReferenceException
type: class
source: Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException
properties: []
methods:
- name: process
visibility: public
parameters:
- name: container
comment: "# * Checks your services for circular references.\n# *\n# * References\
\ from method calls are ignored since we might be able to resolve\n# * these references\
\ depending on the order in which services are called.\n# *\n# * Circular reference\
\ from method calls will only be detected at run-time.\n# *\n# * @author Johannes\
\ M. Schmitt <schmittjoh@gmail.com>\n# */\n# class CheckCircularReferencesPass\
\ implements CompilerPassInterface\n# {\n# private array $currentPath;\n# private\
\ array $checkedNodes;\n# \n# /**\n# * Checks the ContainerBuilder object for\
\ circular references."
- name: checkOutEdges
visibility: private
parameters:
- name: edges
comment: '# * Checks for circular references.
# *
# * @param ServiceReferenceGraphEdge[] $edges An array of Edges
# *
# * @throws ServiceCircularReferenceException when a circular reference is found'
traits:
- Symfony\Component\DependencyInjection\ContainerBuilder
- Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException
interfaces:
- CompilerPassInterface