prefix stringlengths 512 512 | suffix stringlengths 256 256 | middle stringlengths 14 229 | meta dict |
|---|---|---|---|
buted with this source code.
*/
namespace Symfony\Component\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\... | within the
* container.
*
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
*/
class ResolveInvalidReferencesPass implements CompilerPassInterface
{
private ContainerBuilder $container;
private RuntimeException $signalingException;
priva | encyInjection\Exception\ServiceNotFoundException;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\TypedReference;
/**
* Emulates the invalid behavior if the reference is not found | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php",
"language": "php",
"file_size": 5518,
"cut_index": 716,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Argument\AbstractArgument;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\Depe... | ractArgument && $value->getText().'.' === $value->getTextWithContext()) {
$value->setContext(\sprintf('A value found in service "%s"', $this->currentId));
}
if (!$value instanceof Definition) {
return parent::proces |
*/
class ResolveNamedArgumentsPass extends AbstractRecursivePass
{
protected bool $skipScalars = true;
protected function processValue(mixed $value, bool $isRoot = false): mixed
{
if ($value instanceof Abst | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php",
"language": "php",
"file_size": 6075,
"cut_index": 716,
"middle_length": 229
} |
ge.
*
* (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\Co... | ntainerBuilder $container): void
{
$this->container = $container;
try {
foreach ($container->getDefinitions() as $id => $definition) {
if ($definition->isPublic() && !isset($this->resolvedIds[$id])) {
| class ResolveNoPreloadPass extends AbstractRecursivePass
{
private const DO_PRELOAD_TAG = '.container.do_preload';
protected bool $skipScalars = true;
private array $resolvedIds = [];
public function process(Co | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/ResolveNoPreloadPass.php",
"language": "php",
"file_size": 2980,
"cut_index": 563,
"middle_length": 229
} |
*
* 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\Definition;
use Symfony... | rBagInterface $bag;
public function __construct(
private bool $resolveArrays = true,
private bool $throwOnResolveException = true,
) {
}
/**
* @throws ParameterNotFoundException
*/
public function process(Con | %somevalue%" to their real values.
*
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
*/
class ResolveParameterPlaceHoldersPass extends AbstractRecursivePass
{
protected bool $skipScalars = false;
private Paramete | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php",
"language": "php",
"file_size": 3176,
"cut_index": 614,
"middle_length": 229
} |
ge.
*
* (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\Co... | er $container): void
{
parent::process($container);
foreach ($container->getAliases() as $id => $alias) {
$aliasId = (string) $alias;
$this->currentId = $id;
if ($aliasId !== $defId = $this->getDefi | actual service.
*
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
*/
class ResolveReferencesToAliasesPass extends AbstractRecursivePass
{
protected bool $skipScalars = true;
public function process(ContainerBuild | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php",
"language": "php",
"file_size": 2922,
"cut_index": 563,
"middle_length": 229
} |
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 Psr\Container\ContainerInterface;
use Symfon... | tor = null;
protected function processValue(mixed $value, bool $isRoot = false): mixed
{
if ($value instanceof Reference && $this->serviceLocator && \in_array((string) $value, [ContainerInterface::class, ServiceProviderInterface::class], t | ervice locator to service subscribers.
*
* @author Nicolas Grekas <p@tchwork.com>
*/
class ResolveServiceSubscribersPass extends AbstractRecursivePass
{
protected bool $skipScalars = true;
private ?string $serviceLoca | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/ResolveServiceSubscribersPass.php",
"language": "php",
"file_size": 1706,
"cut_index": 537,
"middle_length": 229
} |
hp
/*
* 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\Depe... | instanceof TaggedIteratorArgument) {
return parent::processValue($value, $isRoot);
}
$exclude = $value->getExclude();
if ($value->excludeSelf()) {
$exclude[] = $this->currentId;
}
$value->se | rArgumentPass extends AbstractRecursivePass
{
use PriorityTaggedServiceTrait;
protected bool $skipScalars = true;
protected function processValue(mixed $value, bool $isRoot = false): mixed
{
if (!$value | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/ResolveTaggedIteratorArgumentPass.php",
"language": "php",
"file_size": 1111,
"cut_index": 515,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Alias;
use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
use Symfony\Component\Depend... | ces into ServiceClosureArgument instances.
*
* @author Nicolas Grekas <p@tchwork.com>
*/
final class ServiceLocatorTagPass extends AbstractRecursivePass
{
use PriorityTaggedServiceTrait;
protected bool $skipScalars = true;
protected functi | yInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\ServiceLocator;
/**
* Applies the "container.service_locator" tag by wrapping referen | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/ServiceLocatorTagPass.php",
"language": "php",
"file_size": 5269,
"cut_index": 716,
"middle_length": 229
} |
ge.
*
* (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\Exception\InvalidArgumentExcepti... | ay $nodes = [];
public function hasNode(string $id): bool
{
return isset($this->nodes[$id]);
}
/**
* Gets a node by identifier.
*
* @throws InvalidArgumentException if no node matches the supplied identifier
*/ | it themselves which improves performance quite a lot.
*
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
*
* @final
*/
class ServiceReferenceGraph
{
/**
* @var ServiceReferenceGraphNode[]
*/
private arr | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php",
"language": "php",
"file_size": 2737,
"cut_index": 563,
"middle_length": 229
} |
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;
/**
* Represents an edge in your service graph.... | false,
private bool $byMultiUseArgument = false,
) {
}
/**
* Returns the value of the edge.
*/
public function getValue(): mixed
{
return $this->value;
}
/**
* Returns the source node.
*/
| ferenceGraphNode $sourceNode,
private ServiceReferenceGraphNode $destNode,
private mixed $value = null,
private bool $lazy = false,
private bool $weak = false,
private bool $byConstructor = | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphEdge.php",
"language": "php",
"file_size": 1970,
"cut_index": 537,
"middle_length": 229
} |
ge.
*
* (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\Alias;
use Symfony\Component\Dep... | dInEdge(ServiceReferenceGraphEdge $edge): void
{
$this->inEdges[] = $edge;
}
public function addOutEdge(ServiceReferenceGraphEdge $edge): void
{
$this->outEdges[] = $edge;
}
/**
* Checks if the value of this n | lass ServiceReferenceGraphNode
{
private array $inEdges = [];
private array $outEdges = [];
public function __construct(
private string $id,
private mixed $value,
) {
}
public function ad | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphNode.php",
"language": "php",
"file_size": 2100,
"cut_index": 563,
"middle_length": 229
} |
ge.
*
* (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\Co... | ntainer.tag_decorator', false) as $id => $tags) {
$definition = $container->getDefinition($id);
$definitionCloner = null;
foreach ($tags as $tag) {
if (!$decoratesTag = $tag['decorates_tag'] ?? null) {
| ias Arlaud <mathias.arlaud@gmail.com>
*/
final class TagDecoratorPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container): void
{
foreach ($container->findTaggedResourceIds('co | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/TagDecoratorPass.php",
"language": "php",
"file_size": 2309,
"cut_index": 563,
"middle_length": 229
} |
*
* 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\Config\Definition\BaseNode;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony... | with dummy values.
*
* @author Roland Franssen <franssen.roland@gmail.com>
*/
class ValidateEnvPlaceholdersPass implements CompilerPassInterface
{
private const TYPE_FIXTURES = ['array' => [], 'bool' => false, 'float' => 0.0, 'int' => 0, 'string' => | fony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
/**
* Validates environment variable placeholders used in extension configuration | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/ValidateEnvPlaceholdersPass.php",
"language": "php",
"file_size": 4753,
"cut_index": 614,
"middle_length": 229
} |
n 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\Argument;
/**
* Represents an abstract service argument, which have to be set by a compiler pass or a ... | ublic function setContext(string $context): void
{
$this->context = $context.' is abstract'.('' === $this->text ? '' : ': ');
}
public function getText(): string
{
return $this->text;
}
public function getTextWithC | $this->text = trim($text, '. ');
}
p | {
"filepath": "src/Symfony/Component/DependencyInjection/Argument/AbstractArgument.php",
"language": "php",
"file_size": 968,
"cut_index": 582,
"middle_length": 52
} |
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\Argument;
/**
* @author Guilhem Niot <guilhem.niot@gmail.... | c function __construct(
mixed $value,
bool $trackUsage = true,
int $type = 0,
?string $file = null,
) {
$this->value = $value;
$this->type = $type;
$this->file = $file;
if ($trackUsage) {
| OF_BINDING = 2;
private static int $sequence = 0;
private mixed $value = null;
private ?int $identifier = null;
private ?bool $used = null;
private int $type = 0;
private ?string $file = null;
publi | {
"filepath": "src/Symfony/Component/DependencyInjection/Argument/BoundArgument.php",
"language": "php",
"file_size": 1575,
"cut_index": 537,
"middle_length": 229
} |
he 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\Argument;
use Symfony\Component\DependencyInjection\Exception\EnvNot... | }
public function __invoke(): mixed
{
try {
return ($this->closure)();
} catch (EnvNotFoundException $e) {
return $this->default ?? throw $e;
}
}
public function __toString(): string
{
|
private mixed $default = null,
) {
| {
"filepath": "src/Symfony/Component/DependencyInjection/Argument/EnvClosure.php",
"language": "php",
"file_size": 896,
"cut_index": 547,
"middle_length": 52
} |
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\Argument;
use Symfony\Component\DependencyInjection\Except... | ingable && !\is_string($default ?? '')) {
throw new InvalidArgumentException('The default value of a stringable EnvClosureArgument must be a string or null.');
}
}
public function getValue(): string
{
return $this-> | ment implements ArgumentInterface
{
use ArgumentTrait;
public function __construct(
private string $value,
private mixed $default = null,
private bool $stringable = false,
) {
if ($str | {
"filepath": "src/Symfony/Component/DependencyInjection/Argument/EnvClosureArgument.php",
"language": "php",
"file_size": 1726,
"cut_index": 537,
"middle_length": 229
} |
ge.
*
* (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\Co... | ions.
*/
public function process(ContainerBuilder $container): void
{
try {
$this->enableExpressionProcessing();
$this->container = $container;
$connectedIds = [];
$aliases = $container-> | ork.com>
*/
class RemoveUnusedDefinitionsPass extends AbstractRecursivePass
{
protected bool $skipScalars = true;
private array $connectedIds = [];
/**
* Processes the ContainerBuilder to remove unused definit | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php",
"language": "php",
"file_size": 2890,
"cut_index": 563,
"middle_length": 229
} |
/*
* 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\Argument;
/**
* Represents a collecti... | public function __construct(array $values)
{
$this->setValues($values);
}
public function getValues(): array
{
return $this->values;
}
public function setValues(array $values): void
{
$this->values = | y $values;
| {
"filepath": "src/Symfony/Component/DependencyInjection/Argument/IteratorArgument.php",
"language": "php",
"file_size": 804,
"cut_index": 517,
"middle_length": 14
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\DependencyInjection\Argument;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Exception\InvalidArgume... | }
public function __get(mixed $name): mixed
{
if ('service' !== $name) {
throw new InvalidArgumentException(\sprintf('Cannot read property "%s" from a lazy closure.', $name));
}
if (isset($this->initializer)) | author Nicolas Grekas <p@tchwork.com>
*
* @internal
*/
class LazyClosure
{
public readonly object $service;
public function __construct(
private \Closure $initializer,
) {
unset($this->service);
| {
"filepath": "src/Symfony/Component/DependencyInjection/Argument/LazyClosure.php",
"language": "php",
"file_size": 3305,
"cut_index": 614,
"middle_length": 229
} |
ony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\DependencyInjection\Argument;
/**
* @internal
*/
class RewindableGenerator implements \IteratorAggregate, \Countable
{
private \Closure $gene... | c function getIterator(): \Traversable
{
$g = $this->generator;
return $g();
}
public function count(): int
{
if (!\is_int($count = $this->count)) {
$this->count = $count();
}
return $t | int($count) ? $count : $count(...);
}
publi | {
"filepath": "src/Symfony/Component/DependencyInjection/Argument/RewindableGenerator.php",
"language": "php",
"file_size": 934,
"cut_index": 606,
"middle_length": 52
} |
?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\Argument;
use Symfony\Component\De... | return $this->values;
}
public function setValues(array $values): void
{
if ([0] !== array_keys($values)) {
throw new InvalidArgumentException('A ServiceClosureArgument must hold one and only one value.');
}
| implements ArgumentInterface
{
use ArgumentTrait;
private array $values;
public function __construct(mixed $value)
{
$this->values = [$value];
}
public function getValues(): array
{
| {
"filepath": "src/Symfony/Component/DependencyInjection/Argument/ServiceClosureArgument.php",
"language": "php",
"file_size": 1034,
"cut_index": 513,
"middle_length": 229
} |
ge.
*
* (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\Definition;
use Symfony\Contract... | cessValue($value, $isRoot);
if (!$value instanceof Definition || !$value->isAutowired() || $value->isAbstract() || !$value->getClass()) {
return $value;
}
if (!$reflectionClass = $this->container->getReflectionClass($va | com>
*/
class AutowireRequiredMethodsPass extends AbstractRecursivePass
{
protected bool $skipScalars = true;
protected function processValue(mixed $value, bool $isRoot = false): mixed
{
$value = parent::pro | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredMethodsPass.php",
"language": "php",
"file_size": 3030,
"cut_index": 563,
"middle_length": 229
} |
ge.
*
* (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\Co... | ilder $container): void
{
foreach ($container->getAliases() as $id => $alias) {
try {
if ($alias->isDeprecated() || !$container->hasDefinition((string) $alias)) {
continue;
}
| a service implementing this interface. This ensures injecting the aliased interface won't cause a type error at runtime.
*/
class CheckAliasValidityPass implements CompilerPassInterface
{
public function process(ContainerBu | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/CheckAliasValidityPass.php",
"language": "php",
"file_size": 2031,
"cut_index": 563,
"middle_length": 229
} |
*
* 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\Definition;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
... | false): mixed
{
if (!$value instanceof Definition) {
return parent::processValue($value, $isRoot);
}
$i = 0;
$hasNamedArgs = false;
foreach ($value->getArguments() as $k => $v) {
if (pre | tends AbstractRecursivePass
{
protected bool $skipScalars = true;
public function __construct(
private bool $throwExceptions = true,
) {
}
protected function processValue(mixed $value, bool $isRoot = | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/CheckArgumentsValidityPass.php",
"language": "php",
"file_size": 4290,
"cut_index": 614,
"middle_length": 229
} |
*
* 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\EnvParameterE... | ic services are always public
*
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
*/
class CheckDefinitionValidityPass implements CompilerPassInterface
{
/**
* Processes the ContainerBuilder to validate the Definition.
*
* @throws | ntained in the definition itself.
*
* Later passes can rely on the following, and specifically do not need to
* perform these checks themselves:
*
* - non synthetic, non abstract services always have a class set
* - synthet | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/CheckDefinitionValidityPass.php",
"language": "php",
"file_size": 5034,
"cut_index": 614,
"middle_length": 229
} |
*
* 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\Definition;
use Symfony... |
* before deferred edges fire, but a factory consumes the builder's state at call
* time: deferring $b's setup until after `$b->method(...)` would feed the factory
* an unconfigured builder. The cycle is unresolvable; bail out instead of letting
* the | n $b, $method]` and $b's
* own properties/method calls/configurator transitively require that same service
* through constructor references.
*
* The soft-circular instantiation pattern relies on storing the service's instance | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/CheckFactoryBuilderCircularReferencePass.php",
"language": "php",
"file_size": 4460,
"cut_index": 614,
"middle_length": 229
} |
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\Defini... | lars = true;
protected function processValue(mixed $value, bool $isRoot = false): mixed
{
if ($isRoot && $value instanceof Definition && ($value->isSynthetic() || $value->isAbstract())) {
return $value;
}
if ($v | checks are performed by this pass:
* - target definitions are not abstract
*
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
*/
class CheckReferenceValidityPass extends AbstractRecursivePass
{
protected bool $skipSca | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/CheckReferenceValidityPass.php",
"language": "php",
"file_size": 1532,
"cut_index": 537,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Alias;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Exception\Inva... | Pass
{
protected bool $skipScalars = true;
public function process(ContainerBuilder $container): void
{
$definitions = new \SplPriorityQueue();
$order = \PHP_INT_MAX;
foreach ($container->getDefinitions() as $id => $de | the overridden one.
*
* @author Christophe Coevoet <stof@notk.org>
* @author Fabien Potencier <fabien@symfony.com>
* @author Diego Saint Esteben <diego@saintesteben.me>
*/
class DecoratorServicePass extends AbstractRecursive | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/DecoratorServicePass.php",
"language": "php",
"file_size": 5518,
"cut_index": 716,
"middle_length": 229
} |
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\DependencyInjectio... | process(ContainerBuilder $container): void
{
foreach ($container->getExtensions() as $extension) {
if (!$extension instanceof CompilerPassInterface) {
continue;
}
$extension->process($contai | plements CompilerPassInterface
{
public function | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/ExtensionCompilerPass.php",
"language": "php",
"file_size": 861,
"cut_index": 529,
"middle_length": 52
} |
buted with this source code.
*/
namespace Symfony\Component\DependencyInjection\Compiler;
use Symfony\Component\Config\Definition\BaseNode;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Excepti... | \DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* Merges extension configs into the container builder.
*
* @author Fabien Potencier <fabien@symfony.com>
*/ | mfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Symfony\Component | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php",
"language": "php",
"file_size": 9165,
"cut_index": 716,
"middle_length": 229
} |
tion\Attribute\AsTaggedItem;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\TypedReference;
/**
* Trait that allows a generic method... | * we should not use that class.
*
* @see https://bugs.php.net/53710
* @see https://bugs.php.net/60926
*
* @return Reference[]
*/
private function findAndSortTaggedServices(string|TaggedIteratorArgument $tagName, Contai | iven tag name and order them by their priority.
*
* The order of additions must be respected for services having the same priority,
* and knowing that the \SplPriorityQueue class does not respect the FIFO method,
| {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/PriorityTaggedServiceTrait.php",
"language": "php",
"file_size": 9402,
"cut_index": 921,
"middle_length": 229
} |
ge.
*
* (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\Co... | <p@tchwork.com>
*/
class RegisterEnvVarProcessorsPass implements CompilerPassInterface
{
private const ALLOWED_TYPES = ['array', 'bool', 'float', 'int', 'string', \BackedEnum::class];
public function process(ContainerBuilder $container): void
| se Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
use Symfony\Component\DependencyInjection\Reference;
/**
* Creates the container.env_var_processors_locator service.
*
* @author Nicolas Grekas | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/RegisterEnvVarProcessorsPass.php",
"language": "php",
"file_size": 3039,
"cut_index": 563,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\DependencyInjection\Compiler;
use Psr\Container\ContainerInterface as PsrContainerInterface;
use Symfony\Component\DependencyInjection\Argument\BoundArgument;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
use Symfony\Component\DependencyInje... | ceProviderInterface;
use Symfony\Contracts\Service\ServiceSubscriberInterface;
/**
* Compiler pass to register tagged services that require a service locator.
*
* @author Nicolas Grekas <p@tchwork.com>
*/
class RegisterServiceSubscribersPass extends A | jection\Reference;
use Symfony\Component\DependencyInjection\TypedReference;
use Symfony\Contracts\Service\Attribute\SubscribedService;
use Symfony\Contracts\Service\ServiceCollectionInterface;
use Symfony\Contracts\Service\Servi | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/RegisterServiceSubscribersPass.php",
"language": "php",
"file_size": 7017,
"cut_index": 716,
"middle_length": 229
} |
n 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;
/**
* Removes abstract Definiti... | ($container->getDefinitions() as $id => $definition) {
if ($definition->isAbstract()) {
$container->resolveEnvPlaceholders($definition);
$container->removeDefinition($id);
$container->log($this, \ | inerBuilder $container): void
{
foreach | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/RemoveAbstractDefinitionsPass.php",
"language": "php",
"file_size": 980,
"cut_index": 582,
"middle_length": 52
} |
hp
/*
* 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\Depe... | */
public function process(ContainerBuilder $container): void
{
foreach ($container->getAliases() as $id => $alias) {
if ($alias->isPublic()) {
continue;
}
$container->removeAlias($i | d in
* one of the previous passes.
*
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
*/
class RemovePrivateAliasesPass implements CompilerPassInterface
{
/**
* Removes private aliases from the ContainerBuilder.
| {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/RemovePrivateAliasesPass.php",
"language": "php",
"file_size": 1121,
"cut_index": 515,
"middle_length": 229
} |
*
* 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\InvalidArgume... | rivate array $replacements;
/**
* Process the Container to replace aliases with service definitions.
*
* @throws InvalidArgumentException if the service definition does not exist
*/
public function process(ContainerBuilder $con | initions, effectively removing these
* aliases.
*
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
*/
class ReplaceAliasByActualDefinitionPass extends AbstractRecursivePass
{
protected bool $skipScalars = true;
p | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php",
"language": "php",
"file_size": 4369,
"cut_index": 614,
"middle_length": 229
} |
*
* 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\Attribute\AsDecorator;
use Symfony\Component\DependencyInjection\Attribute\AsTagDec... | c function process(ContainerBuilder $container): void
{
foreach ($container->getDefinitions() as $id => $definition) {
if ($this->accept($definition) && $reflectionClass = $container->getReflectionClass($definition->getClass(), fals | Reads #[AsDecorator] and #[AsTagDecorator] attributes on definitions that are autowired
* and don't have the "container.ignore_attributes" tag.
*/
final class AutowireAsDecoratorPass implements CompilerPassInterface
{
publi | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/AutowireAsDecoratorPass.php",
"language": "php",
"file_size": 3348,
"cut_index": 614,
"middle_length": 229
} |
ge.
*
* (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\Attribute\Autowire;
use Symfony\... |
/**
* Looks for definitions with autowiring enabled and registers their corresponding "#[Required]" properties.
*
* @author Sebastien Morel (Plopix) <morel.seb@gmail.com>
* @author Nicolas Grekas <p@tchwork.com>
*/
class AutowireRequiredPropertiesPas | \Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\TypedReference;
use Symfony\Contracts\Service\Attribute\Required;
| {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredPropertiesPass.php",
"language": "php",
"file_size": 3011,
"cut_index": 563,
"middle_length": 229
} |
ge.
*
* (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\Co... | lass CheckCircularReferencesPass implements CompilerPassInterface
{
private array $currentPath;
private array $checkedNodes;
private array $checkedLazyNodes;
/**
* Checks the ContainerBuilder object for circular references.
*/
| 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>
*/
c | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php",
"language": "php",
"file_size": 2977,
"cut_index": 563,
"middle_length": 229
} |
t\EnvClosureArgument;
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
use Sym... | encyInjection\Parameter;
use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\ServiceLocator;
use Symfony\Component\ExpressionLangu | mponent\DependencyInjection\Exception\InvalidParameterTypeException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ExpressionLanguage;
use Symfony\Component\Depend | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/CheckTypeDeclarationsPass.php",
"language": "php",
"file_size": 12803,
"cut_index": 921,
"middle_length": 229
} |
ge.
*
* (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\Co... | PassConfig();
$this->serviceReferenceGraph = new ServiceReferenceGraph();
}
public function getPassConfig(): PassConfig
{
return $this->passConfig;
}
public function getServiceReferenceGraph(): ServiceReferenceGraph
| @gmail.com>
*/
class Compiler
{
private PassConfig $passConfig;
private array $log = [];
private ServiceReferenceGraph $serviceReferenceGraph;
public function __construct()
{
$this->passConfig = new | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/Compiler.php",
"language": "php",
"file_size": 2636,
"cut_index": 563,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
/**
* Compiler Pass Configuration.
*
* This class has a default configuration embedded.
*
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
... | es;
private array $beforeOptimizationPasses;
private array $beforeRemovingPasses = [];
private array $optimizationPasses;
private array $removingPasses;
public function __construct()
{
$this->mergePass = new MergeExtensionC | _BEFORE_REMOVING = 'beforeRemoving';
public const TYPE_REMOVE = 'removing';
public const TYPE_AFTER_REMOVING = 'afterRemoving';
private MergeExtensionConfigurationPass $mergePass;
private array $afterRemovingPass | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php",
"language": "php",
"file_size": 8098,
"cut_index": 716,
"middle_length": 229
} |
ge.
*
* (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\Argument\ServiceClosureArgument;... |
) {
}
public function process(ContainerBuilder $container): void
{
if (!$container->hasDefinition('reverse_container')) {
return;
}
$refType = $this->beforeRemoving ? ContainerInterface::IGNORE_ON_UNIN | ponent\DependencyInjection\Reference;
/**
* @author Nicolas Grekas <p@tchwork.com>
*/
class RegisterReverseContainerPass implements CompilerPassInterface
{
public function __construct(
private bool $beforeRemoving, | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/RegisterReverseContainerPass.php",
"language": "php",
"file_size": 2020,
"cut_index": 563,
"middle_length": 229
} |
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\Contai... | rs = [];
foreach ($parameterBag->all() as $name => $value) {
if ('.' !== ($name[0] ?? '')) {
continue;
}
if (!$this->preserveArrays || !\is_array($value)) {
$this->removedParamete | __construct(
private bool $preserveArrays = false,
) {
}
public function process(ContainerBuilder $container): void
{
$parameterBag = $container->getParameterBag();
$this->removedParamete | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/RemoveBuildParametersPass.php",
"language": "php",
"file_size": 1511,
"cut_index": 537,
"middle_length": 229
} |
private array $ambiguousServiceTypes;
private array $autowiringAliases;
private ?string $lastFailure = null;
private ?string $decoratedClass = null;
private ?string $decoratedId = null;
private object $defaultArgument;
private ?\Closure $restorePreviousValue = null;
private ?self $typesCl... | $parameter->getDefaultValue());
return $clone;
}
};
}
public function process(ContainerBuilder $container): void
{
$this->defaultArgument->bag = $container->getParameterBag();
try {
| public $names;
public $bag;
public function withValue(\ReflectionParameter $parameter): self
{
$clone = clone $this;
$clone->value = $this->bag->escapeValue( | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php",
"language": "php",
"file_size": 34592,
"cut_index": 2151,
"middle_length": 229
} |
*
* 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\ContainerInterface;
use... | Ids = [];
public function process(ContainerBuilder $container): void
{
$this->serviceLocatorContextIds = [];
foreach ($container->findTaggedServiceIds('container.service_locator_context') as $id => $tags) {
$this->servi | ce.
*
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
*/
class CheckExceptionOnInvalidReferenceBehaviorPass extends AbstractRecursivePass
{
protected bool $skipScalars = true;
private array $serviceLocatorContext | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php",
"language": "php",
"file_size": 4714,
"cut_index": 614,
"middle_length": 229
} |
/*
* 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\Argument;
use Symfony\Component\Depende... |
return match (\count($this->serviceMap[$id] ?? [])) {
0 => parent::get($id),
1 => $this->serviceMap[$id][0],
default => ($this->factory)(...$this->serviceMap[$id]),
};
}
public function getProvi | nstruct(
private \Closure $factory,
private array $serviceMap,
private ?array $serviceTypes = null,
) {
parent::__construct($serviceMap);
}
public function get(string $id): mixed
{ | {
"filepath": "src/Symfony/Component/DependencyInjection/Argument/ServiceLocator.php",
"language": "php",
"file_size": 1128,
"cut_index": 518,
"middle_length": 229
} |
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\Tests\Fixtures;
use Symfony\Component\DependencyInjection\... | ribute(someAttribute: "on name")]
public string $name;
public function __construct(
#[CustomAnyAttribute]
#[CustomParameterAttribute(someAttribute: "on param1 in constructor")]
private string $param1,
#[CustomAnyAtt | Attribute\CustomPropertyAttribute;
use Symfony\Component\DependencyInjection\Tests\Fixtures\Attribute\CustomParameterAttribute;
#[CustomAnyAttribute]
final class TaggedService4
{
#[CustomAnyAttribute]
#[CustomPropertyAtt | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/TaggedService4.php",
"language": "php",
"file_size": 1566,
"cut_index": 537,
"middle_length": 229
} |
use Symfony\Contracts\Service\Attribute\SubscribedService;
use Symfony\Contracts\Service\ServiceMethodsSubscriberTrait;
class TestServiceSubscriberChild extends TestServiceSubscriberParent
{
use ServiceMethodsSubscriberTrait;
use TestServiceMethodsSubscriberTrait;
#[SubscribedService]
private functi... | stom_name');
}
#[SubscribedService]
private function invalidDefinition(): InvalidDefinition
{
return $this->container->get(__METHOD__);
}
private function privateFunction1(): string
{
}
private function privat | tion3
{
return $this->container->get('cu | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/TestServiceSubscriberChild.php",
"language": "php",
"file_size": 992,
"cut_index": 582,
"middle_length": 52
} |
ependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfon... | ion __construct()
{
$this->services = $this->privates = [];
$this->methodMap = [
'Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\ListenerResolver' => 'getListenerResolverService',
];
$this->aliase | ted by the Symfony Dependency Injection Component.
*/
class Symfony_DI_PhpDumper_Test_AutowireCallable_With_ServiceLocator extends Container
{
protected $parameters = [];
protected \Closure $getService;
public funct | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/autowire_callable_with_service_locator.php",
"language": "php",
"file_size": 4445,
"cut_index": 614,
"middle_length": 229
} |
y\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjec... | [
'bar' => 'getBarService',
'baz' => 'getBazService',
'foo' => 'getFooService',
'my_callable' => 'getMyCallableService',
];
$this->aliases = [];
}
public function compile(): void
| e extends Container
{
protected $parameters = [];
public function __construct()
{
$this->parameters = $this->getDefaultParameters();
$this->services = $this->privates = [];
$this->methodMap = | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/autowire_closure.php",
"language": "php",
"file_size": 5792,
"cut_index": 716,
"middle_length": 229
} |
ent\DependencyInjection\Argument\RewindableGenerator;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use... | meters = [];
public function __construct()
{
$this->services = $this->privates = [];
$this->methodMap = [
'bar' => 'getBarService',
];
$this->aliases = [];
}
public function compile(): void
| rBag\ParameterBagInterface;
/**
* @internal This class has been auto-generated by the Symfony Dependency Injection Component.
*/
class Symfony_DI_PhpDumper_Test_Callable_Adapter_Consumer extends Container
{
protected $para | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/callable_adapter_consumer.php",
"language": "php",
"file_size": 2015,
"cut_index": 537,
"middle_length": 229
} |
gument\RewindableGenerator;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\Depende... | $this->services = $this->privates = [];
$this->methodMap = [
'closure' => 'getClosureService',
'closure_of_service_closure' => 'getClosureOfServiceClosureService',
];
$this->aliases = [];
}
| ;
/**
* @internal This class has been auto-generated by the Symfony Dependency Injection Component.
*/
class ProjectServiceContainer extends Container
{
protected $parameters = [];
public function __construct()
{
| {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/closure.php",
"language": "php",
"file_size": 2038,
"cut_index": 563,
"middle_length": 229
} |
gument\RewindableGenerator;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\Depende... | nstruct()
{
$this->services = $this->privates = [];
$this->methodMap = [
'closure_proxy' => 'getClosureProxyService',
];
$this->aliases = [];
}
public function compile(): void
{
throw ne | ;
/**
* @internal This class has been auto-generated by the Symfony Dependency Injection Component.
*/
class Symfony_DI_PhpDumper_Test_Closure_Proxy extends Container
{
protected $parameters = [];
public function __co | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/closure_proxy.php",
"language": "php",
"file_size": 2112,
"cut_index": 563,
"middle_length": 229
} |
ion\Tests\Fixtures\Container;
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyIn... | omponent\DependencyInjection\Tests\Fixtures\Container\ConstructorWithoutArgumentsContainer
{
protected $parameters = [];
public function __construct()
{
parent::__construct();
unset($this->parameterBag);
$this->service | se Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* @internal This class has been auto-generated by the Symfony Dependency Injection Component.
*/
class ProjectServiceContainer extends \Symfony\C | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_constructor_without_arguments.php",
"language": "php",
"file_size": 3000,
"cut_index": 563,
"middle_length": 229
} |
pace Symfony\Component\DependencyInjection\Tests\Fixtures\Container;
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicExcept... | jectServiceContainer extends \Symfony\Component\DependencyInjection\Tests\Fixtures\Container\ConstructorWithMandatoryArgumentsContainer
{
protected $parameters = [];
public function __construct()
{
$this->services = $this->privates = [ | tion\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* @internal This class has been auto-generated by the Symfony Dependency Injection Component.
*/
class Pro | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_mandatory_constructor_arguments.php",
"language": "php",
"file_size": 1274,
"cut_index": 524,
"middle_length": 229
} |
ion\Tests\Fixtures\Container;
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyIn... | omponent\DependencyInjection\Tests\Fixtures\Container\ConstructorWithOptionalArgumentsContainer
{
protected $parameters = [];
public function __construct()
{
parent::__construct();
unset($this->parameterBag);
$this->se | se Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* @internal This class has been auto-generated by the Symfony Dependency Injection Component.
*/
class ProjectServiceContainer extends \Symfony\C | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_optional_constructor_arguments.php",
"language": "php",
"file_size": 3005,
"cut_index": 563,
"middle_length": 229
} |
pace Symfony\Component\DependencyInjection\Tests\Fixtures\Container;
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicExcept... | jectServiceContainer extends \Symfony\Component\DependencyInjection\Tests\Fixtures\Container\NoConstructorContainer
{
protected $parameters = [];
public function __construct()
{
$this->services = $this->privates = [];
$this->a | tion\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* @internal This class has been auto-generated by the Symfony Dependency Injection Component.
*/
class Pro | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_without_constructor.php",
"language": "php",
"file_size": 1254,
"cut_index": 524,
"middle_length": 229
} |
y\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjec... | odMap = [
'Symfony\\Component\\DependencyInjection\\Tests\\Dumper\\InlineAdapterConsumer' => 'getInlineAdapterConsumerService',
'bar' => 'getBarService',
'foo' => 'getFooService',
];
$this->aliases = []; | Consumer extends Container
{
protected $parameters = [];
public function __construct()
{
$this->parameters = $this->getDefaultParameters();
$this->services = $this->privates = [];
$this->meth | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/inline_adapter_consumer.php",
"language": "php",
"file_size": 8401,
"cut_index": 716,
"middle_length": 229
} |
gument\RewindableGenerator;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\Depende... | ction __construct()
{
$this->services = $this->privates = [];
$this->methodMap = [
'bar' => 'getBarService',
'foo' => 'getFooService',
];
$this->aliases = [];
}
public function compile() | ;
/**
* @internal This class has been auto-generated by the Symfony Dependency Injection Component.
*/
class Symfony_DI_PhpDumper_Test_Lazy_Autowire_Attribute extends Container
{
protected $parameters = [];
public fun | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/lazy_autowire_attribute.php",
"language": "php",
"file_size": 3036,
"cut_index": 563,
"middle_length": 229
} |
ependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfon... | $this->methodMap = [
'foo' => 'getFooService',
];
$this->aliases = [];
}
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
| ted by the Symfony Dependency Injection Component.
*/
class ProjectServiceContainer extends Container
{
protected $parameters = [];
public function __construct()
{
$this->services = $this->privates = [];
| {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/lazy_autowire_attribute_with_intersection.php",
"language": "php",
"file_size": 3299,
"cut_index": 614,
"middle_length": 229
} |
gument\RewindableGenerator;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\Depende... | struct()
{
$this->services = $this->privates = [];
$this->methodMap = [
'closure1' => 'getClosure1Service',
'closure2' => 'getClosure2Service',
];
$this->aliases = [];
}
public function | ;
/**
* @internal This class has been auto-generated by the Symfony Dependency Injection Component.
*/
class Symfony_DI_PhpDumper_Test_Lazy_Closure extends Container
{
protected $parameters = [];
public function __con | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/lazy_closure.php",
"language": "php",
"file_size": 2663,
"cut_index": 563,
"middle_length": 229
} |
ependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfon... | $this->methodMap = [
'from_callable' => 'getFromCallableService',
'has_configurator' => 'getHasConfiguratorService',
'has_factory' => 'getHasFactoryService',
'with_closure' => 'getWithClosureService',
| ted by the Symfony Dependency Injection Component.
*/
class ProjectServiceContainer extends Container
{
protected $parameters = [];
public function __construct()
{
$this->services = $this->privates = [];
| {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/named_closure_compiled.php",
"language": "php",
"file_size": 3105,
"cut_index": 614,
"middle_length": 229
} |
namespace Symfony\Component\DependencyInjection\Dump;
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfo... | \Symfony\Component\DependencyInjection\Dump\AbstractContainer
{
protected $parameters = [];
public function __construct()
{
$this->services = $this->privates = [];
$this->aliases = [];
}
public function compile(): vo | Bag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* @internal This class has been auto-generated by the Symfony Dependency Injection Component.
*/
class Container extends | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php",
"language": "php",
"file_size": 1195,
"cut_index": 518,
"middle_length": 229
} |
hp
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\Parameter... | = [];
public function __construct()
{
$this->services = $this->privates = [];
$this->aliases = [];
}
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was | encyInjection\ParameterBag\ParameterBagInterface;
/**
* @internal This class has been auto-generated by the Symfony Dependency Injection Component.
*/
class ProjectServiceContainer extends Container
{
protected $parameters | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1.php",
"language": "php",
"file_size": 1102,
"cut_index": 515,
"middle_length": 229
} |
ependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfon... | ters();
$this->services = $this->privates = [];
$this->methodMap = [
'test' => 'getTestService',
];
$this->aliases = [];
}
public function compile(): void
{
throw new LogicException('You ca | ted by the Symfony Dependency Injection Component.
*/
class ProjectServiceContainer extends Container
{
protected $parameters = [];
public function __construct()
{
$this->parameters = $this->getDefaultParame | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php",
"language": "php",
"file_size": 3668,
"cut_index": 614,
"middle_length": 229
} |
ependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfon... | ters();
$this->services = $this->privates = [];
$this->methodMap = [
'test' => 'getTestService',
];
$this->aliases = [];
}
public function compile(): void
{
throw new LogicException('You ca | ted by the Symfony Dependency Injection Component.
*/
class ProjectServiceContainer extends Container
{
protected $parameters = [];
public function __construct()
{
$this->parameters = $this->getDefaultParame | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php",
"language": "php",
"file_size": 3411,
"cut_index": 614,
"middle_length": 229
} |
ent\DependencyInjection\Argument\RewindableGenerator;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use... | ction __construct()
{
$this->services = $this->privates = [];
$this->methodMap = [
'bar' => 'getBarService',
];
$this->aliases = [];
}
public function compile(): void
{
throw new LogicEx | rBag\ParameterBagInterface;
/**
* @internal This class has been auto-generated by the Symfony Dependency Injection Component.
*/
class ProjectServiceContainer extends Container
{
protected $parameters = [];
public fun | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php",
"language": "php",
"file_size": 1577,
"cut_index": 537,
"middle_length": 229
} |
ependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfon... | ters();
$this->services = $this->privates = [];
$this->methodMap = [
'service_from_anonymous_factory' => 'getServiceFromAnonymousFactoryService',
'service_with_method_call_and_factory' => 'getServiceWithMethodCallAn | ted by the Symfony Dependency Injection Component.
*/
class ProjectServiceContainer extends Container
{
protected $parameters = [];
public function __construct()
{
$this->parameters = $this->getDefaultParame | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services19.php",
"language": "php",
"file_size": 4169,
"cut_index": 614,
"middle_length": 229
} |
ymfony\Component\DependencyInjection\Argument\RewindableGenerator;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundE... | public function __construct()
{
$this->services = $this->privates = [];
$this->methodMap = [
'foo' => 'getFooService',
];
$this->aliases = [];
}
public function compile(): void
{
thro | tion\ParameterBag\ParameterBagInterface;
/**
* @internal This class has been auto-generated by the Symfony Dependency Injection Component.
*/
class ProjectServiceContainer extends Container
{
protected $parameters = [];
| {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services24.php",
"language": "php",
"file_size": 1404,
"cut_index": 524,
"middle_length": 229
} |
ependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfon... | getDefaultParameters();
$this->services = $this->privates = [];
$this->methodMap = [
'bar' => 'getBarService',
'test' => 'getTestService',
];
$this->aliases = [];
}
public function compile( | ted by the Symfony Dependency Injection Component.
*/
class Symfony_DI_PhpDumper_Test_EnvParameters extends Container
{
protected $parameters = [];
public function __construct()
{
$this->parameters = $this-> | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services26.php",
"language": "php",
"file_size": 4428,
"cut_index": 614,
"middle_length": 229
} |
ent\DependencyInjection\Argument\RewindableGenerator;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use... | ction __construct()
{
$this->services = $this->privates = [];
$this->methodMap = [
'Bar\\Foo' => 'getFooService',
'Foo\\Foo' => 'getFoo2Service',
];
$this->aliases = [];
}
public functio | rBag\ParameterBagInterface;
/**
* @internal This class has been auto-generated by the Symfony Dependency Injection Component.
*/
class ProjectServiceContainer extends Container
{
protected $parameters = [];
public fun | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services33.php",
"language": "php",
"file_size": 1692,
"cut_index": 537,
"middle_length": 229
} |
n;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* @internal This class has been auto-generated by the Symfony Dependency Injection Component.
*/
class ProjectServiceContainer extends Container
{
protec... | ce' => 'getBServiceService',
'bar' => 'getBar3Service',
'bar2' => 'getBar22Service',
'baz' => 'getBazService',
'configured_service' => 'getConfiguredServiceService',
'configured_service_simple' => | ticIds = [
'request' => true,
];
$this->methodMap = [
'BAR' => 'getBARService',
'BAR2' => 'getBAR2Service',
'a_service' => 'getAServiceService',
'b_servi | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php",
"language": "php",
"file_size": 16265,
"cut_index": 921,
"middle_length": 229
} |
ependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfon... | $this->methodMap = [
'App\\Bus' => 'getBusService',
'App\\Db' => 'getDbService',
];
$this->aliases = [];
}
public function compile(): void
{
throw new LogicException('You cannot compile a d | ted by the Symfony Dependency Injection Component.
*/
class ProjectServiceContainer extends Container
{
protected $parameters = [];
public function __construct()
{
$this->services = $this->privates = [];
| {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_adawson.php",
"language": "php",
"file_size": 3288,
"cut_index": 614,
"middle_length": 229
} |
$this->services = $this->privates = [];
$this->methodMap = [
'bar2' => 'getBar2Service',
'bar3' => 'getBar3Service',
'baz6' => 'getBaz6Service',
'connection' => 'getConnectionService',
'connection2' => 'getConnection2Service',
'doctr... | anager' => 'getManagerService',
'manager2' => 'getManager2Service',
'manager3' => 'getManager3Service',
'monolog.logger' => 'getMonolog_LoggerService',
'monolog_inline.logger' => 'getMonologInline_LoggerServi | o6' => 'getFoo6Service',
'foobar4' => 'getFoobar4Service',
'listener3' => 'getListener3Service',
'listener4' => 'getListener4Service',
'logger' => 'getLoggerService',
'm | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_private.php",
"language": "php",
"file_size": 22152,
"cut_index": 1331,
"middle_length": 229
} |
$this->services = $this->privates = [];
$this->methodMap = [
'bar' => 'getBarService',
'bar3' => 'getBar3Service',
'bar5' => 'getBar5Service',
'baz6' => 'getBaz6Service',
'connection' => 'getConnectionService',
'connection2' => 'getCo... | ctrine.listener' => 'getDoctrine_ListenerService',
'foo' => 'getFooService',
'foo2' => 'getFoo2Service',
'foo4' => 'getFoo4Service',
'foo5' => 'getFoo5Service',
'foo6' => 'getFoo6Service',
| dispatcher2' => 'getDispatcher2Service',
'doctrine.entity_listener_resolver' => 'getDoctrine_EntityListenerResolverService',
'doctrine.entity_manager' => 'getDoctrine_EntityManagerService',
'do | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_public.php",
"language": "php",
"file_size": 30874,
"cut_index": 1331,
"middle_length": 229
} |
ependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfon... | ters();
$this->services = $this->privates = [];
$this->methodMap = [
'bar' => 'getBarService',
];
$this->aliases = [];
}
public function compile(): void
{
throw new LogicException('You cann | ted by the Symfony Dependency Injection Component.
*/
class ProjectServiceContainer extends Container
{
protected $parameters = [];
public function __construct()
{
$this->parameters = $this->getDefaultParame | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_array_params.php",
"language": "php",
"file_size": 3470,
"cut_index": 614,
"middle_length": 229
} |
ependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfon... | s->getDefaultParameters();
$this->services = $this->privates = [];
$this->aliases = [];
}
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.'); | ted by the Symfony Dependency Injection Component.
*/
class Symfony_DI_PhpDumper_Test_Base64Parameters extends Container
{
protected $parameters = [];
public function __construct()
{
$this->parameters = $thi | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_base64_env.php",
"language": "php",
"file_size": 3169,
"cut_index": 614,
"middle_length": 229
} |
gument\RewindableGenerator;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\Depende... | $this->services = $this->privates = [];
$this->methodMap = [
'foo' => 'getFooService',
'service_closure' => 'getServiceClosureService',
'service_closure_invalid' => 'getServiceClosureInvalidService',
| ;
/**
* @internal This class has been auto-generated by the Symfony Dependency Injection Component.
*/
class ProjectServiceContainer extends Container
{
protected $parameters = [];
public function __construct()
{
| {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_closure_argument_compiled.php",
"language": "php",
"file_size": 2157,
"cut_index": 563,
"middle_length": 229
} |
ependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfon... | getDefaultParameters();
$this->services = $this->privates = [];
$this->aliases = [];
}
public function compile(): void
{
throw new LogicException('You cannot compile a dumped container that was already compiled.');
| ted by the Symfony Dependency Injection Component.
*/
class Symfony_DI_PhpDumper_Test_CsvParameters extends Container
{
protected $parameters = [];
public function __construct()
{
$this->parameters = $this-> | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_csv_env.php",
"language": "php",
"file_size": 3162,
"cut_index": 614,
"middle_length": 229
} |
gument\RewindableGenerator;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\Depende... | unction __construct()
{
$this->services = $this->privates = [];
$this->methodMap = [
'inlined_current' => 'getInlinedCurrentService',
'not_inlined_current' => 'getNotInlinedCurrentService',
];
$t | ;
/**
* @internal This class has been auto-generated by the Symfony Dependency Injection Component.
*/
class Symfony_DI_PhpDumper_Service_CurrentFactoryInlining extends Container
{
protected $parameters = [];
public f | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_current_factory_inlining.php",
"language": "php",
"file_size": 2390,
"cut_index": 563,
"middle_length": 229
} |
on\Kernel\RequiredBundle;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symfony\Component\Filesystem\Filesystem;
class AbstractKernelTest extends TestCase
{
private string $varDir;
protected function setUp(): void
{
$this->varDir = sys_get_temp_dir().'/sf... | kernel.environment'));
$this->assertTrue($kernel->getContainer()->getParameter('kernel.debug'));
}
public function testBootIsIdempotent()
{
$kernel = $this->createKernel();
$kernel->boot();
$container1 = $kernel | {
$kernel = $this->createKernel();
$kernel->boot();
$this->assertInstanceOf(ContainerInterface::class, $kernel->getContainer());
$this->assertSame('test', $kernel->getContainer()->getParameter(' | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/AbstractKernelTest.php",
"language": "php",
"file_size": 21183,
"cut_index": 1331,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\DependencyInjection\Tests;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\ChildDe... | 'get'.ucfirst($property);
$setter = 'set'.ucfirst($property);
$this->assertNull($def->$getter());
$this->assertSame($def, $def->$setter('foo'));
$this->assertSame('foo', $def->$getter());
$this->assertSame([$change | ());
$this->assertSame([], $def->getChanges());
}
#[DataProvider('getPropertyTests')]
public function testSetProperty($property, $changeKey)
{
$def = new ChildDefinition('foo');
$getter = | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/ChildDefinitionTest.php",
"language": "php",
"file_size": 4383,
"cut_index": 614,
"middle_length": 229
} |
ncyInjection\ParameterBag\FrozenParameterBag;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
use Symfony\Component\DependencyInjection\ServiceLocator;
use Symfony\Contracts\Service\ResetInterface;
class ContainerTest extends TestCase
{
public function testConstructor()
{
$sc = new... | estCamelize($id, $expected)
{
$this->assertEquals($expected, Container::camelize($id), \sprintf('Container::camelize("%s")', $id));
}
public static function dataForTestCamelize()
{
return [
['foo_bar', 'FooBar'] | > 'bar']));
$this->assertEquals(['foo' => 'bar'], $sc->getParameterBag()->all(), '__construct() takes an array of parameters as its first argument');
}
#[DataProvider('dataForTestCamelize')]
public function t | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php",
"language": "php",
"file_size": 20229,
"cut_index": 1331,
"middle_length": 229
} |
t\DependencyInjection\Exception\ParameterCircularReferenceException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\DependencyInjection\Tests\Fixtures\IntBackedEnum;
use Symfony\Component\DependencyInjection\Tests\Fixtures\StringBackedEnum;
class EnvVarProcessorTest extends... | ->fail('Should not be called');
});
$this->assertSame($processed, $result);
}
public static function validStrings()
{
return [
['hello', 'hello'],
['true', 'true'],
['false', 'false' | );
$container->setParameter('env(foo)', $value);
$container->compile();
$processor = new EnvVarProcessor($container);
$result = $processor->getEnv('string', 'foo', function () {
$this | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php",
"language": "php",
"file_size": 31008,
"cut_index": 1331,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\DependencyInjection\Tests;
use Psr\Container\ContainerInterface;
use Psr\Container\NotFoundExceptionInterface;
use Symfony\Component\DependencyInjection\Co... | nction getServiceLocator(array $factories): ContainerInterface
{
return new ServiceLocator($factories);
}
public function testGetThrowsOnUndefinedService()
{
$locator = $this->getServiceLocator([
'foo' => static | ent\DependencyInjection\ServiceLocator;
use Symfony\Contracts\Service\ServiceSubscriberInterface;
use Symfony\Contracts\Service\Test\ServiceLocatorTestCase;
class ServiceLocatorTest extends ServiceLocatorTestCase
{
public fu | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/ServiceLocatorTest.php",
"language": "php",
"file_size": 4749,
"cut_index": 614,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\DependencyInjection\Tests\Extension;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Config\Definition\ConfigurableInterface;
use Symfony\Component\Config\Definition\Configuration;
use Symfony\Component\Config\Definition\Configurator\DefinitionConfigu... | or;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
class AbstractExtensionTest extends TestCase
{
public function testConfiguration()
{
$extension = new class extends AbstractExtension {
public function co | Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurat | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Extension/AbstractExtensionTest.php",
"language": "php",
"file_size": 6271,
"cut_index": 716,
"middle_length": 229
} |
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\Tests\Exception;
use PHPUnit\Framework\TestCa... | d "string", you should configure its value explicitly.'
);
self::assertNull($exception->getMessageCallback());
}
public function testLazyness()
{
$counter = 0;
$exception = new AutowiringFailedException(
| essageIsNotANotClosure()
{
$exception = new AutowiringFailedException(
'App\DummyService',
'Cannot autowire service "App\DummyService": argument "$email" of method "__construct()" is type-hinte | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Exception/AutowiringFailedExceptionTest.php",
"language": "php",
"file_size": 1434,
"cut_index": 524,
"middle_length": 229
} |
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\Tests\Exception;
use PHPUnit\Framework\Attributes\DataProv... | arameter);
self::assertSame($expectedMessage, $exception->getMessage());
}
public static function provideReflectionParameters(): iterable
{
yield 'static method' => [
new \ReflectionParameter([MyClass::class, 'doSo | [DataProvider('provideReflectionParameters')]
public function testExceptionMessage(\ReflectionParameter $parameter, string $expectedMessage)
{
$exception = new InvalidParameterTypeException('my_service', 'int', $p | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Exception/InvalidParameterTypeExceptionTest.php",
"language": "php",
"file_size": 1670,
"cut_index": 537,
"middle_length": 229
} |
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\Tests\Attribute;
use PHPUnit\Framework\TestCase;
use Symfo... | sertEquals(
new ServiceLocatorArgument(['foo' => new TypedReference('foo', 'foo'), 'bar' => new TypedReference('bar', 'bar')]),
$locator->value,
);
}
public function testComplexLocator()
{
$locator = new | ace;
use Symfony\Component\DependencyInjection\TypedReference;
class AutowireLocatorTest extends TestCase
{
public function testSimpleLocator()
{
$locator = new AutowireLocator(['foo', 'bar']);
$this->as | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Attribute/AutowireLocatorTest.php",
"language": "php",
"file_size": 1852,
"cut_index": 537,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\DependencyInjection\Tests\Attribute;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjecti... | new Autowire(...$parameters);
}
public function testMustSetOneParameter()
{
$this->expectException(LogicException::class);
new Autowire();
}
public function testCanUseZeroForValue()
{
$this->assertSame('0' | ion;
class AutowireTest extends TestCase
{
#[DataProvider('provideMultipleParameters')]
public function testCanOnlySetOneParameter(array $parameters)
{
$this->expectException(LogicException::class);
| {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Attribute/AutowireTest.php",
"language": "php",
"file_size": 3224,
"cut_index": 614,
"middle_length": 229
} |
<?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\Tests\Fixtures;
use Psr\Container... | lid',
'subscribed' => new SubscribedService(type: 'string', attributes: new Autowire('%some.parameter%')),
'subscribed1' => new Autowire('%some.parameter%'),
])]
public readonly ContainerInterface $locator,
) {
| SubscribedService;
final class AutowireLocatorConsumer
{
public function __construct(
#[AutowireLocator([
BarTagClass::class,
'with_key' => FooTagClass::class,
'nullable' => '?inva | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/Fixtures/AutowireLocatorConsumer.php",
"language": "php",
"file_size": 1004,
"cut_index": 512,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\E... | InlinedIds = [];
private array $inlinedIds = [];
private array $notInlinableIds = [];
private array $autowireInline = [];
private ?ServiceReferenceGraph $graph = null;
public function __construct(
private ?AnalyzeServiceReferen | chmittjoh@gmail.com>
*/
class InlineServiceDefinitionsPass extends AbstractRecursivePass
{
protected bool $skipScalars = true;
private array $cloningIds = [];
private array $connectedIds = [];
private array $not | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php",
"language": "php",
"file_size": 8299,
"cut_index": 716,
"middle_length": 229
} |
*
* 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\Attribute\Autoconfigure;
use Symfony\Component\DependencyInjection\Attribute\Lazy;
... | Grekas <p@tchwork.com>
*/
final class RegisterAutoconfigureAttributesPass implements CompilerPassInterface
{
private static \Closure $registerForAutoconfiguration;
public function process(ContainerBuilder $container): void
{
foreach ( | on;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
/**
* Reads #[Autoconfigure] attributes on definitions that are autoconfigured
* and don't have the "container.ignore_attributes" tag.
*
* @author Nicolas | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/RegisterAutoconfigureAttributesPass.php",
"language": "php",
"file_size": 4094,
"cut_index": 614,
"middle_length": 229
} |
*
* 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\Argument\ArgumentInterface;
use Symfony\Component\DependencyInjection\ContainerBuil... | ds AbstractRecursivePass
{
protected bool $skipScalars = true;
private array $erroredDefinitions = [];
private array $sourceReferences = [];
public function process(ContainerBuilder $container): void
{
try {
parent | se Symfony\Component\DependencyInjection\Reference;
/**
* Throws an exception for any Definitions that have errors and still exist.
*
* @author Ryan Weaver <ryan@knpuniversity.com>
*/
class DefinitionErrorExceptionPass exten | {
"filepath": "src/Symfony/Component/DependencyInjection/Compiler/DefinitionErrorExceptionPass.php",
"language": "php",
"file_size": 3419,
"cut_index": 614,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\DependencyInjection\Argument;
/**
* Represents a collection of services found by tag name to lazily iterate over.
*
* @author Roland Franssen <franssen.... | et services
* @param string|null $indexAttribute The name of the attribute that defines the key referencing each service in the tagged collection
* @param bool $needsIndexes Whether indexes are required and should be generated when compu | aultPriorityMethod = null;
private bool $needsIndexes = false;
private array $exclude = [];
private bool $excludeSelf = true;
/**
* @param string $tag The name of the tag identifying the targ | {
"filepath": "src/Symfony/Component/DependencyInjection/Argument/TaggedIteratorArgument.php",
"language": "php",
"file_size": 4381,
"cut_index": 614,
"middle_length": 229
} |
e Symfony\Component\DependencyInjection\Tests\Compiler\Wither;
use Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass;
use Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition;
use Symfony\Component\DependencyInjection\Tests\Fixtures\FooWithAbstractArgument;
use Symfony\Component\D... | use Symfony\Component\ExpressionLanguage\Expression;
class ContainerBuilderTest extends TestCase
{
public function testDefaultRegisteredDefinitions()
{
$builder = new ContainerBuilder();
$this->assertCount(1, $builder->getDefiniti | rgumentsDummy;
use Symfony\Component\DependencyInjection\Tests\Fixtures\StringBackedEnum;
use Symfony\Component\DependencyInjection\Tests\Fixtures\WitherStaticReturnType;
use Symfony\Component\DependencyInjection\TypedReference;
| {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php",
"language": "php",
"file_size": 89240,
"cut_index": 3790,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\DependencyInjection\Tests;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\IgnoreDe... | self::$fixturesPath = __DIR__.'/Fixtures/';
require_once self::$fixturesPath.'/includes/classes.php';
require_once self::$fixturesPath.'/includes/foo.php';
}
#[DataProvider('crossCheckYamlLoadersDumpers')]
#[IgnoreDeprecatio | er\YamlDumper;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
class CrossCheckTest extends TestCase
{
protected static string $fixturesPath;
public static function setUpBeforeClass(): void
{
| {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php",
"language": "php",
"file_size": 3102,
"cut_index": 614,
"middle_length": 229
} |
/*
* 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\Tests;
use PHPUnit\Framework\TestCase;
... | lic array $envVars = [])
{
}
public function loadEnvVars(): array
{
return $this->envVars;
}
};
$loader = new StaticEnvVarLoader($innerLoader);
$this->ass | ion testLoadEnvVarsCachesInnerLoaderEnvVars()
{
$innerLoader = new class(['FOO' => 'BAR']) implements EnvVarLoaderInterface {
/** @param array<string, string> */
public function __construct(pub | {
"filepath": "src/Symfony/Component/DependencyInjection/Tests/StaticEnvVarLoaderTest.php",
"language": "php",
"file_size": 1182,
"cut_index": 518,
"middle_length": 229
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.