prefix
stringlengths
512
512
suffix
stringlengths
256
256
middle
stringlengths
14
229
meta
dict
* 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\Attribute; use Symfony\Component\Dependency...
R)] class AutowireServiceClosure extends Autowire { /** * @param string $service The service id to wrap in the closure */ public function __construct(string $service) { parent::__construct(new ServiceClosureArgument(new Refere
ARGET_PARAMETE
{ "filepath": "src/Symfony/Component/DependencyInjection/Attribute/AutowireServiceClosure.php", "language": "php", "file_size": 817, "cut_index": 522, "middle_length": 14 }
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\Attribute; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentExcept...
ruct(public ?string $name = null) { } public function getParsedName(): string { if (null === $this->name) { throw new LogicException(\sprintf('Cannot parse the name of a #[Target] attribute that has not been resolved. D
p@tchwork.com> */ #[\Attribute(\Attribute::TARGET_PARAMETER | \Attribute::TARGET_PROPERTY)] final class Target { /** * @param string|null $name The name of the target autowiring alias */ public function __const
{ "filepath": "src/Symfony/Component/DependencyInjection/Attribute/Target.php", "language": "php", "file_size": 2363, "cut_index": 563, "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\Attribute; /** * An attribute to t...
GET_FUNCTION | \Attribute::IS_REPEATABLE)] class When { /** * @param string $env The environment under which the class will be registered as a service (i.e. "dev", "test", "prod") */ public function __construct(public string $env) {
Attribute::TAR
{ "filepath": "src/Symfony/Component/DependencyInjection/Attribute/When.php", "language": "php", "file_size": 791, "cut_index": 514, "middle_length": 14 }
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\Kernel; use Symfony\Component\Config\Definition\Configurator\DefinitionConfigurator;...
* A base class for DI-powered bundles with built-in configuration hooks. * * @author Fabien Potencier <fabien@symfony.com> */ abstract class AbstractBundle implements BundleInterface, ConfigurableExtensionInterface { protected string $name; pr
onent\DependencyInjection\Extension\ConfigurableExtensionInterface; use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; /**
{ "filepath": "src/Symfony/Component/DependencyInjection/Kernel/AbstractBundle.php", "language": "php", "file_size": 2759, "cut_index": 563, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\DependencyInjection\Kernel; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Base class for DI-powered applications. * * Provides properties, lifecycle orchestration and publ...
<string, bool> */ protected static array $freshCache = []; private string $projectDir; public function __construct( protected string $environment, protected bool $debug, ) { if (!$environment) { throw n
/** @var array<string, BundleInterface> */ protected array $bundles = []; protected ?ContainerInterface $container = null; protected bool $booted = false; protected ?float $startTime = null; /** @var array
{ "filepath": "src/Symfony/Component/DependencyInjection/Kernel/AbstractKernel.php", "language": "php", "file_size": 6400, "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\Kernel; use Symfony\Component\Config\Definition\Configuration; use Symfony\Component...
pendencyInjection\Loader\Configurator\ContainerConfigurator; /** * @author Yonel Ceruto <yonelceruto@gmail.com> * * @internal */ class BundleExtension extends Extension implements PrependExtensionInterface { use ExtensionTrait; public functio
ymfony\Component\DependencyInjection\Extension\Extension; use Symfony\Component\DependencyInjection\Extension\ExtensionTrait; use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; use Symfony\Component\De
{ "filepath": "src/Symfony/Component/DependencyInjection/Kernel/BundleExtension.php", "language": "php", "file_size": 2241, "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\Kernel; use Symfony\Component\DependencyInjec...
lds the bundle. * * It is only ever called once when the cache is empty. */ public function build(ContainerBuilder $container): void; /** * Returns the container extension that should be implicitly loaded. */ public fu
abien@symfony.com> */ interface BundleInterface { /** * Boots the Bundle. */ public function boot(): void; /** * Shutdowns the Bundle. */ public function shutdown(): void; /** * Bui
{ "filepath": "src/Symfony/Component/DependencyInjection/Kernel/BundleInterface.php", "language": "php", "file_size": 1417, "cut_index": 524, "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\Kernel; use Symfony\Component\Con...
): string|array { if (isset($file[0]) && '@' === $file[0]) { $resource = $this->kernel->locateResource($file); return $first ? $resource : [$resource]; } return parent::locate($file, $currentPath, $firs
ds BaseFileLocator { public function __construct( private KernelInterface $kernel, ) { parent::__construct(); } public function locate(string $file, ?string $currentPath = null, bool $first = true
{ "filepath": "src/Symfony/Component/DependencyInjection/Kernel/FileLocator.php", "language": "php", "file_size": 1009, "cut_index": 512, "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\Kernel; use Symfony\Component\DependencyInjection\ContainerInterface; /** * @autho...
ns the file path for a given bundle resource. * * A Resource can be a file or a directory. * * The resource name must follow the following pattern: * * "@BundleName/path/to/a/file.something" * * where BundleName
erface> */ public function getBundles(): array; /** * @throws \InvalidArgumentException when the bundle is not enabled */ public function getBundle(string $name): BundleInterface; /** * Retur
{ "filepath": "src/Symfony/Component/DependencyInjection/Kernel/KernelInterface.php", "language": "php", "file_size": 2691, "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; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; use S...
finition to inherit from. */ public function getParent(): string { return $this->parent; } /** * Sets the Definition to inherit from. * * @return $this */ public function setParent(string $parent): stat
dDefinition extends Definition { /** * @param string $parent The id of Definition instance to decorate */ public function __construct( private string $parent, ) { } /** * Returns the De
{ "filepath": "src/Symfony/Component/DependencyInjection/ChildDefinition.php", "language": "php", "file_size": 2583, "cut_index": 563, "middle_length": 229 }
'ale' => '阿留申文', 'aln' => '蓋格阿爾巴尼亞文', 'alt' => '南阿爾泰文', 'am' => '阿姆哈拉文', 'an' => '阿拉貢文', 'ang' => '古英文', 'ann' => '奧博洛語', 'anp' => '昂加文', 'ar' => '阿拉伯文', 'arc' => '阿拉米文', 'arn' => '馬普切文', 'aro' => '阿拉奧納文', 'arp' => '阿...
'bal' => '俾路支文', 'ban' => '峇里文', 'bar' => '巴伐利亞文', 'bas' => '巴薩文', 'bax' => '巴姆穆文', 'bbc' => '巴塔克托巴文', 'bbj' => '戈馬拉文', 'be' => '白俄羅斯文', 'bej' => '貝扎文', 'bem' => '別姆巴文',
, 'ase' => '美國手語', 'ast' => '阿斯圖里亞文', 'atj' => '阿提卡梅克語', 'av' => '阿瓦爾文', 'avk' => '科塔瓦文', 'awa' => '阿瓦文', 'ay' => '艾馬拉文', 'az' => '亞塞拜然文', 'ba' => '巴什喀爾文',
{ "filepath": "src/Symfony/Component/Intl/Resources/data/languages/zh_Hant.php", "language": "php", "file_size": 21564, "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\Intl\Data\Generator; use Symfony\Component\Intl\Data\Bundle\Compiler\BundleCompilerInterface; use Symfon...
uage codes. * * @var string[] */ private array $scriptCodes = []; protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array { return $scanner->scanLocales($sourceDir.'/lang'); } protected
ussek <bschussek@gmail.com> * * @internal */ class ScriptDataGenerator extends AbstractDataGenerator { private const DENYLIST = [ 'Zzzz' => true, // Unknown Script ]; /** * Collects all available lang
{ "filepath": "src/Symfony/Component/Intl/Data/Generator/ScriptDataGenerator.php", "language": "php", "file_size": 2410, "cut_index": 563, "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\Intl\Data\Bundle\Writer; /** * Writes .json resource...
f \Traversable) { $value = iterator_to_array($value); } }); $contents = json_encode($data, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_UNICODE)."\n"; file_put_contents($path.'/'.$locale.'.json', $contents);
cale, mixed $data): void { if ($data instanceof \Traversable) { $data = iterator_to_array($data); } array_walk_recursive($data, static function (&$value) { if ($value instanceo
{ "filepath": "src/Symfony/Component/Intl/Data/Bundle/Writer/JsonBundleWriter.php", "language": "php", "file_size": 1003, "cut_index": 512, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\Intl\Data\Bundle\Writer; /** * Writes .txt resource bundles. * * The resulting files can be converted to binary .res files using a * {@link \Symfony\Component\Intl\ResourceBundle\Compiler\BundleCompilerInterface} * implementation. * * @author Bernhar...
; fclose($file); } /** * Writes a "resourceBundle" node. * * @param resource $file The file handle to write to * @param mixed $value The value of the node * * @see http://source.icu-project.org/repos/icu/
{ public function write(string $path, string $locale, mixed $data, bool $fallback = true): void { $file = fopen($path.'/'.$locale.'.txt', 'w'); $this->writeResourceBundle($file, $locale, $data, $fallback)
{ "filepath": "src/Symfony/Component/Intl/Data/Bundle/Writer/TextBundleWriter.php", "language": "php", "file_size": 5621, "cut_index": 716, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\Intl\Data\Bundle\Reader; use Symfony\Component\Intl\Data\Util\RecursiveArrayAccess; use Symfony\Component\Intl\Exception\MissingResourceException; use Symfony\Component\Intl\Exception\OutOfBoundsException; use Symfony\Component\Intl\Exception\ResourceBundle...
ates an entry reader based on the given resource bundle reader. */ public function __construct( private BundleReaderInterface $reader, ) { } /** * Stores a mapping of locale aliases to locales. * * This mapping
dleEntryReaderInterface * * @internal */ class BundleEntryReader implements BundleEntryReaderInterface { /** * A mapping of locale aliases to locales. */ private array $localeAliases = []; /** * Cre
{ "filepath": "src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php", "language": "php", "file_size": 5809, "cut_index": 716, "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\Intl\Data\Bundle\Reader; use Symfony\Component\Intl\Data\Util\ArrayAccessibleR...
the \ResourceBundle class is not available. try { // Never enable fallback. We want to know if a bundle cannot be found $bundle = new \ResourceBundle($locale, $path, false); } catch (\Exception) { $bundl
ternal */ class IntlBundleReader implements BundleReaderInterface { public function read(string $path, string $locale): mixed { // Point for future extension: Modify this class so that it works also // if
{ "filepath": "src/Symfony/Component/Intl/Data/Bundle/Reader/IntlBundleReader.php", "language": "php", "file_size": 1529, "cut_index": 537, "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\Intl\Data\Bundle\Reader; use Symfony\Component\Intl\Excepti...
if (\dirname($fileName) !== $path) { throw new ResourceBundleNotFoundException(\sprintf('The resource bundle "%s" does not exist.', $fileName)); } if (is_file($fileName.'.gz')) { return GzipStreamWrapper::requir
l */ class PhpBundleReader implements BundleReaderInterface { public function read(string $path, string $locale): mixed { $fileName = $path.'/'.$locale.'.php'; // prevent directory traversal attacks
{ "filepath": "src/Symfony/Component/Intl/Data/Bundle/Reader/PhpBundleReader.php", "language": "php", "file_size": 1242, "cut_index": 518, "middle_length": 229 }
Symfony\Component\DependencyInjection\Compiler\PassConfig; use Symfony\Component\DependencyInjection\Compiler\ResolveEnvPlaceholdersPass; use Symfony\Component\DependencyInjection\Exception\BadMethodCallException; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; use Symfony\Component\Depend...
face; use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\InstantiatorInterface; use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\LazyServiceInstantiator; use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\RealSer
e Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; use Symfony\Component\DependencyInjection\Extension\ExtensionInter
{ "filepath": "src/Symfony/Component/DependencyInjection/ContainerBuilder.php", "language": "php", "file_size": 66144, "cut_index": 2151, "middle_length": 229 }
null; private ?string $file = null; private string|array|null $factory = null; private bool $shared = true; private array $deprecation = []; private array $properties = []; private array $calls = []; private array $instanceof = []; private bool $autoconfigured = false; private strin...
; /** * @internal * * Used to store the name of the inner id when using service decoration together with autowiring */ public ?string $innerServiceId = null; /** * @internal * * Used to store the behavior to
zy = false; private ?array $decoratedService = null; private bool $autowired = false; private array $changes = []; private array $bindings = []; private array $errors = []; protected array $arguments = []
{ "filepath": "src/Symfony/Component/DependencyInjection/Definition.php", "language": "php", "file_size": 21389, "cut_index": 1331, "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; use Symfony\Component\DependencyInjection\Ex...
namespace of the variable; when the empty string is passed, null values should be kept as is * @param string $name The name of the variable within the namespace * @param \Closure(string): mixed $getEnv A closure that allows fet
arProcessorInterface { /** * Returns the value of the given variable as managed by the current instance. * * @param-immediately-invoked-callable $getEnv * * @param string $prefix The
{ "filepath": "src/Symfony/Component/DependencyInjection/EnvVarProcessorInterface.php", "language": "php", "file_size": 1331, "cut_index": 524, "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; use Symfony\Component\DependencyInjection\Exception\LogicException; use Symfony\Com...
lements ExpressionFunctionProviderInterface { private ?\Closure $serviceCompiler; public function __construct( ?callable $serviceCompiler = null, private ?\Closure $getEnv = null, ) { $this->serviceCompiler = null === $
vice, use service('request'). * To get a parameter, use parameter('kernel.debug'). * To get an env variable, use env('SOME_VARIABLE'). * * @author Fabien Potencier <fabien@symfony.com> */ class ExpressionLanguageProvider imp
{ "filepath": "src/Symfony/Component/DependencyInjection/ExpressionLanguageProvider.php", "language": "php", "file_size": 2185, "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; use Psr\Container\ContainerInterface; use Symfony\Component\DependencyInjection\Exc...
) { $this->getServiceId = \Closure::bind(fn (object $service): ?string => array_search($service, $this->services, true) ?: array_search($service, $this->privates, true) ?: null, $serviceContainer, Container::class); } /** * Returns th
private \Closure $getServiceId; public function __construct( private Container $serviceContainer, private ContainerInterface $reversibleLocator, private string $tagName = 'container.reversible',
{ "filepath": "src/Symfony/Component/DependencyInjection/ReverseContainer.php", "language": "php", "file_size": 2250, "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; use ProxyManager\Proxy\LazyLoadingInterface; use Symfony\Component\VarExporter\Lazy...
eServices, private array $resetMethods, private ?\WeakMap $resetMap = null, ) { } public function reset(): void { foreach ($this->resettableServices as $id => $service) { $this->resetInstance($service, (
etterInterface { /** * @param \Traversable<string, object> $resettableServices * @param array<string, string|string[]> $resetMethods */ public function __construct( private \Traversable $resettabl
{ "filepath": "src/Symfony/Component/DependencyInjection/ServicesResetter.php", "language": "php", "file_size": 2185, "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\Extension; use Symfony\Component\Config\Definition\Configuration; use Symfony\Compon...
xtension implements ConfigurableExtensionInterface, PrependExtensionInterface { use ExtensionTrait; public function configure(DefinitionConfigurator $definition): void { } public function prependExtension(ContainerConfigurator $config
ny\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; /** * An Extension that provides configuration hooks. * * @author Yonel Ceruto <yonelceruto@gmail.com> */ abstract class AbstractExtension extends E
{ "filepath": "src/Symfony/Component/DependencyInjection/Extension/AbstractExtension.php", "language": "php", "file_size": 2199, "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; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; class Alias { private const DEFAULT_DEPRECATION_TEM...
on isPublic(): bool { return $this->public; } /** * Sets if this Alias is public. * * @return $this */ public function setPublic(bool $boolean): static { $this->public = $boolean; return $th
public function __construct( private string $id, bool $public = false, ) { $this->public = $public; } /** * Checks if this DI Alias should be public or not. */ public functi
{ "filepath": "src/Symfony/Component/DependencyInjection/Alias.php", "language": "php", "file_size": 3306, "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\Intl\Tests; use PHPUnit\Framework\Attributes\RequiresPhpExtension...
edChecksIfIntlExtensionIsLoaded() { $this->assertTrue(Intl::isExtensionLoaded()); } public function testGetIcuVersionReadsTheVersionOfInstalledIcuLibrary() { $this->assertStringMatchesFormat('%d.%d', Intl::getIcuVersion());
is->defaultLocale = \Locale::getDefault(); } protected function tearDown(): void { \Locale::setDefault($this->defaultLocale); } #[RequiresPhpExtension('intl')] public function testIsExtensionLoad
{ "filepath": "src/Symfony/Component/Intl/Tests/IntlTest.php", "language": "php", "file_size": 1493, "cut_index": 524, "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; /** * Represents a PHP type-hinted service ...
ame of the argument targeting the service * @param array $attributes The attributes to be used */ public function __construct( string $id, private string $type, int $invalidBehavior = ContainerInterface::EXC
identifier * @param string $type The PHP type of the identified service * @param int $invalidBehavior The behavior when the service does not exist * @param string|null $name The n
{ "filepath": "src/Symfony/Component/DependencyInjection/TypedReference.php", "language": "php", "file_size": 1477, "cut_index": 524, "middle_length": 229 }
k' => 'אַקאַדיש', 'am' => 'אַמהאַריש', 'an' => 'אַראַגאניש', 'ang' => 'אַלט ענגליש', 'ar' => 'אַראַביש', 'arc' => 'אַראַמיש', 'as' => 'אַסאַמיש', 'az' => 'אַזערביידזשאַניש', 'ban' => 'באַלינעזיש', 'bar' => 'בײַעריש', 'be' => 'בעלאַרוסיש', ...
טער־סארביש', 'dyo' => 'זשאלא־פֿאני', 'el' => 'גריכיש', 'en' => 'ענגליש', 'enm' => 'מיטל ענגליש', 'eo' => 'עספּעראַנטא', 'es' => 'שפּאַניש', 'et' => 'עסטיש', 'eu' => 'באַסקיש', 'fa' =>
ַניש', 'crh' => 'קרים־טערקיש', 'cs' => 'טשעכיש', 'csb' => 'קאַשוביש', 'cu' => 'קלויסטער־סלאַוויש', 'cy' => 'וועלשיש', 'da' => 'דעניש', 'de' => 'דײַטש', 'dsb' => 'אונ
{ "filepath": "src/Symfony/Component/Intl/Resources/data/languages/yi.php", "language": "php", "file_size": 5593, "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\Intl\Data\Bundle\Reader; use Symfony\Component\Intl\D...
ction read(string $path, string $locale): mixed { $hash = $path.'//'.$locale; if (!isset($this->buffer[$hash])) { $this->buffer[$hash] = $this->reader->read($path, $locale); } return $this->buffer[$hash];
ixed> */ private RingBuffer $buffer; public function __construct( private BundleReaderInterface $reader, int $bufferSize, ) { $this->buffer = new RingBuffer($bufferSize); } public fun
{ "filepath": "src/Symfony/Component/Intl/Data/Bundle/Reader/BufferedBundleReader.php", "language": "php", "file_size": 1004, "cut_index": 512, "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\Intl\Data\Bundle\Writer; use Symfony\Component\VarExport...
$data = iterator_to_array($data); } array_walk_recursive($data, static function (&$value) { if ($value instanceof \Traversable) { $value = iterator_to_array($value); } }); file_put
lic function write(string $path, string $locale, mixed $data): void { $template = <<<'TEMPLATE' <?php return %s; TEMPLATE; if ($data instanceof \Traversable) {
{ "filepath": "src/Symfony/Component/Intl/Data/Bundle/Writer/PhpBundleWriter.php", "language": "php", "file_size": 1094, "cut_index": 515, "middle_length": 229 }
t\ServiceLocator as ArgumentServiceLocator; use Symfony\Component\DependencyInjection\Exception\EnvNotFoundException; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; use Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException; use Symfony\Component\DependencyInj...
zenParameterBag; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; use Symfony\Contracts\Service\ResetInterface; // Help opcache.preload discover always-neede
xception; use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; use Symfony\Component\DependencyInjection\ParameterBag\Fro
{ "filepath": "src/Symfony/Component/DependencyInjection/Container.php", "language": "php", "file_size": 15041, "cut_index": 921, "middle_length": 229 }
tion\ParameterCircularReferenceException; use Symfony\Component\DependencyInjection\Exception\RuntimeException; use Symfony\Contracts\Service\ResetInterface; /** * @author Nicolas Grekas <p@tchwork.com> */ class EnvVarProcessor implements EnvVarProcessorInterface, ResetInterface { /** @var \Traversable<EnvVarLoa...
= $this->loaders = $loaders ?? new \ArrayIterator(); } public static function getProvidedTypes(): array { return [ 'base64' => 'string', 'bool' => 'bool', 'not' => 'bool', 'const' => 'bo
* @param \Traversable<EnvVarLoaderInterface>|null $loaders */ public function __construct( private ContainerInterface $container, ?\Traversable $loaders = null, ) { $this->originalLoaders
{ "filepath": "src/Symfony/Component/DependencyInjection/EnvVarProcessor.php", "language": "php", "file_size": 14484, "cut_index": 921, "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; /** * Reference represents a service refere...
lic function getInvalidBehavior(): int { return $this->invalidBehavior ??= ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; } public function __serialize(): array { $data = []; foreach ((array) $this as $k => $v)
rface::EXCEPTION_ON_INVALID_REFERENCE, ) { } public function __toString(): string { return $this->id; } /** * Returns the behavior to be used when the service does not exist. */ pub
{ "filepath": "src/Symfony/Component/DependencyInjection/Reference.php", "language": "php", "file_size": 1333, "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\Intl\Data\Bundle\Reader; use Symfony\Component\Intl\Exception\MissingResourceE...
* like this: * * TopLevel * NestedLevel * Entry: Value * * Then the value can be read by calling: * * $reader->readEntry('...', 'en', ['TopLevel', 'NestedLevel', 'Entry']); *
erInterface { /** * Reads an entry from a resource bundle. * * An entry can be selected from the resource bundle by passing the path * to that entry in the bundle. For example, if the bundle is structured
{ "filepath": "src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReaderInterface.php", "language": "php", "file_size": 1877, "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\Loader\Configurator; use Symfony\Component\DependencyInjec...
orTrait; use Traits\ConstructorTrait; use Traits\DecorateTrait; use Traits\DeprecateTrait; use Traits\FactoryTrait; use Traits\FileTrait; use Traits\FromCallableTrait; use Traits\LazyTrait; use Traits\ParentTrait; use Tr
use Traits\AbstractTrait; use Traits\ArgumentTrait; use Traits\AutoconfigureTrait; use Traits\AutowireTrait; use Traits\BindTrait; use Traits\CallTrait; use Traits\ClassTrait; use Traits\Configurat
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/ServiceConfigurator.php", "language": "php", "file_size": 1969, "cut_index": 537, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\DependencyInjection\Loader\Configurator; use Symfony\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\ChildDefinition; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Defini...
private Definition $defaults; private array $instanceof; private string $anonymousHash; private int $anonymousCount; public function __construct( private ContainerBuilder $container, private PhpFileLoader $loader,
cyInjection\Loader\PhpFileLoader; use Symfony\Component\VarExporter\DeepCloner; /** * @author Nicolas Grekas <p@tchwork.com> */ class ServicesConfigurator extends AbstractConfigurator { public const FACTORY = 'services';
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/ServicesConfigurator.php", "language": "php", "file_size": 6878, "cut_index": 716, "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\Loader\Configurator; use Symfony\Component\DependencyInjec...
RY = 'stack'; final public function decorate(?string $id, ?string $renamedId = null, int $priority = 0, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE): static { if ($this->definition->hasTag('container.tag_decor
ctServiceConfigurator { use Traits\DecorateTrait { decorate as private doDecorate; decorateTag as private doDecorateTag; } use Traits\DeprecateTrait; use Traits\PublicTrait; public const FACTO
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/StackConfigurator.php", "language": "php", "file_size": 1648, "cut_index": 537, "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\Loader\Configurator\Traits; trait ArgumentTrait { /** * Sets the arguments to pass to the service constructor/factory ...
gument to pass to the service constructor/factory method. * * @return $this */ final public function arg(string|int $key, mixed $value): static { $this->definition->setArgument($key, static::processValue($value, true));
return $this; } /** * Sets one ar
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ArgumentTrait.php", "language": "php", "file_size": 940, "cut_index": 606, "middle_length": 52 }
s 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\Loader\Configurator\Traits; use Symfony\Component\Depende...
* * @throws InvalidArgumentException when a parent is already set */ final public function autoconfigure(bool $autoconfigured = true): static { $this->definition->setAutoconfigured($autoconfigured); return $this; }
turn $this
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AutoconfigureTrait.php", "language": "php", "file_size": 808, "cut_index": 536, "middle_length": 14 }
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\Loader\Configurator\Traits; use Symfony\Component\Dependen...
and of controller actions). * * @param string $nameOrFqcn A parameter name with its "$" prefix, or a FQCN * @param mixed $valueOrRef The value or reference to bind * * @return $this */ final public function bind(string $n
Configurator; trait BindTrait { /** * Sets bindings. * * Bindings map $named or FQCN arguments to values that should be * injected in the matching parameters (of the constructor, of methods * called
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/BindTrait.php", "language": "php", "file_size": 1566, "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\Loader\Configurator\Traits; use Symf...
* * @throws InvalidArgumentException on empty $method param */ final public function call(string $method, array $arguments = [], bool $returnsClone = false): static { $this->definition->addMethodCall($method, static::process
The method name to call * @param array $arguments An array of arguments to pass to the method call * @param bool $returnsClone Whether the call returns the service instance or not * * @return $this
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/CallTrait.php", "language": "php", "file_size": 1072, "cut_index": 515, "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\Loader\Configurator\Traits; use Symfony\Component\Dependen...
service id are equals */ final public function decorate(?string $id, ?string $renamedId = null, int $priority = 0, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE): static { $this->definition->setDecoratedServ
ting. * * @param string|null $id The decorated service id, use null to remove decoration * * @return $this * * @throws InvalidArgumentException in case the decorated service id and the new decorated
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DecorateTrait.php", "language": "php", "file_size": 1904, "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\Loader\Configurator\Traits; use Symf...
eprecation message to use * * @return $this * * @throws InvalidArgumentException when the message template is invalid */ final public function deprecate(string $package, string $version, string $message): static { $
* * @param string $package The name of the composer package that is triggering the deprecation * @param string $version The version of the package that introduced the deprecation * @param string $message The d
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DeprecateTrait.php", "language": "php", "file_size": 1094, "cut_index": 515, "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\Loader\Configurator\Traits; use Symfony\Compo...
ng($factory) && 1 === substr_count($factory, ':')) { $factoryParts = explode(':', $factory); throw new InvalidArgumentException(\sprintf('Invalid factory "%s": the "service:method" notation is not available when using PHP-based DI
ssion; trait FactoryTrait { /** * Sets a factory. * * @return $this */ final public function factory(string|array|\Closure|ReferenceConfigurator|Expression $factory): static { if (\is_stri
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/FactoryTrait.php", "language": "php", "file_size": 1329, "cut_index": 524, "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\Loader\Configurator\Traits; use Symfony\Component\DependencyInjection\ChildDefinitio...
ession $callable): FromCallableConfigurator { if ($this->definition instanceof ChildDefinition) { throw new InvalidArgumentException('The configuration key "parent" is unsupported when using "fromCallable()".'); } f
ependencyInjection\Loader\Configurator\ReferenceConfigurator; use Symfony\Component\ExpressionLanguage\Expression; trait FromCallableTrait { final public function fromCallable(string|array|\Closure|ReferenceConfigurator|Expr
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/FromCallableTrait.php", "language": "php", "file_size": 2503, "cut_index": 563, "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\Loader\Configurator\Traits; trait ...
ublic function lazy(bool|string $lazy = true): static { $this->definition->setLazy((bool) $lazy); if (\is_string($lazy)) { $this->definition->addTag('proxy', ['interface' => $lazy]); } return $this; } }
lass * * @return $this */ final p
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/LazyTrait.php", "language": "php", "file_size": 821, "cut_index": 513, "middle_length": 52 }
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\Loader\Configurator\Traits; use Symfony\Compo...
InvalidArgumentException(\sprintf('A parent cannot be defined when either "_instanceof" or "_defaults" are also defined for service prototype "%s".', $this->id)); } if ($this->definition instanceof ChildDefinition) { $this->de
* * @return $this * * @throws InvalidArgumentException when parent cannot be set */ final public function parent(string $parent): static { if (!$this->allowParent) { throw new
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ParentTrait.php", "language": "php", "file_size": 1459, "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\Loader\Configurator\Traits; use Symfony\Component\Dependen...
teAttributes($name, $attributes); $this->definition->addTag($name, $attributes); return $this; } /** * Adds a resource tag for this definition. * * @return $this */ final public function resourceTag(string
array $attributes = []): static { if ('' === $name) { throw new InvalidArgumentException(\sprintf('The tag name for service "%s" must be a non-empty string.', $this->id)); } $this->valida
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/TagTrait.php", "language": "php", "file_size": 2003, "cut_index": 537, "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\ParameterBag; use Symfony\Component\DependencyInjection\Container; /** * @author Nicolas Grekas <p@tchwork.com> */ class Con...
g()->all(); } public function get(string $name): array|bool|string|int|float|\UnitEnum|null { return $this->container->getParameter($name); } public function has(string $name): bool { return $this->container->hasPa
{ return $this->container->getParameterBa
{ "filepath": "src/Symfony/Component/DependencyInjection/ParameterBag/ContainerBag.php", "language": "php", "file_size": 938, "cut_index": 606, "middle_length": 52 }
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\ParameterBag; use Psr\Container\ContainerInte...
Replaces parameter placeholders (%name%) by their values. * * @template TValue of array<array|scalar>|scalar * * @param TValue $value * * @psalm-return (TValue is scalar ? array|scalar : array<array|scalar>) * * @thr
eters. * * @author Nicolas Grekas <p@tchwork.com> */ interface ContainerBagInterface extends ContainerInterface { /** * Gets the service container parameters. */ public function all(): array; /** *
{ "filepath": "src/Symfony/Component/DependencyInjection/ParameterBag/ContainerBagInterface.php", "language": "php", "file_size": 1391, "cut_index": 524, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\DependencyInjection\ParameterBag; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; use Symfony\Component\DependencyInjection\Exception\RuntimeException; /** * @author Nicolas Grekas <p@tchwork.com> */ class EnvPlaceholderPara...
$name) { $env = substr($name, 4, -1); if (isset($this->envPlaceholders[$env])) { foreach ($this->envPlaceholders[$env] as $placeholder) { return $placeholder; // return first result
dedTypes = []; private static int $counter = 0; public function get(string $name): array|bool|string|int|float|\UnitEnum|null { if (str_starts_with($name, 'env(') && str_ends_with($name, ')') && 'env()' !==
{ "filepath": "src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php", "language": "php", "file_size": 5190, "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\ParameterBag; use Symfony\Component\DependencyInjection\Exception\LogicException; /...
ters = [], protected array $nonEmptyParameters = [], ) { $this->parameters = $parameters; $this->resolved = true; } public function clear(): never { throw new LogicException('Impossible to call clear() on a
r assumes that * all keys are already lowercased. * * This is always the case when used internally. */ public function __construct( array $parameters = [], protected array $deprecatedParame
{ "filepath": "src/Symfony/Component/DependencyInjection/ParameterBag/FrozenParameterBag.php", "language": "php", "file_size": 2054, "cut_index": 563, "middle_length": 229 }
ndencyInjection\Exception\InvalidArgumentException; use Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException; use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException; use Symfony\Component\DependencyInjection\Exception\RuntimeException; /** * Holds parameters. * ...
$this->parameters = []; } public function add(array $parameters): void { foreach ($parameters as $key => $value) { $this->set($key, $value); } } public function all(): array { return $thi
cted array $deprecatedParameters = []; protected array $nonEmptyParameters = []; public function __construct(array $parameters = []) { $this->add($parameters); } public function clear(): void {
{ "filepath": "src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php", "language": "php", "file_size": 9956, "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\ParameterBag; use Symfony\Component\DependencyInjection\Exception\LogicException; us...
function clear(): void; /** * Adds parameters to the service container parameters. * * @throws LogicException if the parameter cannot be added */ public function add(array $parameters): void; /** * Gets the service co
* @author Fabien Potencier <fabien@symfony.com> */ interface ParameterBagInterface { /** * Clears all parameters. * * @throws LogicException if the ParameterBagInterface cannot be cleared */ public
{ "filepath": "src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php", "language": "php", "file_size": 2377, "cut_index": 563, "middle_length": 229 }
ChildDefinition; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Exception\LogicException; use Symfony\Component\DependencyInjection\Exception\RuntimeException; use Symfony\Component\DependencyInjection\Expressio...
ate ExpressionLanguage $expressionLanguage; private bool $inExpression = false; public function process(ContainerBuilder $container): void { $this->container = $container; try { $this->processValue($container->getD
ecursivePass implements CompilerPassInterface { protected ?ContainerBuilder $container; protected ?string $currentId = null; protected bool $skipScalars = false; private bool $processExpressions = false; priv
{ "filepath": "src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php", "language": "php", "file_size": 10635, "cut_index": 921, "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\Compiler; use Symfony\Component\Depende...
$tags */ public function __construct( private array $tags = [], ) { } public function process(ContainerBuilder $container): void { $tags = $container->hasParameter('container.behavior_describing_tags') ? $containe
Pass implements CompilerPassInterface { private const DEFAULT_TAGS = [ 'container.do_not_inline', 'container.service_locator', 'container.service_subscriber', ]; /** * @param list<string>
{ "filepath": "src/Symfony/Component/DependencyInjection/Compiler/AddBehaviorDescribingTagsPass.php", "language": "php", "file_size": 1241, "cut_index": 518, "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...
$tags) { if (null === $package = $tags[0]['package'] ?? null) { throw new InvalidArgumentException(\sprintf('The "package" attribute is mandatory for the "container.private" tag on the "%s" service.', $id)); }
s { protected bool $skipScalars = true; private array $aliases = []; public function process(ContainerBuilder $container): void { foreach ($container->findTaggedServiceIds('container.private') as $id =>
{ "filepath": "src/Symfony/Component/DependencyInjection/Compiler/AliasDeprecatedPublicServicesPass.php", "language": "php", "file_size": 2220, "cut_index": 563, "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\Loader\Configurator; use Symfony\Com...
Traits\ParentTrait; use Traits\PropertyTrait; use Traits\TagTrait; public const FACTORY = 'service'; private string $id = '[inline]'; private bool $allowParent = true; private ?string $path = null; public function __construct
raits\AutowireTrait; use Traits\BindTrait; use Traits\CallTrait; use Traits\ConfiguratorTrait; use Traits\ConstructorTrait; use Traits\FactoryTrait; use Traits\FileTrait; use Traits\LazyTrait; use
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/InlineServiceConfigurator.php", "language": "php", "file_size": 1080, "cut_index": 515, "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\Loader\Configurator; use Symfony\Component\De...
* @return $this */ final public function set(string $name, mixed $value): static { if ($value instanceof Expression) { throw new InvalidArgumentException(\sprintf('Using an expression in parameter "%s" is not allowed.'
rekas <p@tchwork.com> */ class ParametersConfigurator extends AbstractConfigurator { public const FACTORY = 'parameters'; public function __construct( private ContainerBuilder $container, ) { } /**
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/ParametersConfigurator.php", "language": "php", "file_size": 1308, "cut_index": 524, "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\Loader\Configurator; use Symfony\Component\De...
*/ final public function ignoreOnInvalid(): static { $this->invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; return $this; } /** * @return $this */ final public function nullOnInvalid(): s
d; /** @internal */ protected int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE; public function __construct(string $id) { $this->id = $id; } /** * @return $this
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/ReferenceConfigurator.php", "language": "php", "file_size": 1431, "cut_index": 524, "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\Intl\Data\Bundle\Reader; use Symfony\Component\Intl\Exception\Res...
if (\dirname($fileName) !== $path) { throw new ResourceBundleNotFoundException(\sprintf('The resource bundle "%s" does not exist.', $fileName)); } if (!is_file($fileName)) { throw new ResourceBundleNotFoundExce
*/ class JsonBundleReader implements BundleReaderInterface { public function read(string $path, string $locale): mixed { $fileName = $path.'/'.$locale.'.json'; // prevent directory traversal attacks
{ "filepath": "src/Symfony/Component/Intl/Data/Bundle/Reader/JsonBundleReader.php", "language": "php", "file_size": 1364, "cut_index": 524, "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; use Psr\Container\ContainerInterface as PsrContainerInterface; use Symfony\Componen...
interface ContainerInterface extends PsrContainerInterface { public const RUNTIME_EXCEPTION_ON_INVALID_REFERENCE = 0; public const EXCEPTION_ON_INVALID_REFERENCE = 1; public const NULL_ON_INVALID_REFERENCE = 2; public const IGNORE_ON_INVALI
eption\ServiceNotFoundException; /** * ContainerInterface is the interface implemented by service container classes. * * @author Fabien Potencier <fabien@symfony.com> * @author Johannes M. Schmitt <schmittjoh@gmail.com> */
{ "filepath": "src/Symfony/Component/DependencyInjection/ContainerInterface.php", "language": "php", "file_size": 2327, "cut_index": 563, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\DependencyInjection; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; use Symfony\Component\DependencyInjection\Exception\RuntimeException; use Symfony\Component\DependencyInjection\Exception\ServiceCircularRefere...
ectionInterface<T> */ class ServiceLocator implements ServiceCollectionInterface { use ServiceLocatorTrait { get as private doGet; } private ?string $externalId = null; private ?Container $container = null; public function ge
orTrait; use Symfony\Contracts\Service\ServiceSubscriberInterface; /** * @author Robin Chalas <robin.chalas@gmail.com> * @author Nicolas Grekas <p@tchwork.com> * * @template-covariant T of mixed * * @implements ServiceColl
{ "filepath": "src/Symfony/Component/DependencyInjection/ServiceLocator.php", "language": "php", "file_size": 5585, "cut_index": 716, "middle_length": 229 }
pendencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Dumper\PhpDumper; use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\DependencyInjection\Loader\ClosureLoader; use Symfony\Component\Depe...
nt\DependencyInjection\Loader\YamlFileLoader; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\ErrorHandler\DebugClassLoader; use Symfony\Component\Filesystem\Filesystem; // Help opcache.preload discover always-needed symbols cla
DirectoryLoader; use Symfony\Component\DependencyInjection\Loader\GlobFileLoader; use Symfony\Component\DependencyInjection\Loader\IniFileLoader; use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; use Symfony\Compone
{ "filepath": "src/Symfony/Component/DependencyInjection/Kernel/KernelTrait.php", "language": "php", "file_size": 26662, "cut_index": 1331, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\DependencyInjection\Kernel; use PHPUnit\Framework\TestCase; use Psr\Clock\ClockInterface as PsrClockInterface; use Psr\Container\ContainerInterface as PsrContainerInterface; use Psr\EventDispatcher\EventDispatcherInterface as PsrEventDispatcherInterface; us...
Component\DependencyInjection\Compiler\ResettableServicePass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\EnvVarLoaderInterface; use Symfony\Component\DependencyInjection\EnvVarProcessorInterface; u
e Symfony\Component\DependencyInjection\Compiler\AddBehaviorDescribingTagsPass; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\Compiler\PassConfig; use Symfony\
{ "filepath": "src/Symfony/Component/DependencyInjection/Kernel/ServicesBundle.php", "language": "php", "file_size": 6776, "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\Loader\Configurator; use Psr\Clock\ClockInterface as PsrClockInterface; use Psr\EventDispatcher\EventDispatcherInterface as PsrEventDis...
or; use Symfony\Component\DependencyInjection\Kernel\FileLocator; use Symfony\Component\DependencyInjection\Kernel\KernelInterface; use Symfony\Component\DependencyInjection\ParameterBag\ContainerBag; use Symfony\Component\DependencyInjection\ParameterBag\
CheckingResourceChecker; use Symfony\Component\Config\ResourceCheckerConfigCacheFactory; use Symfony\Component\DependencyInjection\Config\ContainerParametersResourceChecker; use Symfony\Component\DependencyInjection\EnvVarProcess
{ "filepath": "src/Symfony/Component/DependencyInjection/Kernel/Resources/config/services.php", "language": "php", "file_size": 4471, "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\Loader; /** * DirectoryLoader is a recursive...
if (is_dir($path.'/'.$dir)) { $dir .= '/'; // append / to allow recursion } $this->setCurrentDir($path); $this->import($dir, null, false, $path); } }
ll): mixed { $file = rtrim($file, '/'); $path = $this->locator->locate($file); $this->container->fileExists($path, false); foreach (scandir($path) as $dir) { if ('.' !== $dir[0]) {
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/DirectoryLoader.php", "language": "php", "file_size": 1289, "cut_index": 524, "middle_length": 229 }
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\Loader; /** * GlobFileLoader loads files from a glob pa...
h => $info) { $this->import($path); } $this->container->addResource($globResource); return null; } public function supports(mixed $resource, ?string $type = null): bool { return 'glob' === $type;
$this->glob($resource, false, $globResource) as $pat
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/GlobFileLoader.php", "language": "php", "file_size": 850, "cut_index": 535, "middle_length": 52 }
buted with this source code. */ namespace Symfony\Component\DependencyInjection\Loader; use Symfony\Component\DependencyInjection\Attribute\When; use Symfony\Component\DependencyInjection\Attribute\WhenNot; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Exceptio...
nd the $container variable can be * used within the file to change the container. * * @author Fabien Potencier <fabien@symfony.com> */ class PhpFileLoader extends FileLoader { use ContentLoaderTrait; protected bool $autoRegisterAliasesForSingl
ncyInjection\Loader\Configurator\AppReference; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; /** * PhpFileLoader loads service definitions from a PHP file. * * The PHP file is required a
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php", "language": "php", "file_size": 8983, "cut_index": 716, "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\Loader; class UndefinedExtensionHandler { private cons...
IconsBundle', 'web_profiler' => 'WebProfilerBundle', ]; public static function getErrorMessage(string $extensionName, ?string $loadingFilePath, string $namespaceOrAlias, array $foundExtensionNamespaces): string { $message = '';
Bundle', 'maker' => 'MakerBundle', 'monolog' => 'MonologBundle', 'security' => 'SecurityBundle', 'twig' => 'TwigBundle', 'twig_component' => 'TwigComponentBundle', 'ux_icons' => 'UX
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/UndefinedExtensionHandler.php", "language": "php", "file_size": 1731, "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\Loader\Configurator; use Symfony\Component\DependencyInjection\Definition; use Symfo...
$this->defaultTags = $defaultTags; } public function __destruct() { // default tags should be added last foreach ($this->defaultTags as $name => $attributes) { foreach ($attributes as $attribute) {
function __construct( protected ServicesConfigurator $parent, Definition $definition, protected ?string $id = null, array $defaultTags = [], ) { $this->definition = $definition;
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/AbstractServiceConfigurator.php", "language": "php", "file_size": 2956, "cut_index": 563, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\DependencyInjection\Loader\Configurator; use Symfony\Component\Config\Loader\ParamConfigurator; use Symfony\Component\DependencyInjection\Argument\AbstractArgument; use Symfony\Component\DependencyInjection\Argument\IteratorArgument; use Symfony\Component\D...
cyInjection\Loader\PhpFileLoader; use Symfony\Component\DependencyInjection\Loader\UndefinedExtensionHandler; use Symfony\Component\ExpressionLanguage\Expression; /** * @author Nicolas Grekas <p@tchwork.com> */ class ContainerConfigurator extends Abstra
ymfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\Dependen
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/ContainerConfigurator.php", "language": "php", "file_size": 8631, "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\Loader\Configurator; use Symfony\Component\DependencyInjection\Definition; use Symfo...
Definition $definition, private ?string $path = null, ) { parent::__construct($parent, $definition, null, []); } /** * Adds a tag for this definition. * * @return $this * * @throws InvalidArgumentExc
Traits\AutoconfigureTrait; use Traits\AutowireTrait; use Traits\BindTrait; use Traits\PublicTrait; public const FACTORY = 'defaults'; public function __construct( ServicesConfigurator $parent,
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/DefaultsConfigurator.php", "language": "php", "file_size": 2884, "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\Loader\Configurator; use Symfony\Component\De...
s\TagTrait; public const FACTORY = 'instanceof'; public function __construct( ServicesConfigurator $parent, Definition $definition, string $id, private ?string $path = null, ) { parent::__construct($par
\BindTrait; use Traits\CallTrait; use Traits\ConfiguratorTrait; use Traits\ConstructorTrait; use Traits\LazyTrait; use Traits\PropertyTrait; use Traits\PublicTrait; use Traits\ShareTrait; use Trait
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/InstanceofConfigurator.php", "language": "php", "file_size": 1269, "cut_index": 524, "middle_length": 229 }
Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface; use Symfony\Component\Intl\Data\Util\ArrayAccessibleResourceBundle; use Symfony\Component\Intl\Data\Util\LocaleScanner; use Symfony\Component\Intl\Exception\MissingResourceException; /** * The rule for compiling the zone bundle. * * @author Rola...
Scanner $scanner, string $sourceDir): array { $this->localeAliases = $scanner->scanAliases($sourceDir.'/locales'); return $scanner->scanLocales($sourceDir.'/zone'); } protected function compileTemporaryBundles(BundleCompilerIn
* * @var string[] */ private array $zoneIds = []; private array $zoneToCountryMapping = []; private array $localeAliases = []; private array $ianaMap = []; protected function scanLocales(Locale
{ "filepath": "src/Symfony/Component/Intl/Data/Generator/TimezoneDataGenerator.php", "language": "php", "file_size": 10436, "cut_index": 921, "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; use Psr\Cache\CacheItemPoolInterface; ...
ce $cache = null, iterable $providers = [], ?callable $serviceCompiler = null, ?\Closure $getEnv = null) { if (!\is_array($providers)) { $providers = iterator_to_array($providers, false); } // prepend the default pr
ult ExpressionLanguage. * * @author Fabien Potencier <fabien@symfony.com> * * @see ExpressionLanguageProvider */ class ExpressionLanguage extends BaseExpressionLanguage { public function __construct(?CacheItemPoolInterfa
{ "filepath": "src/Symfony/Component/DependencyInjection/ExpressionLanguage.php", "language": "php", "file_size": 1194, "cut_index": 518, "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\Kernel; /** * Declares a bundle dependency that s...
bundle class to require * @param bool $ignoreOnInvalid Whether to silently skip if the class doesn't exist */ public function __construct( public string $class, public bool $ignoreOnInvalid = false,
m class-string<BundleInterface> $class The
{ "filepath": "src/Symfony/Component/DependencyInjection/Kernel/RequiredBundle.php", "language": "php", "file_size": 852, "cut_index": 529, "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\Loader; use Symfony\Component\Config...
parent::__construct($env); } public function load(mixed $resource, ?string $type = null): mixed { return $resource($this->container, $this->env); } public function supports(mixed $resource, ?string $type = null): bool
its first argument. * * @author Fabien Potencier <fabien@symfony.com> */ class ClosureLoader extends Loader { public function __construct( private ContainerBuilder $container, ?string $env = null, ) {
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/ClosureLoader.php", "language": "php", "file_size": 1060, "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\Loader; use Symfony\Component\Config\Util\XmlUtils; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; /** ...
if (false === $result || [] === $result) { throw new InvalidArgumentException(\sprintf('The "%s" file is not valid.', $resource)); } // real raw parsing $result = parse_ini_file($path, true, \INI_SCANNER_RAW);
ring $type = null): mixed { $path = $this->locator->locate($resource); $this->container->fileExists($path); // first pass to catch parsing errors $result = parse_ini_file($path, true);
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php", "language": "php", "file_size": 3229, "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\Loader; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; use Symfony\Component\DependencyInjection\Excepti...
rotected bool $autoRegisterAliasesForSinglyImplementedInterfaces = false; private YamlParser $yamlParser; public function load(mixed $resource, ?string $type = null): mixed { $path = $this->locator->locate($resource); $conten
r; use Symfony\Component\Yaml\Yaml; /** * YamlFileLoader loads YAML files service definitions. * * @author Fabien Potencier <fabien@symfony.com> */ class YamlFileLoader extends FileLoader { use ContentLoaderTrait; p
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php", "language": "php", "file_size": 4506, "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\Loader\Configurator; use Symfony\Component\Config\Loader\ParamConfigurator; class EnvConfigurator extends ParamConfigurator { /** ...
ce(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], '\1_\2', $name)); $this->custom($processor, ...$arguments); return $this; } /** * @return $this */ public function custom(string $processor, ...$args): static
string { return '%env('.implode(':', $this->stack).')%'; } /** * @return $this */ public function __call(string $name, array $arguments): static { $processor = strtolower(preg_repla
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/EnvConfigurator.php", "language": "php", "file_size": 4152, "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\Loader\Configurator; use Symfony\Component\DependencyInjection\Definition; use Symfo...
rTrait; use Traits\ConstructorTrait; use Traits\DeprecateTrait; use Traits\FactoryTrait; use Traits\LazyTrait; use Traits\ParentTrait; use Traits\PropertyTrait; use Traits\PublicTrait; use Traits\ShareTrait; use Traits\T
ractServiceConfigurator { use Traits\AbstractTrait; use Traits\ArgumentTrait; use Traits\AutoconfigureTrait; use Traits\AutowireTrait; use Traits\BindTrait; use Traits\CallTrait; use Traits\Configurato
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/PrototypeConfigurator.php", "language": "php", "file_size": 2512, "cut_index": 563, "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\Extension; use Symfony\Component\...
rependExtension(ContainerConfigurator $configurator, ContainerBuilder $container): void; /** * Loads a specific configuration. */ public function loadExtension(array $config, ContainerConfigurator $configurator, ContainerBuilder $contain
* @author Yonel Ceruto <yonelceruto@gmail.com> */ interface ConfigurableExtensionInterface extends ConfigurableInterface { /** * Allows an extension to prepend the extension configurations. */ public function p
{ "filepath": "src/Symfony/Component/DependencyInjection/Extension/ConfigurableExtensionInterface.php", "language": "php", "file_size": 1010, "cut_index": 512, "middle_length": 229 }
fony\Component\DependencyInjection\Attribute\Target; use Symfony\Component\DependencyInjection\Attribute\When; use Symfony\Component\DependencyInjection\Attribute\WhenNot; use Symfony\Component\DependencyInjection\ChildDefinition; use Symfony\Component\DependencyInjection\Compiler\RegisterAutoconfigureAttributesPass; u...
ncier <fabien@symfony.com> */ abstract class FileLoader extends BaseFileLoader { public const ANONYMOUS_ID_REGEXP = ContainerBuilder::ANONYMOUS_ID_REGEXP; protected bool $isLoadingInstanceof = false; protected array $instanceof = []; prot
se Symfony\Component\DependencyInjection\Exception\LogicException; use Symfony\Component\VarExporter\DeepCloner; /** * FileLoader is the abstract class used by all built-in loaders that are file based. * * @author Fabien Pote
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/FileLoader.php", "language": "php", "file_size": 17561, "cut_index": 1331, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\DependencyInjection\Loader\Configurator; // For the phpdoc to remain compatible with the generation of per-app App class, // this file should have no "use" statements: all symbols referenced by // the phpdoc need to be in the current namespace or be root-sc...
::config([ * 'services' => [ * 'App\\' => [ * 'resource' => '../src/', * ], * ], * ]); * ``` * * @psalm-type ImportsConfig = list<string|array{ * resource: string, * type?:
ed by default. * * This is for apps only. Bundles SHOULD NOT use it. * * Example: * * ```php * // config/services.php * namespace Symfony\Component\DependencyInjection\Loader\Configurator; * * return App
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/AppReference.php", "language": "php", "file_size": 6117, "cut_index": 716, "middle_length": 229 }
arent', 'class' => 'class', 'shared' => 'shared', 'synthetic' => 'synthetic', 'lazy' => 'lazy', 'public' => 'public', 'abstract' => 'abstract', 'deprecated' => 'deprecated', 'factory' => 'factory', 'file' => 'file', 'arguments' => 'argument...
'decorates_tag', 'autowire' => 'autowire', 'autoconfigure' => 'autoconfigure', 'bind' => 'bind', 'constructor' => 'constructor', ]; private const PROTOTYPE_KEYWORDS = [ 'resource' => 'resource', 'nam
ecorates' => 'decorates', 'decoration_inner_name' => 'decoration_inner_name', 'decoration_priority' => 'decoration_priority', 'decoration_on_invalid' => 'decoration_on_invalid', 'decorates_tag' =>
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/ContentLoaderTrait.php", "language": "php", "file_size": 43552, "cut_index": 2151, "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\Loader\Configurator; use Symfony\Compon...
use Traits\TagTrait; public const FACTORY = 'services'; public function __construct( private ServiceConfigurator $serviceConfigurator, Definition $definition, ) { parent::__construct($serviceConfigurator->parent, $de
e Traits\AutoconfigureTrait; use Traits\AutowireTrait; use Traits\BindTrait; use Traits\DecorateTrait; use Traits\DeprecateTrait; use Traits\LazyTrait; use Traits\PublicTrait; use Traits\ShareTrait;
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/FromCallableConfigurator.php", "language": "php", "file_size": 1144, "cut_index": 518, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\DependencyInjection\Loader\Configurator; use Symfony\Component\Config\Loader\ParamConfigurator; use Symfony\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\Argument\AbstractArgument; use Symfony\Component\DependencyInjection\A...
igurator { public const FACTORY = 'unknown'; /** * @var \Closure(mixed, bool):mixed|null */ public static ?\Closure $valuePreProcessor = null; /** @internal */ protected Definition|Alias|null $definition = null; public
ction\Exception\InvalidArgumentException; use Symfony\Component\DependencyInjection\Parameter; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\ExpressionLanguage\Expression; abstract class AbstractConf
{ "filepath": "src/Symfony/Component/DependencyInjection/Loader/Configurator/AbstractConfigurator.php", "language": "php", "file_size": 5267, "cut_index": 716, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\ChildDefinition; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Exception\Lo...
private array $parameterAttributeConfigurators = []; public function process(ContainerBuilder $container): void { if (!$container->getAttributeAutoconfigurators()) { return; } foreach ($container->getAttribut
bstractRecursivePass { protected bool $skipScalars = true; private array $classAttributeConfigurators = []; private array $methodAttributeConfigurators = []; private array $propertyAttributeConfigurators = [];
{ "filepath": "src/Symfony/Component/DependencyInjection/Compiler/AttributeAutoconfigurationPass.php", "language": "php", "file_size": 7072, "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\Compiler; use Symfony\Component\DependencyInj...
alias') as $serviceId => $tags) { foreach ($tags as $tag) { if (!isset($tag['format'])) { throw new InvalidArgumentException(\sprintf('Missing tag information "format" on auto_alias service "%s".', $serviceId
another one, given a format pattern. */ class AutoAliasServicePass implements CompilerPassInterface { public function process(ContainerBuilder $container): void { foreach ($container->findTaggedServiceIds('auto_
{ "filepath": "src/Symfony/Component/DependencyInjection/Compiler/AutoAliasServicePass.php", "language": "php", "file_size": 1426, "cut_index": 524, "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\IteratorArgument; use S...
ic function process(ContainerBuilder $container): void { if (!$container->has('services_resetter')) { return; } $services = $methods = []; $hasNonShared = false; foreach ($container->findTaggedServi
\DependencyInjection\Exception\RuntimeException; use Symfony\Component\DependencyInjection\Reference; /** * @author Alexander M. Turek <me@derrabus.de> */ class ResettableServicePass implements CompilerPassInterface { publ
{ "filepath": "src/Symfony/Component/DependencyInjection/Compiler/ResettableServicePass.php", "language": "php", "file_size": 2673, "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\Attribute\AutowireInline; use Symfony\Component\DependencyInjection\ChildDefinition...
r Ismail Özgün Turan <oezguen.turan@dadadev.com> */ class ResolveAutowireInlineAttributesPass extends AbstractRecursivePass { protected bool $skipScalars = true; private int $counter; protected function processValue(mixed $value, bool $isRoo
mfony\Component\DependencyInjection\Reference; use Symfony\Component\VarExporter\ProxyHelper; /** * Inspects existing autowired services for {@see AutowireInline} attributes and registers the definitions for reuse. * * @autho
{ "filepath": "src/Symfony/Component/DependencyInjection/Compiler/ResolveAutowireInlineAttributesPass.php", "language": "php", "file_size": 4623, "cut_index": 614, "middle_length": 229 }
rgument\BoundArgument; use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument; use Symfony\Component\DependencyInjection\Attribute\Autowire; use Symfony\Component\DependencyInjection\Attribute\Target; use Symfony\Component\Dep...
ot <guilhem.niot@gmail.com> */ class ResolveBindingsPass extends AbstractRecursivePass { protected bool $skipScalars = true; private array $usedBindings = []; private array $unusedBindings = []; private array $errorMessages = []; pub
endencyInjection\Exception\RuntimeException; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\TypedReference; use Symfony\Component\VarExporter\ProxyHelper; /** * @author Guilhem Ni
{ "filepath": "src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php", "language": "php", "file_size": 11040, "cut_index": 921, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\ChildDefinition; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Exception\...
ass extends AbstractRecursivePass { protected bool $skipScalars = true; private array $currentPath; protected function processValue(mixed $value, bool $isRoot = false): mixed { if (!$value instanceof Definition) { retu
places all ChildDefinition instances with their equivalent fully * merged Definition instance. * * @author Johannes M. Schmitt <schmittjoh@gmail.com> * @author Nicolas Grekas <p@tchwork.com> */ class ResolveChildDefinitionsP
{ "filepath": "src/Symfony/Component/DependencyInjection/Compiler/ResolveChildDefinitionsPass.php", "language": "php", "file_size": 7625, "cut_index": 716, "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\ChildD...
tion->isSynthetic() || $definition->hasErrors() || null !== $definition->getClass() || !preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+(?:\\\\[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+)++$/', $id)
om> */ class ResolveClassPass implements CompilerPassInterface { public function process(ContainerBuilder $container): void { foreach ($container->getDefinitions() as $id => $definition) { if ($defini
{ "filepath": "src/Symfony/Component/DependencyInjection/Compiler/ResolveClassPass.php", "language": "php", "file_size": 1936, "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\ChildDefinition; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerInterfac...
s Grekas <p@tchwork.com> */ class ResolveDecoratorStackPass implements CompilerPassInterface { public function process(ContainerBuilder $container): void { $stacks = []; foreach ($container->getDefinitions() as $id => $definition)
ceCircularReferenceException; use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\VarExporter\DeepCloner; /** * @author Nicola
{ "filepath": "src/Symfony/Component/DependencyInjection/Compiler/ResolveDecoratorStackPass.php", "language": "php", "file_size": 7029, "cut_index": 716, "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...
true to resolve to the actual values of the referenced env vars */ public function __construct( private string|bool|null $format = true, ) { } protected function processValue(mixed $value, bool $isRoot = false):
* @param string|true|null $format A sprintf() format returning the replacement for each env var name or * null to resolve back to the original "%env(VAR)%" format or *
{ "filepath": "src/Symfony/Component/DependencyInjection/Compiler/ResolveEnvPlaceholdersPass.php", "language": "php", "file_size": 1872, "cut_index": 537, "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\Compiler; use Symfony\Component\Depende...
value->getFactory()) && null === $factory[0]) { if (null === $class = $value->getClass()) { throw new RuntimeException(\sprintf('The "%s" service is defined to be created by a factory, but is missing the factory class. Did you f
Pass extends AbstractRecursivePass { protected bool $skipScalars = true; protected function processValue(mixed $value, bool $isRoot = false): mixed { if ($value instanceof Definition && \is_array($factory = $
{ "filepath": "src/Symfony/Component/DependencyInjection/Compiler/ResolveFactoryClassPass.php", "language": "php", "file_size": 1235, "cut_index": 518, "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\ArgumentInterface; use ...
ublic function process(ContainerBuilder $container): void { try { parent::process($container); $container->getDefinition('service_container')->clearTag('container.hot_path'); } finally { $this->resolv
hot_path" tags to referenced services. * * @author Nicolas Grekas <p@tchwork.com> */ class ResolveHotPathPass extends AbstractRecursivePass { protected bool $skipScalars = true; private array $resolvedIds = []; p
{ "filepath": "src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php", "language": "php", "file_size": 2274, "cut_index": 563, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\ChildDefinition; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Exception\In...
AutoconfiguredInstanceof() as $interface => $definition) { if ($definition->getArguments()) { throw new InvalidArgumentException(\sprintf('Autoconfigured instanceof for type "%s" defines arguments but these are not supported and
ns. * * @author Nicolas Grekas <p@tchwork.com> */ class ResolveInstanceofConditionalsPass implements CompilerPassInterface { public function process(ContainerBuilder $container): void { foreach ($container->get
{ "filepath": "src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php", "language": "php", "file_size": 7128, "cut_index": 716, "middle_length": 229 }