Submit
Path:
~
/
/
opt
/
psa
/
phpMyAdmin
/
vendor
/
symfony
/
dependency-injection
/
Compiler
/
File Content:
CheckCircularReferencesPass.php
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; /** * 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> */ class CheckCircularReferencesPass implements CompilerPassInterface { private $currentPath; private $checkedNodes; /** * Checks the ContainerBuilder object for circular references. */ public function process(ContainerBuilder $container) { $graph = $container->getCompiler()->getServiceReferenceGraph(); $this->checkedNodes = []; foreach ($graph->getNodes() as $id => $node) { $this->currentPath = [$id]; $this->checkOutEdges($node->getOutEdges()); } } /** * Checks for circular references. * * @param ServiceReferenceGraphEdge[] $edges An array of Edges * * @throws ServiceCircularReferenceException when a circular reference is found */ private function checkOutEdges(array $edges) { foreach ($edges as $edge) { $node = $edge->getDestNode(); $id = $node->getId(); if (empty($this->checkedNodes[$id])) { // Don't check circular references for lazy edges if (!$node->getValue() || (!$edge->isLazy() && !$edge->isWeak())) { $searchKey = array_search($id, $this->currentPath); $this->currentPath[] = $id; if (false !== $searchKey) { throw new ServiceCircularReferenceException($id, \array_slice($this->currentPath, $searchKey)); } $this->checkOutEdges($node->getOutEdges()); } $this->checkedNodes[$id] = true; array_pop($this->currentPath); } } } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
INFO
Name
Size
Permission
Action
AbstractRecursivePass.php
9547 bytes
0644
AliasDeprecatedPublicServicesPass.php
2559 bytes
0644
AnalyzeServiceReferencesPass.php
6327 bytes
0644
AttributeAutoconfigurationPass.php
7622 bytes
0644
AutoAliasServicePass.php
1908 bytes
0644
AutowirePass.php
24971 bytes
0644
AutowireRequiredMethodsPass.php
3867 bytes
0644
AutowireRequiredPropertiesPass.php
2286 bytes
0644
CheckArgumentsValidityPass.php
4386 bytes
0644
CheckCircularReferencesPass.php
2448 bytes
0644
CheckDefinitionValidityPass.php
4742 bytes
0644
CheckExceptionOnInvalidReferenceBehaviorPass.php
4653 bytes
0644
CheckReferenceValidityPass.php
1477 bytes
0644
CheckTypeDeclarationsPass.php
12663 bytes
0644
Compiler.php
2724 bytes
0644
CompilerPassInterface.php
668 bytes
0644
DecoratorServicePass.php
5614 bytes
0644
DefinitionErrorExceptionPass.php
3283 bytes
0644
ExtensionCompilerPass.php
892 bytes
0644
InlineServiceDefinitionsPass.php
7636 bytes
0644
MergeExtensionConfigurationPass.php
8360 bytes
0644
PassConfig.php
7547 bytes
0644
PriorityTaggedServiceTrait.php
6984 bytes
0644
RegisterAutoconfigureAttributesPass.php
3376 bytes
0644
RegisterEnvVarProcessorsPass.php
3004 bytes
0644
RegisterReverseContainerPass.php
2422 bytes
0644
RegisterServiceSubscribersPass.php
6651 bytes
0644
RemoveAbstractDefinitionsPass.php
908 bytes
0644
RemovePrivateAliasesPass.php
1114 bytes
0644
RemoveUnusedDefinitionsPass.php
2860 bytes
0644
ReplaceAliasByActualDefinitionPass.php
4491 bytes
0644
ResolveBindingsPass.php
10054 bytes
0644
ResolveChildDefinitionsPass.php
7702 bytes
0644
ResolveClassPass.php
1561 bytes
0644
ResolveDecoratorStackPass.php
4610 bytes
0644
ResolveEnvPlaceholdersPass.php
1357 bytes
0644
ResolveFactoryClassPass.php
1217 bytes
0644
ResolveHotPathPass.php
2553 bytes
0644
ResolveInstanceofConditionalsPass.php
7272 bytes
0644
ResolveInvalidReferencesPass.php
5332 bytes
0644
ResolveNamedArgumentsPass.php
6074 bytes
0644
ResolveNoPreloadPass.php
3364 bytes
0644
ResolveParameterPlaceHoldersPass.php
3178 bytes
0644
ResolvePrivatesPass.php
1178 bytes
0644
ResolveReferencesToAliasesPass.php
2758 bytes
0644
ResolveServiceSubscribersPass.php
1637 bytes
0644
ResolveTaggedIteratorArgumentPass.php
952 bytes
0644
ServiceLocatorTagPass.php
5407 bytes
0644
ServiceReferenceGraph.php
2645 bytes
0644
ServiceReferenceGraphEdge.php
2184 bytes
0644
ServiceReferenceGraphNode.php
2299 bytes
0644
ValidateEnvPlaceholdersPass.php
3669 bytes
0644
N4ST4R_ID | Naxtarrr