prefix stringlengths 512 512 | suffix stringlengths 256 256 | middle stringlengths 14 229 | meta dict |
|---|---|---|---|
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\Bridge\Twig\Attribute;
/**
* Define the template to render in the controller.
*/
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute... | * @param bool $stream Enables streaming the template
* @param string|null $block The name of the block to use in the template
*/
public function __construct(
public string $template,
public ?array $vars = null | roller method arguments to pass to the template
| {
"filepath": "src/Symfony/Bridge/Twig/Attribute/Template.php",
"language": "php",
"file_size": 983,
"cut_index": 582,
"middle_length": 52
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bridge\Twig\Node;
use Twig\Attribute\YieldReady;
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
use Twig\Node\Expression\ArrayExpression;
use Twig\N... | = 0)
{
$nodes = ['body' => $body];
if (null !== $domain) {
$nodes['domain'] = $domain;
}
if (null !== $count) {
$nodes['count'] = $count;
}
if (null !== $vars) {
$node | eldReady]
final class TransNode extends Node
{
public function __construct(Node $body, ?Node $domain = null, ?AbstractExpression $count = null, ?AbstractExpression $vars = null, ?AbstractExpression $locale = null, int $lineno | {
"filepath": "src/Symfony/Bridge/Twig/Node/TransNode.php",
"language": "php",
"file_size": 4051,
"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\Bridge\Twig\TokenParser;
use Symfony\Bridge\Twig\Node\FormThemeNode;
use Twig\Node\Expre... | his->parser->parseExpression();
$only = false;
if ($this->parser->getStream()->test(Token::NAME_TYPE, 'with')) {
$this->parser->getStream()->next();
$resources = $this->parser->parseExpression();
if ($t | ny.com>
*/
final class FormThemeTokenParser extends AbstractTokenParser
{
public function parse(Token $token): Node
{
$lineno = $token->getLine();
$stream = $this->parser->getStream();
$form = $t | {
"filepath": "src/Symfony/Bridge/Twig/TokenParser/FormThemeTokenParser.php",
"language": "php",
"file_size": 1597,
"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\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Sy... | der(), ['debug' => true, 'cache' => false, 'autoescape' => 'html', 'optimizations' => 0]);
$twig->addExtension(new RoutingExtension($this->createStub(UrlGeneratorInterface::class)));
$nodes = $twig->parse($twig->tokenize(new Source($templa | xpression;
use Twig\Source;
class RoutingExtensionTest extends TestCase
{
#[DataProvider('getEscapingTemplates')]
public function testEscaping($template, $mustBeEscaped)
{
$twig = new Environment(new ArrayLoa | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Extension/RoutingExtensionTest.php",
"language": "php",
"file_size": 2127,
"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\Bridge\Twig\Tests\NodeVisitor;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\NodeVisitor\TranslationDefaultD... | function testDefaultDomainAssignment(Node $node)
{
$env = new Environment(new ArrayLoader(), ['cache' => false, 'autoescape' => false, 'optimizations' => 0]);
$visitor = new TranslationDefaultDomainNodeVisitor();
// visit trans | class TranslationDefaultDomainNodeVisitorTest extends TestCase
{
private static string $message = 'message';
private static string $domain = 'domain';
#[DataProvider('getDefaultDomainAssignmentTestData')]
public | {
"filepath": "src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationDefaultDomainNodeVisitorTest.php",
"language": "php",
"file_size": 3295,
"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\Bridge\Twig\Tests\NodeVisitor;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use ... | ('getMessagesExtractionTestData')]
public function testMessagesExtraction(Node $node, array $expectedMessages)
{
$env = new Environment(new ArrayLoader(), ['cache' => false, 'autoescape' => false, 'optimizations' => 0]);
$visitor = | ;
use Twig\Node\Expression\FilterExpression;
use Twig\Node\Expression\Variable\ContextVariable;
use Twig\Node\Node;
use Twig\Node\Nodes;
use Twig\TwigFilter;
class TranslationNodeVisitorTest extends TestCase
{
#[DataProvider | {
"filepath": "src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationNodeVisitorTest.php",
"language": "php",
"file_size": 2263,
"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\Bridge\Twig\Tests\NodeVisitor;
use Symfony\Bridge\Twig\Node\TransDefaultDomainNode;
use ... | new BodyNode([new ConstantExpression($content, 0)]),
null,
new EmptyNode(),
new EmptyNode(),
new EmptyNode(),
new EmptyNode(),
new Source('', '')
);
}
public static f | sion\FilterExpression;
use Twig\Node\ModuleNode;
use Twig\Node\Nodes;
use Twig\Source;
use Twig\TwigFilter;
class TwigNodeProvider
{
public static function getModule($content)
{
return new ModuleNode(
| {
"filepath": "src/Symfony/Bridge/Twig/Tests/NodeVisitor/TwigNodeProvider.php",
"language": "php",
"file_size": 1888,
"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\Bridge\Twig\Tests\Validator\Constraints;
use PHPUnit\Framework\TestCase;
use Symfony\Bri... | er->loadClassMetadata($metadata));
[$bConstraint] = $metadata->getPropertyMetadata('b')[0]->getConstraints();
self::assertSame('myMessage', $bConstraint->message);
self::assertSame(['Default', 'TwigDummy'], $bConstraint->groups);
| .mokhtar@gmail.com>
*/
class TwigTest extends TestCase
{
public function testAttributes()
{
$metadata = new ClassMetadata(TwigDummy::class);
$loader = new AttributeLoader();
self::assertTrue($load | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Validator/Constraints/TwigTest.php",
"language": "php",
"file_size": 1625,
"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\Bridge\Twig\Tests\Validator\Constraints;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
use Symfony\Bridge\Twig\... | se
{
protected function createValidator(): TwigValidator
{
$environment = new Environment(new ArrayLoader());
$environment->addFilter(new TwigFilter('humanize_filter', static fn ($v) => $v));
$options = ['deprecation_info' = | tCase;
use Twig\DeprecatedCallableInfo;
use Twig\Environment;
use Twig\Loader\ArrayLoader;
use Twig\TwigFilter;
/**
* @author Mokhtar Tlili <tlili.mokhtar@gmail.com>
*/
class TwigValidatorTest extends ConstraintValidatorTestCa | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Validator/Constraints/TwigValidatorTest.php",
"language": "php",
"file_size": 4243,
"cut_index": 614,
"middle_length": 229
} |
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Exception\InvalidArgumentException;
use Symfony\Component\Console\Tester\CommandCompletionTester;
use Symfony\Component\Console\Tester\CommandTester;
use Twig\Environment;
use Twig\Loader\ChainLoader;
use Twig\Loader\FilesystemLoader;
class Debug... | r = $this->createCommandTester();
$ret = $tester->execute(['--filter' => 'abs', '--format' => 'json'], ['decorated' => false]);
$expected = [
'filters' => ['abs' => []],
];
$this->assertEquals(0, $ret, 'Returns | $this->assertEquals(0, $ret, 'Returns 0 in case of success');
$this->assertStringContainsString('Functions', trim($tester->getDisplay()));
}
public function testFilterAndJsonFormatOptions()
{
$teste | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Command/DebugCommandTest.php",
"language": "php",
"file_size": 11797,
"cut_index": 921,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Bridge\Twig\Tests\Command;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Command\LintCommand;
use Symfony\Component\C... | lic function testLintCorrectFile()
{
$tester = $this->createCommandTester();
$filename = $this->createFile('{{ foo }}');
$ret = $tester->execute(['filename' => [$filename]], ['verbosity' => OutputInterface::VERBOSITY_VERBOSE, ' | ny\Component\Console\Tester\CommandTester;
use Twig\DeprecatedCallableInfo;
use Twig\Environment;
use Twig\Loader\FilesystemLoader;
use Twig\TwigFilter;
class LintCommandTest extends TestCase
{
private array $files;
pub | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php",
"language": "php",
"file_size": 7921,
"cut_index": 716,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Bridge\Twig\Tests\EventListener;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Attribute\Template;
use Symfony\Bridge\Twig\EventListener\TemplateAttributeListener;
use Symfony\Bridge\Twig\Tests\Fixtures\TemplateAttributeController;
use Symfony\Component\For... | nvironment;
use Twig\Loader\ArrayLoader;
class TemplateAttributeListenerTest extends TestCase
{
public function testAttribute()
{
$twig = $this->createMock(Environment::class);
$twig->expects($this->exactly(3))
->method | ny\Component\HttpKernel\Event\ControllerArgumentsMetadata;
use Symfony\Component\HttpKernel\Event\ControllerEvent;
use Symfony\Component\HttpKernel\Event\ViewEvent;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Twig\E | {
"filepath": "src/Symfony/Bridge/Twig/Tests/EventListener/TemplateAttributeListenerTest.php",
"language": "php",
"file_size": 6335,
"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\Bridge\Twig\Tests\ErrorRenderer;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\ErrorRenderer\TwigErrorRe... | tiveRenderer = $this->createMock(HtmlErrorRenderer::class);
$nativeRenderer
->expects($this->once())
->method('render')
->with($exception)
;
(new TwigErrorRenderer(new Environment(new ArrayLoader | tpException;
use Twig\Environment;
use Twig\Loader\ArrayLoader;
class TwigErrorRendererTest extends TestCase
{
public function testFallbackToNativeRendererIfDebugOn()
{
$exception = new \Exception();
$na | {
"filepath": "src/Symfony/Bridge/Twig/Tests/ErrorRenderer/TwigErrorRendererTest.php",
"language": "php",
"file_size": 2050,
"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\Bridge\Twig\Test;
use Symfony\Bridge\Twig\Form\TwigRendererEngine;
use Symfony\Bridge\Twig\Test\Traits\RuntimeLoaderProvider;
use Symfony\Component\Form\FormRenderer... | e
{
use RuntimeLoaderProvider;
protected FormRendererInterface $renderer;
protected function setUp(): void
{
parent::setUp();
$loader = new FilesystemLoader($this->getTemplatePaths());
$environment = new Environm | anager;
use Twig\Environment;
use Twig\Extension\ExtensionInterface;
use Twig\Loader\FilesystemLoader;
/**
* @author Romain Monteil <monteil.romain@gmail.com>
*/
abstract class FormLayoutTestCase extends FormIntegrationTestCas | {
"filepath": "src/Symfony/Bridge/Twig/Test/FormLayoutTestCase.php",
"language": "php",
"file_size": 4895,
"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\Bridge\Twig\ErrorRenderer;
use Symfony\Component\ErrorHandler\ErrorRenderer\ErrorRendererInterface;
use Symfony\Co... | rorRendererInterface
{
private HtmlErrorRenderer $fallbackErrorRenderer;
private \Closure|bool $debug;
/**
* @param bool|callable $debug The debugging mode as a boolean or a callable that should return it
*/
public function __con | **
* Provides the ability to render custom Twig-based HTML error pages
* in non-debug mode, otherwise falls back to HtmlErrorRenderer.
*
* @author Yonel Ceruto <yonelceruto@gmail.com>
*/
class TwigErrorRenderer implements Er | {
"filepath": "src/Symfony/Bridge/Twig/ErrorRenderer/TwigErrorRenderer.php",
"language": "php",
"file_size": 2859,
"cut_index": 563,
"middle_length": 229
} |
LogProcessorPass;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AssetsContextPass;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ContainerBuilderDebugDumpPass;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\DeprecateJsonStreamerValueTransformerTagPass;
use Symfony\Bu... | lerPass;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TestServiceContainerRealRefPass;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TestServiceContainerWeakRefPass;
use Symfony\Bundle\FrameworkBundle\DependencyInjectio | ndencyInjection\Compiler\PhpConfigReferenceDumpPass;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ProfilerPass;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\RemoveUnusedSessionMarshallingHand | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php",
"language": "php",
"file_size": 15079,
"cut_index": 921,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Bundle\FrameworkBundle;
use Symfony\Bundle\FrameworkBundle\Test\TestBrowserToken;
use Symfony\Component\BrowserKit\Cookie;
use Symfony\Component\BrowserKit\CookieJar;
use Symfony\Component\BrowserKit\History;
use Symfony\Component\DependencyInjection\ContainerInterfa... | requests to a Kernel object.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class KernelBrowser extends HttpKernelBrowser
{
private bool $hasPerformedRequest = false;
private bool $profiler = false;
private bool $reboot = true;
p | \HttpKernelBrowser;
use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\HttpKernel\Profiler\Profile as HttpProfile;
use Symfony\Component\Security\Core\User\UserInterface;
/**
* Simulates a browser and makes | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php",
"language": "php",
"file_size": 8701,
"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\Bundle\FrameworkBundle\HttpCache;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundati... | bien Potencier <fabien@symfony.com>
*/
class HttpCache extends BaseHttpCache
{
protected ?string $cacheDir = null;
private ?StoreInterface $store = null;
private array $options;
/**
* @param $cache The cache directory (default used | y\Component\HttpKernel\HttpCache\StoreInterface;
use Symfony\Component\HttpKernel\HttpCache\SurrogateInterface;
use Symfony\Component\HttpKernel\KernelInterface;
/**
* Manages HTTP cache objects in a Container.
*
* @author Fa | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php",
"language": "php",
"file_size": 2640,
"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\Bundle\FrameworkBundle\DataCollector;
use Symfony\Bundle\Framewo... | roller)) {
$controller = $controller[0];
}
if ($controller instanceof RedirectController && $request->attributes->has('_route')) {
return $request->attributes->get('_route');
}
return parent::guessR | thor Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class RouterDataCollector extends BaseRouterDataCollector
{
public function guessRoute(Request $request, mixed $controller): string
{
if (\is_array($cont | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/DataCollector/RouterDataCollector.php",
"language": "php",
"file_size": 1035,
"cut_index": 513,
"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\Bundle\FrameworkBundle\Routing;
use Symfony\Component\Routing\Loader\AttributeClassLoade... | efault parameter of a given Route instance.
*/
protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, object $attr): void
{
if ('__invoke' === $method->getName()) {
$route->setDe | names.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Alexandre Daubois <alex.daubois@gmail.com>
*/
class AttributeRouteControllerLoader extends AttributeClassLoader
{
/**
* Configures the _controller d | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Routing/AttributeRouteControllerLoader.php",
"language": "php",
"file_size": 1725,
"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\Bundle\FrameworkBundle\Routing;
use Symfony\Component\Config\Exception\LoaderLoadException;
use Symfony\Component\Config\Loader\DelegatingLoader as BaseDelegatingLoa... | lass DelegatingLoader extends BaseDelegatingLoader
{
private bool $loading = false;
public function __construct(
LoaderResolverInterface $resolver,
private array $defaultOptions = [],
private array $defaultRequirements = [] | r resolver.
*
* This implementation resolves the _controller attribute from the short notation
* to the fully-qualified form (from a:b:c to class::method).
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
c | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php",
"language": "php",
"file_size": 3324,
"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\Bundle\FrameworkBundle\Routing;
use Symfony\Component\Routing\Matcher... | ony\\Bundle\\FrameworkBundle\\Controller\\RedirectController::urlRedirectAction',
'path' => $path,
'permanent' => true,
'scheme' => $scheme,
'httpPort' => $this->context->getHttpPort(),
'httpsPort | UrlMatcher extends CompiledUrlMatcher implements RedirectableUrlMatcherInterface
{
public function redirect(string $path, string $route, ?string $scheme = null): array
{
return [
'_controller' => 'Symf | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Routing/RedirectableCompiledUrlMatcher.php",
"language": "php",
"file_size": 1127,
"cut_index": 518,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Bundle\FrameworkBundle\Routing;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\Config\Resource\FileExistenceResource;
use Symfony\Component\Config\Resource\FileResource;
us... | text;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Router as BaseRouter;
use Symfony\Contracts\Service\ServiceSubscriberInterface;
/**
* This Router creates the Loader only when the cache is empty.
*
* @author Fabien Pot | endencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface;
use Symfony\Component\Routing\RequestCon | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Routing/Router.php",
"language": "php",
"file_size": 7320,
"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\Bundle\FrameworkBundle\Routing\Attribute;
use Symfony\Component\DependencyI... | #[Route('/page', condition: "service('foo').bar()")]
* public function page(): Response
* {
* // ...
* }
* }
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
class AsRoutingConditionService extends Autoconfig | meFooService
* {
* public function bar(): bool
* {
* // ...
* }
* }
*
* Then you can use the tagged service in the routing condition:
*
* class PageController
* {
* | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Routing/Attribute/AsRoutingConditionService.php",
"language": "php",
"file_size": 1488,
"cut_index": 524,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Bundle\FrameworkBundle\Console;
use Composer\InstalledVersions;
use Psr\Container\ContainerInterface;
use Symfony\Component\Console\Application as BaseApplication;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Command\TraceableCommand;
... | ent\HttpKernel\KernelInterface;
use Symfony\Contracts\Service\ContainerAwareInterface;
/**
* @author Fabien Potencier <fabien@symfony.com>
*/
class Application extends BaseApplication implements ContainerAwareInterface
{
private bool $commandsRegist | eOutputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Compon | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Console/Application.php",
"language": "php",
"file_size": 7893,
"cut_index": 716,
"middle_length": 229
} |
fony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
... | ($object instanceof ContainerBuilder) {
(new AnalyzeServiceReferencesPass(false, false))->process($object);
}
$deprecatedParameters = [];
if ($object instanceof ContainerBuilder && isset($options['parameter']) && ($par | escriptor implements DescriptorInterface
{
protected OutputInterface $output;
public function describe(OutputInterface $output, mixed $object, array $options = []): void
{
$this->output = $output;
if | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php",
"language": "php",
"file_size": 18100,
"cut_index": 1331,
"middle_length": 229
} |
encyInjection\ParameterBag\ParameterBag;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
/**
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* ... | routes))[$name] ?? []) {
$data[$name]['aliases'] = $aliases;
}
}
$this->writeData($data, $options);
}
protected function describeRoute(Route $route, array $options = []): void
{
$this->write | each ($routes->all() as $name => $route) {
$data[$name] = $this->getRouteData($route);
if (($showAliases ??= $options['show_aliases'] ?? false) && $aliases = ($reverseAliases ??= $this->getReverseAliases($ | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php",
"language": "php",
"file_size": 17404,
"cut_index": 1331,
"middle_length": 229
} |
nt\Routing\RouteCollection;
/**
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class MarkdownDescriptor extends Descriptor
{
protected function describeRouteCollection(RouteCollection $routes, array $options = []): void
{
$first = true;
foreach ($routes->... | es: \n%s", implode("\n", array_map(static fn (string $alias): string => \sprintf(' - %s', $alias), $aliases))));
}
}
$this->write("\n");
}
protected function describeRoute(Route $route, array $options = []): void
| $route, ['name' => $name]);
if (($showAliases ??= $options['show_aliases'] ?? false) && $aliases = ($reverseAliases ??= $this->getReverseAliases($routes))[$name] ?? []) {
$this->write(\sprintf("- Alias | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php",
"language": "php",
"file_size": 18877,
"cut_index": 1331,
"middle_length": 229
} |
omponent\DependencyInjection\Argument\ServiceLocatorArgument;
use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
... | VERB_COLORS = [
'ANY' => 'default',
'GET' => 'blue',
'QUERY' => 'blue',
'HEAD' => 'magenta',
'OPTIONS' => 'blue',
'POST' => 'green',
'PUT' => 'yellow',
'PATCH' => 'yellow',
'DELETE' => | fony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
/**
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class TextDescriptor extends Descriptor
{
private const | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php",
"language": "php",
"file_size": 30323,
"cut_index": 1331,
"middle_length": 229
} |
ony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
/**... | s->writeDocument($this->getRouteDocument($route, $options['name'] ?? null));
}
protected function describeContainerParameters(ParameterBag $parameters, array $options = []): void
{
$this->writeDocument($this->getContainerParametersDocu | $routes, array $options = []): void
{
$this->writeDocument($this->getRouteCollectionDocument($routes, $options));
}
protected function describeRoute(Route $route, array $options = []): void
{
$thi | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php",
"language": "php",
"file_size": 27278,
"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\Bundle\FrameworkBundle\Console\Helper;
use Symfony\Bundle\FrameworkBu... | François Simon <jeanfrancois.simon@sensiolabs.com>
*
* @internal
*/
class DescriptorHelper extends BaseDescriptorHelper
{
public function __construct(?FileLinkFormatter $fileLinkFormatter = null)
{
$this
->register('txt', new | ony\Bundle\FrameworkBundle\Console\Descriptor\XmlDescriptor;
use Symfony\Component\Console\Helper\DescriptorHelper as BaseDescriptorHelper;
use Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter;
/**
* @author Jean- | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Console/Helper/DescriptorHelper.php",
"language": "php",
"file_size": 1218,
"cut_index": 518,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Bundle\FrameworkBundle\Kernel;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Kernel\KernelTrait;
use Symfo... | ation as private doRegisterContainerConfiguration;
initializeBundles as protected doInitializeBundles;
initializeContainer as protected doInitializeContainer;
getKernelParameters as private doGetKernelParameters;
getBundlesD | A Kernel that provides configuration hooks.
*
* @author Ryan Weaver <ryan@knpuniversity.com>
* @author Fabien Potencier <fabien@symfony.com>
*/
trait MicroKernelTrait
{
use KernelTrait {
registerContainerConfigur | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php",
"language": "php",
"file_size": 5717,
"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\Bundle\FrameworkBundle\ErrorHandler\ErrorRenderer;
use Symfony\Component\ErrorHa... | aram \Closure(): ErrorRendererInterface $cliErrorRenderer
*/
public static function select(bool $isWebMode, \Closure $htmlErrorRenderer, \Closure $cliErrorRenderer): ErrorRendererInterface
{
return ($isWebMode ? $htmlErrorRenderer : $c | ErrorRendererInterface $htmlErrorRenderer
* @p | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/ErrorHandler/ErrorRenderer/RuntimeModeErrorRendererSelector.php",
"language": "php",
"file_size": 865,
"cut_index": 529,
"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\Bundle\FrameworkBundle\Secrets;
/**
* @author Nicolas Grekas <p@tchwork.co... | ing $name): bool;
/**
* @return array<string, string|null>
*/
abstract public function list(bool $reveal = false): array;
protected function validateName(string $name): void
{
if (!preg_match('/^\w++$/D', $name)) {
| lic function generateKeys(bool $override = false): bool;
abstract public function seal(string $name, string $value): void;
abstract public function reveal(string $name): ?string;
abstract public function remove(str | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Secrets/AbstractVault.php",
"language": "php",
"file_size": 1285,
"cut_index": 524,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bundle\FrameworkBundle\Secrets;
/**
* @author Nicolas Grekas <p@tchwork.com>
*/
class DotenvVault extends AbstractVault
{
public function __construct(
... | $this->validateName($name);
$v = str_replace("'", "'\\''", $value);
$content = is_file($this->dotenvFile) ? file_get_contents($this->dotenvFile) : '';
$content = preg_replace("/^$name=((\\\\'|'[^']++')++|.*)/m", "$name='$v'", $ | $this->lastMessage = 'The dotenv vault doesn\'t encrypt secrets thus doesn\'t need keys.';
return false;
}
public function seal(string $name, string $value): void
{
$this->lastMessage = null;
| {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Secrets/DotenvVault.php",
"language": "php",
"file_size": 3123,
"cut_index": 614,
"middle_length": 229
} |
mponent\VarExporter\VarExporter;
/**
* @author Tobias Schultze <http://tobion.de>
* @author Jérémy Derussé <jeremy@derusse.com>
* @author Nicolas Grekas <p@tchwork.com>
*/
class SodiumVault extends AbstractVault implements EnvVarLoaderInterface
{
private ?string $encryptionKey = null;
private string|\Strin... | |\Stringable|null $decryptionKey = null,
private ?string $derivedSecretEnvVar = null,
) {
$this->pathPrefix = rtrim(strtr($secretsDir, '/', \DIRECTORY_SEPARATOR), \DIRECTORY_SEPARATOR).\DIRECTORY_SEPARATOR.basename($secretsDir).'.';
| e key to use to decrypt the vault
* or null to store generated keys in the provided $secretsDir
*/
public function __construct(
string $secretsDir,
#[\SensitiveParameter] string | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Secrets/SodiumVault.php",
"language": "php",
"file_size": 9326,
"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\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Sy... | ny\Component\Serializer\Mapping\Loader\AttributeLoader;
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
use Symfony\Component\Serializer\Serializer;
use Twig\Environment;
use Twig\Loader\ArrayLoader;
use Twig\RuntimeLoader\ContainerRuntimeLoa | nent\DependencyInjection\ServiceLocator;
use Symfony\Component\Serializer\Encoder\JsonEncoder;
use Symfony\Component\Serializer\Encoder\YamlEncoder;
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
use Symfo | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Extension/SerializerExtensionTest.php",
"language": "php",
"file_size": 2454,
"cut_index": 563,
"middle_length": 229
} |
nExtension;
use Symfony\Component\Translation\Loader\ArrayLoader;
use Symfony\Component\Translation\Translator;
use Symfony\Contracts\Translation\TranslatorInterface;
use Twig\Environment;
use Twig\Error\SyntaxError;
use Twig\Loader\ArrayLoader as TwigArrayLoader;
use Twig\TemplateWrapper;
class TranslationExtensionTe... | ->getTemplate($template)->render($variables)) {
echo $template."\n";
$loader = new TwigArrayLoader(['index' => $template]);
$twig = new Environment($loader, ['debug' => true, 'cache' => false]);
$twig->addExt | rox.']);
$this->assertEquals('Percent: 12% (approx.)', $output);
}
#[DataProvider('getTransTests')]
public function testTrans($template, $expected, array $variables = [])
{
if ($expected != $this | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php",
"language": "php",
"file_size": 11953,
"cut_index": 921,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Extension\WorkflowExtension;
use Symfony\Component\Workflow\Definition;
use Symf... | private WorkflowExtension $extension;
private Transition $t1;
protected function setUp(): void
{
$places = ['ordered', 'waiting_for_payment', 'processed'];
$transitions = [
$this->t1 = new Transition('t1', 'order | upportStrategy\InstanceOfSupportStrategy;
use Symfony\Component\Workflow\Transition;
use Symfony\Component\Workflow\TransitionBlockerList;
use Symfony\Component\Workflow\Workflow;
class WorkflowExtensionTest extends TestCase
{
| {
"filepath": "src/Symfony/Bridge/Twig/Tests/Extension/WorkflowExtensionTest.php",
"language": "php",
"file_size": 4734,
"cut_index": 614,
"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\Bridge\Twig\Tests\Extension\Fixtures\FormFlow;
use Symfony\Compone... | e::class, [
'clear_submission' => true,
]);
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'with_reset' => true,
]);
}
public function get | mponent\OptionsResolver\OptionsResolver;
final class RegisterNavigatorType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->add('skip', NextFlowTyp | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/FormFlow/RegisterNavigatorType.php",
"language": "php",
"file_size": 1112,
"cut_index": 515,
"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\Bridge\Twig\Tests\Extension\Fixtures\FormFlow\Step;
use Symfony\Component\Form\AbstractType;
use S... | ldForm(FormBuilderInterface $builder, array $options): void
{
$builder->add('agreeTerms', CheckboxType::class);
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'inh | nType extends AbstractType
{
public function bui | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/FormFlow/Step/RegisterConfirmationType.php",
"language": "php",
"file_size": 927,
"cut_index": 547,
"middle_length": 52
} |
ny\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\FormType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormError;
use Symfony\Component\Form\FormView;
use Symfony\Component\Form\Test\FormIntegrationTestCase;
use Symfony\Component\Tr... | = new FormExtension();
$this->translatorExtension = new FormExtension(new StubTranslator());
$data = [
'username' => 'tgalopin',
'choice_multiple' => ['sugar', 'salt'],
];
$form = $this->factory->c | private FormView $view;
protected function getTypes(): array
{
return [new TextType(), new ChoiceType()];
}
protected function setUp(): void
{
parent::setUp();
$this->rawExtension | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionFieldHelpersTest.php",
"language": "php",
"file_size": 13688,
"cut_index": 921,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Bridge\Twig\Tests\Extension;
use Symfony\Bridge\Twig\Extension\FormExtension;
use Symfony\Bridge\Twig\Extension\TranslationExtension;
use Symfony\Bridge\Twig\Tests\Extension\Fixtures\StubTranslator;
class FormExtensionTableLayoutTest extends AbstractTableLayoutTestC... | TagHasActionAttributeWhenActionIsZero()
{
$form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', null, [
'method' => 'get',
'action' => '0',
]);
$html = $this->renderStart( | 'method' => 'get',
'action' => '',
]);
$html = $this->renderStart($form->createView());
$this->assertSame('<form name="form" method="get">', $html);
}
public function testStart | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php",
"language": "php",
"file_size": 5781,
"cut_index": 716,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Extension\HttpFoundationExtension;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use... | er($stack));
$this->assertEquals($expected, $extension->generateAbsoluteUrl($path));
}
public static function getGenerateAbsoluteUrlData()
{
return [
['http://localhost/foo.png', '/foo.png', '/foo/bar.html'],
| )]
public function testGenerateAbsoluteUrl($expected, $path, $pathinfo)
{
$stack = new RequestStack();
$stack->push(Request::create($pathinfo));
$extension = new HttpFoundationExtension(new UrlHelp | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Extension/HttpFoundationExtensionTest.php",
"language": "php",
"file_size": 5393,
"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\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Ext... | Environment(new ArrayLoader([
'template' => '{{ importmap("application") }}',
]), ['debug' => true, 'cache' => false, 'autoescape' => 'html', 'optimizations' => 0]);
$twig->addExtension(new ImportMapExtension());
$import | ocator;
use Twig\Environment;
use Twig\Loader\ArrayLoader;
use Twig\RuntimeLoader\ContainerRuntimeLoader;
class ImportMapExtensionTest extends TestCase
{
public function testItRendersTheImportmap()
{
$twig = new | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Extension/ImportMapExtensionTest.php",
"language": "php",
"file_size": 1644,
"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\Bridge\Twig\Tests\Extension\Fixtures\FormFlow\Step;
use Symfony\Component\Form\AbstractType;
use S... | rm(FormBuilderInterface $builder, array $options): void
{
$builder->add('company', TextType::class);
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'inherit_data' | e extends AbstractType
{
public function buildFo | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/FormFlow/Step/RegisterOrganizationType.php",
"language": "php",
"file_size": 916,
"cut_index": 547,
"middle_length": 52
} |
buted with this source code.
*/
namespace Symfony\Bridge\Twig\Tests\Mime;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Mime\NotificationEmail;
class NotificationEmailTest extends TestCase
{
public function test()
{
$email = (new NotificationEmail())
->markdown('Foo')
... | //example.com/',
'markdown' => true,
'raw' => false,
'a' => 'b',
'footer_text' => 'Notification email sent by Symfony',
], $email->getContext());
}
public function testSerialize()
{
| $this->assertEquals([
'importance' => NotificationEmail::IMPORTANCE_HIGH,
'content' => 'Foo',
'exception' => true,
'action_text' => 'Bar',
'action_url' => 'http: | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Mime/NotificationEmailTest.php",
"language": "php",
"file_size": 5919,
"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\Bridge\Twig\Tests\Mime;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Mime\BodyRenderer;
use Symfony\Bridge\Twig\Mime\TemplatedEmail;
use Symfony\Bridge\Tw... | ody = $email->toString();
$inlineParts = array_values(array_filter($email->getAttachments(), static fn (DataPart $part) => $part->hasContentId()));
self::assertCount(3, $inlineParts);
$contentId1 = $inlineParts[0]->getContentId(); | <a.hofbauer@fify.at
*/
class WrappedTemplatedEmailTest extends TestCase
{
public function testEmailImage()
{
$email = $this->buildEmail('email/image.html.twig');
$html = $email->getHtmlBody();
$b | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Mime/WrappedTemplatedEmailTest.php",
"language": "php",
"file_size": 4510,
"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\Bridge\Twig\Tests\TokenParser;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Node\FormThemeNode;
use Symfony... | {
$env = new Environment(new ArrayLoader(), ['cache' => false, 'autoescape' => false, 'optimizations' => 0]);
$env->addTokenParser(new FormThemeTokenParser());
$source = new Source($source, '');
$stream = $env->tokenize($sou | g\Node\Expression\Variable\ContextVariable;
use Twig\Parser;
use Twig\Source;
class FormThemeTokenParserTest extends TestCase
{
#[DataProvider('getTestsForFormTheme')]
public function testCompile($source, $expected)
| {
"filepath": "src/Symfony/Bridge/Twig/Tests/TokenParser/FormThemeTokenParserTest.php",
"language": "php",
"file_size": 4041,
"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\Bridge\Twig\Tests\Node;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Node\FormThemeNode;
use Symfony\Bridge\Twig\Test\Traits\RuntimeLoaderProvider;
use Sy... | ructor()
{
$form = new ContextVariable('form', 0);
$resources = new Nodes([
new ConstantExpression('tpl1', 0),
new ConstantExpression('tpl2', 0),
]);
$node = new FormThemeNode($form, $resources, | xpression;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Expression\Variable\ContextVariable;
use Twig\Node\Nodes;
class FormThemeTest extends TestCase
{
use RuntimeLoaderProvider;
public function testConst | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Node/FormThemeTest.php",
"language": "php",
"file_size": 3852,
"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\Bridge\Twig\Tests\Node;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Node\Tra... | y, null, null, $vars);
$env = new Environment(new ArrayLoader(), ['strict_variables' => true]);
$compiler = new Compiler($env);
$this->assertEquals(
\sprintf(
'yield $this->env->getExtension(\'Symfony\B | gmail.com>
*/
class TransNodeTest extends TestCase
{
public function testCompileStrict()
{
$body = new TextNode('trans %var%', 0);
$vars = new ContextVariable('foo', 0);
$node = new TransNode($bod | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php",
"language": "php",
"file_size": 1797,
"cut_index": 537,
"middle_length": 229
} |
use Symfony\Bridge\Twig\Extension\SecurityExtension;
use Symfony\Component\Security\Acl\Voter\FieldVote;
use Symfony\Component\Security\Core\Authorization\AccessDecision;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
use Symfony\Component\Security\Core\Authorization\UserAuthorizationC... | essDecision::class => true]);
}
#[DataProvider('provideObjectFieldAclCases')]
public function testIsGrantedCreatesFieldVoteObjectWhenFieldNotNull($object, $field, $expectedSubject)
{
$securityChecker = $this->createMock(Authorizati | c function setUpBeforeClass(): void
{
ClassExistsMock::register(SecurityExtension::class);
}
protected function tearDown(): void
{
ClassExistsMock::withMockedClasses([FieldVote::class => true, Acc | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Extension/SecurityExtensionTest.php",
"language": "php",
"file_size": 10890,
"cut_index": 921,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Extension\StopwatchExtension;
use... | r" %}', []);
}
#[DataProvider('getTimingTemplates')]
public function testTiming($template, $events)
{
$twig = new Environment(new ArrayLoader(['template' => $template]), ['debug' => true, 'cache' => false, 'autoescape' => 'html', ' | er;
class StopwatchExtensionTest extends TestCase
{
public function testFailIfStoppingWrongEvent()
{
$this->expectException(SyntaxError::class);
$this->testTiming('{% stopwatch "foo" %}{% endstopwatch "ba | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Extension/StopwatchExtensionTest.php",
"language": "php",
"file_size": 3470,
"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\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Extension\WebLinkExtension;
use Symfony\Component\HttpFoundation\Request;
use Sy... | st);
$this->extension = new WebLinkExtension($requestStack);
}
public function testLink()
{
$this->assertEquals('/foo.css', $this->extension->link('/foo.css', 'preload', ['as' => 'style', 'nopush' => true]));
$link = | Request $request;
private WebLinkExtension $extension;
protected function setUp(): void
{
$this->request = new Request();
$requestStack = new RequestStack();
$requestStack->push($this->reque | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Extension/WebLinkExtensionTest.php",
"language": "php",
"file_size": 3312,
"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\Bridge\Twig\Tests\Extension\Fixtures\FormFlow;
use Symfony\Bridge\Twig\Tests\Extension\F... | ony\Component\Form\Flow\FormFlowBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class RegisterType extends AbstractFlowType
{
public function buildFormFlow(FormFlowBuilderInterface $builder, array $options): void
{
| CredentialsType;
use Symfony\Bridge\Twig\Tests\Extension\Fixtures\FormFlow\Step\RegisterOrganizationType;
use Symfony\Component\Form\Flow\AbstractFlowType;
use Symfony\Component\Form\Flow\DataStorage\InMemoryDataStorage;
use Symf | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/FormFlow/RegisterType.php",
"language": "php",
"file_size": 1607,
"cut_index": 537,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Bridge\Twig\Tests\Extension;
use Symfony\Bridge\Twig\Extension\FormExtension;
use Symfony\Bridge\Twig\Tests\Extension\Fixtures\FormFlow\Data\Register;
use Symfony\Bridge\Twig\Tests\Extension\Fixtures\FormFlow\RegisterType;
use Symfony\Component\Form\Extension\Core\Ty... | = new Register();
$view = $this->factory->create(RegisterType::class, $data)
->getStepForm()
->createView();
$this->assertSame(3, $this->rawExtension->getFormFlowTotalSteps($view));
$this->assertSame(['org | private FormExtension $rawExtension;
protected function setUp(): void
{
parent::setUp();
$this->rawExtension = new FormExtension();
}
public function testFlowAtFirstStep()
{
$data | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionFlowHelpersTest.php",
"language": "php",
"file_size": 7454,
"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\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Extension\HttpKernelExtension;
use Symfony\Bridge\Twig\Extension\HttpKernelRunti... | FragmentRendererInterface;
use Symfony\Component\HttpKernel\Fragment\FragmentUriGenerator;
use Twig\Environment;
use Twig\Error\RuntimeError;
use Twig\Loader\ArrayLoader;
use Twig\RuntimeLoader\ContainerRuntimeLoader;
class HttpKernelExtensionTest extends | ent\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\UriSigner;
use Symfony\Component\HttpKernel\Fragment\FragmentHandler;
use Symfony\Component\HttpKernel\Fragment\ | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Extension/HttpKernelExtensionTest.php",
"language": "php",
"file_size": 4426,
"cut_index": 614,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Bridge\Twig\Tests\Mime;
use PHPUnit\Framework\Attributes\RequiresPhpExtension;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Mime\BodyRenderer;
use Symfony\Bridge\Twig\Mime\TemplatedEmail;
use Symfony\Component\Mime\Exception\InvalidArgumentException;
use S... | blic function testRenderTextOnly()
{
$email = $this->prepareEmail('Text', null);
$this->assertEquals('Text', $email->getBody()->bodyToString());
}
public function testRenderHtmlOnlyWithDefaultConverter()
{
$html = ' | Symfony\Component\Mime\Part\Multipart\AlternativePart;
use Symfony\Component\Translation\LocaleSwitcher;
use Twig\Environment;
use Twig\Loader\ArrayLoader;
use Twig\TwigFunction;
class BodyRendererTest extends TestCase
{
pu | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Mime/BodyRendererTest.php",
"language": "php",
"file_size": 7147,
"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\Bridge\Twig\Tests\Node;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Node\DumpNode;
use Twig\Compiler;
use Twig\Environment;
use Twig\Loader\ArrayLoader;
... | ext as $barkey => $barval) {
if (!$barval instanceof \Twig\Template) {
$barvars[$barkey] = $barval;
}
}
// line 7
\Symfony\Component\VarDumper\V | );
$env = new Environment(new ArrayLoader());
$compiler = new Compiler($env);
$expected = <<<'EOTXT'
if ($this->env->isDebug()) {
$barvars = [];
foreach ($cont | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Node/DumpNodeTest.php",
"language": "php",
"file_size": 3409,
"cut_index": 614,
"middle_length": 229
} |
use Twig\Loader\ArrayLoader;
use Twig\Node\Expression\ArrayExpression;
use Twig\Node\Expression\ConstantExpression;
use Twig\Node\Expression\Ternary\ConditionalTernary;
use Twig\Node\Expression\Variable\ContextVariable;
use Twig\Node\Nodes;
use Twig\TwigFunction;
class SearchAndRenderBlockNodeTest extends TestCase
{
... | Renderer\')->searchAndRenderBlock(%s, \'widget\')',
$this->getVariableGetter('form')
),
trim($compiler->compile($node)->getSource())
);
}
public function testCompileWidgetWithVariables()
{
| tion('form_widget'), $arguments, 0);
$compiler = new Compiler(new Environment(new ArrayLoader()));
$this->assertEquals(
\sprintf(
'$this->env->getRuntime(\'Symfony\Component\Form\Form | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Node/SearchAndRenderBlockNodeTest.php",
"language": "php",
"file_size": 9943,
"cut_index": 921,
"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\Bridge\Twig\Tests\Extension\Fixtures;
use Symfony\Contracts\Translation\TranslatableInterface;
use... | > $v) {
if ($v instanceof TranslatableInterface) {
$parameters[$k] = $v->trans($this, $locale);
}
}
return '[trans]'.strtr($id, $parameters).'[/trans]';
}
public function getLocale(): string | ): string
{
foreach ($parameters as $k = | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/StubTranslator.php",
"language": "php",
"file_size": 891,
"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\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Ext... | sanitize_html("bar") }}',
]);
$twig = new Environment($loader, ['debug' => true, 'cache' => false, 'autoescape' => 'html', 'optimizations' => 0]);
$fooSanitizer = $this->createMock(HtmlSanitizerInterface::class);
$fooSanit | Loader;
class HtmlSanitizerExtensionTest extends TestCase
{
public function testSanitizeHtml()
{
$loader = new ArrayLoader([
'foo' => '{{ "foobar"|sanitize_html }}',
'bar' => '{{ "foobar"| | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Extension/HtmlSanitizerExtensionTest.php",
"language": "php",
"file_size": 1685,
"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\Bridge\Twig\Tests\Mime;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Mime\TemplatedEmail;
use Symfony\Component\Mime\Part\DataPart;
use Symfony\Component\... | extends TestCase
{
public function test()
{
$email = new TemplatedEmail();
$email->context($context = ['product' => 'Symfony']);
$this->assertEquals($context, $email->getContext());
$email->textTemplate($template = | rmalizer\MimeMessageNormalizer;
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
use Symfony\Component\Serializer\Normalizer\PropertyNormalizer;
use Symfony\Component\Serializer\Serializer;
class TemplatedEmailTest | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Mime/TemplatedEmailTest.php",
"language": "php",
"file_size": 4816,
"cut_index": 614,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Bridge\Twig\Tests\Translation;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Extension\TranslationExtension;
use Symfony\Bridge\Twig\Translation\TwigExtractor;
use Symfony\Component\Translation\IdentityTranslat... | 'cache' => false,
'autoescape' => false,
]);
$twig->addExtension(new TranslationExtension(new IdentityTranslator()));
$extractor = new TwigExtractor($twig);
$extractor->setPrefix('prefix');
$catalo | ;
#[DataProvider('getExtractData')]
public function testExtract($template, $messages)
{
$twig = new Environment(new ArrayLoader(), [
'strict_variables' => true,
'debug' => true,
| {
"filepath": "src/Symfony/Bridge/Twig/Tests/Translation/TwigExtractorTest.php",
"language": "php",
"file_size": 6535,
"cut_index": 716,
"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\Bridge\Twig\Tests\Extension\Fixtures\FormFlow\Step;
use Symfony... | dd('email', EmailType::class);
$builder->add('password', PasswordType::class);
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'inherit_data' => true,
]);
} | face;
use Symfony\Component\OptionsResolver\OptionsResolver;
final class RegisterCredentialsType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->a | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/FormFlow/Step/RegisterCredentialsType.php",
"language": "php",
"file_size": 1034,
"cut_index": 512,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bridge\Twig\EventListener;
use Symfony\Bridge\Twig\Attribute\Template;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\For... | tributesListener;
use Symfony\Component\HttpKernel\KernelEvents;
use Twig\Environment;
class TemplateAttributeListener implements EventSubscriberInterface
{
public function __construct(
private Environment $twig,
) {
}
public func | omponent\HttpKernel\Event\ControllerArgumentsMetadata;
use Symfony\Component\HttpKernel\Event\ControllerAttributeEvent;
use Symfony\Component\HttpKernel\Event\ViewEvent;
use Symfony\Component\HttpKernel\EventListener\ControllerAt | {
"filepath": "src/Symfony/Bridge/Twig/EventListener/TemplateAttributeListener.php",
"language": "php",
"file_size": 4070,
"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\Bridge\Twig\Tests\Form;
use Symfony\Bridge\Twig\Form\TwigRendererEngine;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\Coll... | lectionsDoNotReuseParentBlockPrefixCache()
{
$renderer = $this->createRenderer();
$form = $this->factory->create(TaskManagerType::class);
$form->submit([
'taskLists' => [
[
'tasks | nent\Form\FormRenderer;
use Symfony\Component\Form\Test\FormIntegrationTestCase;
use Twig\Environment;
use Twig\Loader\ArrayLoader;
class TwigRendererEngineTest extends FormIntegrationTestCase
{
public function testNestedCol | {
"filepath": "src/Symfony/Bridge/Twig/Tests/Form/TwigRendererEngineTest.php",
"language": "php",
"file_size": 3073,
"cut_index": 614,
"middle_length": 229
} |
use Symfony\Component\AssetMapper\AssetMapperDevServerSubscriber;
use Symfony\Component\AssetMapper\AssetMapperInterface;
use Symfony\Component\AssetMapper\AssetMapperRepository;
use Symfony\Component\AssetMapper\Command\AssetMapperCompileCommand;
use Symfony\Component\AssetMapper\Command\CompressAssetsCommand;
use Sy... | Mapper\Command\ImportMapUpdateCommand;
use Symfony\Component\AssetMapper\CompiledAssetMapperConfigReader;
use Symfony\Component\AssetMapper\Compiler\CssAssetUrlCompiler;
use Symfony\Component\AssetMapper\Compiler\JavaScriptImportPathCompiler;
use Symfony\C |
use Symfony\Component\AssetMapper\Command\ImportMapOutdatedCommand;
use Symfony\Component\AssetMapper\Command\ImportMapRemoveCommand;
use Symfony\Component\AssetMapper\Command\ImportMapRequireCommand;
use Symfony\Component\Asset | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/asset_mapper.php",
"language": "php",
"file_size": 12285,
"cut_index": 921,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
use Psr\Container\ContainerInterface;
use Symfony\Bundle\FrameworkBundle\CacheWarmer\RouterCacheWarmer;
use Symfony\Bundle\FrameworkBundle\Controller\RedirectController;
use Symfony\Bundle\FrameworkBundle\Controller\... | uting\Generator\CompiledUrlGenerator;
use Symfony\Component\Routing\Generator\Dumper\CompiledUrlGeneratorDumper;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Routing\Loader\AttributeDirectoryLoader;
use Symfony\Compo | outing\RedirectableCompiledUrlMatcher;
use Symfony\Bundle\FrameworkBundle\Routing\Router;
use Symfony\Component\Config\Loader\LoaderResolver;
use Symfony\Component\HttpKernel\EventListener\RouterListener;
use Symfony\Component\Ro | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/routing.php",
"language": "php",
"file_size": 9127,
"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\Scheduler\Event... | r', ServiceCallMessageHandler::class)
->args([
tagged_locator('scheduler.task'),
])
->tag('messenger.message_handler')
->set('scheduler.messenger_transport_factory', SchedulerTransportFactory::cla | rmalizer;
use Symfony\Component\Scheduler\Messenger\ServiceCallMessageHandler;
return static function (ContainerConfigurator $container) {
$container->services()
->set('scheduler.messenger.service_call_message_handle | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/scheduler.php",
"language": "php",
"file_size": 1680,
"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\Loader\Configurator;
use Symfony\Bundle\Frame... | ion_key')->ignoreOnInvalid(),
abstract_arg('Secret env var, set in FrameworkExtension'),
])
->set('secrets.env_var_loader', StaticEnvVarLoader::class)
->args([service('secrets.vault')])
->tag('co | ator $container) {
$container->services()
->set('secrets.vault', SodiumVault::class)
->args([
abstract_arg('Secret dir, set in FrameworkExtension'),
service('secrets.decrypt | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/secrets.php",
"language": "php",
"file_size": 1344,
"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;
use Symfony\Bridge\Twig\Extension\CsrfExtension;
use Symfony\Br... | r;
use Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage;
use Symfony\Component\Security\Csrf\TokenStorage\TokenStorageInterface;
return static function (ContainerConfigurator $container) {
$container->services()
->set('security | iginCsrfListener;
use Symfony\Component\Security\Csrf\SameOriginCsrfTokenManager;
use Symfony\Component\Security\Csrf\TokenGenerator\TokenGeneratorInterface;
use Symfony\Component\Security\Csrf\TokenGenerator\UriSafeTokenGenerato | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/security_csrf.php",
"language": "php",
"file_size": 2915,
"cut_index": 563,
"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\Loader\Configurator;
use Symfony\Component\Semaphore\SemaphoreFactory;
use Symfony\Component\Semaphore\... | )])
->call('setLogger', [service('logger')->ignoreOnInvalid()])
->tag('monolog.logger', ['channel' => 'semaphore'])
->set('serializer.normalizer.semaphore_key', SemaphoreKeyNormalizer::class)
->tag('serializer.n | >abstract()
->args([abstract_arg('Store' | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/semaphore.php",
"language": "php",
"file_size": 953,
"cut_index": 582,
"middle_length": 52
} |
armer;
use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
use Symfony\Component\ErrorHandler\ErrorRenderer\ErrorRendererInterface;
use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer;
use Symfony\Component\ErrorHandler\ErrorRenderer\SerializerErrorRenderer;
use Symfony\Component\PropertyInfo\Extractor\... | Metadata;
use Symfony\Component\Serializer\Mapping\ClassDiscriminatorResolverInterface;
use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory;
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
use Symfony\Component | use Symfony\Component\Serializer\Encoder\JsonEncoder;
use Symfony\Component\Serializer\Encoder\XmlEncoder;
use Symfony\Component\Serializer\Encoder\YamlEncoder;
use Symfony\Component\Serializer\Mapping\ClassDiscriminatorFromClass | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.php",
"language": "php",
"file_size": 12005,
"cut_index": 921,
"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;
use Symfony\C... | llector'),
'default',
])
->set('serializer.data_collector', SerializerDataCollector::class)
->tag('data_collector', [
'template' => '@WebProfiler/Collector/serializer.html.twig',
| er->services()
->set('debug.serializer', TraceableSerializer::class)
->decorate('serializer')
->args([
service('debug.serializer.inner'),
service('serializer.data_co | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer_debug.php",
"language": "php",
"file_size": 1048,
"cut_index": 513,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;
use Symfony\Component\DependencyInjection\Kernel\FileLocator;
use Symfony\Component\DependencyInjection\Parameter;
use Symfony\Component\DependencyInjection\Ser... | nel\CacheWarmer\CacheWarmerAggregate;
use Symfony\Component\HttpKernel\Config\FileLocator as LegacyFileLocator;
use Symfony\Component\HttpKernel\DependencyInjection\ServicesResetterInterface as LegacyServicesResetterInterface;
use Symfony\Component\HttpKer | tpFoundation\Session\SessionInterface;
use Symfony\Component\HttpFoundation\UriSigner;
use Symfony\Component\HttpFoundation\UrlHelper;
use Symfony\Component\HttpKernel\CacheClearer\ChainCacheClearer;
use Symfony\Component\HttpKer | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/services.php",
"language": "php",
"file_size": 6469,
"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 Symfony\Component\HttpFoundation\Session\SessionFactory;
use Symfony\Component\HttpFoundation\Session\Storage\... | age\Handler\StrictSessionHandler;
use Symfony\Component\HttpFoundation\Session\Storage\MetadataBag;
use Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorageFactory;
use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorag | Handler;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\SessionHandlerFactory;
use Symfony\Component\HttpFoundation\Session\Stor | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/session.php",
"language": "php",
"file_size": 4946,
"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\Loader\Configurator;
use Symfony\Bundle\FrameworkBundle\Ke... | rvices()
->set('test.client', KernelBrowser::class)
->args([
service('kernel'),
param('test.client.parameters'),
service('test.client.history'),
service('test.client.cookie | ion\ServiceLocator;
use Symfony\Component\HttpKernel\EventListener\SessionListener;
return static function (ContainerConfigurator $container) {
$container->parameters()->set('test.client.parameters', []);
$container->se | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/test.php",
"language": "php",
"file_size": 1976,
"cut_index": 537,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
use Psr\Container\ContainerInterface;
use Symfony\Bundle\FrameworkBundle\CacheWarmer\TranslationsCacheWarmer;
use Symfony\Bundle\FrameworkBundle\Translation\Translator;
use Symfony\Component\Translation\Dumper\CsvFil... | nt\Translation\Dumper\XliffFileDumper;
use Symfony\Component\Translation\Dumper\YamlFileDumper;
use Symfony\Component\Translation\Extractor\ChainExtractor;
use Symfony\Component\Translation\Extractor\ExtractorInterface;
use Symfony\Component\Translation\Ex | \Component\Translation\Dumper\MoFileDumper;
use Symfony\Component\Translation\Dumper\PhpFileDumper;
use Symfony\Component\Translation\Dumper\PoFileDumper;
use Symfony\Component\Translation\Dumper\QtFileDumper;
use Symfony\Compone | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/translation.php",
"language": "php",
"file_size": 8590,
"cut_index": 716,
"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... | nore'])
->set('data_collector.translation', TranslationDataCollector::class)
->args([service('translator.data_collector')])
->tag('data_collector', [
'template' => '@WebProfiler/Collector/translation.html.tw | r->services()
->set('translator.data_collector', DataCollectorTranslator::class)
->args([service('translator.data_collector.inner')])
->tag('kernel.reset', ['method' => 'reset', 'on_invalid' => 'ig | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/translation_debug.php",
"language": "php",
"file_size": 1103,
"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\Configurator;
use Symfony\Component\HttpClient\HttpClient;
use Symfony\Component\Translation\Bridge\Crowdin\CrowdinProviderFacto... | ectionFactory;
use Symfony\Contracts\HttpClient\HttpClientInterface;
return static function (ContainerConfigurator $container) {
$container->services()
->set('translation.provider_collection', TranslationProviderCollection::class)
| e\PhraseProviderFactory;
use Symfony\Component\Translation\Provider\NullProviderFactory;
use Symfony\Component\Translation\Provider\TranslationProviderCollection;
use Symfony\Component\Translation\Provider\TranslationProviderColl | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/translation_providers.php",
"language": "php",
"file_size": 3654,
"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\TypeInfo\TypeContext\TypeContextFactory;
... | return static function (ContainerConfigurator $container) {
$container->services()
// type context
->set('type_info.type_context_factory', TypeContextFactory::class)
->args([
service('type_info.resolver.strin | lver\ReflectionReturnTypeResolver;
use Symfony\Component\TypeInfo\TypeResolver\ReflectionTypeResolver;
use Symfony\Component\TypeInfo\TypeResolver\TypeResolver;
use Symfony\Component\TypeInfo\TypeResolver\TypeResolverInterface;
| {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/type_info.php",
"language": "php",
"file_size": 2476,
"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\Loader\Configurator;
use Symfony\Component\Uid\Factory\Nam... | lias(UlidFactory::class, 'ulid.factory')
->set('uuid.factory', UuidFactory::class)
->alias(UuidFactory::class, 'uuid.factory')
->set('name_based_uuid.factory', NameBasedUuidFactory::class)
->factory([service('uuid.fact | Component\Uid\Factory\UuidFactory;
use Symfony\Component\Uid\Uuid47Transformer;
return static function (ContainerConfigurator $container) {
$container->services()
->set('ulid.factory', UlidFactory::class)
->a | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/uid.php",
"language": "php",
"file_size": 1877,
"cut_index": 537,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
use Symfony\Bundle\FrameworkBundle\CacheWarmer\ValidatorCacheWarmer;
use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
use Symfony\Component\Clock\ClockInterface;
use Symfony\Component\ExpressionLanguage\Expressio... | dator\Constraints\WhenValidator;
use Symfony\Component\Validator\ContainerConstraintValidatorFactory;
use Symfony\Component\Validator\Mapping\Loader\PropertyInfoLoader;
use Symfony\Component\Validator\Validation;
use Symfony\Component\Validator\Validator\V | onent\Validator\Constraints\ExpressionValidator;
use Symfony\Component\Validator\Constraints\NoSuspiciousCharactersValidator;
use Symfony\Component\Validator\Constraints\NotCompromisedPasswordValidator;
use Symfony\Component\Vali | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.php",
"language": "php",
"file_size": 5641,
"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\Loader\Configurator;
use Symfony\Component\Va... | tate_checker')->nullOnInvalid(),
])
->tag('kernel.reset', [
'method' => 'reset',
])
->set('data_collector.validator', ValidatorDataCollector::class)
->args([
service(' | s()
->set('debug.validator', TraceableValidator::class)
->decorate('validator', null, 255)
->args([
service('debug.validator.inner'),
service('profiler.is_disabled_s | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/validator_debug.php",
"language": "php",
"file_size": 1253,
"cut_index": 524,
"middle_length": 229
} |
Controller\ControllerHelper;
use Symfony\Bundle\FrameworkBundle\Controller\ControllerResolver;
use Symfony\Bundle\FrameworkBundle\Controller\TemplateController;
use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
use Symfony\Component\HttpKernel\Controller\ArgumentResolver;
use Symfony\Component\HttpKernel\Con... | HttpKernel\Controller\ArgumentResolver\RequestHeaderValueResolver;
use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestPayloadValueResolver;
use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestValueResolver;
use Symfony\Comp | er\DefaultValueResolver;
use Symfony\Component\HttpKernel\Controller\ArgumentResolver\QueryParameterValueResolver;
use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestAttributeValueResolver;
use Symfony\Component\ | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/web.php",
"language": "php",
"file_size": 9656,
"cut_index": 921,
"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... | nk.http_header_parser', HttpHeaderParser::class)
->alias(HttpHeaderParser::class, 'web_link.http_header_parser')
->set('web_link.add_link_header_listener', AddLinkHeaderListener::class)
->args([
service('web_lin | urator $container) {
$container->services()
->set('web_link.http_header_serializer', HttpHeaderSerializer::class)
->alias(HttpHeaderSerializer::class, 'web_link.http_header_serializer')
->set('web_li | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/web_link.php",
"language": "php",
"file_size": 1097,
"cut_index": 515,
"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\Webhook\Client\RequestParser;
use Symfony... | r;
use Symfony\Component\Webhook\Server\Transport;
return static function (ContainerConfigurator $container) {
$container->services()
->set('webhook.transport', Transport::class)
->args([
service('http_client'),
| hook\Server\HeaderSignatureConfigurator;
use Symfony\Component\Webhook\Server\JsonBodyConfigurator;
use Symfony\Component\Webhook\Server\NativeJsonPayloadSerializer;
use Symfony\Component\Webhook\Server\SerializerPayloadSerialize | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/webhook.php",
"language": "php",
"file_size": 2621,
"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\Loader\Configurator;
use Symfony\Component\Workflow\EventL... | finition'),
abstract_arg('marking store'),
service('event_dispatcher')->ignoreOnInvalid(),
abstract_arg('workflow name'),
abstract_arg('events to dispatch'),
])
->abstr | mponent\Workflow\Workflow;
return static function (ContainerConfigurator $container) {
$container->services()
->set('workflow.abstract', Workflow::class)
->args([
abstract_arg('workflow de | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/workflow.php",
"language": "php",
"file_size": 1709,
"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\Loader\Configurator;
use Symfony\Component\Workflow\DataCollector\Wo... | => '@WebProfiler/Collector/workflow.html.twig',
'id' => 'workflow',
])
->args([
tagged_iterator('workflow', 'name'),
service('event_dispatcher'),
service('debug.file_l | ->tag('data_collector', [
'template' | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/workflow_debug.php",
"language": "php",
"file_size": 896,
"cut_index": 547,
"middle_length": 52
} |
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.
*/
if ('cli' !== \PHP_SAPI) {
throw new Exception('This script must be run from the command line.'... | file_get_contents($target);
$contents = preg_replace('{private const KNOWN_TAGS = \[(.+?)\];}sm', "private const KNOWN_TAGS = [\n '".implode("',\n '", UnusedTagsPassUtils::getDefinedTags())."',\n ];", $contents);
file_put_contents($target | yInjection/Compiler/UnusedTagsPass.php';
$contents = | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/bin/check-unused-known-tags.php",
"language": "php",
"file_size": 851,
"cut_index": 529,
"middle_length": 52
} |
pe;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Symfony\Component\HttpFoundation\Exception\SessionNotFoundException;
use Symfony\Component\HttpFoundation\JsonRespo... | el\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Security\Core\Authentication\Token | n\Response;
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
use Symfony\Component\HttpFoundation\Session\FlashBagAwareSessionInterface;
use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\HttpKern | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Controller/AbstractController.php",
"language": "php",
"file_size": 19299,
"cut_index": 1331,
"middle_length": 229
} |
pe;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Symfony\Component\HttpFoundation\Exception\SessionNotFoundException;
use Symfony\Component\HttpFoundation\JsonRespo... | el\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Security\Core\Authentication\Token | n\Response;
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
use Symfony\Component\HttpFoundation\Session\FlashBagAwareSessionInterface;
use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\HttpKern | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Controller/ControllerHelper.php",
"language": "php",
"file_size": 19016,
"cut_index": 1331,
"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\Bundle\FrameworkBundle\Controller;
use Symfony\Component\HttpKer... | troller->setContainer($this->container)) {
throw new \LogicException(\sprintf('"%s" has no container set, did you forget to define it as a service subscriber?', $class));
}
$controller->setContainer($previousContain | function instantiateController(string $class): object
{
$controller = parent::instantiateController($class);
if ($controller instanceof AbstractController) {
if (null === $previousContainer = $con | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Controller/ControllerResolver.php",
"language": "php",
"file_size": 1050,
"cut_index": 513,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Bundle\FrameworkBundle\Controller;
use Symfony\Component\HttpFoundation\HeaderUtils;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\E... | * Redirects to another route with the given name.
*
* The response status code is 302 if the permanent parameter is false (default),
* and 301 if the redirection is permanent.
*
* In case the route name is empty, the status code w | nal
*/
class RedirectController
{
public function __construct(
private ?UrlGeneratorInterface $router = null,
private ?int $httpPort = null,
private ?int $httpsPort = null,
) {
}
/**
| {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php",
"language": "php",
"file_size": 7348,
"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\Bundle\FrameworkBundle\Controller;
use Symfony\Component\HttpFoundation\Response;
use Twig\Environment;
/**
* Te... | roxy) caching
* @param bool|null $private Whether or not caching should apply for client caches only
* @param array $context The context (arguments) of the template
* @param int $statusCode The HTTP status code to return with | ) {
}
/**
* Renders a template.
*
* @param string $template The template name
* @param int|null $maxAge Max age for client caching
* @param int|null $sharedAge Max age for shared (p | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Controller/TemplateController.php",
"language": "php",
"file_size": 2615,
"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\Bundle\FrameworkBundle\CacheWarmer;
use Symfony\Component\Cache\Adapter\ArrayAdapter;
use Symfony\Component\Cache\... | ring $phpArrayFile,
) {
}
public function isOptional(): bool
{
return true;
}
public function warmUp(string $cacheDir, ?string $buildDir = null): array
{
$arrayAdapter = new ArrayAdapter();
spl_autoloa | Interface;
abstract class AbstractPhpFileCacheWarmer implements CacheWarmerInterface
{
/**
* @param string $phpArrayFile The PHP file where metadata are cached
*/
public function __construct(
private st | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/CacheWarmer/AbstractPhpFileCacheWarmer.php",
"language": "php",
"file_size": 2522,
"cut_index": 563,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Bundle\FrameworkBundle\Translation;
use Psr\Container\ContainerInterface;
use Symfony\Component\Config\Resource\DirectoryResource;
use Symfony\Component\Config\Resource\FileExistenceResource;
use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface;
use Symfony... | 'resource_files' => [],
'scanned_directories' => [],
'cache_vary' => [],
];
/**
* @var list<string>
*/
private array $resourceLocales;
/**
* Holds parameters from addResource() calls so we can defer the | ;
/**
* @author Fabien Potencier <fabien@symfony.com>
*/
final class Translator extends BaseTranslator implements WarmableInterface
{
protected array $options = [
'cache_dir' => null,
'debug' => false,
| {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php",
"language": "php",
"file_size": 5729,
"cut_index": 716,
"middle_length": 229
} |
y\Component\Cache\Adapter\AdapterInterface;
use Symfony\Component\Cache\Adapter\ApcuAdapter;
use Symfony\Component\Cache\Adapter\ArrayAdapter;
use Symfony\Component\Cache\Adapter\DoctrineDbalAdapter;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\Cache\Adapter\MemcachedAdapter;
use Symfony... | heClearer;
use Symfony\Contracts\Cache\CacheInterface;
use Symfony\Contracts\Cache\NamespacedPoolInterface;
use Symfony\Contracts\Cache\TagAwareCacheInterface;
return static function (ContainerConfigurator $container) {
$container->services()
| r;
use Symfony\Component\Cache\Adapter\TagAwareAdapter;
use Symfony\Component\Cache\Marshaller\DefaultMarshaller;
use Symfony\Component\Cache\Messenger\EarlyExpirationHandler;
use Symfony\Component\HttpKernel\CacheClearer\Psr6Cac | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/cache.php",
"language": "php",
"file_size": 9790,
"cut_index": 921,
"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\Bundle\FrameworkBundle\DataCollector\RouterDataCollector;
use Symfony\Component\Console\DataCollector\... | llector;
use Symfony\Component\HttpKernel\DataCollector\RequestDataCollector;
use Symfony\Component\HttpKernel\DataCollector\TimeDataCollector;
use Symfony\Component\HttpKernel\KernelEvents;
return static function (ContainerConfigurator $container) {
| aCollector\EventDataCollector;
use Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector;
use Symfony\Component\HttpKernel\DataCollector\LoggerDataCollector;
use Symfony\Component\HttpKernel\DataCollector\MemoryDataCo | {
"filepath": "src/Symfony/Bundle/FrameworkBundle/Resources/config/collectors.php",
"language": "php",
"file_size": 4337,
"cut_index": 614,
"middle_length": 229
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.