Showing preview only (1,543K chars total). Download the full file or copy to clipboard to get everything.
Repository: symfony/http-kernel
Branch: 8.1
Commit: 47bc33d92b1c
Files: 339
Total size: 1.4 MB
Directory structure:
gitextract_533_a94u/
├── .gitattributes
├── .github/
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ └── close-pull-request.yml
├── .gitignore
├── Attribute/
│ ├── AsController.php
│ ├── AsTargetedValueResolver.php
│ ├── Cache.php
│ ├── IsSignatureValid.php
│ ├── MapDateTime.php
│ ├── MapQueryParameter.php
│ ├── MapQueryString.php
│ ├── MapRequestHeader.php
│ ├── MapRequestPayload.php
│ ├── MapUploadedFile.php
│ ├── Serialize.php
│ ├── ValueResolver.php
│ ├── WithHttpStatus.php
│ └── WithLogLevel.php
├── Bundle/
│ ├── AbstractBundle.php
│ ├── Bundle.php
│ ├── BundleExtension.php
│ └── BundleInterface.php
├── CHANGELOG.md
├── CacheClearer/
│ ├── CacheClearerInterface.php
│ ├── ChainCacheClearer.php
│ └── Psr6CacheClearer.php
├── CacheWarmer/
│ ├── CacheWarmer.php
│ ├── CacheWarmerAggregate.php
│ ├── CacheWarmerInterface.php
│ └── WarmableInterface.php
├── Config/
│ └── FileLocator.php
├── Controller/
│ ├── ArgumentResolver/
│ │ ├── BackedEnumValueResolver.php
│ │ ├── DateTimeValueResolver.php
│ │ ├── DefaultValueResolver.php
│ │ ├── NotTaggedControllerValueResolver.php
│ │ ├── QueryParameterValueResolver.php
│ │ ├── RequestAttributeValueResolver.php
│ │ ├── RequestHeaderValueResolver.php
│ │ ├── RequestPayloadValueResolver.php
│ │ ├── RequestValueResolver.php
│ │ ├── ServiceValueResolver.php
│ │ ├── SessionValueResolver.php
│ │ ├── TraceableValueResolver.php
│ │ ├── UidValueResolver.php
│ │ └── VariadicValueResolver.php
│ ├── ArgumentResolver.php
│ ├── ArgumentResolverInterface.php
│ ├── ContainerControllerResolver.php
│ ├── ControllerReference.php
│ ├── ControllerResolver.php
│ ├── ControllerResolverInterface.php
│ ├── ErrorController.php
│ ├── TraceableArgumentResolver.php
│ ├── TraceableControllerResolver.php
│ └── ValueResolverInterface.php
├── ControllerMetadata/
│ ├── ArgumentMetadata.php
│ ├── ArgumentMetadataFactory.php
│ └── ArgumentMetadataFactoryInterface.php
├── DataCollector/
│ ├── AjaxDataCollector.php
│ ├── ConfigDataCollector.php
│ ├── DataCollector.php
│ ├── DataCollectorInterface.php
│ ├── DumpDataCollector.php
│ ├── EventDataCollector.php
│ ├── ExceptionDataCollector.php
│ ├── LateDataCollectorInterface.php
│ ├── LoggerDataCollector.php
│ ├── MemoryDataCollector.php
│ ├── RequestDataCollector.php
│ ├── RouterDataCollector.php
│ └── TimeDataCollector.php
├── Debug/
│ ├── ErrorHandlerConfigurator.php
│ ├── TraceableEventDispatcher.php
│ └── VirtualRequestStack.php
├── DependencyInjection/
│ ├── ConfigurableExtension.php
│ ├── ControllerArgumentValueResolverPass.php
│ ├── ControllerAttributesListenerPass.php
│ ├── Extension.php
│ ├── FragmentRendererPass.php
│ ├── LazyLoadingFragmentHandler.php
│ ├── LoggerPass.php
│ ├── MergeExtensionConfigurationPass.php
│ ├── RegisterControllerArgumentLocatorsPass.php
│ ├── RegisterLocaleAwareServicesPass.php
│ ├── RemoveEmptyControllerArgumentLocatorsPass.php
│ ├── ResettableServicePass.php
│ ├── ServicesResetter.php
│ └── ServicesResetterInterface.php
├── Event/
│ ├── ControllerArgumentsEvent.php
│ ├── ControllerArgumentsMetadata.php
│ ├── ControllerAttributeEvent.php
│ ├── ControllerEvent.php
│ ├── ControllerMetadata.php
│ ├── ExceptionEvent.php
│ ├── FinishRequestEvent.php
│ ├── KernelEvent.php
│ ├── RequestEvent.php
│ ├── ResponseEvent.php
│ ├── TerminateEvent.php
│ └── ViewEvent.php
├── EventListener/
│ ├── AbstractSessionListener.php
│ ├── AddRequestFormatsListener.php
│ ├── CacheAttributeListener.php
│ ├── ControllerAttributesListener.php
│ ├── DebugHandlersListener.php
│ ├── DisallowRobotsIndexingListener.php
│ ├── DumpListener.php
│ ├── ErrorListener.php
│ ├── FragmentListener.php
│ ├── IsSignatureValidAttributeListener.php
│ ├── LocaleAwareListener.php
│ ├── LocaleListener.php
│ ├── ProfilerListener.php
│ ├── ResponseListener.php
│ ├── RouterListener.php
│ ├── SerializeControllerResultAttributeListener.php
│ ├── SessionListener.php
│ ├── SurrogateListener.php
│ └── ValidateRequestListener.php
├── Exception/
│ ├── AccessDeniedHttpException.php
│ ├── BadRequestHttpException.php
│ ├── ConflictHttpException.php
│ ├── ControllerDoesNotReturnResponseException.php
│ ├── GoneHttpException.php
│ ├── HttpException.php
│ ├── HttpExceptionInterface.php
│ ├── InvalidMetadataException.php
│ ├── LengthRequiredHttpException.php
│ ├── LockedHttpException.php
│ ├── MethodNotAllowedHttpException.php
│ ├── NearMissValueResolverException.php
│ ├── NotAcceptableHttpException.php
│ ├── NotFoundHttpException.php
│ ├── PreconditionFailedHttpException.php
│ ├── PreconditionRequiredHttpException.php
│ ├── ResolverNotFoundException.php
│ ├── ServiceUnavailableHttpException.php
│ ├── TooManyRequestsHttpException.php
│ ├── UnauthorizedHttpException.php
│ ├── UnexpectedSessionUsageException.php
│ ├── UnprocessableEntityHttpException.php
│ └── UnsupportedMediaTypeHttpException.php
├── Fragment/
│ ├── AbstractSurrogateFragmentRenderer.php
│ ├── EsiFragmentRenderer.php
│ ├── FragmentHandler.php
│ ├── FragmentRendererInterface.php
│ ├── FragmentUriGenerator.php
│ ├── FragmentUriGeneratorInterface.php
│ ├── HIncludeFragmentRenderer.php
│ ├── InlineFragmentRenderer.php
│ ├── RoutableFragmentRenderer.php
│ └── SsiFragmentRenderer.php
├── HttpCache/
│ ├── AbstractSurrogate.php
│ ├── CacheWasLockedException.php
│ ├── Esi.php
│ ├── HttpCache.php
│ ├── ResponseCacheStrategy.php
│ ├── ResponseCacheStrategyInterface.php
│ ├── Ssi.php
│ ├── Store.php
│ ├── StoreInterface.php
│ ├── SubRequestHandler.php
│ └── SurrogateInterface.php
├── HttpClientKernel.php
├── HttpKernel.php
├── HttpKernelBrowser.php
├── HttpKernelInterface.php
├── Kernel.php
├── KernelEvents.php
├── KernelInterface.php
├── LICENSE
├── Log/
│ ├── DebugLoggerConfigurator.php
│ ├── DebugLoggerInterface.php
│ └── Logger.php
├── Profiler/
│ ├── FileProfilerStorage.php
│ ├── Profile.php
│ ├── Profiler.php
│ ├── ProfilerStateChecker.php
│ └── ProfilerStorageInterface.php
├── README.md
├── RebootableInterface.php
├── Resources/
│ └── welcome.html.php
├── TerminableInterface.php
├── Tests/
│ ├── Attribute/
│ │ └── WithLogLevelTest.php
│ ├── Bundle/
│ │ └── BundleTest.php
│ ├── CacheClearer/
│ │ ├── ChainCacheClearerTest.php
│ │ └── Psr6CacheClearerTest.php
│ ├── CacheWarmer/
│ │ ├── CacheWarmerAggregateTest.php
│ │ └── CacheWarmerTest.php
│ ├── Config/
│ │ └── FileLocatorTest.php
│ ├── Controller/
│ │ ├── ArgumentResolver/
│ │ │ ├── BackedEnumValueResolverTest.php
│ │ │ ├── DateTimeValueResolverTest.php
│ │ │ ├── NotTaggedControllerValueResolverTest.php
│ │ │ ├── QueryParameterValueResolverTest.php
│ │ │ ├── RequestAttributeValueResolverTest.php
│ │ │ ├── RequestHeaderValueResolverTest.php
│ │ │ ├── RequestPayloadValueResolverTest.php
│ │ │ ├── RequestValueResolverTest.php
│ │ │ ├── ServiceValueResolverTest.php
│ │ │ ├── TraceableValueResolverTest.php
│ │ │ ├── UidValueResolverTest.php
│ │ │ └── UploadedFileValueResolverTest.php
│ │ ├── ArgumentResolverTest.php
│ │ ├── ContainerControllerResolverTest.php
│ │ ├── ControllerResolverTest.php
│ │ ├── ErrorControllerTest.php
│ │ ├── TraceableArgumentResolverTest.php
│ │ └── TraceableControllerResolverTest.php
│ ├── ControllerMetadata/
│ │ ├── ArgumentMetadataFactoryTest.php
│ │ └── ArgumentMetadataTest.php
│ ├── DataCollector/
│ │ ├── Compiler.log
│ │ ├── ConfigDataCollectorTest.php
│ │ ├── DataCollectorTest.php
│ │ ├── DumpDataCollectorTest.php
│ │ ├── ExceptionDataCollectorTest.php
│ │ ├── LoggerDataCollectorTest.php
│ │ ├── MemoryDataCollectorTest.php
│ │ ├── RequestDataCollectorTest.php
│ │ ├── RouterDataCollectorTest.php
│ │ └── TimeDataCollectorTest.php
│ ├── Debug/
│ │ ├── ErrorHandlerConfiguratorTest.php
│ │ └── TraceableEventDispatcherTest.php
│ ├── DependencyInjection/
│ │ ├── ControllerArgumentValueResolverPassTest.php
│ │ ├── ControllerAttributesListenerPassTest.php
│ │ ├── FragmentRendererPassTest.php
│ │ ├── LazyLoadingFragmentHandlerTest.php
│ │ ├── LoggerPassTest.php
│ │ ├── MergeExtensionConfigurationPassTest.php
│ │ ├── RegisterControllerArgumentLocatorsPassTest.php
│ │ ├── RegisterLocaleAwareServicesPassTest.php
│ │ ├── RemoveEmptyControllerArgumentLocatorsPassTest.php
│ │ ├── ResettableServicePassTest.php
│ │ └── ServicesResetterTest.php
│ ├── Event/
│ │ ├── ControllerArgumentsEventTest.php
│ │ ├── ControllerAttributeEventTest.php
│ │ ├── ControllerEventTest.php
│ │ └── ExceptionEventTest.php
│ ├── EventListener/
│ │ ├── AddRequestFormatsListenerTest.php
│ │ ├── CacheAttributeListenerTest.php
│ │ ├── ControllerAttributesListenerTest.php
│ │ ├── DebugHandlersListenerTest.php
│ │ ├── DisallowRobotsIndexingListenerTest.php
│ │ ├── DumpListenerTest.php
│ │ ├── ErrorListenerTest.php
│ │ ├── FragmentListenerTest.php
│ │ ├── IsSignatureValidAttributeListenerTest.php
│ │ ├── LocaleAwareListenerTest.php
│ │ ├── LocaleListenerTest.php
│ │ ├── ProfilerListenerTest.php
│ │ ├── ResponseListenerTest.php
│ │ ├── RouterListenerTest.php
│ │ ├── SerializeControllerResultListenerTest.php
│ │ ├── SessionListenerTest.php
│ │ ├── SurrogateListenerTest.php
│ │ └── ValidateRequestListenerTest.php
│ ├── Exception/
│ │ ├── AccessDeniedHttpExceptionTest.php
│ │ ├── BadRequestHttpExceptionTest.php
│ │ ├── ConflictHttpExceptionTest.php
│ │ ├── GoneHttpExceptionTest.php
│ │ ├── HttpExceptionTest.php
│ │ ├── LengthRequiredHttpExceptionTest.php
│ │ ├── LockedHttpExceptionTest.php
│ │ ├── MethodNotAllowedHttpExceptionTest.php
│ │ ├── NotAcceptableHttpExceptionTest.php
│ │ ├── NotFoundHttpExceptionTest.php
│ │ ├── PreconditionFailedHttpExceptionTest.php
│ │ ├── PreconditionRequiredHttpExceptionTest.php
│ │ ├── ServiceUnavailableHttpExceptionTest.php
│ │ ├── TooManyRequestsHttpExceptionTest.php
│ │ ├── UnauthorizedHttpExceptionTest.php
│ │ ├── UnprocessableEntityHttpExceptionTest.php
│ │ └── UnsupportedMediaTypeHttpExceptionTest.php
│ ├── Fixtures/
│ │ ├── AcmeFooBundle/
│ │ │ ├── AcmeFooBundle.php
│ │ │ └── Resources/
│ │ │ └── config/
│ │ │ ├── definition.php
│ │ │ └── services.php
│ │ ├── Attribute/
│ │ │ ├── Bar.php
│ │ │ ├── Baz.php
│ │ │ ├── Buz.php
│ │ │ ├── Foo.php
│ │ │ ├── Qux.php
│ │ │ └── SubBuz.php
│ │ ├── Bundle1Bundle/
│ │ │ ├── Resources/
│ │ │ │ └── .gitkeep
│ │ │ └── foo.txt
│ │ ├── BundleCompilerPass/
│ │ │ └── BundleAsCompilerPassBundle.php
│ │ ├── ClearableService.php
│ │ ├── Controller/
│ │ │ ├── ArgumentResolver/
│ │ │ │ └── UploadedFile/
│ │ │ │ ├── file-big.txt
│ │ │ │ └── file-small.txt
│ │ │ ├── AttributeController.php
│ │ │ ├── BasicTypesController.php
│ │ │ ├── CacheAttributeController.php
│ │ │ ├── ControllerAttributesController.php
│ │ │ ├── ExtendingRequest.php
│ │ │ ├── ExtendingSession.php
│ │ │ ├── NullableController.php
│ │ │ └── VariadicController.php
│ │ ├── DataCollector/
│ │ │ ├── CloneVarDataCollector.php
│ │ │ └── DummyController.php
│ │ ├── ExtensionNotValidBundle/
│ │ │ ├── DependencyInjection/
│ │ │ │ └── ExtensionNotValidExtension.php
│ │ │ └── ExtensionNotValidBundle.php
│ │ ├── ExtensionPresentBundle/
│ │ │ ├── DependencyInjection/
│ │ │ │ └── ExtensionPresentExtension.php
│ │ │ └── ExtensionPresentBundle.php
│ │ ├── IntEnum.php
│ │ ├── IsSignatureValidAttributeController.php
│ │ ├── IsSignatureValidAttributeMethodsController.php
│ │ ├── KernelWithoutBundles.php
│ │ ├── LazyResettableService.php
│ │ ├── MockableUploadFileWithClientSize.php
│ │ ├── MultiResettableService.php
│ │ ├── ResettableService.php
│ │ ├── Suit.php
│ │ ├── TestClient.php
│ │ ├── UsePropertyInDestruct.php
│ │ └── WithPublicObjectProperty.php
│ ├── Fragment/
│ │ ├── EsiFragmentRendererTest.php
│ │ ├── FragmentHandlerTest.php
│ │ ├── HIncludeFragmentRendererTest.php
│ │ ├── InlineFragmentRendererTest.php
│ │ ├── RoutableFragmentRendererTest.php
│ │ └── SsiFragmentRendererTest.php
│ ├── HttpCache/
│ │ ├── EsiTest.php
│ │ ├── HttpCacheTest.php
│ │ ├── HttpCacheTestCase.php
│ │ ├── ResponseCacheStrategyTest.php
│ │ ├── SsiTest.php
│ │ ├── StoreTest.php
│ │ ├── SubRequestHandlerTest.php
│ │ ├── TestHttpKernel.php
│ │ └── TestMultipleHttpKernel.php
│ ├── HttpClientKernelTest.php
│ ├── HttpKernelBrowserTest.php
│ ├── HttpKernelTest.php
│ ├── KernelTest.php
│ ├── Log/
│ │ └── LoggerTest.php
│ ├── Logger.php
│ ├── Profiler/
│ │ ├── FileProfilerStorageTest.php
│ │ └── ProfilerTest.php
│ └── TestHttpKernel.php
├── composer.json
└── phpunit.xml.dist
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
/Tests export-ignore
/phpunit.xml.dist export-ignore
/.git* export-ignore
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
Please do not submit any Pull Requests here. They will be closed.
---
Please submit your PR here instead:
https://github.com/symfony/symfony
This repository is what we call a "subtree split": a read-only subset of that main repository.
We're looking forward to your PR there!
================================================
FILE: .github/workflows/close-pull-request.yml
================================================
name: Close Pull Request
on:
pull_request_target:
types: [opened]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: superbrothers/close-pull-request@v3
with:
comment: |
Thanks for your Pull Request! We love contributions.
However, you should instead open your PR on the main repository:
https://github.com/symfony/symfony
This repository is what we call a "subtree split": a read-only subset of that main repository.
We're looking forward to your PR there!
================================================
FILE: .gitignore
================================================
vendor/
composer.lock
phpunit.xml
Tests/Fixtures/cache/
Tests/Fixtures/logs/
================================================
FILE: Attribute/AsController.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Attribute;
/**
* Autoconfigures controllers as services by applying
* the `controller.service_arguments` tag to them.
*
* This enables injecting services as method arguments in addition
* to other conventional dependency injection strategies.
*/
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_FUNCTION)]
class AsController
{
}
================================================
FILE: Attribute/AsTargetedValueResolver.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Attribute;
/**
* Service tag to autoconfigure targeted value resolvers.
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
class AsTargetedValueResolver
{
/**
* @param string|null $name The name with which the resolver can be targeted
*/
public function __construct(public readonly ?string $name = null)
{
}
}
================================================
FILE: Attribute/Cache.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Attribute;
use Symfony\Component\ExpressionLanguage\Expression;
use Symfony\Component\HttpFoundation\Request;
/**
* Describes the default HTTP cache headers on controllers.
* Headers defined in the Cache attribute are ignored if they are already set
* by the controller.
*
* @see https://symfony.com/doc/current/http_cache.html#making-your-responses-http-cacheable
*
* @author Fabien Potencier <fabien@symfony.com>
*/
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::TARGET_FUNCTION | \Attribute::IS_REPEATABLE)]
final class Cache
{
/**
* @internal
*/
public public(set) readonly array $variables;
public function __construct(
/**
* The expiration date as a valid date for the strtotime() function.
*/
public ?string $expires = null,
/**
* The number of seconds that the response is considered fresh by a private
* cache like a web browser.
*/
public int|string|null $maxage = null,
/**
* The number of seconds that the response is considered fresh by a public
* cache like a reverse proxy cache.
*/
public int|string|null $smaxage = null,
/**
* If true, the contents will be stored in a public cache and served to all
* the next requests.
*/
public ?bool $public = null,
/**
* If true, the response is not served stale by a cache in any circumstance
* without first revalidating with the origin.
*/
public bool $mustRevalidate = false,
/**
* Set "Vary" header.
*
* Example:
* ['Accept-Encoding', 'User-Agent']
*
* @see https://symfony.com/doc/current/http_cache/cache_vary.html
*
* @var string[]
*/
public array $vary = [],
/**
* A value evaluated to compute the Last-Modified HTTP header.
*
* The value may be either an ExpressionLanguage expression or a Closure and
* receives all the request attributes and the resolved controller arguments.
*
* The result must be an instance of \DateTimeInterface.
*
* @var \DateTimeInterface|string|Expression|\Closure(array<string, mixed>, Request, ?object):\DateTimeInterface|null
*/
public \DateTimeInterface|string|Expression|\Closure|null $lastModified = null,
/**
* A value evaluated to compute the ETag HTTP header.
*
* The value may be either an ExpressionLanguage expression or a Closure and
* receives all the request attributes and the resolved controller arguments.
*
* The result must be a string that will be hashed.
*
* @var string|Expression|\Closure(array<string, mixed>, Request, ?object):string|null
*/
public string|Expression|\Closure|null $etag = null,
/**
* max-stale Cache-Control header
* It can be expressed in seconds or with a relative time format (1 day, 2 weeks, ...).
*/
public int|string|null $maxStale = null,
/**
* stale-while-revalidate Cache-Control header
* It can be expressed in seconds or with a relative time format (1 day, 2 weeks, ...).
*/
public int|string|null $staleWhileRevalidate = null,
/**
* stale-if-error Cache-Control header
* It can be expressed in seconds or with a relative time format (1 day, 2 weeks, ...).
*/
public int|string|null $staleIfError = null,
/**
* Add the "no-store" Cache-Control directive when set to true.
*
* This directive indicates that no part of the response can be cached
* in any cache (not in a shared cache, nor in a private cache).
*
* Supersedes the "$public" and "$smaxage" values.
*
* @see https://datatracker.ietf.org/doc/html/rfc7234#section-5.2.2.3
*/
public ?bool $noStore = null,
/**
* A value evaluated to determine whether the cache attribute should be applied.
*
* The value may be either an ExpressionLanguage expression or a Closure and
* receives all the request attributes and the resolved controller arguments.
*
* The result must be a boolean. If true the attribute is applied, if false it is ignored.
*
* @var bool|string|Expression|\Closure(array<string, mixed>, Request, ?object):bool
*/
public bool|string|Expression|\Closure $if = true,
) {
}
}
================================================
FILE: Attribute/IsSignatureValid.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Attribute;
/**
* Validates the request signature for specific HTTP methods.
*
* This class determines whether a request's signature should be validated
* based on the configured HTTP methods. If the request method matches one
* of the specified methods (or if no methods are specified), the signature
* is checked.
*
* If the signature is invalid, a {@see \Symfony\Component\HttpFoundation\Exception\SignedUriException}
* is thrown during validation.
*
* @author Santiago San Martin <sanmartindev@gmail.com>
*/
#[\Attribute(\Attribute::IS_REPEATABLE | \Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::TARGET_FUNCTION)]
final class IsSignatureValid
{
/** @var string[] */
public readonly array $methods;
/**
* @param string[]|string $methods HTTP methods that require signature validation. An empty array means that no method filtering is done
*/
public function __construct(
array|string $methods = [],
) {
$this->methods = (array) $methods;
}
}
================================================
FILE: Attribute/MapDateTime.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Attribute;
use Symfony\Component\HttpKernel\Controller\ArgumentResolver\DateTimeValueResolver;
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface;
/**
* Controller parameter tag to configure DateTime arguments.
*/
#[\Attribute(\Attribute::TARGET_PARAMETER)]
class MapDateTime extends ValueResolver
{
/**
* @param string|null $format The DateTime format to use, @see https://php.net/datetime.format
* @param bool $disabled Whether this value resolver is disabled; this allows to enable a value resolver globally while disabling it in specific cases
* @param class-string<ValueResolverInterface>|string $resolver The name of the resolver to use
*/
public function __construct(
public readonly ?string $format = null,
bool $disabled = false,
string $resolver = DateTimeValueResolver::class,
) {
parent::__construct($resolver, $disabled);
}
}
================================================
FILE: Attribute/MapQueryParameter.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Attribute;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Controller\ArgumentResolver\QueryParameterValueResolver;
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface;
/**
* Can be used to pass a query parameter to a controller argument.
*
* @author Ruud Kamphuis <ruud@ticketswap.com>
* @author Ionut Enache <i.ovidiuenache@yahoo.com>
*/
#[\Attribute(\Attribute::TARGET_PARAMETER)]
final class MapQueryParameter extends ValueResolver
{
/**
* @see https://php.net/manual/filter.constants for filter, flags and options
*
* @param string|null $name The name of the query parameter; if null, the name of the argument in the controller will be used
* @param (FILTER_VALIDATE_*)|(FILTER_SANITIZE_*)|null $filter The filter to pass to "filter_var()", deduced from the type-hint if null
* @param int-mask-of<(FILTER_FLAG_*)|FILTER_NULL_ON_FAILURE> $flags
* @param array{min_range?: int|float, max_range?: int|float, regexp?: string, ...} $options
* @param class-string<ValueResolverInterface>|string $resolver The name of the resolver to use
*/
public function __construct(
public ?string $name = null,
public ?int $filter = null,
public int $flags = 0,
public array $options = [],
string $resolver = QueryParameterValueResolver::class,
public int $validationFailedStatusCode = Response::HTTP_NOT_FOUND,
) {
parent::__construct($resolver);
}
}
================================================
FILE: Attribute/MapQueryString.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Attribute;
use Symfony\Component\ExpressionLanguage\Expression;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestPayloadValueResolver;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
use Symfony\Component\Validator\Constraints\GroupSequence;
/**
* Controller parameter tag to map the query string of the request to typed object and validate it.
*
* @psalm-import-type GroupResolver from RequestPayloadValueResolver
*
* @author Konstantin Myakshin <molodchick@gmail.com>
*/
#[\Attribute(\Attribute::TARGET_PARAMETER)]
class MapQueryString extends ValueResolver
{
public ArgumentMetadata $metadata;
/**
* @param array<string, mixed> $serializationContext The serialization context to use when deserializing the query string
* @param string|Expression|GroupSequence|GroupResolver|array<string>|null $validationGroups The validation groups to use when validating the query string mapping
* @param class-string $resolver The class name of the resolver to use
* @param int $validationFailedStatusCode The HTTP code to return if the validation fails
*/
public function __construct(
public readonly array $serializationContext = [],
public readonly string|Expression|GroupSequence|\Closure|array|null $validationGroups = null,
string $resolver = RequestPayloadValueResolver::class,
public readonly int $validationFailedStatusCode = Response::HTTP_NOT_FOUND,
public readonly ?string $key = null,
public bool $mapWhenEmpty = false,
) {
parent::__construct($resolver);
}
}
================================================
FILE: Attribute/MapRequestHeader.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Attribute;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestHeaderValueResolver;
#[\Attribute(\Attribute::TARGET_PARAMETER)]
final class MapRequestHeader extends ValueResolver
{
/**
* @param string|null $name The name of the header parameter; if null, the name of the argument in the controller will be used
* @param class-string $resolver The class name of the resolver to use
* @param int $validationFailedStatusCode The HTTP code to return if the validation fails
*/
public function __construct(
public readonly ?string $name = null,
string $resolver = RequestHeaderValueResolver::class,
public readonly int $validationFailedStatusCode = Response::HTTP_BAD_REQUEST,
) {
parent::__construct($resolver);
}
}
================================================
FILE: Attribute/MapRequestPayload.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Attribute;
use Symfony\Component\ExpressionLanguage\Expression;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestPayloadValueResolver;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
use Symfony\Component\Validator\Constraints\GroupSequence;
/**
* Controller parameter tag to map the request content to typed object and validate it.
*
* @psalm-import-type GroupResolver from RequestPayloadValueResolver
*
* @author Konstantin Myakshin <molodchick@gmail.com>
*/
#[\Attribute(\Attribute::TARGET_PARAMETER)]
class MapRequestPayload extends ValueResolver
{
public ArgumentMetadata $metadata;
/**
* @param array<string>|string|null $acceptFormat The payload formats to accept (i.e. "json", "xml")
* @param array<string, mixed> $serializationContext The serialization context to use when deserializing the payload
* @param string|Expression|GroupSequence|GroupResolver|array<string>|null $validationGroups The validation groups to use when validating the query string mapping
* @param class-string $resolver The class name of the resolver to use
* @param int $validationFailedStatusCode The HTTP code to return if the validation fails
* @param class-string|string|null $type The element type for array deserialization
*/
public function __construct(
public readonly array|string|null $acceptFormat = null,
public readonly array $serializationContext = [],
public readonly string|Expression|GroupSequence|\Closure|array|null $validationGroups = null,
string $resolver = RequestPayloadValueResolver::class,
public readonly int $validationFailedStatusCode = Response::HTTP_UNPROCESSABLE_ENTITY,
public readonly ?string $type = null,
public bool $mapWhenEmpty = false,
) {
parent::__construct($resolver);
}
}
================================================
FILE: Attribute/MapUploadedFile.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Attribute;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestPayloadValueResolver;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
use Symfony\Component\Validator\Constraint;
#[\Attribute(\Attribute::TARGET_PARAMETER)]
class MapUploadedFile extends ValueResolver
{
public ArgumentMetadata $metadata;
public function __construct(
/** @var Constraint|array<Constraint>|null */
public Constraint|array|null $constraints = null,
public ?string $name = null,
string $resolver = RequestPayloadValueResolver::class,
public readonly int $validationFailedStatusCode = Response::HTTP_UNPROCESSABLE_ENTITY,
) {
parent::__construct($resolver);
}
}
================================================
FILE: Attribute/Serialize.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Attribute;
/**
* Controller tag to serialize response.
*
* @author Konstantin Myakshin <molodchick@gmail.com>
*/
#[\Attribute(\Attribute::TARGET_METHOD)]
final class Serialize
{
/**
* @param int $code The HTTP status code (200 "OK" by default)
* @param array<string, mixed> $headers Extra headers to set on the response
* @param array<string, mixed> $context The serialization context passed to the serializer
*/
public function __construct(
public readonly int $code = 200,
public readonly array $headers = [],
public readonly array $context = [],
) {
}
}
================================================
FILE: Attribute/ValueResolver.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Attribute;
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface;
/**
* Defines which value resolver should be used for a given parameter.
*/
#[\Attribute(\Attribute::TARGET_PARAMETER | \Attribute::IS_REPEATABLE)]
class ValueResolver
{
/**
* @param class-string<ValueResolverInterface>|string $resolver The class name of the resolver to use
* @param bool $disabled Whether this value resolver is disabled; this allows to enable a value resolver globally while disabling it in specific cases
*/
public function __construct(
public string $resolver,
public bool $disabled = false,
) {
}
}
================================================
FILE: Attribute/WithHttpStatus.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Attribute;
/**
* Defines the HTTP status code applied to an exception.
*
* @author Dejan Angelov <angelovdejan@protonmail.com>
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
class WithHttpStatus
{
/**
* @param int $statusCode The HTTP status code to use
* @param array<string, string> $headers The HTTP headers to add to the response
*/
public function __construct(
public readonly int $statusCode,
public readonly array $headers = [],
) {
}
}
================================================
FILE: Attribute/WithLogLevel.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Attribute;
use Psr\Log\LogLevel;
/**
* Defines the log level applied to an exception.
*
* @author Dejan Angelov <angelovdejan@protonmail.com>
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
final class WithLogLevel
{
/**
* @param LogLevel::* $level The level to use to log the exception
*/
public function __construct(public readonly string $level)
{
if (!\defined('Psr\Log\LogLevel::'.strtoupper($this->level))) {
throw new \InvalidArgumentException(\sprintf('Invalid log level "%s".', $this->level));
}
}
}
================================================
FILE: Bundle/AbstractBundle.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Bundle;
use Symfony\Component\Config\Definition\Configurator\DefinitionConfigurator;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\ConfigurableExtensionInterface;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
/**
* A Bundle that provides configuration hooks.
*
* @author Yonel Ceruto <yonelceruto@gmail.com>
*/
abstract class AbstractBundle extends Bundle implements ConfigurableExtensionInterface
{
protected string $extensionAlias = '';
public function configure(DefinitionConfigurator $definition): void
{
}
public function prependExtension(ContainerConfigurator $container, ContainerBuilder $builder): void
{
}
public function loadExtension(array $config, ContainerConfigurator $container, ContainerBuilder $builder): void
{
}
public function getContainerExtension(): ?ExtensionInterface
{
if ('' === $this->extensionAlias) {
$this->extensionAlias = Container::underscore(preg_replace('/Bundle$/', '', $this->getName()));
}
return $this->extension ??= new BundleExtension($this, $this->extensionAlias);
}
public function getPath(): string
{
if (!isset($this->path)) {
$reflected = new \ReflectionObject($this);
// assume the modern directory structure by default
$this->path = \dirname($reflected->getFileName(), 2);
}
return $this->path;
}
}
================================================
FILE: Bundle/Bundle.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Bundle;
use Symfony\Component\Console\Application;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
/**
* An implementation of BundleInterface that adds a few conventions for DependencyInjection extensions.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
abstract class Bundle implements BundleInterface
{
protected string $name;
protected ExtensionInterface|false|null $extension = null;
protected string $path;
protected ?ContainerInterface $container;
private string $namespace;
public function boot(): void
{
}
public function shutdown(): void
{
}
/**
* This method can be overridden to register compilation passes,
* other extensions, ...
*/
public function build(ContainerBuilder $container): void
{
}
/**
* Returns the bundle's container extension.
*
* @throws \LogicException
*/
public function getContainerExtension(): ?ExtensionInterface
{
if (!isset($this->extension)) {
$extension = $this->createContainerExtension();
if (null !== $extension) {
if (!$extension instanceof ExtensionInterface) {
throw new \LogicException(\sprintf('Extension "%s" must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface.', get_debug_type($extension)));
}
// check naming convention
$basename = preg_replace('/Bundle$/', '', $this->getName());
$expectedAlias = Container::underscore($basename);
if ($expectedAlias != $extension->getAlias()) {
throw new \LogicException(\sprintf('Users will expect the alias of the default extension of a bundle to be the underscored version of the bundle name ("%s"). You can override "Bundle::getContainerExtension()" if you want to use "%s" or another alias.', $expectedAlias, $extension->getAlias()));
}
$this->extension = $extension;
} else {
$this->extension = false;
}
}
return $this->extension ?: null;
}
public function getNamespace(): string
{
if (!isset($this->namespace)) {
$this->parseClassName();
}
return $this->namespace;
}
public function getPath(): string
{
if (!isset($this->path)) {
$reflected = new \ReflectionObject($this);
$this->path = \dirname($reflected->getFileName());
}
return $this->path;
}
/**
* Returns the bundle name (the class short name).
*/
final public function getName(): string
{
if (!isset($this->name)) {
$this->parseClassName();
}
return $this->name;
}
public function registerCommands(Application $application): void
{
}
/**
* Returns the bundle's container extension class.
*/
protected function getContainerExtensionClass(): string
{
$basename = preg_replace('/Bundle$/', '', $this->getName());
return $this->getNamespace().'\\DependencyInjection\\'.$basename.'Extension';
}
/**
* Creates the bundle's container extension.
*/
protected function createContainerExtension(): ?ExtensionInterface
{
return class_exists($class = $this->getContainerExtensionClass()) ? new $class() : null;
}
private function parseClassName(): void
{
$pos = strrpos(static::class, '\\');
$this->namespace = false === $pos ? '' : substr(static::class, 0, $pos);
$this->name ??= false === $pos ? static::class : substr(static::class, $pos + 1);
}
public function setContainer(?ContainerInterface $container): void
{
$this->container = $container;
}
}
================================================
FILE: Bundle/BundleExtension.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Bundle;
use Symfony\Component\Config\Definition\Configuration;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\ConfigurableExtensionInterface;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Extension\ExtensionTrait;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
/**
* @author Yonel Ceruto <yonelceruto@gmail.com>
*
* @internal
*/
class BundleExtension extends Extension implements PrependExtensionInterface
{
use ExtensionTrait;
public function __construct(
private ConfigurableExtensionInterface $subject,
private string $alias,
) {
}
public function getConfiguration(array $config, ContainerBuilder $container): ?ConfigurationInterface
{
return new Configuration($this->subject, $container, $this->getAlias());
}
public function getAlias(): string
{
return $this->alias;
}
public function prepend(ContainerBuilder $container): void
{
$callback = function (ContainerConfigurator $configurator) use ($container) {
$this->subject->prependExtension($configurator, $container);
};
$this->executeConfiguratorCallback($container, $callback, $this->subject, true);
}
public function load(array $configs, ContainerBuilder $container): void
{
$config = $this->processConfiguration($this->getConfiguration([], $container), $configs);
$callback = function (ContainerConfigurator $configurator) use ($config, $container) {
$this->subject->loadExtension($config, $configurator, $container);
};
$this->executeConfiguratorCallback($container, $callback, $this->subject);
}
}
================================================
FILE: Bundle/BundleInterface.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Bundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
/**
* BundleInterface.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface BundleInterface
{
/**
* Boots the Bundle.
*/
public function boot(): void;
/**
* Shutdowns the Bundle.
*/
public function shutdown(): void;
/**
* Builds 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 function getContainerExtension(): ?ExtensionInterface;
/**
* Returns the bundle name (the class short name).
*/
public function getName(): string;
/**
* Gets the Bundle namespace.
*/
public function getNamespace(): string;
/**
* Gets the Bundle directory path.
*
* The path should always be returned as a Unix path (with /).
*/
public function getPath(): string;
public function setContainer(?ContainerInterface $container): void;
}
================================================
FILE: CHANGELOG.md
================================================
CHANGELOG
=========
8.1
---
* Add `#[MapRequestHeader]` to map a header from `Request` to a controller argument
* Add `hasErrors()` method to `Profile` to track profiles with errors (exceptions or error-level logs)
* Validate typed route parameters before calling controllers and return an HTTP error when an invalid value is provided
* Add `ControllerAttributeEvent` et al. to dispatch events named after controller attributes
* Add support for `UploadedFile` when using `MapRequestPayload`
* Add support for bundles as compiler pass
* Add support for `SOURCE_DATE_EPOCH` environment variable
* Add property `$controllerMetadata` to several kernel events to give listeners access to controller metadata
* Add `Request` attribute `_controller_attributes` to decouple controller attributes from their source code
* Return attributes as a flat list when using `Controller[Arguments]Event::getAttributes('*')`
* Pass `request` and `args` variables to `Cache` attribute expressions containing the `Request` object and controller arguments
* Allow using closures with the `Cache` attribute
* Allow setting a condition when the `Cache` attribute should be applied
* Add `ControllerEvent::evaluate()` et al. to help with evaluating expressions or closures in controller attributes
* Deprecate passing a non-flat list of attributes to `Controller::setController()`
* Deprecate the `Symfony\Component\HttpKernel\DependencyInjection\Extension` class, use the parent `Symfony\Component\DependencyInjection\Extension\Extension` class instead
* Allow using Expression or \Closure for `validationGroups` in `#[MapRequestPayload]` and `#[MapQueryString]`
* Deprecate passing a `ControllerArgumentsEvent` to the `ViewEvent` constructor; pass a `ControllerArgumentsMetadata` instead
* Support variadic argument with `#[MapRequestPayload]`
* Add `#[Serialize]` to serialize values returned by controllers
* Add argument `$mapWhenEmpty` to `MapQueryString` and `MapRequestPayload` for always attempting denormalization with empty query and request payload
8.0
---
* Remove `AddAnnotatedClassesToCachePass`
* Remove `Extension::getAnnotatedClassesToCompile()` and `Extension::addAnnotatedClassesToCompile()`
* Remove `Kernel::getAnnotatedClassesToCompile()` and `Kernel::setAnnotatedClassCache()`
* Make `ServicesResetter` class `final`
* Add argument `$logChannel` to `ErrorListener::logException()`
* Add argument `$event` to `DumpListener::configure()`
* Replace `__sleep/wakeup()` by `__(un)serialize()` on kernels and data collectors
* Add method `getShareDir()` to `KernelInterface`
7.4
---
* Add support for the `QUERY` HTTP method
* Deprecate implementing `__sleep/wakeup()` on kernels; use `__(un)serialize()` instead
* Deprecate implementing `__sleep/wakeup()` on data collectors; use `__(un)serialize()` instead
* Add `#[IsSignatureValid]` attribute to validate URI signatures
* Make `Profile` final and `Profiler::__sleep()` internal
* Collect the application runner class
* Allow configuring `DumpListener` to use a different dumper when CLI profiling is enabled
7.3
---
* Record a `waiting` trace in the `HttpCache` when the cache had to wait for another request to finish
* Add `$key` argument to `#[MapQueryString]` that allows using a specific key for argument resolving
* Support `Uid` in `#[MapQueryParameter]`
* Add `ServicesResetterInterface`, implemented by `ServicesResetter`
* Allow configuring the logging channel per type of exceptions in ErrorListener
7.2
---
* Remove `@internal` flag and add `@final` to `ServicesResetter`
* Add support for `SYMFONY_DISABLE_RESOURCE_TRACKING` env var
* Add support for configuring trusted proxies/headers/hosts via env vars
7.1
---
* Add method `isKernelTerminating()` to `ExceptionEvent` that allows to check if an exception was thrown while the kernel is being terminated
* Add `HttpException::fromStatusCode()`
* Add `$validationFailedStatusCode` argument to `#[MapQueryParameter]` that allows setting a custom HTTP status code when validation fails
* Add `NearMissValueResolverException` to let value resolvers report when an argument could be under their watch but failed to be resolved
* Add `$type` argument to `#[MapRequestPayload]` that allows mapping a list of items
* The `Extension` class is marked as internal, extend the `Extension` class from the DependencyInjection component instead
* Deprecate `Extension::addAnnotatedClassesToCompile()`
* Deprecate `AddAnnotatedClassesToCachePass`
* Deprecate the `setAnnotatedClassCache()` and `getAnnotatedClassesToCompile()` methods of the `Kernel` class
* Add `#[MapUploadedFile]` attribute to fetch, validate, and inject uploaded files into controller arguments
7.0
---
* Add argument `$reflector` to `ArgumentResolverInterface::getArguments()` and `ArgumentMetadataFactoryInterface::createArgumentMetadata()`
* Remove `ArgumentValueResolverInterface`, use `ValueResolverInterface` instead
* Remove `StreamedResponseListener`
* Remove `AbstractSurrogate::$phpEscapeMap`
* Remove `HttpKernelInterface::MASTER_REQUEST`
* Remove `terminate_on_cache_hit` option from `HttpCache`
* Require explicit argument when calling `ConfigDataCollector::setKernel()`, `RouterListener::setCurrentRequest()`
* Remove `Kernel::stripComments()`
* Remove `FileLinkFormatter`, use `FileLinkFormatter` from the ErrorHandler component instead
* Remove `UriSigner`, use `UriSigner` from the HttpFoundation component instead
* Add argument `$buildDir` to `WarmableInterface`
* Add argument `$filter` to `Profiler::find()` and `FileProfilerStorage::find()`
6.4
---
* Support backed enums in #[MapQueryParameter]
* `BundleInterface` no longer extends `ContainerAwareInterface`
* Add optional `$className` parameter to `ControllerEvent::getAttributes()`
* Add native return types to `TraceableEventDispatcher` and to `MergeExtensionConfigurationPass`
* Add argument `$validationFailedStatusCode` to `#[MapQueryString]` and `#[MapRequestPayload]`
* Add argument `$debug` to `Logger`
* Add class `DebugLoggerConfigurator`
* Add parameters `kernel.runtime_mode` and `kernel.runtime_mode.*`, all set from env var `APP_RUNTIME_MODE`
* Deprecate `Kernel::stripComments()`
* Support the `!` character at the beginning of a string as a negation operator in the url filter of the profiler
* Deprecate `UriSigner`, use `UriSigner` from the HttpFoundation component instead
* Deprecate `FileLinkFormatter`, use `FileLinkFormatter` from the ErrorHandler component instead
* Add argument `$buildDir` to `WarmableInterface`
* Add argument `$filter` to `Profiler::find()` and `FileProfilerStorage::find()`
* Add `ControllerResolver::allowControllers()` to define which callables are legit controllers when the `_check_controller_is_allowed` request attribute is set
6.3
---
* Deprecate parameters `container.dumper.inline_factories` and `container.dumper.inline_class_loader`, use `.container.dumper.inline_factories` and `.container.dumper.inline_class_loader` instead
* `FileProfilerStorage` removes profiles automatically after two days
* Add `#[WithHttpStatus]` for defining status codes for exceptions
* Use an instance of `Psr\Clock\ClockInterface` to generate the current date time in `DateTimeValueResolver`
* Add `#[WithLogLevel]` for defining log levels for exceptions
* Add `skip_response_headers` to the `HttpCache` options
* Introduce targeted value resolvers with `#[ValueResolver]` and `#[AsTargetedValueResolver]`
* Add `#[MapRequestPayload]` to map and validate request payload from `Request::getContent()` or `Request::$request->all()` to typed objects
* Add `#[MapQueryString]` to map and validate request query string from `Request::$query->all()` to typed objects
* Add `#[MapQueryParameter]` to map and validate individual query parameters to controller arguments
* Collect data from every event dispatcher
6.2
---
* Add constructor argument `bool $handleAllThrowable` to `HttpKernel`
* Add `ControllerEvent::getAttributes()` to handle attributes on controllers
* Add `#[Cache]` to describe the default HTTP cache headers on controllers
* Add `absolute_uri` option to surrogate fragment renderers
* Add `ValueResolverInterface` and deprecate `ArgumentValueResolverInterface`
* Add argument `$reflector` to `ArgumentResolverInterface` and `ArgumentMetadataFactoryInterface`
* Deprecate calling `ConfigDataCollector::setKernel()`, `RouterListener::setCurrentRequest()` without arguments
6.1
---
* Add `BackedEnumValueResolver` to resolve backed enum cases from request attributes in controller arguments
* Add `DateTimeValueResolver` to resolve request attributes into DateTime objects in controller arguments
* Deprecate StreamedResponseListener, it's not needed anymore
* Add `Profiler::isEnabled()` so collaborating collector services may elect to omit themselves
* Add the `UidValueResolver` argument value resolver
* Add `AbstractBundle` class for DI configuration/definition on a single file
* Update the path of a bundle placed in the `src/` directory to the parent directory when `AbstractBundle` is used
6.0
---
* Remove `ArgumentInterface`
* Remove `ArgumentMetadata::getAttribute()`, use `getAttributes()` instead
* Remove support for returning a `ContainerBuilder` from `KernelInterface::registerContainerConfiguration()`
* Remove `KernelEvent::isMasterRequest()`, use `isMainRequest()` instead
* Remove support for `service:action` syntax to reference controllers, use `serviceOrFqcn::method` instead
5.4
---
* Add the ability to enable the profiler using a request query parameter, body parameter or attribute
* Deprecate `AbstractTestSessionListener` and `TestSessionListener`, use `AbstractSessionListener` and `SessionListener` instead
* Deprecate the `fileLinkFormat` parameter of `DebugHandlersListener`
* Add support for configuring log level, and status code by exception class
* Allow ignoring "kernel.reset" methods that don't exist with "on_invalid" attribute
5.3
---
* Deprecate `ArgumentInterface`
* Add `ArgumentMetadata::getAttributes()`
* Deprecate `ArgumentMetadata::getAttribute()`, use `getAttributes()` instead
* Mark the class `Symfony\Component\HttpKernel\EventListener\DebugHandlersListener` as internal
* Deprecate returning a `ContainerBuilder` from `KernelInterface::registerContainerConfiguration()`
* Deprecate `HttpKernelInterface::MASTER_REQUEST` and add `HttpKernelInterface::MAIN_REQUEST` as replacement
* Deprecate `KernelEvent::isMasterRequest()` and add `isMainRequest()` as replacement
* Add `#[AsController]` attribute for declaring standalone controllers on PHP 8
* Add `FragmentUriGeneratorInterface` and `FragmentUriGenerator` to generate the URI of a fragment
5.2.0
-----
* added session usage
* made the public `http_cache` service handle requests when available
* allowed enabling trusted hosts and proxies using new `kernel.trusted_hosts`,
`kernel.trusted_proxies` and `kernel.trusted_headers` parameters
* content of request parameter `_password` is now also hidden
in the request profiler raw content section
* Allowed adding attributes on controller arguments that will be passed to argument resolvers.
* kernels implementing the `ExtensionInterface` will now be auto-registered to the container
* added parameter `kernel.runtime_environment`, defined as `%env(default:kernel.environment:APP_RUNTIME_ENV)%`
* do not set a default `Accept` HTTP header when using `HttpKernelBrowser`
5.1.0
-----
* allowed to use a specific logger channel for deprecations
* made `WarmableInterface::warmUp()` return a list of classes or files to preload on PHP 7.4+;
not returning an array is deprecated
* made kernels implementing `WarmableInterface` be part of the cache warmup stage
* deprecated support for `service:action` syntax to reference controllers, use `serviceOrFqcn::method` instead
* allowed using public aliases to reference controllers
* added session usage reporting when the `_stateless` attribute of the request is set to `true`
* added `AbstractSessionListener::onSessionUsage()` to report when the session is used while a request is stateless
5.0.0
-----
* removed support for getting the container from a non-booted kernel
* removed the first and second constructor argument of `ConfigDataCollector`
* removed `ConfigDataCollector::getApplicationName()`
* removed `ConfigDataCollector::getApplicationVersion()`
* removed support for `Symfony\Component\Templating\EngineInterface` in `HIncludeFragmentRenderer`, use a `Twig\Environment` only
* removed `TranslatorListener` in favor of `LocaleAwareListener`
* removed `getRootDir()` and `getName()` from `Kernel` and `KernelInterface`
* removed `FilterControllerArgumentsEvent`, use `ControllerArgumentsEvent` instead
* removed `FilterControllerEvent`, use `ControllerEvent` instead
* removed `FilterResponseEvent`, use `ResponseEvent` instead
* removed `GetResponseEvent`, use `RequestEvent` instead
* removed `GetResponseForControllerResultEvent`, use `ViewEvent` instead
* removed `GetResponseForExceptionEvent`, use `ExceptionEvent` instead
* removed `PostResponseEvent`, use `TerminateEvent` instead
* removed `SaveSessionListener` in favor of `AbstractSessionListener`
* removed `Client`, use `HttpKernelBrowser` instead
* added method `getProjectDir()` to `KernelInterface`
* removed methods `serialize` and `unserialize` from `DataCollector`, store the serialized state in the data property instead
* made `ProfilerStorageInterface` internal
* removed the second and third argument of `KernelInterface::locateResource`
* removed the second and third argument of `FileLocator::__construct`
* removed loading resources from `%kernel.root_dir%/Resources` and `%kernel.root_dir%` as
fallback directories.
* removed class `ExceptionListener`, use `ErrorListener` instead
4.4.0
-----
* The `DebugHandlersListener` class has been marked as `final`
* Added new Bundle directory convention consistent with standard skeletons
* Deprecated the second and third argument of `KernelInterface::locateResource`
* Deprecated the second and third argument of `FileLocator::__construct`
* Deprecated loading resources from `%kernel.root_dir%/Resources` and `%kernel.root_dir%` as
fallback directories. Resources like service definitions are usually loaded relative to the
current directory or with a glob pattern. The fallback directories have never been advocated
so you likely do not use those in any app based on the SF Standard or Flex edition.
* Marked all dispatched event classes as `@final`
* Added `ErrorController` to enable the preview and error rendering mechanism
* Getting the container from a non-booted kernel is deprecated.
* Marked the `AjaxDataCollector`, `ConfigDataCollector`, `EventDataCollector`,
`ExceptionDataCollector`, `LoggerDataCollector`, `MemoryDataCollector`,
`RequestDataCollector` and `TimeDataCollector` classes as `@final`.
* Marked the `RouterDataCollector::collect()` method as `@final`.
* The `DataCollectorInterface::collect()` and `Profiler::collect()` methods third parameter signature
will be `\Throwable $exception = null` instead of `\Exception $exception = null` in Symfony 5.0.
* Deprecated methods `ExceptionEvent::get/setException()`, use `get/setThrowable()` instead
* Deprecated class `ExceptionListener`, use `ErrorListener` instead
4.3.0
-----
* renamed `Client` to `HttpKernelBrowser`
* `KernelInterface` doesn't extend `Serializable` anymore
* deprecated the `Kernel::serialize()` and `unserialize()` methods
* increased the priority of `Symfony\Component\HttpKernel\EventListener\AddRequestFormatsListener`
* made `Symfony\Component\HttpKernel\EventListener\LocaleListener` set the default locale early
* deprecated `TranslatorListener` in favor of `LocaleAwareListener`
* added the registration of all `LocaleAwareInterface` implementations into the `LocaleAwareListener`
* made `FileLinkFormatter` final and not implement `Serializable` anymore
* the base `DataCollector` doesn't implement `Serializable` anymore, you should
store all the serialized state in the data property instead
* `DumpDataCollector` has been marked as `final`
* added an event listener to prevent search engines from indexing applications in debug mode.
* renamed `FilterControllerArgumentsEvent` to `ControllerArgumentsEvent`
* renamed `FilterControllerEvent` to `ControllerEvent`
* renamed `FilterResponseEvent` to `ResponseEvent`
* renamed `GetResponseEvent` to `RequestEvent`
* renamed `GetResponseForControllerResultEvent` to `ViewEvent`
* renamed `GetResponseForExceptionEvent` to `ExceptionEvent`
* renamed `PostResponseEvent` to `TerminateEvent`
* added `HttpClientKernel` for handling requests with an `HttpClientInterface` instance
* added `trace_header` and `trace_level` configuration options to `HttpCache`
4.2.0
-----
* deprecated `KernelInterface::getRootDir()` and the `kernel.root_dir` parameter
* deprecated `KernelInterface::getName()` and the `kernel.name` parameter
* deprecated the first and second constructor argument of `ConfigDataCollector`
* deprecated `ConfigDataCollector::getApplicationName()`
* deprecated `ConfigDataCollector::getApplicationVersion()`
4.1.0
-----
* added orphaned events support to `EventDataCollector`
* `ExceptionListener` now logs exceptions at priority `0` (previously logged at `-128`)
* Added support for using `service::method` to reference controllers, making it consistent with other cases. It is recommended over the `service:action` syntax with a single colon, which will be deprecated in the future.
* Added the ability to profile individual argument value resolvers via the
`Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver`
4.0.0
-----
* removed the `DataCollector::varToString()` method, use `DataCollector::cloneVar()`
instead
* using the `DataCollector::cloneVar()` method requires the VarDumper component
* removed the `ValueExporter` class
* removed `ControllerResolverInterface::getArguments()`
* removed `TraceableControllerResolver::getArguments()`
* removed `ControllerResolver::getArguments()` and the ability to resolve arguments
* removed the `argument_resolver` service dependency from the `debug.controller_resolver`
* removed `LazyLoadingFragmentHandler::addRendererService()`
* removed `Psr6CacheClearer::addPool()`
* removed `Extension::addClassesToCompile()` and `Extension::getClassesToCompile()`
* removed `Kernel::loadClassCache()`, `Kernel::doLoadClassCache()`, `Kernel::setClassCache()`,
and `Kernel::getEnvParameters()`
* support for the `X-Status-Code` when handling exceptions in the `HttpKernel`
has been dropped, use the `HttpKernel::allowCustomResponseCode()` method
instead
* removed convention-based commands registration
* removed the `ChainCacheClearer::add()` method
* removed the `CacheaWarmerAggregate::add()` and `setWarmers()` methods
* made `CacheWarmerAggregate` and `ChainCacheClearer` classes final
3.4.0
-----
* added a minimalist PSR-3 `Logger` class that writes in `stderr`
* made kernels implementing `CompilerPassInterface` able to process the container
* deprecated bundle inheritance
* added `RebootableInterface` and implemented it in `Kernel`
* deprecated commands auto registration
* deprecated `EnvParametersResource`
* added `Symfony\Component\HttpKernel\Client::catchExceptions()`
* deprecated the `ChainCacheClearer::add()` method
* deprecated the `CacheaWarmerAggregate::add()` and `setWarmers()` methods
* made `CacheWarmerAggregate` and `ChainCacheClearer` classes final
* added the possibility to reset the profiler to its initial state
* deprecated data collectors without a `reset()` method
* deprecated implementing `DebugLoggerInterface` without a `clear()` method
3.3.0
-----
* added `kernel.project_dir` and `Kernel::getProjectDir()`
* deprecated `kernel.root_dir` and `Kernel::getRootDir()`
* deprecated `Kernel::getEnvParameters()`
* deprecated the special `SYMFONY__` environment variables
* added the possibility to change the query string parameter used by `UriSigner`
* deprecated `LazyLoadingFragmentHandler::addRendererService()`
* deprecated `Extension::addClassesToCompile()` and `Extension::getClassesToCompile()`
* deprecated `Psr6CacheClearer::addPool()`
3.2.0
-----
* deprecated `DataCollector::varToString()`, use `cloneVar()` instead
* changed surrogate capability name in `AbstractSurrogate::addSurrogateCapability` to 'symfony'
* Added `ControllerArgumentValueResolverPass`
3.1.0
-----
* deprecated passing objects as URI attributes to the ESI and SSI renderers
* deprecated `ControllerResolver::getArguments()`
* added `Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface`
* added `Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface` as argument to `HttpKernel`
* added `Symfony\Component\HttpKernel\Controller\ArgumentResolver`
* added `Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::getMethod()`
* added `Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::getRedirect()`
* added the `kernel.controller_arguments` event, triggered after controller arguments have been resolved
3.0.0
-----
* removed `Symfony\Component\HttpKernel\Kernel::init()`
* removed `Symfony\Component\HttpKernel\Kernel::isClassInActiveBundle()` and `Symfony\Component\HttpKernel\KernelInterface::isClassInActiveBundle()`
* removed `Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher::setProfiler()`
* removed `Symfony\Component\HttpKernel\EventListener\FragmentListener::getLocalIpAddresses()`
* removed `Symfony\Component\HttpKernel\EventListener\LocaleListener::setRequest()`
* removed `Symfony\Component\HttpKernel\EventListener\RouterListener::setRequest()`
* removed `Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest()`
* removed `Symfony\Component\HttpKernel\Fragment\FragmentHandler::setRequest()`
* removed `Symfony\Component\HttpKernel\HttpCache\Esi::hasSurrogateEsiCapability()`
* removed `Symfony\Component\HttpKernel\HttpCache\Esi::addSurrogateEsiCapability()`
* removed `Symfony\Component\HttpKernel\HttpCache\Esi::needsEsiParsing()`
* removed `Symfony\Component\HttpKernel\HttpCache\HttpCache::getEsi()`
* removed `Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel`
* removed `Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass`
* removed `Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener`
* removed `Symfony\Component\HttpKernel\EventListener\EsiListener`
* removed `Symfony\Component\HttpKernel\HttpCache\EsiResponseCacheStrategy`
* removed `Symfony\Component\HttpKernel\HttpCache\EsiResponseCacheStrategyInterface`
* removed `Symfony\Component\HttpKernel\Log\LoggerInterface`
* removed `Symfony\Component\HttpKernel\Log\NullLogger`
* removed `Symfony\Component\HttpKernel\Profiler::import()`
* removed `Symfony\Component\HttpKernel\Profiler::export()`
2.8.0
-----
* deprecated `Profiler::import` and `Profiler::export`
2.7.0
-----
* added the HTTP status code to profiles
2.6.0
-----
* deprecated `Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener`, use `Symfony\Component\HttpKernel\EventListener\DebugHandlersListener` instead
* deprecated unused method `Symfony\Component\HttpKernel\Kernel::isClassInActiveBundle` and `Symfony\Component\HttpKernel\KernelInterface::isClassInActiveBundle`
2.5.0
-----
* deprecated `Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass`, use `Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass` instead
2.4.0
-----
* added event listeners for the session
* added the KernelEvents::FINISH_REQUEST event
2.3.0
-----
* [BC BREAK] renamed `Symfony\Component\HttpKernel\EventListener\DeprecationLoggerListener` to `Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener` and changed its constructor
* deprecated `Symfony\Component\HttpKernel\Debug\ErrorHandler`, `Symfony\Component\HttpKernel\Debug\ExceptionHandler`,
`Symfony\Component\HttpKernel\Exception\FatalErrorException` and `Symfony\Component\HttpKernel\Exception\FlattenException`
* deprecated `Symfony\Component\HttpKernel\Kernel::init()`
* added the possibility to specify an id an extra attributes to hinclude tags
* added the collect of data if a controller is a Closure in the Request collector
* pass exceptions from the ExceptionListener to the logger using the logging context to allow for more
detailed messages
2.2.0
-----
* [BC BREAK] the path info for sub-request is now always _fragment (or whatever you configured instead of the default)
* added Symfony\Component\HttpKernel\EventListener\FragmentListener
* added Symfony\Component\HttpKernel\UriSigner
* added Symfony\Component\HttpKernel\FragmentRenderer and rendering strategies (in Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface)
* added Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel
* added ControllerReference to create reference of Controllers (used in the FragmentRenderer class)
* [BC BREAK] renamed TimeDataCollector::getTotalTime() to
TimeDataCollector::getDuration()
* updated the MemoryDataCollector to include the memory used in the
kernel.terminate event listeners
* moved the Stopwatch classes to a new component
* added TraceableControllerResolver
* added TraceableEventDispatcher (removed ContainerAwareTraceableEventDispatcher)
* added support for WinCache opcode cache in ConfigDataCollector
2.1.0
-----
* [BC BREAK] the charset is now configured via the Kernel::getCharset() method
* [BC BREAK] the current locale for the user is not stored anymore in the session
* added the HTTP method to the profiler storage
* updated all listeners to implement EventSubscriberInterface
* added TimeDataCollector
* added ContainerAwareTraceableEventDispatcher
* moved TraceableEventDispatcherInterface to the EventDispatcher component
* added RouterListener, LocaleListener, and StreamedResponseListener
* added CacheClearerInterface (and ChainCacheClearer)
* added a kernel.terminate event (via TerminableInterface and PostResponseEvent)
* added a Stopwatch class
* added WarmableInterface
* improved extensibility between bundles
* added profiler storages for Memcache(d), File-based, MongoDB, Redis
* moved Filesystem class to its own component
================================================
FILE: CacheClearer/CacheClearerInterface.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\CacheClearer;
/**
* CacheClearerInterface.
*
* @author Dustin Dobervich <ddobervich@gmail.com>
*/
interface CacheClearerInterface
{
/**
* Clears any caches necessary.
*/
public function clear(string $cacheDir): void;
}
================================================
FILE: CacheClearer/ChainCacheClearer.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\CacheClearer;
/**
* ChainCacheClearer.
*
* @author Dustin Dobervich <ddobervich@gmail.com>
*
* @final
*/
class ChainCacheClearer implements CacheClearerInterface
{
/**
* @param iterable<mixed, CacheClearerInterface> $clearers
*/
public function __construct(
private iterable $clearers = [],
) {
}
public function clear(string $cacheDir): void
{
foreach ($this->clearers as $clearer) {
$clearer->clear($cacheDir);
}
}
}
================================================
FILE: CacheClearer/Psr6CacheClearer.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\CacheClearer;
use Psr\Cache\CacheItemPoolInterface;
/**
* @author Nicolas Grekas <p@tchwork.com>
*/
class Psr6CacheClearer implements CacheClearerInterface
{
private array $pools = [];
/**
* @param array<string, CacheItemPoolInterface> $pools
*/
public function __construct(array $pools = [])
{
$this->pools = $pools;
}
public function hasPool(string $name): bool
{
return isset($this->pools[$name]);
}
/**
* @throws \InvalidArgumentException If the cache pool with the given name does not exist
*/
public function getPool(string $name): CacheItemPoolInterface
{
if (!$this->hasPool($name)) {
throw new \InvalidArgumentException(\sprintf('Cache pool not found: "%s".', $name));
}
return $this->pools[$name];
}
/**
* @throws \InvalidArgumentException If the cache pool with the given name does not exist
*/
public function clearPool(string $name): bool
{
if (!isset($this->pools[$name])) {
throw new \InvalidArgumentException(\sprintf('Cache pool not found: "%s".', $name));
}
return $this->pools[$name]->clear();
}
public function clear(string $cacheDir): void
{
foreach ($this->pools as $pool) {
$pool->clear();
}
}
}
================================================
FILE: CacheWarmer/CacheWarmer.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\CacheWarmer;
/**
* Abstract cache warmer that knows how to write a file to the cache.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
abstract class CacheWarmer implements CacheWarmerInterface
{
protected function writeCacheFile(string $file, $content): void
{
$tmpFile = @tempnam(\dirname($file), basename($file));
if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) {
@chmod($file, 0o666 & ~umask());
return;
}
throw new \RuntimeException(\sprintf('Failed to write cache file "%s".', $file));
}
}
================================================
FILE: CacheWarmer/CacheWarmerAggregate.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\CacheWarmer;
use Symfony\Component\Console\Style\SymfonyStyle;
/**
* Aggregates several cache warmers into a single one.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class CacheWarmerAggregate implements CacheWarmerInterface
{
private bool $optionalsEnabled = false;
private bool $onlyOptionalsEnabled = false;
/**
* @param iterable<mixed, CacheWarmerInterface> $warmers
*/
public function __construct(
private iterable $warmers = [],
private bool $debug = false,
private ?string $deprecationLogsFilepath = null,
) {
}
public function enableOptionalWarmers(): void
{
$this->optionalsEnabled = true;
}
public function enableOnlyOptionalWarmers(): void
{
$this->onlyOptionalsEnabled = $this->optionalsEnabled = true;
}
public function warmUp(string $cacheDir, ?string $buildDir = null, ?SymfonyStyle $io = null): array
{
if ($collectDeprecations = $this->debug && !\defined('PHPUNIT_COMPOSER_INSTALL')) {
$collectedLogs = [];
$previousHandler = set_error_handler(static function ($type, $message, $file, $line) use (&$collectedLogs, &$previousHandler) {
if (\E_USER_DEPRECATED !== $type && \E_DEPRECATED !== $type) {
return $previousHandler ? $previousHandler($type, $message, $file, $line) : false;
}
if (isset($collectedLogs[$message])) {
++$collectedLogs[$message]['count'];
return null;
}
$backtrace = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 3);
// Clean the trace by removing first frames added by the error handler itself.
for ($i = 0; isset($backtrace[$i]); ++$i) {
if (isset($backtrace[$i]['file'], $backtrace[$i]['line']) && $backtrace[$i]['line'] === $line && $backtrace[$i]['file'] === $file) {
$backtrace = \array_slice($backtrace, 1 + $i);
break;
}
}
$collectedLogs[$message] = [
'type' => $type,
'message' => $message,
'file' => $file,
'line' => $line,
'trace' => $backtrace,
'count' => 1,
];
return null;
});
}
$preload = [];
try {
foreach ($this->warmers as $warmer) {
if (!$this->optionalsEnabled && $warmer->isOptional()) {
continue;
}
if ($this->onlyOptionalsEnabled && !$warmer->isOptional()) {
continue;
}
$start = microtime(true);
foreach ($warmer->warmUp($cacheDir, $buildDir) as $item) {
if (is_dir($item) || (str_starts_with($item, \dirname($cacheDir)) && !is_file($item)) || ($buildDir && str_starts_with($item, \dirname($buildDir)) && !is_file($item))) {
throw new \LogicException(\sprintf('"%s::warmUp()" should return a list of files or classes but "%s" is none of them.', $warmer::class, $item));
}
$preload[] = $item;
}
if ($io?->isDebug()) {
$io->info(\sprintf('"%s" completed in %0.2fms.', $warmer::class, 1000 * (microtime(true) - $start)));
}
}
} finally {
if ($collectDeprecations) {
restore_error_handler();
if (is_file($this->deprecationLogsFilepath)) {
$previousLogs = unserialize(file_get_contents($this->deprecationLogsFilepath));
if (\is_array($previousLogs)) {
$collectedLogs = array_merge($previousLogs, $collectedLogs);
}
}
file_put_contents($this->deprecationLogsFilepath, serialize(array_values($collectedLogs)));
}
}
return array_values(array_unique($preload));
}
public function isOptional(): bool
{
return false;
}
}
================================================
FILE: CacheWarmer/CacheWarmerInterface.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\CacheWarmer;
/**
* Interface for classes able to warm up the cache.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface CacheWarmerInterface extends WarmableInterface
{
/**
* Checks whether this warmer is optional or not.
*
* Optional warmers can be ignored on certain conditions.
*
* A warmer should return true if the cache can be
* generated incrementally and on-demand.
*/
public function isOptional(): bool;
}
================================================
FILE: CacheWarmer/WarmableInterface.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\CacheWarmer;
/**
* Interface for classes that support warming their cache.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface WarmableInterface
{
/**
* Warms up the cache.
*
* @param string $cacheDir Where warm-up artifacts should be stored
* @param string|null $buildDir Where read-only artifacts should go; null when called after compile-time
*
* @return string[] A list of classes or files to preload
*/
public function warmUp(string $cacheDir, ?string $buildDir = null): array;
}
================================================
FILE: Config/FileLocator.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Config;
use Symfony\Component\Config\FileLocator as BaseFileLocator;
use Symfony\Component\HttpKernel\KernelInterface;
/**
* FileLocator uses the KernelInterface to locate resources in bundles.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class FileLocator extends BaseFileLocator
{
public function __construct(
private KernelInterface $kernel,
) {
parent::__construct();
}
public function locate(string $file, ?string $currentPath = null, bool $first = true): string|array
{
if (isset($file[0]) && '@' === $file[0]) {
$resource = $this->kernel->locateResource($file);
return $first ? $resource : [$resource];
}
return parent::locate($file, $currentPath, $first);
}
}
================================================
FILE: Controller/ArgumentResolver/BackedEnumValueResolver.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* Attempt to resolve backed enum cases from request attributes, for a route path parameter,
* leading to a 404 Not Found if the attribute value isn't a valid backing value for the enum type.
*
* @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
*/
final class BackedEnumValueResolver implements ValueResolverInterface
{
public function resolve(Request $request, ArgumentMetadata $argument): iterable
{
if (!is_subclass_of($argument->getType(), \BackedEnum::class)) {
return [];
}
if ($argument->isVariadic()) {
// only target route path parameters, which cannot be variadic.
return [];
}
$name = $argument->getName();
// do not support if no value can be resolved at all
// letting the \Symfony\Component\HttpKernel\Controller\ArgumentResolver\DefaultValueResolver be used
// or \Symfony\Component\HttpKernel\Controller\ArgumentResolver fail with a meaningful error.
if (!$request->attributes->has($name)) {
return [];
}
if (null === $value = $request->attributes->get($name)) {
return [null];
}
if ($value instanceof \BackedEnum) {
return [$value];
}
/** @var class-string<\BackedEnum> $type */
$type = $argument->getType();
if (!\is_int($value) && !\is_string($value)) {
throw new NotFoundHttpException(\sprintf('Could not resolve the "%s $%s" controller argument: expecting an int or string, got "%s".', $type, $name, get_debug_type($value)));
}
try {
return [$type::from($value)];
} catch (\ValueError|\TypeError $e) {
throw new NotFoundHttpException(\sprintf('Could not resolve the "%s $%s" controller argument: ', $type, $name).$e->getMessage(), $e);
}
}
}
================================================
FILE: Controller/ArgumentResolver/DateTimeValueResolver.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;
use Psr\Clock\ClockInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Attribute\MapDateTime;
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* Convert DateTime instances from request attribute variable.
*
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Tim Goudriaan <tim@codedmonkey.com>
*/
final class DateTimeValueResolver implements ValueResolverInterface
{
public function __construct(
private readonly ?ClockInterface $clock = null,
) {
}
public function resolve(Request $request, ArgumentMetadata $argument): array
{
if (!is_a($argument->getType(), \DateTimeInterface::class, true) || !$request->attributes->has($argument->getName())) {
return [];
}
$value = $request->attributes->get($argument->getName());
$class = \DateTimeInterface::class === $argument->getType() ? \DateTimeImmutable::class : $argument->getType();
if (!$value) {
if ($argument->isNullable()) {
return [null];
}
if (!$this->clock) {
return [new $class()];
}
$value = $this->clock->now();
}
if ($value instanceof \DateTimeInterface) {
return [$value instanceof $class ? $value : $class::createFromInterface($value)];
}
$format = null;
if ($attributes = $argument->getAttributes(MapDateTime::class, ArgumentMetadata::IS_INSTANCEOF)) {
$attribute = $attributes[0];
$format = $attribute->format;
}
if (null !== $format) {
$date = $class::createFromFormat($format, $value, $this->clock?->now()->getTimeZone());
if (($class::getLastErrors() ?: ['warning_count' => 0])['warning_count']) {
$date = false;
}
} else {
if (false !== filter_var($value, \FILTER_VALIDATE_INT, ['options' => ['min_range' => 0]])) {
$value = '@'.$value;
}
try {
$date = new $class($value, $this->clock?->now()->getTimeZone());
} catch (\Exception) {
$date = false;
}
}
if (!$date) {
throw new NotFoundHttpException(\sprintf('Invalid date given for parameter "%s".', $argument->getName()));
}
return [$date];
}
}
================================================
FILE: Controller/ArgumentResolver/DefaultValueResolver.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
/**
* Yields the default value defined in the action signature when no value has been given.
*
* @author Iltar van der Berg <kjarli@gmail.com>
*/
final class DefaultValueResolver implements ValueResolverInterface
{
public function resolve(Request $request, ArgumentMetadata $argument): array
{
if ($argument->hasDefaultValue()) {
return [$argument->getDefaultValue()];
}
if (null !== $argument->getType() && $argument->isNullable() && !$argument->isVariadic()) {
return [null];
}
return [];
}
}
================================================
FILE: Controller/ArgumentResolver/NotTaggedControllerValueResolver.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;
use Psr\Container\ContainerInterface;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
/**
* Provides an intuitive error message when controller fails because it is not registered as a service.
*
* @author Simeon Kolev <simeon.kolev9@gmail.com>
*/
final class NotTaggedControllerValueResolver implements ValueResolverInterface
{
public function __construct(
private ContainerInterface $container,
) {
}
public function resolve(Request $request, ArgumentMetadata $argument): array
{
$controller = $request->attributes->get('_controller');
if (\is_array($controller) && \is_callable($controller, true) && \is_string($controller[0])) {
$controller = $controller[0].'::'.$controller[1];
} elseif (!\is_string($controller) || '' === $controller) {
return [];
}
if ('\\' === $controller[0]) {
$controller = ltrim($controller, '\\');
}
if (!$this->container->has($controller)) {
$controller = (false !== $i = strrpos($controller, ':'))
? substr($controller, 0, $i).strtolower(substr($controller, $i))
: $controller.'::__invoke';
}
if ($this->container->has($controller)) {
return [];
}
$what = \sprintf('argument $%s of "%s()"', $argument->getName(), $controller);
$message = \sprintf('Could not resolve %s, maybe you forgot to register the controller as a service or missed tagging it with the "controller.service_arguments"?', $what);
throw new RuntimeException($message);
}
}
================================================
FILE: Controller/ArgumentResolver/QueryParameterValueResolver.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Attribute\MapQueryParameter;
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\Uid\AbstractUid;
/**
* Resolve arguments of type: array, string, int, float, bool, \BackedEnum from query parameters.
*
* @author Ruud Kamphuis <ruud@ticketswap.com>
* @author Nicolas Grekas <p@tchwork.com>
* @author Mateusz Anders <anders_mateusz@outlook.com>
* @author Ionut Enache <i.ovidiuenache@yahoo.com>
*/
final class QueryParameterValueResolver implements ValueResolverInterface
{
public function resolve(Request $request, ArgumentMetadata $argument): array
{
if (!$attribute = $argument->getAttributesOfType(MapQueryParameter::class)[0] ?? null) {
return [];
}
$name = $attribute->name ?? $argument->getName();
$validationFailedCode = $attribute->validationFailedStatusCode;
if (!$request->query->has($name)) {
if ($argument->isNullable() || $argument->hasDefaultValue()) {
return [];
}
throw HttpException::fromStatusCode($validationFailedCode, \sprintf('Missing query parameter "%s".', $name));
}
$value = $request->query->all()[$name];
$type = $argument->getType();
if (null === $attribute->filter && 'array' === $type) {
if (!$argument->isVariadic()) {
return [(array) $value];
}
$filtered = array_values(array_filter((array) $value, \is_array(...)));
if ($filtered !== $value && !($attribute->flags & \FILTER_NULL_ON_FAILURE)) {
throw HttpException::fromStatusCode($validationFailedCode, \sprintf('Invalid query parameter "%s".', $name));
}
return $filtered;
}
$options = [
'flags' => $attribute->flags | \FILTER_NULL_ON_FAILURE,
'options' => $attribute->options,
];
if ('array' === $type || $argument->isVariadic()) {
$value = (array) $value;
$options['flags'] |= \FILTER_REQUIRE_ARRAY;
} else {
$options['flags'] |= \FILTER_REQUIRE_SCALAR;
}
$uidType = null;
if (is_subclass_of($type, AbstractUid::class)) {
$uidType = $type;
$type = 'uid';
}
$enumType = null;
$filter = match ($type) {
'array' => \FILTER_DEFAULT,
'string' => isset($attribute->options['regexp']) ? \FILTER_VALIDATE_REGEXP : \FILTER_DEFAULT,
'int' => \FILTER_VALIDATE_INT,
'float' => \FILTER_VALIDATE_FLOAT,
'bool' => \FILTER_VALIDATE_BOOL,
'uid' => \FILTER_DEFAULT,
default => match ($enumType = is_subclass_of($type, \BackedEnum::class) ? (new \ReflectionEnum($type))->getBackingType()->getName() : null) {
'int' => \FILTER_VALIDATE_INT,
'string' => \FILTER_DEFAULT,
default => throw new \LogicException(\sprintf('#[MapQueryParameter] cannot be used on controller argument "%s$%s" of type "%s"; one of array, string, int, float, bool, uid or \BackedEnum should be used.', $argument->isVariadic() ? '...' : '', $argument->getName(), $type ?? 'mixed')),
},
};
$value = filter_var($value, $attribute->filter ?? $filter, $options);
if (null !== $enumType && null !== $value) {
$enumFrom = static function ($value) use ($type) {
if (!\is_string($value) && !\is_int($value)) {
return null;
}
try {
return $type::from($value);
} catch (\ValueError) {
return null;
}
};
$value = \is_array($value) ? array_map($enumFrom, $value) : $enumFrom($value);
}
if (null !== $uidType) {
$value = \is_array($value) ? array_map([$uidType, 'fromString'], $value) : $uidType::fromString($value);
}
if (null === $value && !($attribute->flags & \FILTER_NULL_ON_FAILURE)) {
throw HttpException::fromStatusCode($validationFailedCode, \sprintf('Invalid query parameter "%s".', $name));
}
if (!\is_array($value)) {
return [$value];
}
$filtered = array_filter($value, static fn ($v) => null !== $v);
if ($argument->isVariadic()) {
$filtered = array_values($filtered);
}
if ($filtered !== $value && !($attribute->flags & \FILTER_NULL_ON_FAILURE)) {
throw HttpException::fromStatusCode($validationFailedCode, \sprintf('Invalid query parameter "%s".', $name));
}
return $argument->isVariadic() ? $filtered : [$filtered];
}
}
================================================
FILE: Controller/ArgumentResolver/RequestAttributeValueResolver.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* Yields a non-variadic argument's value from the request attributes.
*
* @author Iltar van der Berg <kjarli@gmail.com>
*/
final class RequestAttributeValueResolver implements ValueResolverInterface
{
public function resolve(Request $request, ArgumentMetadata $argument): array
{
if ($argument->isVariadic()) {
return [];
}
$name = $argument->getName();
if (!$request->attributes->has($name)) {
return [];
}
$value = $request->attributes->get($name);
if (null === $value && $argument->isNullable()) {
return [null];
}
$type = $argument->getType();
// Skip when no type declaration or complex types; fall back to other resolvers/defaults
if (null === $type || str_contains($type, '|') || str_contains($type, '&')) {
return [$value];
}
if ('string' === $type) {
if (!\is_scalar($value) && !$value instanceof \Stringable) {
throw new NotFoundHttpException(\sprintf('The value for the "%s" route parameter is invalid.', $name));
}
$value = (string) $value;
} elseif ($filter = match ($type) {
'int' => \FILTER_VALIDATE_INT,
'float' => \FILTER_VALIDATE_FLOAT,
'bool' => \FILTER_VALIDATE_BOOL,
default => null,
}) {
if (null === $value = $request->attributes->filter($name, null, $filter, ['flags' => \FILTER_NULL_ON_FAILURE | \FILTER_REQUIRE_SCALAR])) {
throw new NotFoundHttpException(\sprintf('The value for the "%s" route parameter is invalid.', $name));
}
}
return [$value];
}
}
================================================
FILE: Controller/ArgumentResolver/RequestHeaderValueResolver.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;
use Symfony\Component\HttpFoundation\AcceptHeader;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Attribute\MapRequestHeader;
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
use Symfony\Component\HttpKernel\Exception\HttpException;
final class RequestHeaderValueResolver implements ValueResolverInterface
{
public function resolve(Request $request, ArgumentMetadata $argument): array
{
if (!$attribute = $argument->getAttributesOfType(MapRequestHeader::class)[0] ?? null) {
return [];
}
$type = $argument->getType();
if (!\in_array($type, ['string', 'array', AcceptHeader::class])) {
throw new \LogicException(\sprintf('Could not resolve the argument typed "%s". Valid types are "array", "string" or "%s".', $type, AcceptHeader::class));
}
$name = $attribute->name ?? strtolower(preg_replace('/[a-z]\K[A-Z]/', '-$0', $argument->getName()));
$value = null;
if ($request->headers->has($name)) {
$value = match ($type) {
'string' => $request->headers->get($name),
'array' => match (strtolower($name)) {
'accept' => $request->getAcceptableContentTypes(),
'accept-charset' => $request->getCharsets(),
'accept-language' => $request->getLanguages(),
'accept-encoding' => $request->getEncodings(),
default => $request->headers->all($name),
},
AcceptHeader::class => AcceptHeader::fromString($request->headers->get($name)),
};
} elseif ($argument->hasDefaultValue()) {
$value = $argument->getDefaultValue();
}
if (null === $value && 'array' === $type) {
$value = [];
}
if (null === $value && !$argument->isNullable()) {
throw HttpException::fromStatusCode($attribute->validationFailedStatusCode, \sprintf('Missing header "%s".', $name));
}
return [$value];
}
}
================================================
FILE: Controller/ArgumentResolver/RequestPayloadValueResolver.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\ExpressionLanguage\Expression;
use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Attribute\MapQueryString;
use Symfony\Component\HttpKernel\Attribute\MapRequestPayload;
use Symfony\Component\HttpKernel\Attribute\MapUploadedFile;
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
use Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\NearMissValueResolverException;
use Symfony\Component\HttpKernel\Exception\UnsupportedMediaTypeHttpException;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\Serializer\Exception\InvalidArgumentException as SerializerInvalidArgumentException;
use Symfony\Component\Serializer\Exception\NotEncodableValueException;
use Symfony\Component\Serializer\Exception\PartialDenormalizationException;
use Symfony\Component\Serializer\Exception\UnexpectedPropertyException;
use Symfony\Component\Serializer\Exception\UnsupportedFormatException;
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
use Symfony\Component\Serializer\SerializerInterface;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Constraints\GroupSequence;
use Symfony\Component\Validator\ConstraintViolation;
use Symfony\Component\Validator\ConstraintViolationList;
use Symfony\Component\Validator\Exception\ValidationFailedException;
use Symfony\Component\Validator\Validator\ValidatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
* @author Konstantin Myakshin <molodchick@gmail.com>
*
* @psalm-type GroupResolver = \Closure(array<string, mixed>, Request, ?object):string|GroupSequence|array<string>
*
* @final
*/
class RequestPayloadValueResolver implements ValueResolverInterface, EventSubscriberInterface
{
/**
* @see DenormalizerInterface::COLLECT_DENORMALIZATION_ERRORS
*/
private const CONTEXT_DENORMALIZE = [
'collect_denormalization_errors' => true,
];
/**
* @see DenormalizerInterface::COLLECT_DENORMALIZATION_ERRORS
*/
private const CONTEXT_DESERIALIZE = [
'collect_denormalization_errors' => true,
];
public function __construct(
private readonly SerializerInterface&DenormalizerInterface $serializer,
private readonly ?ValidatorInterface $validator = null,
private readonly ?TranslatorInterface $translator = null,
private string $translationDomain = 'validators',
private ?ExpressionLanguage $expressionLanguage = null,
) {
}
public function resolve(Request $request, ArgumentMetadata $argument): iterable
{
$attribute = $argument->getAttributesOfType(MapQueryString::class, ArgumentMetadata::IS_INSTANCEOF)[0]
?? $argument->getAttributesOfType(MapRequestPayload::class, ArgumentMetadata::IS_INSTANCEOF)[0]
?? $argument->getAttributesOfType(MapUploadedFile::class, ArgumentMetadata::IS_INSTANCEOF)[0]
?? null;
if (!$attribute) {
return [];
}
if ($attribute instanceof MapQueryString && $argument->isVariadic()) {
throw new \LogicException(\sprintf('Mapping variadic argument "$%s" is not supported.', $argument->getName()));
}
if ($attribute instanceof MapRequestPayload) {
if ('array' === $argument->getType()) {
if (!$attribute->type) {
throw new NearMissValueResolverException(\sprintf('Please set the $type argument of the #[%s] attribute to the type of the objects in the expected array.', MapRequestPayload::class));
}
} elseif ($attribute->type && !$argument->isVariadic()) {
throw new NearMissValueResolverException(\sprintf('Please set its type to "array" when using argument $type of #[%s].', MapRequestPayload::class));
}
}
$attribute->metadata = $argument;
return [$attribute];
}
public function onKernelControllerArguments(ControllerArgumentsEvent $event): void
{
$arguments = $event->getArguments();
foreach ($arguments as $i => $argument) {
if ($argument instanceof MapQueryString) {
$payloadMapper = $this->mapQueryString(...);
$validationFailedCode = $argument->validationFailedStatusCode;
} elseif ($argument instanceof MapRequestPayload) {
$payloadMapper = $this->mapRequestPayload(...);
$validationFailedCode = $argument->validationFailedStatusCode;
} elseif ($argument instanceof MapUploadedFile) {
$payloadMapper = $this->mapUploadedFile(...);
$validationFailedCode = $argument->validationFailedStatusCode;
} else {
continue;
}
$request = $event->getRequest();
if (!$argument->metadata->getType()) {
throw new \LogicException(\sprintf('Could not resolve the "$%s" controller argument: argument should be typed.', $argument->metadata->getName()));
}
if ($this->validator) {
$violations = new ConstraintViolationList();
try {
$payload = $payloadMapper($request, $argument->metadata, $argument);
} catch (PartialDenormalizationException $e) {
$trans = $this->translator ? $this->translator->trans(...) : static fn ($m, $p) => strtr($m, $p);
foreach ($e->getErrors() as $error) {
$parameters = [];
$template = 'This value was of an unexpected type.';
if ($expectedTypes = $error->getExpectedTypes()) {
$template = 'This value should be of type {{ type }}.';
$parameters['{{ type }}'] = implode('|', $expectedTypes);
}
if ($error->canUseMessageForUser()) {
$parameters['hint'] = $error->getMessage();
}
$message = $trans($template, $parameters, $this->translationDomain);
$violations->add(new ConstraintViolation($message, $template, $parameters, null, $error->getPath(), null));
}
$payload = $e->getData();
} catch (SerializerInvalidArgumentException $e) {
$violations->add(new ConstraintViolation($e->getMessage(), $e->getMessage(), [], null, '', null));
$payload = null;
}
if (null !== $payload && !\count($violations)) {
$constraints = $argument->constraints ?? null;
if (\is_array($payload) && !empty($constraints) && !$constraints instanceof Assert\All) {
$constraints = new Assert\All($constraints);
}
$groups = $this->resolveValidationGroups($argument->validationGroups ?? null, $event);
if ($argument instanceof MapUploadedFile) {
$violations->addAll($this->validator->startContext()->atPath($argument->metadata->getName())->validate($payload, $constraints, $groups)->getViolations());
} else {
$violations->addAll($this->validator->validate($payload, $constraints, $groups));
}
}
if (\count($violations)) {
throw HttpException::fromStatusCode($validationFailedCode, implode("\n", array_map(static fn ($e) => $e->getMessage(), iterator_to_array($violations))), new ValidationFailedException($payload, $violations));
}
} else {
try {
$payload = $payloadMapper($request, $argument->metadata, $argument);
} catch (PartialDenormalizationException $e) {
throw HttpException::fromStatusCode($validationFailedCode, implode("\n", array_map(static fn ($e) => $e->getMessage(), $e->getErrors())), $e);
} catch (SerializerInvalidArgumentException $e) {
throw HttpException::fromStatusCode($validationFailedCode, $e->getMessage(), $e);
}
}
if ($argument->metadata->isVariadic()) {
array_splice($arguments, $i, 1, $payload ?? []);
continue;
}
if (null === $payload) {
$payload = match (true) {
$argument->metadata->hasDefaultValue() => $argument->metadata->getDefaultValue(),
$argument->metadata->isNullable() => null,
default => throw HttpException::fromStatusCode($validationFailedCode),
};
}
$arguments[$i] = $payload;
}
$event->setArguments($arguments);
}
public static function getSubscribedEvents(): array
{
return [
KernelEvents::CONTROLLER_ARGUMENTS => 'onKernelControllerArguments',
];
}
private function mapQueryString(Request $request, ArgumentMetadata $argument, MapQueryString $attribute): ?object
{
if (!($data = $request->query->all($attribute->key)) && ($argument->isNullable() || $argument->hasDefaultValue()) && !$attribute->mapWhenEmpty) {
return null;
}
return $this->serializer->denormalize($data, $argument->getType(), 'csv', $attribute->serializationContext + self::CONTEXT_DENORMALIZE + ['filter_bool' => true]);
}
private function mapRequestPayload(Request $request, ArgumentMetadata $argument, MapRequestPayload $attribute): object|array|null
{
if ('' === $data = $request->request->all() ?: $request->getContent()) {
if ($attribute->mapWhenEmpty) {
$data = [];
} elseif ($argument->isNullable() || $argument->hasDefaultValue()) {
return null;
}
}
if (null === $format = $request->getContentTypeFormat()) {
throw new UnsupportedMediaTypeHttpException('Unsupported format.');
}
if ($attribute->acceptFormat && !\in_array($format, (array) $attribute->acceptFormat, true)) {
throw new UnsupportedMediaTypeHttpException(\sprintf('Unsupported format, expects "%s", but "%s" given.', implode('", "', (array) $attribute->acceptFormat), $format));
}
$type = match (true) {
$argument->isVariadic() => ($attribute->type ?? $argument->getType()).'[]',
'array' === $argument->getType() && null !== $attribute->type => $attribute->type.'[]',
default => $argument->getType(),
};
if (\is_array($data)) {
$data = $this->mergeParamsAndFiles($data, $request->files->all());
return $this->serializer->denormalize($data, $type, self::hasNonStringScalar($data) ? $format : 'csv', $attribute->serializationContext + self::CONTEXT_DENORMALIZE + ('form' === $format ? ['filter_bool' => true] : []));
}
if ('form' === $format) {
throw new BadRequestHttpException('Request payload contains invalid "form" data.');
}
try {
return $this->serializer->deserialize($data, $type, $format, self::CONTEXT_DESERIALIZE + $attribute->serializationContext);
} catch (UnsupportedFormatException $e) {
throw new UnsupportedMediaTypeHttpException(\sprintf('Unsupported format: "%s".', $format), $e);
} catch (NotEncodableValueException $e) {
throw new BadRequestHttpException(\sprintf('Request payload contains invalid "%s" data.', $format), $e);
} catch (UnexpectedPropertyException $e) {
throw new BadRequestHttpException(\sprintf('Request payload contains invalid "%s" property.', $e->property), $e);
}
}
private function mapUploadedFile(Request $request, ArgumentMetadata $argument, MapUploadedFile $attribute): UploadedFile|array|null
{
if ($files = $request->files->get($attribute->name ?? $argument->getName())) {
return !\is_array($files) && $argument->isVariadic() ? [$files] : $files;
}
if ($argument->isNullable() || $argument->hasDefaultValue()) {
return null;
}
return 'array' === $argument->getType() ? [] : null;
}
private function mergeParamsAndFiles(array $params, array $files): array
{
$isFilesList = array_is_list($files);
foreach ($params as $key => $value) {
if (\is_array($value) && \is_array($files[$key] ?? null)) {
$params[$key] = $this->mergeParamsAndFiles($value, $files[$key]);
unset($files[$key]);
}
}
if (!$isFilesList) {
return array_replace($params, $files);
}
foreach ($files as $value) {
$params[] = $value;
}
return $params;
}
private function resolveValidationGroups(Expression|string|GroupSequence|\Closure|array|null $validationGroups, ControllerArgumentsEvent $event): string|GroupSequence|array|null
{
if ($validationGroups instanceof Expression || $validationGroups instanceof \Closure) {
$validationGroups = $event->evaluate($validationGroups, $this->expressionLanguage);
}
if (null === $validationGroups || \is_string($validationGroups) || $validationGroups instanceof GroupSequence) {
return $validationGroups;
}
if (!\is_array($validationGroups)) {
throw new \LogicException('The validation groups expression or closure must return a string, an array of strings, or a GroupSequence.');
}
foreach ($validationGroups as $group) {
if ($group instanceof Expression) {
throw new \LogicException('Nested expressions in validation groups are not supported. Use a single Expression or a list of strings (or a GroupSequence) instead.');
}
if ($group instanceof \Closure) {
throw new \LogicException('Nested closures in validation groups are not supported. Use a single Closure or a list of strings (or a GroupSequence) instead.');
}
if ($group instanceof GroupSequence) {
throw new \LogicException('GroupSequence cannot be used inside an array of validation groups. Pass the GroupSequence as the top-level validationGroups value instead.');
}
if (!\is_string($group)) {
throw new \LogicException('Validation groups must be strings.');
}
}
return $validationGroups;
}
private static function hasNonStringScalar(array $data): bool
{
$stack = [$data];
while ($stack) {
foreach (array_pop($stack) as $v) {
if (\is_array($v)) {
$stack[] = $v;
} elseif (!\is_string($v)) {
return true;
}
}
}
return false;
}
}
================================================
FILE: Controller/ArgumentResolver/RequestValueResolver.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
use Symfony\Component\HttpKernel\Exception\NearMissValueResolverException;
/**
* Yields the same instance as the request object passed along.
*
* @author Iltar van der Berg <kjarli@gmail.com>
*/
final class RequestValueResolver implements ValueResolverInterface
{
public function resolve(Request $request, ArgumentMetadata $argument): array
{
if (Request::class === $argument->getType() || is_subclass_of($argument->getType(), Request::class)) {
return [$request];
}
if (str_ends_with($argument->getType() ?? '', '\\Request')) {
throw new NearMissValueResolverException(\sprintf('Looks like you required a Request object with the wrong class name "%s". Did you mean to use "%s" instead?', $argument->getType(), Request::class));
}
return [];
}
}
================================================
FILE: Controller/ArgumentResolver/ServiceValueResolver.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;
use Psr\Container\ContainerInterface;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
use Symfony\Component\HttpKernel\Exception\NearMissValueResolverException;
/**
* Yields a service keyed by _controller and argument name.
*
* @author Nicolas Grekas <p@tchwork.com>
*/
final class ServiceValueResolver implements ValueResolverInterface
{
public function __construct(
private ContainerInterface $container,
) {
}
public function resolve(Request $request, ArgumentMetadata $argument): array
{
$controller = $request->attributes->get('_controller');
if (\is_array($controller) && \is_callable($controller, true) && \is_string($controller[0])) {
$controller = $controller[0].'::'.$controller[1];
} elseif (!\is_string($controller) || '' === $controller) {
return [];
}
if ('\\' === $controller[0]) {
$controller = ltrim($controller, '\\');
}
if (!$this->container->has($controller) && false !== $i = strrpos($controller, ':')) {
$controller = substr($controller, 0, $i).strtolower(substr($controller, $i));
}
if (!$this->container->has($controller) || !$this->container->get($controller)->has($argument->getName())) {
return [];
}
try {
return [$this->container->get($controller)->get($argument->getName())];
} catch (RuntimeException $e) {
$what = 'argument $'.$argument->getName();
$message = str_replace(\sprintf('service "%s"', $argument->getName()), $what, $e->getMessage());
$what .= \sprintf(' of "%s()"', $controller);
$message = preg_replace('/service "\.service_locator\.[^"]++"/', $what, $message);
if ($e->getMessage() === $message) {
$message = \sprintf('Cannot resolve %s: %s', $what, $message);
}
throw new NearMissValueResolverException($message, $e->getCode(), $e);
}
}
}
================================================
FILE: Controller/ArgumentResolver/SessionValueResolver.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
/**
* Yields the Session.
*
* @author Iltar van der Berg <kjarli@gmail.com>
*/
final class SessionValueResolver implements ValueResolverInterface
{
public function resolve(Request $request, ArgumentMetadata $argument): array
{
if (!$request->hasSession()) {
return [];
}
$type = $argument->getType();
if (SessionInterface::class !== $type && !is_subclass_of($type, SessionInterface::class)) {
return [];
}
return $request->getSession() instanceof $type ? [$request->getSession()] : [];
}
}
================================================
FILE: Controller/ArgumentResolver/TraceableValueResolver.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
use Symfony\Component\Stopwatch\Stopwatch;
/**
* Provides timing information via the stopwatch.
*
* @author Iltar van der Berg <kjarli@gmail.com>
*/
final class TraceableValueResolver implements ValueResolverInterface
{
public function __construct(
private ValueResolverInterface $inner,
private Stopwatch $stopwatch,
) {
}
public function resolve(Request $request, ArgumentMetadata $argument): iterable
{
$method = $this->inner::class.'::'.__FUNCTION__;
$this->stopwatch->start($method, 'controller.argument_value_resolver');
yield from $this->inner->resolve($request, $argument);
$this->stopwatch->stop($method);
}
}
================================================
FILE: Controller/ArgumentResolver/UidValueResolver.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Uid\AbstractUid;
final class UidValueResolver implements ValueResolverInterface
{
public function resolve(Request $request, ArgumentMetadata $argument): array
{
if ($argument->isVariadic()
|| !\is_string($value = $request->attributes->get($argument->getName()))
|| null === ($uidClass = $argument->getType())
|| !is_subclass_of($uidClass, AbstractUid::class, true)
) {
return [];
}
try {
return [$uidClass::fromString($value)];
} catch (\InvalidArgumentException $e) {
throw new NotFoundHttpException(\sprintf('The uid for the "%s" parameter is invalid.', $argument->getName()), $e);
}
}
}
================================================
FILE: Controller/ArgumentResolver/VariadicValueResolver.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
/**
* Yields a variadic argument's values from the request attributes.
*
* @author Iltar van der Berg <kjarli@gmail.com>
*/
final class VariadicValueResolver implements ValueResolverInterface
{
public function resolve(Request $request, ArgumentMetadata $argument): array
{
if (!$argument->isVariadic() || !$request->attributes->has($argument->getName())) {
return [];
}
$values = $request->attributes->get($argument->getName());
if (!\is_array($values)) {
throw new \InvalidArgumentException(\sprintf('The action argument "...$%1$s" is required to be an array, the request attribute "%1$s" contains a type of "%2$s" instead.', $argument->getName(), get_debug_type($values)));
}
return $values;
}
}
================================================
FILE: Controller/ArgumentResolver.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller;
use Psr\Container\ContainerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Attribute\ValueResolver;
use Symfony\Component\HttpKernel\Controller\ArgumentResolver\DefaultValueResolver;
use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestAttributeValueResolver;
use Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestValueResolver;
use Symfony\Component\HttpKernel\Controller\ArgumentResolver\SessionValueResolver;
use Symfony\Component\HttpKernel\Controller\ArgumentResolver\VariadicValueResolver;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactory;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactoryInterface;
use Symfony\Component\HttpKernel\Exception\NearMissValueResolverException;
use Symfony\Component\HttpKernel\Exception\ResolverNotFoundException;
use Symfony\Contracts\Service\ServiceProviderInterface;
/**
* Responsible for resolving the arguments passed to an action.
*
* @author Iltar van der Berg <kjarli@gmail.com>
*/
final class ArgumentResolver implements ArgumentResolverInterface
{
private ArgumentMetadataFactoryInterface $argumentMetadataFactory;
private iterable $argumentValueResolvers;
/**
* @param iterable<mixed, ValueResolverInterface> $argumentValueResolvers
*/
public function __construct(
?ArgumentMetadataFactoryInterface $argumentMetadataFactory = null,
iterable $argumentValueResolvers = [],
private ?ContainerInterface $namedResolvers = null,
) {
$this->argumentMetadataFactory = $argumentMetadataFactory ?? new ArgumentMetadataFactory();
$this->argumentValueResolvers = $argumentValueResolvers ?: self::getDefaultArgumentValueResolvers();
}
public function getArguments(Request $request, callable $controller, ?\ReflectionFunctionAbstract $reflector = null): array
{
$arguments = [];
foreach ($this->argumentMetadataFactory->createArgumentMetadata($controller, $reflector) as $metadata) {
$argumentValueResolvers = $this->argumentValueResolvers;
$disabledResolvers = [];
if ($this->namedResolvers && $attributes = $metadata->getAttributesOfType(ValueResolver::class, $metadata::IS_INSTANCEOF)) {
$resolverName = null;
foreach ($attributes as $attribute) {
if ($attribute->disabled) {
$disabledResolvers[$attribute->resolver] = true;
} elseif ($resolverName) {
throw new \LogicException(\sprintf('You can only pin one resolver per argument, but argument "$%s" of "%s()" has more.', $metadata->getName(), $metadata->getControllerName()));
} else {
$resolverName = $attribute->resolver;
}
}
if ($resolverName) {
if (!$this->namedResolvers->has($resolverName)) {
throw new ResolverNotFoundException($resolverName, $this->namedResolvers instanceof ServiceProviderInterface ? array_keys($this->namedResolvers->getProvidedServices()) : []);
}
$argumentValueResolvers = [
$this->namedResolvers->get($resolverName),
new RequestAttributeValueResolver(),
new DefaultValueResolver(),
];
}
}
$valueResolverExceptions = [];
foreach ($argumentValueResolvers as $name => $resolver) {
if (isset($disabledResolvers[\is_int($name) ? $resolver::class : $name])) {
continue;
}
try {
$count = 0;
foreach ($resolver->resolve($request, $metadata) as $argument) {
++$count;
$arguments[] = $argument;
}
} catch (NearMissValueResolverException $e) {
$valueResolverExceptions[] = $e;
}
if (1 < $count && !$metadata->isVariadic()) {
throw new \InvalidArgumentException(\sprintf('"%s::resolve()" must yield at most one value for non-variadic arguments.', get_debug_type($resolver)));
}
if ($count) {
// continue to the next controller argument
continue 2;
}
}
$reasons = array_map(static fn (NearMissValueResolverException $e) => $e->getMessage(), $valueResolverExceptions);
if (!$reasons) {
$reasons[] = 'Either the argument is nullable and no null value has been provided, no default value has been provided or there is a non-optional argument after this one.';
}
$reasonCounter = 1;
if (\count($reasons) > 1) {
foreach ($reasons as $i => $reason) {
$reasons[$i] = $reasonCounter.') '.$reason;
++$reasonCounter;
}
}
throw new \RuntimeException(\sprintf('Controller "%s" requires the "$%s" argument that could not be resolved. '.($reasonCounter > 1 ? 'Possible reasons: ' : '').'%s', $metadata->getControllerName(), $metadata->getName(), implode(' ', $reasons)));
}
return $arguments;
}
/**
* @return iterable<int, ValueResolverInterface>
*/
public static function getDefaultArgumentValueResolvers(): iterable
{
return [
new RequestAttributeValueResolver(),
new RequestValueResolver(),
new SessionValueResolver(),
new DefaultValueResolver(),
new VariadicValueResolver(),
];
}
}
================================================
FILE: Controller/ArgumentResolverInterface.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller;
use Symfony\Component\HttpFoundation\Request;
/**
* An ArgumentResolverInterface instance knows how to determine the
* arguments for a specific action.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface ArgumentResolverInterface
{
/**
* Returns the arguments to pass to the controller.
*
* @throws \RuntimeException When no value could be provided for a required argument
*/
public function getArguments(Request $request, callable $controller, ?\ReflectionFunctionAbstract $reflector = null): array;
}
================================================
FILE: Controller/ContainerControllerResolver.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\DependencyInjection\Container;
/**
* A controller resolver searching for a controller in a psr-11 container when using the "service::method" notation.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
*/
class ContainerControllerResolver extends ControllerResolver
{
public function __construct(
protected ContainerInterface $container,
?LoggerInterface $logger = null,
) {
parent::__construct($logger);
}
protected function instantiateController(string $class): object
{
$class = ltrim($class, '\\');
if ($this->container->has($class)) {
return $this->container->get($class);
}
try {
return parent::instantiateController($class);
} catch (\Error $e) {
}
$this->throwExceptionIfControllerWasRemoved($class, $e);
if ($e instanceof \ArgumentCountError) {
throw new \InvalidArgumentException(\sprintf('Controller "%s" has required constructor arguments and does not exist in the container. Did you forget to define the controller as a service?', $class), 0, $e);
}
throw new \InvalidArgumentException(\sprintf('Controller "%s" does neither exist as service nor as class.', $class), 0, $e);
}
private function throwExceptionIfControllerWasRemoved(string $controller, \Throwable $previous): void
{
if ($this->container instanceof Container && isset($this->container->getRemovedIds()[$controller])) {
throw new \InvalidArgumentException(\sprintf('Controller "%s" cannot be fetched from the container because it is private. Did you forget to tag the service with "controller.service_arguments"?', $controller), 0, $previous);
}
}
}
================================================
FILE: Controller/ControllerReference.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller;
use Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface;
/**
* Acts as a marker and a data holder for a Controller.
*
* Some methods in Symfony accept both a URI (as a string) or a controller as
* an argument. In the latter case, instead of passing an array representing
* the controller, you can use an instance of this class.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @see FragmentRendererInterface
*/
class ControllerReference
{
public array $attributes = [];
public array $query = [];
/**
* @param string $controller The controller name
* @param array $attributes An array of parameters to add to the Request attributes
* @param array $query An array of parameters to add to the Request query string
*/
public function __construct(
public string $controller,
array $attributes = [],
array $query = [],
) {
$this->attributes = $attributes;
$this->query = $query;
}
}
================================================
FILE: Controller/ControllerResolver.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller;
use Psr\Log\LoggerInterface;
use Symfony\Component\HttpFoundation\Exception\BadRequestException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Attribute\AsController;
/**
* This implementation uses the '_controller' request attribute to determine
* the controller to execute.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Tobias Schultze <http://tobion.de>
*/
class ControllerResolver implements ControllerResolverInterface
{
private array $allowedControllerTypes = [];
private array $allowedControllerAttributes = [AsController::class => AsController::class];
public function __construct(
private ?LoggerInterface $logger = null,
) {
}
/**
* @param array<class-string> $types
* @param array<class-string> $attributes
*/
public function allowControllers(array $types = [], array $attributes = []): void
{
foreach ($types as $type) {
$this->allowedControllerTypes[$type] = $type;
}
foreach ($attributes as $attribute) {
$this->allowedControllerAttributes[$attribute] = $attribute;
}
}
/**
* @throws BadRequestException when the request has attribute "_check_controller_is_allowed" set to true and the controller is not allowed
*/
public function getController(Request $request): callable|false
{
if (!$controller = $request->attributes->get('_controller')) {
$this->logger?->warning('Unable to look for the controller as the "_controller" parameter is missing.');
return false;
}
if (\is_array($controller)) {
if (isset($controller[0]) && \is_string($controller[0]) && isset($controller[1])) {
try {
$controller[0] = $this->instantiateController($controller[0]);
} catch (\Error|\LogicException $e) {
if (\is_callable($controller)) {
return $this->checkController($request, $controller);
}
throw $e;
}
}
if (!\is_callable($controller)) {
throw new \InvalidArgumentException(\sprintf('The controller for URI "%s" is not callable: ', $request->getPathInfo()).$this->getControllerError($controller));
}
return $this->checkController($request, $controller);
}
if (\is_object($controller)) {
if (!\is_callable($controller)) {
throw new \InvalidArgumentException(\sprintf('The controller for URI "%s" is not callable: ', $request->getPathInfo()).$this->getControllerError($controller));
}
return $this->checkController($request, $controller);
}
if (\function_exists($controller)) {
return $this->checkController($request, $controller);
}
try {
$callable = $this->createController($controller);
} catch (\InvalidArgumentException $e) {
throw new \InvalidArgumentException(\sprintf('The controller for URI "%s" is not callable: ', $request->getPathInfo()).$e->getMessage(), 0, $e);
}
if (!\is_callable($callable)) {
throw new \InvalidArgumentException(\sprintf('The controller for URI "%s" is not callable: ', $request->getPathInfo()).$this->getControllerError($callable));
}
return $this->checkController($request, $callable);
}
/**
* Returns a callable for the given controller.
*
* @throws \InvalidArgumentException When the controller cannot be created
*/
protected function createController(string $controller): callable
{
if (!str_contains($controller, '::')) {
$controller = $this->instantiateController($controller);
if (!\is_callable($controller)) {
throw new \InvalidArgumentException($this->getControllerError($controller));
}
return $controller;
}
[$class, $method] = explode('::', $controller, 2);
try {
$controller = [$this->instantiateController($class), $method];
} catch (\Error|\LogicException $e) {
try {
if ((new \ReflectionMethod($class, $method))->isStatic()) {
return $class.'::'.$method;
}
} catch (\ReflectionException) {
throw $e;
}
throw $e;
}
if (!\is_callable($controller)) {
throw new \InvalidArgumentException($this->getControllerError($controller));
}
return $controller;
}
/**
* Returns an instantiated controller.
*/
protected function instantiateController(string $class): object
{
return new $class();
}
private function getControllerError(mixed $callable): string
{
if (\is_string($callable)) {
if (str_contains($callable, '::')) {
$callable = explode('::', $callable, 2);
} else {
return \sprintf('Function "%s" does not exist.', $callable);
}
}
if (\is_object($callable)) {
$availableMethods = $this->getClassMethodsWithoutMagicMethods($callable);
$alternativeMsg = $availableMethods ? \sprintf(' or use one of the available methods: "%s"', implode('", "', $availableMethods)) : '';
return \sprintf('Controller class "%s" cannot be called without a method name. You need to implement "__invoke"%s.', get_debug_type($callable), $alternativeMsg);
}
if (!\is_array($callable)) {
return \sprintf('Invalid type for controller given, expected string, array or object, got "%s".', get_debug_type($callable));
}
if (!isset($callable[0]) || !isset($callable[1]) || 2 !== \count($callable)) {
return 'Invalid array callable, expected [controller, method].';
}
[$controller, $method] = $callable;
if (\is_string($controller) && !class_exists($controller)) {
return \sprintf('Class "%s" does not exist.', $controller);
}
$className = \is_object($controller) ? get_debug_type($controller) : $controller;
if (method_exists($controller, $method)) {
return \sprintf('Method "%s" on class "%s" should be public and non-abstract.', $method, $className);
}
$collection = $this->getClassMethodsWithoutMagicMethods($controller);
$alternatives = [];
foreach ($collection as $item) {
$lev = levenshtein($method, $item);
if ($lev <= \strlen($method) / 3 || str_contains($item, $method)) {
$alternatives[] = $item;
}
}
asort($alternatives);
$message = \sprintf('Expected method "%s" on class "%s"', $method, $className);
if (\count($alternatives) > 0) {
$message .= \sprintf(', did you mean "%s"?', implode('", "', $alternatives));
} else {
$message .= \sprintf('. Available methods: "%s".', implode('", "', $collection));
}
return $message;
}
private function getClassMethodsWithoutMagicMethods($classOrObject): array
{
$methods = get_class_methods($classOrObject);
return array_filter($methods, static fn (string $method) => 0 !== strncmp($method, '__', 2));
}
private function checkController(Request $request, callable $controller): callable
{
if (!$request->attributes->get('_check_controller_is_allowed', false)) {
return $controller;
}
$r = null;
if (\is_array($controller)) {
[$class, $name] = $controller;
$name = (\is_string($class) ? $class : $class::class).'::'.$name;
} elseif (\is_object($controller) && !$controller instanceof \Closure) {
$class = $controller;
$name = $class::class.'::__invoke';
} else {
$r = new \ReflectionFunction($controller);
$name = $r->name;
if ($r->isAnonymous()) {
$name = $class = \Closure::class;
} elseif ($class = $r->getClosureCalledClass()) {
$class = $class->name;
$name = $class.'::'.$name;
}
}
if ($class) {
foreach ($this->allowedControllerTypes as $type) {
if (is_a($class, $type, true)) {
return $controller;
}
}
}
$r ??= new \ReflectionClass($class);
foreach ($r->getAttributes() as $attribute) {
if (isset($this->allowedControllerAttributes[$attribute->getName()])) {
return $controller;
}
}
if (str_contains($name, '@anonymous')) {
$name = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)?[0-9a-fA-F]++/', static fn ($m) => class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0], $name);
}
throw new BadRequestException(\sprintf('Callable "%s()" is not allowed as a controller. Did you miss tagging it with "#[AsController]" or registering its type with "%s::allowControllers()"?', $name, self::class));
}
}
================================================
FILE: Controller/ControllerResolverInterface.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller;
use Symfony\Component\HttpFoundation\Request;
/**
* A ControllerResolverInterface implementation knows how to determine the
* controller to execute based on a Request object.
*
* A Controller can be any valid PHP callable.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface ControllerResolverInterface
{
/**
* Returns the Controller instance associated with a Request.
*
* As several resolvers can exist for a single application, a resolver must
* return false when it is not able to determine the controller.
*
* The resolver must only throw an exception when it should be able to load a
* controller but cannot because of some errors made by the developer.
*
* @return callable|false A PHP callable representing the Controller,
* or false if this resolver is not able to determine the controller
*
* @throws \LogicException If a controller was found based on the request but it is not callable
*/
public function getController(Request $request): callable|false;
}
================================================
FILE: Controller/ErrorController.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller;
use Symfony\Component\ErrorHandler\ErrorRenderer\ErrorRendererInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\HttpKernelInterface;
/**
* Renders error or exception pages from a given FlattenException.
*
* @author Yonel Ceruto <yonelceruto@gmail.com>
* @author Matthias Pigulla <mp@webfactory.de>
*/
class ErrorController
{
public function __construct(
private HttpKernelInterface $kernel,
private string|object|array|null $controller,
private ErrorRendererInterface $errorRenderer,
) {
}
public function __invoke(\Throwable $exception): Response
{
$exception = $this->errorRenderer->render($exception);
return new Response($exception->getAsString(), $exception->getStatusCode(), $exception->getHeaders());
}
public function preview(Request $request, int $code): Response
{
/*
* This Request mimics the parameters set by
* \Symfony\Component\HttpKernel\EventListener\ErrorListener::duplicateRequest, with
* the additional "showException" flag.
*/
$subRequest = $request->duplicate(null, null, [
'_controller' => $this->controller,
'exception' => new HttpException($code, 'This is a sample exception.'),
'logger' => null,
'showException' => false,
]);
return $this->kernel->handle($subRequest, HttpKernelInterface::SUB_REQUEST);
}
}
================================================
FILE: Controller/TraceableArgumentResolver.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Stopwatch\Stopwatch;
/**
* @author Fabien Potencier <fabien@symfony.com>
*/
class TraceableArgumentResolver implements ArgumentResolverInterface
{
public function __construct(
private ArgumentResolverInterface $resolver,
private Stopwatch $stopwatch,
) {
}
public function getArguments(Request $request, callable $controller, ?\ReflectionFunctionAbstract $reflector = null): array
{
$e = $this->stopwatch->start('controller.get_arguments');
try {
return $this->resolver->getArguments($request, $controller, $reflector);
} finally {
$e->stop();
}
}
}
================================================
FILE: Controller/TraceableControllerResolver.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Stopwatch\Stopwatch;
/**
* @author Fabien Potencier <fabien@symfony.com>
*/
class TraceableControllerResolver implements ControllerResolverInterface
{
public function __construct(
private ControllerResolverInterface $resolver,
private Stopwatch $stopwatch,
) {
}
public function getController(Request $request): callable|false
{
$e = $this->stopwatch->start('controller.get_callable');
try {
return $this->resolver->getController($request);
} finally {
$e->stop();
}
}
}
================================================
FILE: Controller/ValueResolverInterface.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
/**
* Responsible for resolving the value of an argument based on its metadata.
*
* @author Nicolas Grekas <p@tchwork.com>
*/
interface ValueResolverInterface
{
/**
* Returns the possible value(s).
*/
public function resolve(Request $request, ArgumentMetadata $argument): iterable;
}
================================================
FILE: ControllerMetadata/ArgumentMetadata.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\ControllerMetadata;
/**
* Responsible for storing metadata of an argument.
*
* @author Iltar van der Berg <kjarli@gmail.com>
*/
class ArgumentMetadata
{
public const IS_INSTANCEOF = 2;
/**
* @param object[] $attributes
*/
public function __construct(
private string $name,
private ?string $type,
private bool $isVariadic,
private bool $hasDefaultValue,
private mixed $defaultValue,
private bool $isNullable = false,
private array $attributes = [],
private string $controllerName = 'n/a',
) {
$this->isNullable = $isNullable || null === $type || ($hasDefaultValue && null === $defaultValue);
}
/**
* Returns the name as given in PHP, $foo would yield "foo".
*/
public function getName(): string
{
return $this->name;
}
/**
* Returns the type of the argument.
*/
public function getType(): ?string
{
return $this->type;
}
/**
* Returns whether the argument is defined as "...$variadic".
*/
public function isVariadic(): bool
{
return $this->isVariadic;
}
/**
* Returns whether the argument has a default value.
*
* Implies whether an argument is optional.
*/
public function hasDefaultValue(): bool
{
return $this->hasDefaultValue;
}
/**
* Returns whether the argument accepts null values.
*/
public function isNullable(): bool
{
return $this->isNullable;
}
/**
* Returns the default value of the argument.
*
* @throws \LogicException if no default value is present; {@see self::hasDefaultValue()}
*/
public function getDefaultValue(): mixed
{
if (!$this->hasDefaultValue) {
throw new \LogicException(\sprintf('Argument $%s does not have a default value. Use "%s::hasDefaultValue()" to avoid this exception.', $this->name, __CLASS__));
}
return $this->defaultValue;
}
/**
* @param class-string $name
* @param self::IS_INSTANCEOF|0 $flags
*
* @return array<object>
*/
public function getAttributes(?string $name = null, int $flags = 0): array
{
if (!$name) {
return $this->attributes;
}
return $this->getAttributesOfType($name, $flags);
}
/**
* @template T of object
*
* @param class-string<T> $name
* @param self::IS_INSTANCEOF|0 $flags
*
* @return array<T>
*/
public function getAttributesOfType(string $name, int $flags = 0): array
{
$attributes = [];
if ($flags & self::IS_INSTANCEOF) {
foreach ($this->attributes as $attribute) {
if ($attribute instanceof $name) {
$attributes[] = $attribute;
}
}
} else {
foreach ($this->attributes as $attribute) {
if ($attribute::class === $name) {
$attributes[] = $attribute;
}
}
}
return $attributes;
}
public function getControllerName(): string
{
return $this->controllerName;
}
}
================================================
FILE: ControllerMetadata/ArgumentMetadataFactory.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\ControllerMetadata;
/**
* Builds {@see ArgumentMetadata} objects based on the given Controller.
*
* @author Iltar van der Berg <kjarli@gmail.com>
*/
final class ArgumentMetadataFactory implements ArgumentMetadataFactoryInterface
{
public function createArgumentMetadata(string|object|array $controller, ?\ReflectionFunctionAbstract $reflector = null): array
{
$arguments = [];
$reflector ??= new \ReflectionFunction($controller(...));
$controllerName = $this->getPrettyName($reflector);
foreach ($reflector->getParameters() as $param) {
$attributes = [];
foreach ($param->getAttributes() as $reflectionAttribute) {
if (class_exists($reflectionAttribute->getName())) {
$attributes[] = $reflectionAttribute->newInstance();
}
}
$arguments[] = new ArgumentMetadata($param->getName(), $this->getType($param), $param->isVariadic(), $param->isDefaultValueAvailable(), $param->isDefaultValueAvailable() ? $param->getDefaultValue() : null, $param->allowsNull(), $attributes, $controllerName);
}
return $arguments;
}
/**
* Returns an associated type to the given parameter if available.
*/
private function getType(\ReflectionParameter $parameter): ?string
{
if (!$type = $parameter->getType()) {
return null;
}
$name = $type instanceof \ReflectionNamedType ? $type->getName() : (string) $type;
return match (strtolower($name)) {
'self' => $parameter->getDeclaringClass()?->name,
'parent' => get_parent_class($parameter->getDeclaringClass()?->name ?? '') ?: null,
default => $name,
};
}
private function getPrettyName(\ReflectionFunctionAbstract $r): string
{
$name = $r->name;
if ($r instanceof \ReflectionMethod) {
return $r->class.'::'.$name;
}
if ($r->isAnonymous() || !$class = $r->getClosureCalledClass()) {
return $name;
}
return $class->name.'::'.$name;
}
}
================================================
FILE: ControllerMetadata/ArgumentMetadataFactoryInterface.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\ControllerMetadata;
/**
* Builds method argument data.
*
* @author Iltar van der Berg <kjarli@gmail.com>
*/
interface ArgumentMetadataFactoryInterface
{
/**
* @return ArgumentMetadata[]
*/
public function createArgumentMetadata(string|object|array $controller, ?\ReflectionFunctionAbstract $reflector = null): array;
}
================================================
FILE: DataCollector/AjaxDataCollector.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\DataCollector;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
/**
* @author Bart van den Burg <bart@burgov.nl>
*
* @final
*/
class AjaxDataCollector extends DataCollector
{
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
{
// all collecting is done client side
}
public function reset(): void
{
// all collecting is done client side
}
public function getName(): string
{
return 'ajax';
}
}
================================================
FILE: DataCollector/ConfigDataCollector.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\DataCollector;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Runtime\RunnerInterface;
use Symfony\Component\VarDumper\Caster\ClassStub;
use Symfony\Component\VarDumper\Cloner\Data;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class ConfigDataCollector extends DataCollector implements LateDataCollectorInterface
{
private KernelInterface $kernel;
/**
* Sets the Kernel associated with this Request.
*/
public function setKernel(KernelInterface $kernel): void
{
$this->kernel = $kernel;
}
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
{
$eom = \DateTimeImmutable::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_MAINTENANCE);
$eol = \DateTimeImmutable::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_LIFE);
$xdebugMode = getenv('XDEBUG_MODE') ?: \ini_get('xdebug.mode');
$this->data = [
'token' => $response->headers->get('X-Debug-Token'),
'symfony_version' => Kernel::VERSION,
'symfony_minor_version' => \sprintf('%s.%s', Kernel::MAJOR_VERSION, Kernel::MINOR_VERSION),
'symfony_lts' => 4 === Kernel::MINOR_VERSION,
'symfony_state' => $this->determineSymfonyState(),
'symfony_eom' => $eom->format('F Y'),
'symfony_eol' => $eol->format('F Y'),
'env' => isset($this->kernel) ? $this->kernel->getEnvironment() : 'n/a',
'debug' => isset($this->kernel) ? $this->kernel->isDebug() : 'n/a',
'php_version' => \PHP_VERSION,
'php_architecture' => \PHP_INT_SIZE * 8,
'php_intl_locale' => class_exists(\Locale::class, false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a',
'php_timezone' => date_default_timezone_get(),
'xdebug_enabled' => \extension_loaded('xdebug'),
'xdebug_status' => \extension_loaded('xdebug') ? ($xdebugMode && 'off' !== $xdebugMode ? 'Enabled ('.$xdebugMode.')' : 'Not enabled') : 'Not installed',
'apcu_enabled' => \extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOL),
'apcu_status' => \extension_loaded('apcu') ? (filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN) ? 'Enabled' : 'Not enabled') : 'Not installed',
'zend_opcache_enabled' => \extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOL),
'zend_opcache_status' => \extension_loaded('Zend OPcache') ? (filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) ? 'Enabled' : 'Not enabled') : 'Not installed',
'bundles' => [],
'sapi_name' => \PHP_SAPI,
'runner_class' => $this->determineRunnerClass(),
];
if (isset($this->kernel)) {
foreach ($this->kernel->getBundles() as $name => $bundle) {
$this->data['bundles'][$name] = new ClassStub($bundle::class);
}
}
if (preg_match('~^(\d+(?:\.\d+)*)(.+)?$~', $this->data['php_version'], $matches) && isset($matches[2])) {
$this->data['php_version'] = $matches[1];
$this->data['php_version_extra'] = $matches[2];
}
}
public function lateCollect(): void
{
$this->data = $this->cloneVar($this->data);
}
/**
* Gets the token.
*/
public function getToken(): ?string
{
return $this->data['token'];
}
/**
* Gets the Symfony version.
*/
public function getSymfonyVersion(): string
{
return $this->data['symfony_version'];
}
/**
* Returns the state of the current Symfony release
* as one of: unknown, dev, stable, eom, eol.
*/
public function getSymfonyState(): string
{
return $this->data['symfony_state'];
}
/**
* Returns the minor Symfony version used (without patch numbers of extra
* suffix like "RC", "beta", etc.).
*/
public function getSymfonyMinorVersion(): string
{
return $this->data['symfony_minor_version'];
}
public function isSymfonyLts(): bool
{
return $this->data['symfony_lts'];
}
/**
* Returns the human readable date when this Symfony version ends its
* maintenance period.
*/
public function getSymfonyEom(): string
{
return $this->data['symfony_eom'];
}
/**
* Returns the human readable date when this Symfony version reaches its
* "end of life" and won't receive bugs or security fixes.
*/
public function getSymfonyEol(): string
{
return $this->data['symfony_eol'];
}
/**
* Gets the PHP version.
*/
public function getPhpVersion(): string
{
return $this->data['php_version'];
}
/**
* Gets the PHP version extra part.
*/
public function getPhpVersionExtra(): ?string
{
return $this->data['php_version_extra'] ?? null;
}
public function getPhpArchitecture(): int
{
return $this->data['php_architecture'];
}
public function getPhpIntlLocale(): string
{
return $this->data['php_intl_locale'];
}
public function getPhpTimezone(): string
{
return $this->data['php_timezone'];
}
/**
* Gets the environment.
*/
public function getEnv(): string
{
return $this->data['env'];
}
/**
* Returns true if the debug is enabled.
*
* @return bool|string true if debug is enabled, false otherwise or a string if no kernel was set
*/
public function isDebug(): bool|string
{
return $this->data['debug'];
}
/**
* Returns true if the Xdebug is enabled.
*/
public function hasXdebug(): bool
{
return $this->data['xdebug_enabled'];
}
public function getXdebugStatus(): string
{
return $this->data['xdebug_status'];
}
/**
* Returns true if the function xdebug_info is available.
*/
public function hasXdebugInfo(): bool
{
return \function_exists('xdebug_info');
}
/**
* Returns true if APCu is enabled.
*/
public function hasApcu(): bool
{
return $this->data['apcu_enabled'];
}
public function getApcuStatus(): string
{
return $this->data['apcu_status'];
}
/**
* Returns true if Zend OPcache is enabled.
*/
public function hasZendOpcache(): bool
{
return $this->data['zend_opcache_enabled'];
}
public function getZendOpcacheStatus(): string
{
return $this->data['zend_opcache_status'];
}
public function getBundles(): array|Data
{
return $this->data['bundles'];
}
/**
* Gets the PHP SAPI name.
*/
public function getSapiName(): string
{
return $this->data['sapi_name'];
}
public function getRunnerClass(): ?string
{
return $this->data['runner_class'];
}
public function getName(): string
{
return 'config';
}
private function determineSymfonyState(): string
{
$now = new \DateTimeImmutable();
$eom = \DateTimeImmutable::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_MAINTENANCE)->modify('last day of this month');
$eol = \DateTimeImmutable::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_LIFE)->modify('last day of this month');
if ($now > $eol) {
$versionState = 'eol';
} elseif ($now > $eom) {
$versionState = 'eom';
} elseif ('' !== Kernel::EXTRA_VERSION) {
$versionState = 'dev';
} else {
$versionState = 'stable';
}
return $versionState;
}
private function determineRunnerClass(): ?string
{
$stack = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS);
for ($frame = end($stack); $frame; $frame = prev($stack)) {
if (!$class = $frame['class'] ?? null) {
continue;
}
if (is_a($class, RunnerInterface::class, true)) {
return $class;
}
}
return null;
}
}
================================================
FILE: DataCollector/DataCollector.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\DataCollector;
use Symfony\Component\VarDumper\Caster\CutStub;
use Symfony\Component\VarDumper\Caster\ReflectionCaster;
use Symfony\Component\VarDumper\Cloner\ClonerInterface;
use Symfony\Component\VarDumper\Cloner\Data;
use Symfony\Component\VarDumper\Cloner\Stub;
use Symfony\Component\VarDumper\Cloner\VarCloner;
/**
* DataCollector.
*
* Children of this class must store the collected data in the data property.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Bernhard Schussek <bschussek@symfony.com>
*/
abstract class DataCollector implements DataCollectorInterface
{
protected array|Data $data = [];
private ClonerInterface $cloner;
/**
* Converts the variable into a serializable Data instance.
*
* This array can be displayed in the template using
* the VarDumper component.
*/
protected function cloneVar(mixed $var): Data
{
if ($var instanceof Data) {
return $var;
}
if (!isset($this->cloner)) {
$this->cloner = new VarCloner();
$this->cloner->setMaxItems(-1);
$this->cloner->addCasters($this->getCasters());
}
return $this->cloner->cloneVar($var);
}
/**
* @return callable[] The casters to add to the cloner
*/
protected function getCasters(): array
{
return [
'*' => static function ($v, array $a, Stub $s, $isNested) {
if (!$v instanceof Stub) {
$b = $a;
foreach ($a as $k => $v) {
if (!\is_object($v) || $v instanceof \DateTimeInterface || $v instanceof Stub) {
continue;
}
try {
$a[$k] = $s = new CutStub($v);
if ($b[$k] === $s) {
// we've hit a non-typed reference
$a[$k] = $v;
}
} catch (\TypeError $e) {
// we've hit a typed reference
}
}
}
return $a;
},
] + ReflectionCaster::UNSET_CLOSURE_FILE_INFO;
}
public function __serialize(): array
{
return ['data' => $this->data];
}
public function __unserialize(array $data): void
{
$this->data = $data['data'] ?? $data["\0*\0data"];
}
public function reset(): void
{
$this->data = [];
}
}
================================================
FILE: DataCollector/DataCollectorInterface.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\DataCollector;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Contracts\Service\ResetInterface;
/**
* DataCollectorInterface.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface DataCollectorInterface extends ResetInterface
{
/**
* Collects data for the given Request and Response.
*/
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void;
/**
* Returns the name of the collector.
*/
public function getName(): string;
}
================================================
FILE: DataCollector/DumpDataCollector.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\DataCollector;
use Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Stopwatch\Stopwatch;
use Symfony\Component\VarDumper\Cloner\Data;
use Symfony\Component\VarDumper\Cloner\VarCloner;
use Symfony\Component\VarDumper\Dumper\CliDumper;
use Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider;
use Symfony\Component\VarDumper\Dumper\DataDumperInterface;
use Symfony\Component\VarDumper\Dumper\HtmlDumper;
use Symfony\Component\VarDumper\Server\Connection;
/**
* @author Nicolas Grekas <p@tchwork.com>
*
* @final
*/
class DumpDataCollector extends DataCollector implements DataDumperInterface
{
private string|FileLinkFormatter|false $fileLinkFormat;
private int $dataCount = 0;
private bool $isCollected = true;
private int $clonesCount = 0;
private int $clonesIndex = 0;
private array $rootRefs;
private string $charset;
private mixed $sourceContextProvider;
private bool $webMode;
public function __construct(
private ?Stopwatch $stopwatch = null,
string|FileLinkFormatter|null $fileLinkFormat = null,
?string $charset = null,
private ?RequestStack $requestStack = null,
private DataDumperInterface|Connection|null $dumper = null,
?bool $webMode = null,
) {
$fileLinkFormat = $fileLinkFormat ?: \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
$this->fileLinkFormat = $fileLinkFormat instanceof FileLinkFormatter && false === $fileLinkFormat->format('', 0) ? false : $fileLinkFormat;
$this->charset = $charset ?: \ini_get('php.output_encoding') ?: \ini_get('default_charset') ?: 'UTF-8';
$this->webMode = $webMode ?? !\in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true);
// All clones share these properties by reference:
$this->rootRefs = [
&$this->data,
&$this->dataCount,
&$this->isCollected,
&$this->clonesCount,
];
$this->sourceContextProvider = $dumper instanceof Connection && isset($dumper->getContextProviders()['source']) ? $dumper->getContextProviders()['source'] : new SourceContextProvider($this->charset);
}
public function __clone()
{
$this->clonesIndex = ++$this->clonesCount;
}
public function dump(Data $data): ?string
{
$this->stopwatch?->start('dump');
['name' => $name, 'file' => $file, 'line' => $line, 'file_excerpt' => $fileExcerpt] = $this->sourceContextProvider->getContext();
if (!$this->dumper || $this->dumper instanceof Connection && !$this->dumper->write($data)) {
$this->isCollected = false;
}
$context = $data->getContext();
$label = $context['label'] ?? '';
unset($context['label']);
$data = $data->withContext($context);
if ($this->dumper && !$this->dumper instanceof Connection) {
$this->doDump($this->dumper, $data, $name, $file, $line, $label);
}
if (!$this->dataCount) {
$this->data = [];
}
$this->data[] = compact('data', 'name', 'file', 'line', 'fileExcerpt', 'label');
++$this->dataCount;
$this->stopwatch?->stop('dump');
return null;
}
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
{
if (!$this->dataCount) {
$this->data = [];
}
// Sub-requests and programmatic calls stay in the collected profile.
if ($this->dumper || ($this->requestStack && $this->requestStack->getMainRequest() !== $request) || $request->isXmlHttpRequest() || $request->headers->has('Origin')) {
return;
}
// In all other conditions that remove the web debug toolbar, dumps are written on the output.
if (!$this->requestStack
|| !$response->headers->has('X-Debug-Token')
|| $response->isRedirection()
|| ($response->headers->has('Content-Type') && !str_contains($response->headers->get('Content-Type') ?? '', 'html'))
|| 'html' !== $request->getRequestFormat()
|| false === strripos($response->getContent(), '</body>')
) {
if ($response->headers->has('Content-Type') && str_contains($response->headers->get('Content-Type') ?? '', 'html')) {
$dumper = new HtmlDumper('php://output', $this->charset);
} else {
$dumper = new CliDumper('php://output', $this->charset);
}
$dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]);
foreach ($this->data as $dump) {
$this->doDump($dumper, $dump['data'], $dump['name'], $dump['file'], $dump['line'], $dump['label'] ?? '');
}
}
}
public function reset(): void
{
$this->stopwatch?->reset();
parent::reset();
$this->dataCount = 0;
$this->isCollected = true;
$this->clonesCount = 0;
$this->clonesIndex = 0;
}
public function __serialize(): array
{
if (!$this->dataCount) {
$this->data = [];
}
if ($this->clonesCount !== $this->clonesIndex) {
return [];
}
$this->data[] = $this->fileLinkFormat;
$this->data[] = $this->charset;
$this->dataCount = 0;
$this->isCollected = true;
return ['data' => $this->data];
}
public function __unserialize(array $data): void
{
$this->data = array_pop($data) ?? [];
$charset = array_pop($this->data);
$fileLinkFormat = array_pop($this->data);
$this->dataCount = \count($this->data);
foreach ($this->data as $dump) {
if (!\is_string($dump['name']) || !\is_string($dump['file']) || !\is_int($dump['line'])) {
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
}
}
self::__construct($this->stopwatch ?? null, \is_string($fileLinkFormat) || $fileLinkFormat instanceof FileLinkFormatter ? $fileLinkFormat : null, \is_string($charset) ? $charset : null);
}
public function getDumpsCount(): int
{
return $this->dataCount;
}
public function getDumps(string $format, int $maxDepthLimit = -1, int $maxItemsPerDepth = -1): array
{
$data = fopen('php://memory', 'r+');
if ('html' === $format) {
$dumper = new HtmlDumper($data, $this->charset);
$dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]);
} else {
throw new \InvalidArgumentException(\sprintf('Invalid dump format: "%s".', $format));
}
$dumps = [];
if (!$this->dataCount) {
return $this->data = [];
}
foreach ($this->data as $dump) {
$dumper->dump($dump['data']->withMaxDepth($maxDepthLimit)->withMaxItemsPerDepth($maxItemsPerDepth));
$dump['data'] = stream_get_contents($data, -1, 0);
ftruncate($data, 0);
rewind($data);
$dumps[] = $dump;
}
return $dumps;
}
public function getName(): string
{
return 'dump';
}
public function __destruct()
{
if (0 === $this->clonesCount-- && !$this->isCollected && $this->dataCount) {
$this->clonesCount = 0;
$this->isCollected = true;
$h = headers_list();
$i = \count($h);
array_unshift($h, 'Content-Type: '.\ini_get('default_mimetype'));
while (0 !== stripos($h[$i], 'Content-Type:')) {
--$i;
}
if ($this->webMode) {
$dumper = new HtmlDumper('php://output', $this->charset);
} else {
$dumper = new CliDumper('php://output', $this->charset);
}
$dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]);
foreach ($this->data as $i => $dump) {
$this->data[$i] = null;
$this->doDump($dumper, $dump['data'], $dump['name'], $dump['file'], $dump['line'], $dump['label'] ?? '');
}
$this->data = [];
$this->dataCount = 0;
}
}
private function doDump(DataDumperInterface $dumper, Data $data, string $name, string $file, int $line, string $label): void
{
if ($dumper instanceof CliDumper) {
$contextDumper = function ($name, $file, $line, $fmt, $label) {
$this->line = '' !== $label ? $this->style('meta', $label).' in ' : '';
if ($this instanceof HtmlDumper) {
if ($file) {
$s = $this->style('meta', '%s');
$f = strip_tags($this->style('', $file));
$name = strip_tags($this->style('', $name));
if ($fmt && $link = \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : $fmt->format($file, $line)) {
$name = \sprintf('<a href="%s" title="%s">'.$s.'</a>', strip_tags($this->style('', $link)), $f, $name);
} else {
$name = \sprintf('<abbr title="%s">'.$s.'</abbr>', $f, $name);
}
} else {
$name = $this->style('meta', $name);
}
$this->line .= $name.' on line '.$this->style('meta', $line).':';
} else {
$this->line .= $this->style('meta', $name).' on line '.$this->style('meta', $line).':';
}
$this->dumpLine(0);
};
$contextDumper = $contextDumper->bindTo($dumper, $dumper);
$contextDumper($name, $file, $line, $this->fileLinkFormat, $label);
} else {
$cloner = new VarCloner();
$dumper->dump($cloner->cloneVar(('' !== $label ? $label.' in ' : '').$name.' on line '.$line.':'));
}
$dumper->dump($data);
}
}
================================================
FILE: DataCollector/EventDataCollector.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\DataCollector;
use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\VarDumper\Cloner\Data;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\Service\ResetInterface;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @see TraceableEventDispatcher
*
* @final
*/
class EventDataCollector extends DataCollector implements LateDataCollectorInterface
{
/** @var iterable<EventDispatcherInterface> */
private iterable $dispatchers;
private ?Request $currentRequest = null;
/**
* @param iterable<EventDispatcherInterface>|EventDispatcherInterface|null $dispatchers
*/
public function __construct(
iterable|EventDispatcherInterface|null $dispatchers = null,
private ?RequestStack $requestStack = null,
private string $defaultDispatcher = 'event_dispatcher',
) {
if ($dispatchers instanceof EventDispatcherInterface) {
$dispatchers = [$this->defaultDispatcher => $dispatchers];
}
$this->dispatchers = $dispatchers ?? [];
}
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
{
$this->currentRequest = $this->requestStack && $this->requestStack->getMainRequest() !== $request ? $request : null;
$this->data = [];
}
public function reset(): void
{
parent::reset();
foreach ($this->dispatchers as $dispatcher) {
if ($dispatcher instanceof ResetInterface) {
$dispatcher->reset();
}
}
}
public function lateCollect(): void
{
foreach ($this->dispatchers as $name => $dispatcher) {
if (!$dispatcher instanceof TraceableEventDispatcher) {
continue;
}
$this->setCalledListeners($dispatcher->getCalledListeners($this->currentRequest), $name);
$this->setNotCalledListeners($dispatcher->getNotCalledListeners($this->currentRequest), $name);
$this->setOrphanedEvents($dispatcher->getOrphanedEvents($this->currentRequest), $name);
}
$this->data = $this->cloneVar($this->data);
}
public function getData(): array|Data
{
return $this->data;
}
/**
* @see TraceableEventDispatcher
*/
public function setCalledListeners(array $listeners, ?string $dispatcher = null): void
{
$this->data[$dispatcher ?? $this->defaultDispatcher]['called_listeners'] = $listeners;
}
/**
* @see TraceableEventDispatcher
*/
public function getCalledListeners(?string $dispatcher = null): array|Data
{
return $this->data[$dispatcher ?? $this->defaultDispatcher]['called_listeners'] ?? [];
}
/**
* @see TraceableEventDispatcher
*/
public function setNotCalledListeners(array $listeners, ?string $dispatcher = null): void
{
$this->data[$dispatcher ?? $this->defaultDispatcher]['not_called_listeners'] = $listeners;
}
/**
* @see TraceableEventDispatcher
*/
public function getNotCalledListeners(?string $dispatcher = null): array|Data
{
return $this->data[$dispatcher ?? $this->defaultDispatcher]['not_called_listeners'] ?? [];
}
/**
* @param array $events An array of orphaned events
*
* @see TraceableEventDispatcher
*/
public function setOrphanedEvents(array $events, ?string $dispatcher = null): void
{
$this->data[$dispatcher ?? $this->defaultDispatcher]['orphaned_events'] = $events;
}
/**
* @see TraceableEventDispatcher
*/
public function getOrphanedEvents(?string $dispatcher = null): array|Data
{
return $this->data[$dispatcher ?? $this->defaultDispatcher]['orphaned_events'] ?? [];
}
public function getName(): string
{
return 'events';
}
}
================================================
FILE: DataCollector/ExceptionDataCollector.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\DataCollector;
use Symfony\Component\ErrorHandler\Exception\FlattenException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class ExceptionDataCollector extends DataCollector
{
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
{
if (null !== $exception) {
$this->data = [
'exception' => FlattenException::createWithDataRepresentation($exception),
];
}
}
public function hasException(): bool
{
return isset($this->data['exception']);
}
public function getException(): \Exception|FlattenException
{
return $this->data['exception'];
}
public function getMessage(): string
{
return $this->data['exception']->getMessage();
}
public function getCode(): int|string
{
return $this->data['exception']->getCode();
}
public function getStatusCode(): int
{
return $this->data['exception']->getStatusCode();
}
public function getTrace(): array
{
return $this->data['exception']->getTrace();
}
public function getName(): string
{
return 'exception';
}
}
================================================
FILE: DataCollector/LateDataCollectorInterface.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\DataCollector;
/**
* LateDataCollectorInterface.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface LateDataCollectorInterface
{
/**
* Collects data as late as possible.
*/
public function lateCollect(): void;
}
================================================
FILE: DataCollector/LoggerDataCollector.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\DataCollector;
use Symfony\Component\ErrorHandler\Exception\SilencedErrorContext;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Log\DebugLoggerConfigurator;
use Symfony\Component\HttpKernel\Log\DebugLoggerInterface;
use Symfony\Component\VarDumper\Cloner\Data;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class LoggerDataCollector extends DataCollector implements LateDataCollectorInterface
{
private ?DebugLoggerInterface $logger;
private ?Request $currentRequest = null;
private ?array $processedLogs = null;
public function __construct(
?object $logger = null,
private ?string $containerPathPrefix = null,
private ?RequestStack $requestStack = null,
) {
$this->logger = DebugLoggerConfigurator::getDebugLogger($logger);
}
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
{
$this->currentRequest = $this->requestStack && $this->requestStack->getMainRequest() !== $request ? $request : null;
}
public function lateCollect(): void
{
if ($this->logger) {
$containerDeprecationLogs = $this->getContainerDeprecationLogs();
$this->data = $this->computeErrorsCount($containerDeprecationLogs);
// get compiler logs later (only when they are needed) to improve performance
$this->data['compiler_logs'] = [];
$this->data['compiler_logs_filepath'] = $this->containerPathPrefix.'Compiler.log';
$this->data['logs'] = $this->sanitizeLogs(array_merge($this->logger->getLogs($this->currentRequest), $containerDeprecationLogs));
$this->data = $this->cloneVar($this->data);
}
$this->currentRequest = null;
}
public function getLogs(): Data|array
{
return $this->data['logs'] ?? [];
}
public function getProcessedLogs(): array
{
if (null !== $this->processedLogs) {
return $this->processedLogs;
}
$rawLogs = $this->getLogs();
if ([] === $rawLogs) {
return $this->processedLogs = $rawLogs;
}
$logs = [];
foreach ($this->getLogs()->getValue() as $rawLog) {
$rawLogData = $rawLog->getValue();
if ($rawLogData['priority']->getValue() > 300) {
$logType = 'error';
} elseif (isset($rawLogData['scream']) && false === $rawLogData['scream']->getValue()) {
$logType = 'deprecation';
} elseif (isset($rawLogData['scream']) && true === $rawLogData['scream']->getValue()) {
$logType = 'silenced';
} else {
$logType = 'regular';
}
$logs[] = [
'type' => $logType,
'errorCount' => $rawLog['errorCount'] ?? 1,
'timestamp' => $rawLogData['timestamp_rfc3339']->getValue(),
'priority' => $rawLogData['priority']->getValue(),
'priorityName' => $rawLogData['priorityName']->getValue(),
'channel' => $rawLogData['channel']->getValue(),
'message' => $rawLogData['message'],
'context' => $rawLogData['context'],
];
}
// sort logs from oldest to newest
usort($logs, static fn ($logA, $logB) => $logA['timestamp'] <=> $logB['timestamp']);
return $this->processedLogs = $logs;
}
public function getFilters(): array
{
$filters = [
'channel' => [],
'priority' => [
'Debug' => 100,
'Info' => 200,
'Notice' => 250,
'Warning' => 300,
'Error' => 400,
'Critical' => 500,
'Alert' => 550,
'Emergency' => 600,
],
];
$allChannels = [];
foreach ($this->getProcessedLogs() as $log) {
if ('' === trim($log['channel'] ?? '')) {
continue;
}
$allChannels[] = $log['channel'];
}
$channels = array_unique($allChannels);
sort($channels);
$filters['channel'] = $channels;
return $filters;
}
public function getPriorities(): Data|array
{
return $this->data['priorities'] ?? [];
}
public function countErrors(): int
{
return $this->data['error_count'] ?? 0;
}
public function countDeprecations(): int
{
return $this->data['deprecation_count'] ?? 0;
}
public function countWarnings(): int
{
return $this->data['warning_count'] ?? 0;
}
public function countScreams(): int
{
return $this->data['scream_count'] ?? 0;
}
public function getCompilerLogs(): Data
{
return $this->cloneVar($this->getContainerCompilerLogs($this->data['compiler_logs_filepath'] ?? null));
}
public function getName(): string
{
return 'logger';
}
private function getContainerDeprecationLogs(): array
{
if (null === $this->containerPathPrefix || !is_file($file = $this->containerPathPrefix.'Deprecations.log')) {
return [];
}
if ('' === $logContent = trim(file_get_contents($file))) {
return [];
}
$bootTime = filemtime($file);
$logs = [];
foreach (unserialize($logContent) as $log) {
$log['context'] = ['exception' => new SilencedErrorContext($log['type'], $log['file'], $log['line'], $log['trace'], $log['count'])];
$log['timestamp'] = $bootTime;
$log['timestamp_rfc3339'] = (new \DateTimeImmutable())->setTimestamp($bootTime)->format(\DateTimeInterface::RFC3339_EXTENDED);
$log['priority'] = 100;
$log['priorityName'] = 'DEBUG';
$log['channel'] = null;
$log['scream'] = false;
unset($log['type'], $log['file'], $log['line'], $log['trace'], $log['count']);
$logs[] = $log;
}
return $logs;
}
private function getContainerCompilerLogs(?string $compilerLogsFilepath = null): array
{
if (!$compilerLogsFilepath || !is_file($compilerLogsFilepath)) {
return [];
}
$logs = [];
foreach (file($compilerLogsFilepath, \FILE_IGNORE_NEW_LINES) as $log) {
$log = explode(': ', $log, 2);
if (!isset($log[1]) || !preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+(?:\\\\[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+)++$/', $log[0])) {
$log = ['Unknown Compiler Pass', implode(': ', $log)];
}
$logs[$log[0]][] = ['message' => $log[1]];
}
return $logs;
}
private function sanitizeLogs(array $logs): array
{
$sanitizedLogs = [];
$silencedLogs = [];
foreach ($logs as $log) {
if (!$this->isSilencedOrDeprecationErrorLog($log)) {
$sanitizedLogs[] = $log;
continue;
}
$message = '_'.$log['message'];
$exception = $log['context']['exception'];
if ($exception instanceof SilencedErrorContext) {
if (isset($silencedLogs[$id = spl_object_id($exception)])) {
continue;
}
$silencedLogs[$id] = true;
if (!isset($sanitizedLogs[$message])) {
$sanitizedLogs[$message] = $log + [
'errorCount' => 0,
'scream' => true,
];
}
$sanitizedLogs[$message]['errorCount'] += $exception->count;
continue;
}
$errorId = hash('xxh128', "{$exception->getSeverity()}/{$exception->getLine()}/{$exception->getFile()}\0{$message}", true);
if (isset($sanitizedLogs[$errorId])) {
++$sanitizedLogs[$errorId]['errorCount'];
} else {
$log += [
'errorCount' => 1,
'scream' => false,
];
$sanitizedLogs[$errorId] = $log;
}
}
return array_values($sanitizedLogs);
}
private function isSilencedOrDeprecationErrorLog(array $log): bool
{
if (!isset($log['context']['exception'])) {
return false;
}
$exception = $log['context']['exception'];
if ($exception instanceof SilencedErrorContext) {
return true;
}
if ($exception instanceof \ErrorException && \in_array($exception->getSeverity(), [\E_DEPRECATED, \E_USER_DEPRECATED], true)) {
return true;
}
return false;
}
private function computeErrorsCount(array $containerDeprecationLogs): array
{
$silencedLogs = [];
$count = [
'error_count' => $this->logger->countErrors($this->currentRequest),
'deprecation_count' => 0,
'warning_count' => 0,
'scream_count' => 0,
'priorities' => [],
];
foreach ($this->logger->getLogs($this->currentRequest) as $log) {
if (isset($count['priorities'][$log['priority']])) {
++$count['priorities'][$log['priority']]['count'];
} else {
$count['priorities'][$log['priority']] = [
'count' => 1,
'name' => $log['priorityName'],
];
}
if ('WARNING' === $log['priorityName']) {
++$count['warning_count'];
}
if ($this->isSilencedOrDeprecationErrorLog($log)) {
$exception = $log['context']['exception'];
if ($exception instanceof SilencedErrorContext) {
if (isset($silencedLogs[$id = spl_object_id($exception)])) {
continue;
}
$silencedLogs[$id] = true;
$count['scream_count'] += $exception->count;
} else {
++$count['deprecation_count'];
}
}
}
foreach ($containerDeprecationLogs as $deprecationLog) {
$count['deprecation_count'] += $deprecationLog['context']['exception']->count;
}
ksort($count['priorities']);
return $count;
}
}
================================================
FILE: DataCollector/MemoryDataCollector.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\DataCollector;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class MemoryDataCollector extends DataCollector implements LateDataCollectorInterface
{
public function __construct()
{
$this->reset();
}
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
{
$this->updateMemoryUsage();
}
public function reset(): void
{
$this->data = [
'memory' => 0,
'memory_limit' => $this->convertToBytes(\ini_get('memory_limit')),
];
}
public function lateCollect(): void
{
$this->updateMemoryUsage();
}
public function getMemory(): int
{
return $this->data['memory'];
}
public function getMemoryLimit(): int|float
{
return $this->data['memory_limit'];
}
public function updateMemoryUsage(): void
{
$this->data['memory'] = memory_get_peak_usage(true);
}
public function getName(): string
{
return 'memory';
}
private function convertToBytes(string $memoryLimit): int|float
{
if ('-1' === $memoryLimit) {
return -1;
}
$memoryLimit = strtolower($memoryLimit);
$max = strtolower(ltrim($memoryLimit, '+'));
if (str_starts_with($max, '0x')) {
$max = \intval($max, 16);
} elseif (str_starts_with($max, '0')) {
$max = \intval($max, 8);
} else {
$max = (int) $max;
}
switch (substr($memoryLimit, -1)) {
case 't': $max *= 1024;
// no break
case 'g': $max *= 1024;
// no break
case 'm': $max *= 1024;
// no break
case 'k': $max *= 1024;
}
return $max;
}
}
================================================
FILE: DataCollector/RequestDataCollector.php
================================================
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\DataCollector;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\Cookie;
use Symfony\Component\HttpFoundation\ParameterBag;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\SessionBagInterface;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpKernel\Event\ControllerEvent;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\Process\Process;
use Symfony\Component\VarDumper\Cloner\Data;
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class RequestDataCollector extends DataCollector implements EventSubscriberInterface, LateDataCollectorInterface
{
/**
* @var \SplObjectStorage<Request, callable>
*/
private \SplObjectStorage $controllers;
private array $sessionUsages = [];
public function __construct(
private ?RequestStack $requestStack = null,
) {
$this->controllers = new \SplObjectStorage();
}
public function collect(R
gitextract_533_a94u/ ├── .gitattributes ├── .github/ │ ├── PULL_REQUEST_TEMPLATE.md │ └── workflows/ │ └── close-pull-request.yml ├── .gitignore ├── Attribute/ │ ├── AsController.php │ ├── AsTargetedValueResolver.php │ ├── Cache.php │ ├── IsSignatureValid.php │ ├── MapDateTime.php │ ├── MapQueryParameter.php │ ├── MapQueryString.php │ ├── MapRequestHeader.php │ ├── MapRequestPayload.php │ ├── MapUploadedFile.php │ ├── Serialize.php │ ├── ValueResolver.php │ ├── WithHttpStatus.php │ └── WithLogLevel.php ├── Bundle/ │ ├── AbstractBundle.php │ ├── Bundle.php │ ├── BundleExtension.php │ └── BundleInterface.php ├── CHANGELOG.md ├── CacheClearer/ │ ├── CacheClearerInterface.php │ ├── ChainCacheClearer.php │ └── Psr6CacheClearer.php ├── CacheWarmer/ │ ├── CacheWarmer.php │ ├── CacheWarmerAggregate.php │ ├── CacheWarmerInterface.php │ └── WarmableInterface.php ├── Config/ │ └── FileLocator.php ├── Controller/ │ ├── ArgumentResolver/ │ │ ├── BackedEnumValueResolver.php │ │ ├── DateTimeValueResolver.php │ │ ├── DefaultValueResolver.php │ │ ├── NotTaggedControllerValueResolver.php │ │ ├── QueryParameterValueResolver.php │ │ ├── RequestAttributeValueResolver.php │ │ ├── RequestHeaderValueResolver.php │ │ ├── RequestPayloadValueResolver.php │ │ ├── RequestValueResolver.php │ │ ├── ServiceValueResolver.php │ │ ├── SessionValueResolver.php │ │ ├── TraceableValueResolver.php │ │ ├── UidValueResolver.php │ │ └── VariadicValueResolver.php │ ├── ArgumentResolver.php │ ├── ArgumentResolverInterface.php │ ├── ContainerControllerResolver.php │ ├── ControllerReference.php │ ├── ControllerResolver.php │ ├── ControllerResolverInterface.php │ ├── ErrorController.php │ ├── TraceableArgumentResolver.php │ ├── TraceableControllerResolver.php │ └── ValueResolverInterface.php ├── ControllerMetadata/ │ ├── ArgumentMetadata.php │ ├── ArgumentMetadataFactory.php │ └── ArgumentMetadataFactoryInterface.php ├── DataCollector/ │ ├── AjaxDataCollector.php │ ├── ConfigDataCollector.php │ ├── DataCollector.php │ ├── DataCollectorInterface.php │ ├── DumpDataCollector.php │ ├── EventDataCollector.php │ ├── ExceptionDataCollector.php │ ├── LateDataCollectorInterface.php │ ├── LoggerDataCollector.php │ ├── MemoryDataCollector.php │ ├── RequestDataCollector.php │ ├── RouterDataCollector.php │ └── TimeDataCollector.php ├── Debug/ │ ├── ErrorHandlerConfigurator.php │ ├── TraceableEventDispatcher.php │ └── VirtualRequestStack.php ├── DependencyInjection/ │ ├── ConfigurableExtension.php │ ├── ControllerArgumentValueResolverPass.php │ ├── ControllerAttributesListenerPass.php │ ├── Extension.php │ ├── FragmentRendererPass.php │ ├── LazyLoadingFragmentHandler.php │ ├── LoggerPass.php │ ├── MergeExtensionConfigurationPass.php │ ├── RegisterControllerArgumentLocatorsPass.php │ ├── RegisterLocaleAwareServicesPass.php │ ├── RemoveEmptyControllerArgumentLocatorsPass.php │ ├── ResettableServicePass.php │ ├── ServicesResetter.php │ └── ServicesResetterInterface.php ├── Event/ │ ├── ControllerArgumentsEvent.php │ ├── ControllerArgumentsMetadata.php │ ├── ControllerAttributeEvent.php │ ├── ControllerEvent.php │ ├── ControllerMetadata.php │ ├── ExceptionEvent.php │ ├── FinishRequestEvent.php │ ├── KernelEvent.php │ ├── RequestEvent.php │ ├── ResponseEvent.php │ ├── TerminateEvent.php │ └── ViewEvent.php ├── EventListener/ │ ├── AbstractSessionListener.php │ ├── AddRequestFormatsListener.php │ ├── CacheAttributeListener.php │ ├── ControllerAttributesListener.php │ ├── DebugHandlersListener.php │ ├── DisallowRobotsIndexingListener.php │ ├── DumpListener.php │ ├── ErrorListener.php │ ├── FragmentListener.php │ ├── IsSignatureValidAttributeListener.php │ ├── LocaleAwareListener.php │ ├── LocaleListener.php │ ├── ProfilerListener.php │ ├── ResponseListener.php │ ├── RouterListener.php │ ├── SerializeControllerResultAttributeListener.php │ ├── SessionListener.php │ ├── SurrogateListener.php │ └── ValidateRequestListener.php ├── Exception/ │ ├── AccessDeniedHttpException.php │ ├── BadRequestHttpException.php │ ├── ConflictHttpException.php │ ├── ControllerDoesNotReturnResponseException.php │ ├── GoneHttpException.php │ ├── HttpException.php │ ├── HttpExceptionInterface.php │ ├── InvalidMetadataException.php │ ├── LengthRequiredHttpException.php │ ├── LockedHttpException.php │ ├── MethodNotAllowedHttpException.php │ ├── NearMissValueResolverException.php │ ├── NotAcceptableHttpException.php │ ├── NotFoundHttpException.php │ ├── PreconditionFailedHttpException.php │ ├── PreconditionRequiredHttpException.php │ ├── ResolverNotFoundException.php │ ├── ServiceUnavailableHttpException.php │ ├── TooManyRequestsHttpException.php │ ├── UnauthorizedHttpException.php │ ├── UnexpectedSessionUsageException.php │ ├── UnprocessableEntityHttpException.php │ └── UnsupportedMediaTypeHttpException.php ├── Fragment/ │ ├── AbstractSurrogateFragmentRenderer.php │ ├── EsiFragmentRenderer.php │ ├── FragmentHandler.php │ ├── FragmentRendererInterface.php │ ├── FragmentUriGenerator.php │ ├── FragmentUriGeneratorInterface.php │ ├── HIncludeFragmentRenderer.php │ ├── InlineFragmentRenderer.php │ ├── RoutableFragmentRenderer.php │ └── SsiFragmentRenderer.php ├── HttpCache/ │ ├── AbstractSurrogate.php │ ├── CacheWasLockedException.php │ ├── Esi.php │ ├── HttpCache.php │ ├── ResponseCacheStrategy.php │ ├── ResponseCacheStrategyInterface.php │ ├── Ssi.php │ ├── Store.php │ ├── StoreInterface.php │ ├── SubRequestHandler.php │ └── SurrogateInterface.php ├── HttpClientKernel.php ├── HttpKernel.php ├── HttpKernelBrowser.php ├── HttpKernelInterface.php ├── Kernel.php ├── KernelEvents.php ├── KernelInterface.php ├── LICENSE ├── Log/ │ ├── DebugLoggerConfigurator.php │ ├── DebugLoggerInterface.php │ └── Logger.php ├── Profiler/ │ ├── FileProfilerStorage.php │ ├── Profile.php │ ├── Profiler.php │ ├── ProfilerStateChecker.php │ └── ProfilerStorageInterface.php ├── README.md ├── RebootableInterface.php ├── Resources/ │ └── welcome.html.php ├── TerminableInterface.php ├── Tests/ │ ├── Attribute/ │ │ └── WithLogLevelTest.php │ ├── Bundle/ │ │ └── BundleTest.php │ ├── CacheClearer/ │ │ ├── ChainCacheClearerTest.php │ │ └── Psr6CacheClearerTest.php │ ├── CacheWarmer/ │ │ ├── CacheWarmerAggregateTest.php │ │ └── CacheWarmerTest.php │ ├── Config/ │ │ └── FileLocatorTest.php │ ├── Controller/ │ │ ├── ArgumentResolver/ │ │ │ ├── BackedEnumValueResolverTest.php │ │ │ ├── DateTimeValueResolverTest.php │ │ │ ├── NotTaggedControllerValueResolverTest.php │ │ │ ├── QueryParameterValueResolverTest.php │ │ │ ├── RequestAttributeValueResolverTest.php │ │ │ ├── RequestHeaderValueResolverTest.php │ │ │ ├── RequestPayloadValueResolverTest.php │ │ │ ├── RequestValueResolverTest.php │ │ │ ├── ServiceValueResolverTest.php │ │ │ ├── TraceableValueResolverTest.php │ │ │ ├── UidValueResolverTest.php │ │ │ └── UploadedFileValueResolverTest.php │ │ ├── ArgumentResolverTest.php │ │ ├── ContainerControllerResolverTest.php │ │ ├── ControllerResolverTest.php │ │ ├── ErrorControllerTest.php │ │ ├── TraceableArgumentResolverTest.php │ │ └── TraceableControllerResolverTest.php │ ├── ControllerMetadata/ │ │ ├── ArgumentMetadataFactoryTest.php │ │ └── ArgumentMetadataTest.php │ ├── DataCollector/ │ │ ├── Compiler.log │ │ ├── ConfigDataCollectorTest.php │ │ ├── DataCollectorTest.php │ │ ├── DumpDataCollectorTest.php │ │ ├── ExceptionDataCollectorTest.php │ │ ├── LoggerDataCollectorTest.php │ │ ├── MemoryDataCollectorTest.php │ │ ├── RequestDataCollectorTest.php │ │ ├── RouterDataCollectorTest.php │ │ └── TimeDataCollectorTest.php │ ├── Debug/ │ │ ├── ErrorHandlerConfiguratorTest.php │ │ └── TraceableEventDispatcherTest.php │ ├── DependencyInjection/ │ │ ├── ControllerArgumentValueResolverPassTest.php │ │ ├── ControllerAttributesListenerPassTest.php │ │ ├── FragmentRendererPassTest.php │ │ ├── LazyLoadingFragmentHandlerTest.php │ │ ├── LoggerPassTest.php │ │ ├── MergeExtensionConfigurationPassTest.php │ │ ├── RegisterControllerArgumentLocatorsPassTest.php │ │ ├── RegisterLocaleAwareServicesPassTest.php │ │ ├── RemoveEmptyControllerArgumentLocatorsPassTest.php │ │ ├── ResettableServicePassTest.php │ │ └── ServicesResetterTest.php │ ├── Event/ │ │ ├── ControllerArgumentsEventTest.php │ │ ├── ControllerAttributeEventTest.php │ │ ├── ControllerEventTest.php │ │ └── ExceptionEventTest.php │ ├── EventListener/ │ │ ├── AddRequestFormatsListenerTest.php │ │ ├── CacheAttributeListenerTest.php │ │ ├── ControllerAttributesListenerTest.php │ │ ├── DebugHandlersListenerTest.php │ │ ├── DisallowRobotsIndexingListenerTest.php │ │ ├── DumpListenerTest.php │ │ ├── ErrorListenerTest.php │ │ ├── FragmentListenerTest.php │ │ ├── IsSignatureValidAttributeListenerTest.php │ │ ├── LocaleAwareListenerTest.php │ │ ├── LocaleListenerTest.php │ │ ├── ProfilerListenerTest.php │ │ ├── ResponseListenerTest.php │ │ ├── RouterListenerTest.php │ │ ├── SerializeControllerResultListenerTest.php │ │ ├── SessionListenerTest.php │ │ ├── SurrogateListenerTest.php │ │ └── ValidateRequestListenerTest.php │ ├── Exception/ │ │ ├── AccessDeniedHttpExceptionTest.php │ │ ├── BadRequestHttpExceptionTest.php │ │ ├── ConflictHttpExceptionTest.php │ │ ├── GoneHttpExceptionTest.php │ │ ├── HttpExceptionTest.php │ │ ├── LengthRequiredHttpExceptionTest.php │ │ ├── LockedHttpExceptionTest.php │ │ ├── MethodNotAllowedHttpExceptionTest.php │ │ ├── NotAcceptableHttpExceptionTest.php │ │ ├── NotFoundHttpExceptionTest.php │ │ ├── PreconditionFailedHttpExceptionTest.php │ │ ├── PreconditionRequiredHttpExceptionTest.php │ │ ├── ServiceUnavailableHttpExceptionTest.php │ │ ├── TooManyRequestsHttpExceptionTest.php │ │ ├── UnauthorizedHttpExceptionTest.php │ │ ├── UnprocessableEntityHttpExceptionTest.php │ │ └── UnsupportedMediaTypeHttpExceptionTest.php │ ├── Fixtures/ │ │ ├── AcmeFooBundle/ │ │ │ ├── AcmeFooBundle.php │ │ │ └── Resources/ │ │ │ └── config/ │ │ │ ├── definition.php │ │ │ └── services.php │ │ ├── Attribute/ │ │ │ ├── Bar.php │ │ │ ├── Baz.php │ │ │ ├── Buz.php │ │ │ ├── Foo.php │ │ │ ├── Qux.php │ │ │ └── SubBuz.php │ │ ├── Bundle1Bundle/ │ │ │ ├── Resources/ │ │ │ │ └── .gitkeep │ │ │ └── foo.txt │ │ ├── BundleCompilerPass/ │ │ │ └── BundleAsCompilerPassBundle.php │ │ ├── ClearableService.php │ │ ├── Controller/ │ │ │ ├── ArgumentResolver/ │ │ │ │ └── UploadedFile/ │ │ │ │ ├── file-big.txt │ │ │ │ └── file-small.txt │ │ │ ├── AttributeController.php │ │ │ ├── BasicTypesController.php │ │ │ ├── CacheAttributeController.php │ │ │ ├── ControllerAttributesController.php │ │ │ ├── ExtendingRequest.php │ │ │ ├── ExtendingSession.php │ │ │ ├── NullableController.php │ │ │ └── VariadicController.php │ │ ├── DataCollector/ │ │ │ ├── CloneVarDataCollector.php │ │ │ └── DummyController.php │ │ ├── ExtensionNotValidBundle/ │ │ │ ├── DependencyInjection/ │ │ │ │ └── ExtensionNotValidExtension.php │ │ │ └── ExtensionNotValidBundle.php │ │ ├── ExtensionPresentBundle/ │ │ │ ├── DependencyInjection/ │ │ │ │ └── ExtensionPresentExtension.php │ │ │ └── ExtensionPresentBundle.php │ │ ├── IntEnum.php │ │ ├── IsSignatureValidAttributeController.php │ │ ├── IsSignatureValidAttributeMethodsController.php │ │ ├── KernelWithoutBundles.php │ │ ├── LazyResettableService.php │ │ ├── MockableUploadFileWithClientSize.php │ │ ├── MultiResettableService.php │ │ ├── ResettableService.php │ │ ├── Suit.php │ │ ├── TestClient.php │ │ ├── UsePropertyInDestruct.php │ │ └── WithPublicObjectProperty.php │ ├── Fragment/ │ │ ├── EsiFragmentRendererTest.php │ │ ├── FragmentHandlerTest.php │ │ ├── HIncludeFragmentRendererTest.php │ │ ├── InlineFragmentRendererTest.php │ │ ├── RoutableFragmentRendererTest.php │ │ └── SsiFragmentRendererTest.php │ ├── HttpCache/ │ │ ├── EsiTest.php │ │ ├── HttpCacheTest.php │ │ ├── HttpCacheTestCase.php │ │ ├── ResponseCacheStrategyTest.php │ │ ├── SsiTest.php │ │ ├── StoreTest.php │ │ ├── SubRequestHandlerTest.php │ │ ├── TestHttpKernel.php │ │ └── TestMultipleHttpKernel.php │ ├── HttpClientKernelTest.php │ ├── HttpKernelBrowserTest.php │ ├── HttpKernelTest.php │ ├── KernelTest.php │ ├── Log/ │ │ └── LoggerTest.php │ ├── Logger.php │ ├── Profiler/ │ │ ├── FileProfilerStorageTest.php │ │ └── ProfilerTest.php │ └── TestHttpKernel.php ├── composer.json └── phpunit.xml.dist
Showing preview only (250K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2408 symbols across 320 files)
FILE: Attribute/AsController.php
class AsController (line 21) | #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_FUNCTION)]
FILE: Attribute/AsTargetedValueResolver.php
class AsTargetedValueResolver (line 17) | #[\Attribute(\Attribute::TARGET_CLASS)]
method __construct (line 23) | public function __construct(public readonly ?string $name = null)
FILE: Attribute/Cache.php
class Cache (line 26) | #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Att...
method __construct (line 34) | public function __construct(
FILE: Attribute/IsSignatureValid.php
class IsSignatureValid (line 27) | #[\Attribute(\Attribute::IS_REPEATABLE | \Attribute::TARGET_CLASS | \Att...
method __construct (line 36) | public function __construct(
FILE: Attribute/MapDateTime.php
class MapDateTime (line 20) | #[\Attribute(\Attribute::TARGET_PARAMETER)]
method __construct (line 28) | public function __construct(
FILE: Attribute/MapQueryParameter.php
class MapQueryParameter (line 24) | #[\Attribute(\Attribute::TARGET_PARAMETER)]
method __construct (line 36) | public function __construct(
FILE: Attribute/MapQueryString.php
class MapQueryString (line 27) | #[\Attribute(\Attribute::TARGET_PARAMETER)]
method __construct (line 38) | public function __construct(
FILE: Attribute/MapRequestHeader.php
class MapRequestHeader (line 17) | #[\Attribute(\Attribute::TARGET_PARAMETER)]
method __construct (line 25) | public function __construct(
FILE: Attribute/MapRequestPayload.php
class MapRequestPayload (line 27) | #[\Attribute(\Attribute::TARGET_PARAMETER)]
method __construct (line 40) | public function __construct(
FILE: Attribute/MapUploadedFile.php
class MapUploadedFile (line 19) | #[\Attribute(\Attribute::TARGET_PARAMETER)]
method __construct (line 24) | public function __construct(
FILE: Attribute/Serialize.php
class Serialize (line 19) | #[\Attribute(\Attribute::TARGET_METHOD)]
method __construct (line 27) | public function __construct(
FILE: Attribute/ValueResolver.php
class ValueResolver (line 19) | #[\Attribute(\Attribute::TARGET_PARAMETER | \Attribute::IS_REPEATABLE)]
method __construct (line 26) | public function __construct(
FILE: Attribute/WithHttpStatus.php
class WithHttpStatus (line 19) | #[\Attribute(\Attribute::TARGET_CLASS)]
method __construct (line 26) | public function __construct(
FILE: Attribute/WithLogLevel.php
class WithLogLevel (line 21) | #[\Attribute(\Attribute::TARGET_CLASS)]
method __construct (line 27) | public function __construct(public readonly string $level)
FILE: Bundle/AbstractBundle.php
class AbstractBundle (line 26) | abstract class AbstractBundle extends Bundle implements ConfigurableExte...
method configure (line 30) | public function configure(DefinitionConfigurator $definition): void
method prependExtension (line 34) | public function prependExtension(ContainerConfigurator $container, Con...
method loadExtension (line 38) | public function loadExtension(array $config, ContainerConfigurator $co...
method getContainerExtension (line 42) | public function getContainerExtension(): ?ExtensionInterface
method getPath (line 51) | public function getPath(): string
FILE: Bundle/Bundle.php
class Bundle (line 25) | abstract class Bundle implements BundleInterface
method boot (line 34) | public function boot(): void
method shutdown (line 38) | public function shutdown(): void
method build (line 46) | public function build(ContainerBuilder $container): void
method getContainerExtension (line 55) | public function getContainerExtension(): ?ExtensionInterface
method getNamespace (line 82) | public function getNamespace(): string
method getPath (line 91) | public function getPath(): string
method getName (line 104) | final public function getName(): string
method registerCommands (line 113) | public function registerCommands(Application $application): void
method getContainerExtensionClass (line 120) | protected function getContainerExtensionClass(): string
method createContainerExtension (line 130) | protected function createContainerExtension(): ?ExtensionInterface
method parseClassName (line 135) | private function parseClassName(): void
method setContainer (line 142) | public function setContainer(?ContainerInterface $container): void
FILE: Bundle/BundleExtension.php
class BundleExtension (line 28) | class BundleExtension extends Extension implements PrependExtensionInter...
method __construct (line 32) | public function __construct(
method getConfiguration (line 38) | public function getConfiguration(array $config, ContainerBuilder $cont...
method getAlias (line 43) | public function getAlias(): string
method prepend (line 48) | public function prepend(ContainerBuilder $container): void
method load (line 57) | public function load(array $configs, ContainerBuilder $container): void
FILE: Bundle/BundleInterface.php
type BundleInterface (line 23) | interface BundleInterface
method boot (line 28) | public function boot(): void;
method shutdown (line 33) | public function shutdown(): void;
method build (line 40) | public function build(ContainerBuilder $container): void;
method getContainerExtension (line 45) | public function getContainerExtension(): ?ExtensionInterface;
method getName (line 50) | public function getName(): string;
method getNamespace (line 55) | public function getNamespace(): string;
method getPath (line 62) | public function getPath(): string;
method setContainer (line 64) | public function setContainer(?ContainerInterface $container): void;
FILE: CacheClearer/CacheClearerInterface.php
type CacheClearerInterface (line 19) | interface CacheClearerInterface
method clear (line 24) | public function clear(string $cacheDir): void;
FILE: CacheClearer/ChainCacheClearer.php
class ChainCacheClearer (line 21) | class ChainCacheClearer implements CacheClearerInterface
method __construct (line 26) | public function __construct(
method clear (line 31) | public function clear(string $cacheDir): void
FILE: CacheClearer/Psr6CacheClearer.php
class Psr6CacheClearer (line 19) | class Psr6CacheClearer implements CacheClearerInterface
method __construct (line 26) | public function __construct(array $pools = [])
method hasPool (line 31) | public function hasPool(string $name): bool
method getPool (line 39) | public function getPool(string $name): CacheItemPoolInterface
method clearPool (line 51) | public function clearPool(string $name): bool
method clear (line 60) | public function clear(string $cacheDir): void
FILE: CacheWarmer/CacheWarmer.php
class CacheWarmer (line 19) | abstract class CacheWarmer implements CacheWarmerInterface
method writeCacheFile (line 21) | protected function writeCacheFile(string $file, $content): void
FILE: CacheWarmer/CacheWarmerAggregate.php
class CacheWarmerAggregate (line 23) | class CacheWarmerAggregate implements CacheWarmerInterface
method __construct (line 31) | public function __construct(
method enableOptionalWarmers (line 38) | public function enableOptionalWarmers(): void
method enableOnlyOptionalWarmers (line 43) | public function enableOnlyOptionalWarmers(): void
method warmUp (line 48) | public function warmUp(string $cacheDir, ?string $buildDir = null, ?Sy...
method isOptional (line 125) | public function isOptional(): bool
FILE: CacheWarmer/CacheWarmerInterface.php
type CacheWarmerInterface (line 19) | interface CacheWarmerInterface extends WarmableInterface
method isOptional (line 29) | public function isOptional(): bool;
FILE: CacheWarmer/WarmableInterface.php
type WarmableInterface (line 19) | interface WarmableInterface
method warmUp (line 29) | public function warmUp(string $cacheDir, ?string $buildDir = null): ar...
FILE: Config/FileLocator.php
class FileLocator (line 22) | class FileLocator extends BaseFileLocator
method __construct (line 24) | public function __construct(
method locate (line 30) | public function locate(string $file, ?string $currentPath = null, bool...
FILE: Controller/ArgumentResolver.php
class ArgumentResolver (line 33) | final class ArgumentResolver implements ArgumentResolverInterface
method __construct (line 41) | public function __construct(
method getArguments (line 50) | public function getArguments(Request $request, callable $controller, ?...
method getDefaultArgumentValueResolvers (line 131) | public static function getDefaultArgumentValueResolvers(): iterable
FILE: Controller/ArgumentResolver/BackedEnumValueResolver.php
class BackedEnumValueResolver (line 25) | final class BackedEnumValueResolver implements ValueResolverInterface
method resolve (line 27) | public function resolve(Request $request, ArgumentMetadata $argument):...
FILE: Controller/ArgumentResolver/DateTimeValueResolver.php
class DateTimeValueResolver (line 27) | final class DateTimeValueResolver implements ValueResolverInterface
method __construct (line 29) | public function __construct(
method resolve (line 34) | public function resolve(Request $request, ArgumentMetadata $argument):...
FILE: Controller/ArgumentResolver/DefaultValueResolver.php
class DefaultValueResolver (line 23) | final class DefaultValueResolver implements ValueResolverInterface
method resolve (line 25) | public function resolve(Request $request, ArgumentMetadata $argument):...
FILE: Controller/ArgumentResolver/NotTaggedControllerValueResolver.php
class NotTaggedControllerValueResolver (line 25) | final class NotTaggedControllerValueResolver implements ValueResolverInt...
method __construct (line 27) | public function __construct(
method resolve (line 32) | public function resolve(Request $request, ArgumentMetadata $argument):...
FILE: Controller/ArgumentResolver/QueryParameterValueResolver.php
class QueryParameterValueResolver (line 29) | final class QueryParameterValueResolver implements ValueResolverInterface
method resolve (line 31) | public function resolve(Request $request, ArgumentMetadata $argument):...
FILE: Controller/ArgumentResolver/RequestAttributeValueResolver.php
class RequestAttributeValueResolver (line 24) | final class RequestAttributeValueResolver implements ValueResolverInterface
method resolve (line 26) | public function resolve(Request $request, ArgumentMetadata $argument):...
FILE: Controller/ArgumentResolver/RequestHeaderValueResolver.php
class RequestHeaderValueResolver (line 21) | final class RequestHeaderValueResolver implements ValueResolverInterface
method resolve (line 23) | public function resolve(Request $request, ArgumentMetadata $argument):...
FILE: Controller/ArgumentResolver/RequestPayloadValueResolver.php
class RequestPayloadValueResolver (line 52) | class RequestPayloadValueResolver implements ValueResolverInterface, Eve...
method __construct (line 68) | public function __construct(
method resolve (line 77) | public function resolve(Request $request, ArgumentMetadata $argument):...
method onKernelControllerArguments (line 107) | public function onKernelControllerArguments(ControllerArgumentsEvent $...
method getSubscribedEvents (line 201) | public static function getSubscribedEvents(): array
method mapQueryString (line 208) | private function mapQueryString(Request $request, ArgumentMetadata $ar...
method mapRequestPayload (line 217) | private function mapRequestPayload(Request $request, ArgumentMetadata ...
method mapUploadedFile (line 262) | private function mapUploadedFile(Request $request, ArgumentMetadata $a...
method mergeParamsAndFiles (line 275) | private function mergeParamsAndFiles(array $params, array $files): array
method resolveValidationGroups (line 297) | private function resolveValidationGroups(Expression|string|GroupSequen...
method hasNonStringScalar (line 332) | private static function hasNonStringScalar(array $data): bool
FILE: Controller/ArgumentResolver/RequestValueResolver.php
class RequestValueResolver (line 24) | final class RequestValueResolver implements ValueResolverInterface
method resolve (line 26) | public function resolve(Request $request, ArgumentMetadata $argument):...
FILE: Controller/ArgumentResolver/ServiceValueResolver.php
class ServiceValueResolver (line 26) | final class ServiceValueResolver implements ValueResolverInterface
method __construct (line 28) | public function __construct(
method resolve (line 33) | public function resolve(Request $request, ArgumentMetadata $argument):...
FILE: Controller/ArgumentResolver/SessionValueResolver.php
class SessionValueResolver (line 24) | final class SessionValueResolver implements ValueResolverInterface
method resolve (line 26) | public function resolve(Request $request, ArgumentMetadata $argument):...
FILE: Controller/ArgumentResolver/TraceableValueResolver.php
class TraceableValueResolver (line 24) | final class TraceableValueResolver implements ValueResolverInterface
method __construct (line 26) | public function __construct(
method resolve (line 32) | public function resolve(Request $request, ArgumentMetadata $argument):...
FILE: Controller/ArgumentResolver/UidValueResolver.php
class UidValueResolver (line 20) | final class UidValueResolver implements ValueResolverInterface
method resolve (line 22) | public function resolve(Request $request, ArgumentMetadata $argument):...
FILE: Controller/ArgumentResolver/VariadicValueResolver.php
class VariadicValueResolver (line 23) | final class VariadicValueResolver implements ValueResolverInterface
method resolve (line 25) | public function resolve(Request $request, ArgumentMetadata $argument):...
FILE: Controller/ArgumentResolverInterface.php
type ArgumentResolverInterface (line 22) | interface ArgumentResolverInterface
method getArguments (line 29) | public function getArguments(Request $request, callable $controller, ?...
FILE: Controller/ContainerControllerResolver.php
class ContainerControllerResolver (line 24) | class ContainerControllerResolver extends ControllerResolver
method __construct (line 26) | public function __construct(
method instantiateController (line 33) | protected function instantiateController(string $class): object
method throwExceptionIfControllerWasRemoved (line 55) | private function throwExceptionIfControllerWasRemoved(string $controll...
FILE: Controller/ControllerReference.php
class ControllerReference (line 27) | class ControllerReference
method __construct (line 37) | public function __construct(
FILE: Controller/ControllerResolver.php
class ControllerResolver (line 26) | class ControllerResolver implements ControllerResolverInterface
method __construct (line 31) | public function __construct(
method allowControllers (line 40) | public function allowControllers(array $types = [], array $attributes ...
method getController (line 54) | public function getController(Request $request): callable|false
method createController (line 112) | protected function createController(string $controller): callable
method instantiateController (line 150) | protected function instantiateController(string $class): object
method getControllerError (line 155) | private function getControllerError(mixed $callable): string
method getClassMethodsWithoutMagicMethods (line 217) | private function getClassMethodsWithoutMagicMethods($classOrObject): a...
method checkController (line 224) | private function checkController(Request $request, callable $controlle...
FILE: Controller/ControllerResolverInterface.php
type ControllerResolverInterface (line 24) | interface ControllerResolverInterface
method getController (line 40) | public function getController(Request $request): callable|false;
FILE: Controller/ErrorController.php
class ErrorController (line 26) | class ErrorController
method __construct (line 28) | public function __construct(
method __invoke (line 35) | public function __invoke(\Throwable $exception): Response
method preview (line 42) | public function preview(Request $request, int $code): Response
FILE: Controller/TraceableArgumentResolver.php
class TraceableArgumentResolver (line 20) | class TraceableArgumentResolver implements ArgumentResolverInterface
method __construct (line 22) | public function __construct(
method getArguments (line 28) | public function getArguments(Request $request, callable $controller, ?...
FILE: Controller/TraceableControllerResolver.php
class TraceableControllerResolver (line 20) | class TraceableControllerResolver implements ControllerResolverInterface
method __construct (line 22) | public function __construct(
method getController (line 28) | public function getController(Request $request): callable|false
FILE: Controller/ValueResolverInterface.php
type ValueResolverInterface (line 22) | interface ValueResolverInterface
method resolve (line 27) | public function resolve(Request $request, ArgumentMetadata $argument):...
FILE: ControllerMetadata/ArgumentMetadata.php
class ArgumentMetadata (line 19) | class ArgumentMetadata
method __construct (line 26) | public function __construct(
method getName (line 42) | public function getName(): string
method getType (line 50) | public function getType(): ?string
method isVariadic (line 58) | public function isVariadic(): bool
method hasDefaultValue (line 68) | public function hasDefaultValue(): bool
method isNullable (line 76) | public function isNullable(): bool
method getDefaultValue (line 86) | public function getDefaultValue(): mixed
method getAttributes (line 101) | public function getAttributes(?string $name = null, int $flags = 0): a...
method getAttributesOfType (line 118) | public function getAttributesOfType(string $name, int $flags = 0): array
method getControllerName (line 138) | public function getControllerName(): string
FILE: ControllerMetadata/ArgumentMetadataFactory.php
class ArgumentMetadataFactory (line 19) | final class ArgumentMetadataFactory implements ArgumentMetadataFactoryIn...
method createArgumentMetadata (line 21) | public function createArgumentMetadata(string|object|array $controller...
method getType (line 44) | private function getType(\ReflectionParameter $parameter): ?string
method getPrettyName (line 58) | private function getPrettyName(\ReflectionFunctionAbstract $r): string
FILE: ControllerMetadata/ArgumentMetadataFactoryInterface.php
type ArgumentMetadataFactoryInterface (line 19) | interface ArgumentMetadataFactoryInterface
method createArgumentMetadata (line 24) | public function createArgumentMetadata(string|object|array $controller...
FILE: DataCollector/AjaxDataCollector.php
class AjaxDataCollector (line 22) | class AjaxDataCollector extends DataCollector
method collect (line 24) | public function collect(Request $request, Response $response, ?\Throwa...
method reset (line 29) | public function reset(): void
method getName (line 34) | public function getName(): string
FILE: DataCollector/ConfigDataCollector.php
class ConfigDataCollector (line 27) | class ConfigDataCollector extends DataCollector implements LateDataColle...
method setKernel (line 34) | public function setKernel(KernelInterface $kernel): void
method collect (line 39) | public function collect(Request $request, Response $response, ?\Throwa...
method lateCollect (line 83) | public function lateCollect(): void
method getToken (line 91) | public function getToken(): ?string
method getSymfonyVersion (line 99) | public function getSymfonyVersion(): string
method getSymfonyState (line 108) | public function getSymfonyState(): string
method getSymfonyMinorVersion (line 117) | public function getSymfonyMinorVersion(): string
method isSymfonyLts (line 122) | public function isSymfonyLts(): bool
method getSymfonyEom (line 131) | public function getSymfonyEom(): string
method getSymfonyEol (line 140) | public function getSymfonyEol(): string
method getPhpVersion (line 148) | public function getPhpVersion(): string
method getPhpVersionExtra (line 156) | public function getPhpVersionExtra(): ?string
method getPhpArchitecture (line 161) | public function getPhpArchitecture(): int
method getPhpIntlLocale (line 166) | public function getPhpIntlLocale(): string
method getPhpTimezone (line 171) | public function getPhpTimezone(): string
method getEnv (line 179) | public function getEnv(): string
method isDebug (line 189) | public function isDebug(): bool|string
method hasXdebug (line 197) | public function hasXdebug(): bool
method getXdebugStatus (line 202) | public function getXdebugStatus(): string
method hasXdebugInfo (line 210) | public function hasXdebugInfo(): bool
method hasApcu (line 218) | public function hasApcu(): bool
method getApcuStatus (line 223) | public function getApcuStatus(): string
method hasZendOpcache (line 231) | public function hasZendOpcache(): bool
method getZendOpcacheStatus (line 236) | public function getZendOpcacheStatus(): string
method getBundles (line 241) | public function getBundles(): array|Data
method getSapiName (line 249) | public function getSapiName(): string
method getRunnerClass (line 254) | public function getRunnerClass(): ?string
method getName (line 259) | public function getName(): string
method determineSymfonyState (line 264) | private function determineSymfonyState(): string
method determineRunnerClass (line 283) | private function determineRunnerClass(): ?string
FILE: DataCollector/DataCollector.php
class DataCollector (line 29) | abstract class DataCollector implements DataCollectorInterface
method cloneVar (line 41) | protected function cloneVar(mixed $var): Data
method getCasters (line 58) | protected function getCasters(): array
method __serialize (line 87) | public function __serialize(): array
method __unserialize (line 92) | public function __unserialize(array $data): void
method reset (line 97) | public function reset(): void
FILE: DataCollector/DataCollectorInterface.php
type DataCollectorInterface (line 23) | interface DataCollectorInterface extends ResetInterface
method collect (line 28) | public function collect(Request $request, Response $response, ?\Throwa...
method getName (line 33) | public function getName(): string;
FILE: DataCollector/DumpDataCollector.php
class DumpDataCollector (line 32) | class DumpDataCollector extends DataCollector implements DataDumperInter...
method __construct (line 44) | public function __construct(
method __clone (line 68) | public function __clone()
method dump (line 73) | public function dump(Data $data): ?string
method collect (line 103) | public function collect(Request $request, Response $response, ?\Throwa...
method reset (line 136) | public function reset(): void
method __serialize (line 146) | public function __serialize(): array
method __unserialize (line 164) | public function __unserialize(array $data): void
method getDumpsCount (line 179) | public function getDumpsCount(): int
method getDumps (line 184) | public function getDumps(string $format, int $maxDepthLimit = -1, int ...
method getName (line 211) | public function getName(): string
method __destruct (line 216) | public function __destruct()
method doDump (line 247) | private function doDump(DataDumperInterface $dumper, Data $data, strin...
FILE: DataCollector/EventDataCollector.php
class EventDataCollector (line 29) | class EventDataCollector extends DataCollector implements LateDataCollec...
method __construct (line 38) | public function __construct(
method collect (line 49) | public function collect(Request $request, Response $response, ?\Throwa...
method reset (line 55) | public function reset(): void
method lateCollect (line 66) | public function lateCollect(): void
method getData (line 81) | public function getData(): array|Data
method setCalledListeners (line 89) | public function setCalledListeners(array $listeners, ?string $dispatch...
method getCalledListeners (line 97) | public function getCalledListeners(?string $dispatcher = null): array|...
method setNotCalledListeners (line 105) | public function setNotCalledListeners(array $listeners, ?string $dispa...
method getNotCalledListeners (line 113) | public function getNotCalledListeners(?string $dispatcher = null): arr...
method setOrphanedEvents (line 123) | public function setOrphanedEvents(array $events, ?string $dispatcher =...
method getOrphanedEvents (line 131) | public function getOrphanedEvents(?string $dispatcher = null): array|Data
method getName (line 136) | public function getName(): string
FILE: DataCollector/ExceptionDataCollector.php
class ExceptionDataCollector (line 23) | class ExceptionDataCollector extends DataCollector
method collect (line 25) | public function collect(Request $request, Response $response, ?\Throwa...
method hasException (line 34) | public function hasException(): bool
method getException (line 39) | public function getException(): \Exception|FlattenException
method getMessage (line 44) | public function getMessage(): string
method getCode (line 49) | public function getCode(): int|string
method getStatusCode (line 54) | public function getStatusCode(): int
method getTrace (line 59) | public function getTrace(): array
method getName (line 64) | public function getName(): string
FILE: DataCollector/LateDataCollectorInterface.php
type LateDataCollectorInterface (line 19) | interface LateDataCollectorInterface
method lateCollect (line 24) | public function lateCollect(): void;
FILE: DataCollector/LoggerDataCollector.php
class LoggerDataCollector (line 27) | class LoggerDataCollector extends DataCollector implements LateDataColle...
method __construct (line 33) | public function __construct(
method collect (line 41) | public function collect(Request $request, Response $response, ?\Throwa...
method lateCollect (line 46) | public function lateCollect(): void
method getLogs (line 60) | public function getLogs(): Data|array
method getProcessedLogs (line 65) | public function getProcessedLogs(): array
method getFilters (line 108) | public function getFilters(): array
method getPriorities (line 139) | public function getPriorities(): Data|array
method countErrors (line 144) | public function countErrors(): int
method countDeprecations (line 149) | public function countDeprecations(): int
method countWarnings (line 154) | public function countWarnings(): int
method countScreams (line 159) | public function countScreams(): int
method getCompilerLogs (line 164) | public function getCompilerLogs(): Data
method getName (line 169) | public function getName(): string
method getContainerDeprecationLogs (line 174) | private function getContainerDeprecationLogs(): array
method getContainerCompilerLogs (line 201) | private function getContainerCompilerLogs(?string $compilerLogsFilepat...
method sanitizeLogs (line 220) | private function sanitizeLogs(array $logs): array
method isSilencedOrDeprecationErrorLog (line 269) | private function isSilencedOrDeprecationErrorLog(array $log): bool
method computeErrorsCount (line 288) | private function computeErrorsCount(array $containerDeprecationLogs): ...
FILE: DataCollector/MemoryDataCollector.php
class MemoryDataCollector (line 22) | class MemoryDataCollector extends DataCollector implements LateDataColle...
method __construct (line 24) | public function __construct()
method collect (line 29) | public function collect(Request $request, Response $response, ?\Throwa...
method reset (line 34) | public function reset(): void
method lateCollect (line 42) | public function lateCollect(): void
method getMemory (line 47) | public function getMemory(): int
method getMemoryLimit (line 52) | public function getMemoryLimit(): int|float
method updateMemoryUsage (line 57) | public function updateMemoryUsage(): void
method getName (line 62) | public function getName(): string
method convertToBytes (line 67) | private function convertToBytes(string $memoryLimit): int|float
FILE: DataCollector/RequestDataCollector.php
class RequestDataCollector (line 33) | class RequestDataCollector extends DataCollector implements EventSubscri...
method __construct (line 41) | public function __construct(
method collect (line 47) | public function collect(Request $request, Response $response, ?\Throwa...
method lateCollect (line 178) | public function lateCollect(): void
method reset (line 183) | public function reset(): void
method getMethod (line 190) | public function getMethod(): string
method getPathInfo (line 195) | public function getPathInfo(): string
method getRequestRequest (line 200) | public function getRequestRequest(): ParameterBag
method getRequestQuery (line 205) | public function getRequestQuery(): ParameterBag
method getRequestFiles (line 210) | public function getRequestFiles(): ParameterBag
method getRequestHeaders (line 215) | public function getRequestHeaders(): ParameterBag
method getRequestServer (line 220) | public function getRequestServer(bool $raw = false): ParameterBag
method getRequestCookies (line 225) | public function getRequestCookies(bool $raw = false): ParameterBag
method getRequestAttributes (line 230) | public function getRequestAttributes(): ParameterBag
method getResponseHeaders (line 235) | public function getResponseHeaders(): ParameterBag
method getResponseCookies (line 240) | public function getResponseCookies(): ParameterBag
method getSessionMetadata (line 245) | public function getSessionMetadata(): array
method getSessionAttributes (line 250) | public function getSessionAttributes(): array
method getStatelessCheck (line 255) | public function getStatelessCheck(): bool
method getSessionUsages (line 260) | public function getSessionUsages(): Data|array
method getFlashes (line 265) | public function getFlashes(): array
method getContent (line 273) | public function getContent()
method isJsonRequest (line 278) | public function isJsonRequest(): bool
method getPrettyJson (line 283) | public function getPrettyJson(): ?string
method getContentType (line 290) | public function getContentType(): string
method getStatusText (line 295) | public function getStatusText(): string
method getStatusCode (line 300) | public function getStatusCode(): int
method getFormat (line 305) | public function getFormat(): string
method getLocale (line 310) | public function getLocale(): string
method getDotenvVars (line 315) | public function getDotenvVars(): ParameterBag
method getRoute (line 325) | public function getRoute(): string
method getIdentifier (line 330) | public function getIdentifier(): string
method getRouteParams (line 340) | public function getRouteParams(): array
method getController (line 351) | public function getController(): array|string|Data
method getRedirect (line 362) | public function getRedirect(): array|Data|false
method getForwardToken (line 367) | public function getForwardToken(): ?string
method onKernelController (line 372) | public function onKernelController(ControllerEvent $event): void
method onKernelResponse (line 377) | public function onKernelResponse(ResponseEvent $event): void
method getSubscribedEvents (line 388) | public static function getSubscribedEvents(): array
method getName (line 396) | public function getName(): string
method collectSessionUsage (line 401) | public function collectSessionUsage(): void
method parseController (line 435) | private function parseController(array|object|string|null $controller)...
method computeCurlCommand (line 502) | private function computeCurlCommand(Request $request, ?string $content...
method getCurlCommand (line 539) | public function getCurlCommand(): string
method escapePayload (line 544) | private function escapePayload(string $payload): string
FILE: DataCollector/RouterDataCollector.php
class RouterDataCollector (line 22) | class RouterDataCollector extends DataCollector
method __construct (line 29) | public function __construct()
method collect (line 37) | public function collect(Request $request, Response $response, ?\Throwa...
method reset (line 51) | public function reset(): void
method guessRoute (line 62) | protected function guessRoute(Request $request, string|object|array $c...
method onKernelController (line 70) | public function onKernelController(ControllerEvent $event): void
method getRedirect (line 78) | public function getRedirect(): bool
method getTargetUrl (line 83) | public function getTargetUrl(): ?string
method getTargetRoute (line 88) | public function getTargetRoute(): ?string
method getName (line 93) | public function getName(): string
FILE: DataCollector/TimeDataCollector.php
class TimeDataCollector (line 25) | class TimeDataCollector extends DataCollector implements LateDataCollect...
method __construct (line 27) | public function __construct(
method collect (line 34) | public function collect(Request $request, Response $response, ?\Throwa...
method reset (line 50) | public function reset(): void
method lateCollect (line 57) | public function lateCollect(): void
method setEvents (line 68) | public function setEvents(array $events): void
method getEvents (line 80) | public function getEvents(): array
method getDuration (line 88) | public function getDuration(): float
method getInitTime (line 104) | public function getInitTime(): float
method getStartTime (line 113) | public function getStartTime(): float
method isStopwatchInstalled (line 118) | public function isStopwatchInstalled(): bool
method getName (line 123) | public function getName(): string
FILE: Debug/ErrorHandlerConfigurator.php
class ErrorHandlerConfigurator (line 24) | class ErrorHandlerConfigurator
method __construct (line 35) | public function __construct(
method configure (line 50) | public function configure(ErrorHandler $handler): void
method setDefaultLoggers (line 78) | private function setDefaultLoggers(ErrorHandler $handler): void
FILE: Debug/TraceableEventDispatcher.php
class TraceableEventDispatcher (line 24) | class TraceableEventDispatcher extends BaseTraceableEventDispatcher
method beforeDispatch (line 26) | protected function beforeDispatch(string $eventName, object $event): void
method afterDispatch (line 61) | protected function afterDispatch(string $eventName, object $event): void
FILE: Debug/VirtualRequestStack.php
class VirtualRequestStack (line 24) | final class VirtualRequestStack extends RequestStack
method __construct (line 26) | public function __construct(
method push (line 31) | public function push(Request $request): void
method pop (line 46) | public function pop(): ?Request
method getCurrentRequest (line 51) | public function getCurrentRequest(): ?Request
method getMainRequest (line 56) | public function getMainRequest(): ?Request
method getParentRequest (line 61) | public function getParentRequest(): ?Request
FILE: DependencyInjection/ConfigurableExtension.php
class ConfigurableExtension (line 29) | abstract class ConfigurableExtension extends Extension
method load (line 31) | final public function load(array $configs, ContainerBuilder $container...
method loadInternal (line 39) | abstract protected function loadInternal(array $mergedConfig, Containe...
FILE: DependencyInjection/ControllerArgumentValueResolverPass.php
class ControllerArgumentValueResolverPass (line 29) | class ControllerArgumentValueResolverPass implements CompilerPassInterface
method process (line 33) | public function process(ContainerBuilder $container): void
FILE: DependencyInjection/ControllerAttributesListenerPass.php
class ControllerAttributesListenerPass (line 23) | class ControllerAttributesListenerPass implements CompilerPassInterface
method process (line 34) | public function process(ContainerBuilder $container): void
FILE: DependencyInjection/Extension.php
class Extension (line 25) | abstract class Extension extends BaseExtension
FILE: DependencyInjection/FragmentRendererPass.php
class FragmentRendererPass (line 26) | class FragmentRendererPass implements CompilerPassInterface
method process (line 28) | public function process(ContainerBuilder $container): void
FILE: DependencyInjection/LazyLoadingFragmentHandler.php
class LazyLoadingFragmentHandler (line 24) | class LazyLoadingFragmentHandler extends FragmentHandler
method __construct (line 31) | public function __construct(
method render (line 39) | public function render(string|ControllerReference $uri, string $render...
FILE: DependencyInjection/LoggerPass.php
class LoggerPass (line 26) | class LoggerPass implements CompilerPassInterface
method process (line 28) | public function process(ContainerBuilder $container): void
FILE: DependencyInjection/MergeExtensionConfigurationPass.php
class MergeExtensionConfigurationPass (line 22) | class MergeExtensionConfigurationPass extends BaseMergeExtensionConfigur...
method __construct (line 27) | public function __construct(
method process (line 32) | public function process(ContainerBuilder $container): void
FILE: DependencyInjection/RegisterControllerArgumentLocatorsPass.php
class RegisterControllerArgumentLocatorsPass (line 35) | class RegisterControllerArgumentLocatorsPass implements CompilerPassInte...
method process (line 37) | public function process(ContainerBuilder $container): void
FILE: DependencyInjection/RegisterLocaleAwareServicesPass.php
class RegisterLocaleAwareServicesPass (line 24) | class RegisterLocaleAwareServicesPass implements CompilerPassInterface
method process (line 26) | public function process(ContainerBuilder $container): void
FILE: DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php
class RemoveEmptyControllerArgumentLocatorsPass (line 22) | class RemoveEmptyControllerArgumentLocatorsPass implements CompilerPassI...
method process (line 24) | public function process(ContainerBuilder $container): void
FILE: DependencyInjection/ResettableServicePass.php
class ResettableServicePass (line 24) | class ResettableServicePass implements CompilerPassInterface
method process (line 26) | public function process(ContainerBuilder $container): void
FILE: DependencyInjection/ServicesResetter.php
class ServicesResetter (line 23) | final class ServicesResetter implements ServicesResetterInterface
method __construct (line 29) | public function __construct(
method reset (line 35) | public function reset(): void
FILE: DependencyInjection/ServicesResetterInterface.php
type ServicesResetterInterface (line 19) | interface ServicesResetterInterface extends ResetInterface
FILE: Event/ControllerArgumentsEvent.php
class ControllerArgumentsEvent (line 31) | final class ControllerArgumentsEvent extends KernelEvent
method __construct (line 36) | public function __construct(
method getController (line 52) | public function getController(): callable
method setController (line 60) | public function setController(callable $controller, ?array $attributes...
method getArguments (line 69) | public function getArguments(): array
method setArguments (line 77) | public function setArguments(array $arguments): void
method getNamedArguments (line 86) | public function getNamedArguments(): array
method getAttributes (line 117) | public function getAttributes(?string $className = null): array
method evaluate (line 122) | public function evaluate(mixed $value, ?ExpressionLanguage $expression...
FILE: Event/ControllerArgumentsMetadata.php
class ControllerArgumentsMetadata (line 21) | class ControllerArgumentsMetadata extends ControllerMetadata
method __construct (line 23) | public function __construct(
method getArguments (line 33) | public function getArguments(): array
method getNamedArguments (line 41) | public function getNamedArguments(): array
method evaluate (line 46) | public function evaluate(mixed $value, ?ExpressionLanguage $expression...
FILE: Event/ControllerAttributeEvent.php
class ControllerAttributeEvent (line 25) | final class ControllerAttributeEvent implements StoppableEventInterface
method __construct (line 32) | public function __construct(
method isPropagationStopped (line 45) | public function isPropagationStopped(): bool
method evaluate (line 65) | public function evaluate(mixed $value, ?ExpressionLanguage $expression...
FILE: Event/ControllerEvent.php
class ControllerEvent (line 28) | final class ControllerEvent extends KernelEvent
method __construct (line 33) | public function __construct(HttpKernelInterface $kernel, callable $con...
method getController (line 40) | public function getController(): callable
method getControllerReflector (line 45) | public function getControllerReflector(): \ReflectionFunctionAbstract
method setController (line 53) | public function setController(callable $controller, ?array $attributes...
method getAttributes (line 94) | public function getAttributes(?string $className = null): array
method evaluate (line 129) | public function evaluate(mixed $value, ?ExpressionLanguage $expression...
FILE: Event/ControllerMetadata.php
class ControllerMetadata (line 21) | class ControllerMetadata
method __construct (line 23) | public function __construct(
method getController (line 28) | public function getController(): callable
method getReflector (line 33) | public function getReflector(): \ReflectionFunctionAbstract
method getAttributes (line 45) | public function getAttributes(?string $className = null): array
method evaluate (line 50) | public function evaluate(mixed $value, ?ExpressionLanguage $expression...
FILE: Event/ExceptionEvent.php
class ExceptionEvent (line 30) | final class ExceptionEvent extends RequestEvent
method __construct (line 35) | public function __construct(
method getThrowable (line 48) | public function getThrowable(): \Throwable
method setThrowable (line 58) | public function setThrowable(\Throwable $exception): void
method allowCustomResponseCode (line 66) | public function allowCustomResponseCode(): void
method isAllowingCustomResponseCode (line 74) | public function isAllowingCustomResponseCode(): bool
method isKernelTerminating (line 79) | public function isKernelTerminating(): bool
FILE: Event/FinishRequestEvent.php
class FinishRequestEvent (line 22) | final class FinishRequestEvent extends KernelEvent
method __construct (line 24) | public function __construct(
FILE: Event/KernelEvent.php
class KernelEvent (line 23) | class KernelEvent extends Event
method __construct (line 29) | public function __construct(
method getKernel (line 39) | public function getKernel(): HttpKernelInterface
method getRequest (line 47) | public function getRequest(): Request
method getRequestType (line 58) | public function getRequestType(): int
method isMainRequest (line 66) | public function isMainRequest(): bool
FILE: Event/RequestEvent.php
class RequestEvent (line 25) | class RequestEvent extends KernelEvent
method getResponse (line 32) | public function getResponse(): ?Response
method setResponse (line 40) | public function setResponse(Response $response): void
method hasResponse (line 52) | public function hasResponse(): bool
FILE: Event/ResponseEvent.php
class ResponseEvent (line 27) | final class ResponseEvent extends KernelEvent
method __construct (line 29) | public function __construct(
method getResponse (line 39) | public function getResponse(): Response
method setResponse (line 44) | public function setResponse(Response $response): void
FILE: Event/TerminateEvent.php
class TerminateEvent (line 26) | final class TerminateEvent extends KernelEvent
method __construct (line 28) | public function __construct(
method getResponse (line 36) | public function getResponse(): Response
FILE: Event/ViewEvent.php
class ViewEvent (line 26) | final class ViewEvent extends RequestEvent
method __construct (line 45) | public function __construct(
method getControllerResult (line 63) | public function getControllerResult(): mixed
method setControllerResult (line 68) | public function setControllerResult(mixed $controllerResult): void
FILE: EventListener/AbstractSessionListener.php
class AbstractSessionListener (line 39) | abstract class AbstractSessionListener implements EventSubscriberInterfa...
method __construct (line 48) | public function __construct(
method onKernelRequest (line 58) | public function onKernelRequest(RequestEvent $event): void
method onKernelResponse (line 94) | public function onKernelResponse(ResponseEvent $event): void
method onSessionUsage (line 225) | public function onSessionUsage(): void
method getSubscribedEvents (line 263) | public static function getSubscribedEvents(): array
method reset (line 275) | public function reset(): void
method getSession (line 294) | abstract protected function getSession(): ?SessionInterface;
method getSessionOptions (line 296) | private function getSessionOptions(array $sessionOptions): array
FILE: EventListener/AddRequestFormatsListener.php
class AddRequestFormatsListener (line 25) | class AddRequestFormatsListener implements EventSubscriberInterface
method __construct (line 27) | public function __construct(
method onKernelRequest (line 35) | public function onKernelRequest(RequestEvent $event): void
method getSubscribedEvents (line 43) | public static function getSubscribedEvents(): array
FILE: EventListener/CacheAttributeListener.php
class CacheAttributeListener (line 31) | class CacheAttributeListener implements EventSubscriberInterface
method __construct (line 33) | public function __construct(
method onKernelControllerAttribute (line 38) | public function onKernelControllerAttribute(ControllerAttributeEvent $...
method onKernelControllerArguments (line 70) | public function onKernelControllerArguments(ControllerArgumentsEvent $...
method onKernelResponse (line 93) | public function onKernelResponse(ResponseEvent $event): void
method getSubscribedEvents (line 116) | public static function getSubscribedEvents(): array
method reset (line 131) | public function reset(): void
method processAttributeBeforeController (line 135) | private function processAttributeBeforeController(Cache $cache, Reques...
method processAttributeAfterController (line 169) | private function processAttributeAfterController(Cache $cache, Request...
method getVariables (line 249) | private function getVariables(Cache $cache, Request $request, Controll...
method evaluate (line 269) | private function evaluate(string|Expression|\Closure $closureOrExpress...
method getExpressionLanguage (line 278) | private function getExpressionLanguage(): ExpressionLanguage
method toSeconds (line 285) | private function toSeconds(int|string $time): int
FILE: EventListener/ControllerAttributesListener.php
class ControllerAttributesListener (line 32) | class ControllerAttributesListener implements EventSubscriberInterface
method __construct (line 37) | public function __construct(
method beforeController (line 46) | public function beforeController(ControllerEvent|ControllerArgumentsEv...
method afterController (line 72) | public function afterController(KernelEvent $event, string $eventName,...
method getAttributeEventNames (line 90) | private function getAttributeEventNames(object $attribute, string $eve...
method getSubscribedEvents (line 109) | public static function getSubscribedEvents(): array
FILE: EventListener/DebugHandlersListener.php
class DebugHandlersListener (line 31) | class DebugHandlersListener implements EventSubscriberInterface
method __construct (line 42) | public function __construct(?callable $exceptionHandler = null, ?bool ...
method configure (line 55) | public function configure(?object $event = null): void
method getSubscribedEvents (line 119) | public static function getSubscribedEvents(): array
FILE: EventListener/DisallowRobotsIndexingListener.php
class DisallowRobotsIndexingListener (line 23) | class DisallowRobotsIndexingListener implements EventSubscriberInterface
method onResponse (line 27) | public function onResponse(ResponseEvent $event): void
method getSubscribedEvents (line 34) | public static function getSubscribedEvents(): array
FILE: EventListener/DumpListener.php
class DumpListener (line 27) | class DumpListener implements EventSubscriberInterface
method __construct (line 33) | public function __construct(
method configure (line 41) | public function configure(?ConsoleCommandEvent $event = null): void
method getSubscribedEvents (line 61) | public static function getSubscribedEvents(): array
FILE: EventListener/ErrorListener.php
class ErrorListener (line 34) | class ErrorListener implements EventSubscriberInterface
method __construct (line 39) | public function __construct(
method logKernelException (line 48) | public function logKernelException(ExceptionEvent $event): void
method onKernelException (line 77) | public function onKernelException(ExceptionEvent $event): void
method removeCspHeader (line 125) | public function removeCspHeader(ResponseEvent $event): void
method onControllerArguments (line 132) | public function onControllerArguments(ControllerArgumentsEvent $event)...
method getSubscribedEvents (line 150) | public static function getSubscribedEvents(): array
method logException (line 162) | protected function logException(\Throwable $exception, string $message...
method resolveLogLevel (line 177) | private function resolveLogLevel(\Throwable $throwable): string
method resolveLogChannel (line 196) | private function resolveLogChannel(\Throwable $throwable): ?string
method duplicateRequest (line 210) | protected function duplicateRequest(\Throwable $exception, Request $re...
method getInheritedAttribute (line 230) | private function getInheritedAttribute(string $class, string $attribut...
method getLogger (line 264) | private function getLogger(?string $logChannel): ?LoggerInterface
FILE: EventListener/FragmentListener.php
class FragmentListener (line 34) | class FragmentListener implements EventSubscriberInterface
method __construct (line 39) | public function __construct(
method onKernelRequest (line 50) | public function onKernelRequest(RequestEvent $event): void
method validateRequest (line 76) | protected function validateRequest(Request $request): void
method getSubscribedEvents (line 91) | public static function getSubscribedEvents(): array
FILE: EventListener/IsSignatureValidAttributeListener.php
class IsSignatureValidAttributeListener (line 27) | class IsSignatureValidAttributeListener implements EventSubscriberInterface
method __construct (line 29) | public function __construct(
method onKernelControllerAttribute (line 34) | public function onKernelControllerAttribute(ControllerAttributeEvent $...
method onKernelControllerArguments (line 48) | public function onKernelControllerArguments(ControllerArgumentsEvent $...
method processAttribute (line 57) | private function processAttribute(IsSignatureValid $attribute, Request...
method getSubscribedEvents (line 67) | public static function getSubscribedEvents(): array
FILE: EventListener/LocaleAwareListener.php
class LocaleAwareListener (line 26) | class LocaleAwareListener implements EventSubscriberInterface
method __construct (line 31) | public function __construct(
method onKernelRequest (line 37) | public function onKernelRequest(RequestEvent $event): void
method onKernelFinishRequest (line 42) | public function onKernelFinishRequest(FinishRequestEvent $event): void
method getSubscribedEvents (line 55) | public static function getSubscribedEvents(): array
method setLocale (line 64) | private function setLocale(string $locale, string $defaultLocale): void
FILE: EventListener/LocaleListener.php
class LocaleListener (line 30) | class LocaleListener implements EventSubscriberInterface
method __construct (line 32) | public function __construct(
method setDefaultLocale (line 42) | public function setDefaultLocale(KernelEvent $event): void
method onKernelRequest (line 48) | public function onKernelRequest(RequestEvent $event): void
method onKernelFinishRequest (line 56) | public function onKernelFinishRequest(FinishRequestEvent $event): void
method setLocale (line 61) | private function setLocale(Request $request): void
method setRouterLocale (line 73) | private function setRouterLocale(string $locale): void
method getSubscribedEvents (line 78) | public static function getSubscribedEvents(): array
FILE: EventListener/ProfilerListener.php
class ProfilerListener (line 33) | class ProfilerListener implements EventSubscriberInterface
method __construct (line 45) | public function __construct(
method onKernelException (line 60) | public function onKernelException(ExceptionEvent $event): void
method onKernelResponse (line 72) | public function onKernelResponse(ResponseEvent $event): void
method onKernelTerminate (line 116) | public function onKernelTerminate(TerminateEvent $event): void
method reset (line 135) | public function reset(): void
method getSubscribedEvents (line 142) | public static function getSubscribedEvents(): array
FILE: EventListener/ResponseListener.php
class ResponseListener (line 25) | class ResponseListener implements EventSubscriberInterface
method __construct (line 27) | public function __construct(
method onKernelResponse (line 36) | public function onKernelResponse(ResponseEvent $event): void
method getSubscribedEvents (line 59) | public static function getSubscribedEvents(): array
FILE: EventListener/RouterListener.php
class RouterListener (line 42) | class RouterListener implements EventSubscriberInterface
method __construct (line 51) | public function __construct(
method setCurrentRequest (line 66) | private function setCurrentRequest(?Request $request): void
method onKernelFinishRequest (line 81) | public function onKernelFinishRequest(): void
method onKernelRequest (line 86) | public function onKernelRequest(RequestEvent $event): void
method onKernelException (line 164) | public function onKernelException(ExceptionEvent $event): void
method getSubscribedEvents (line 175) | public static function getSubscribedEvents(): array
method createWelcomeResponse (line 184) | private function createWelcomeResponse(): Response
FILE: EventListener/SerializeControllerResultAttributeListener.php
class SerializeControllerResultAttributeListener (line 28) | final class SerializeControllerResultAttributeListener implements EventS...
method __construct (line 30) | public function __construct(private readonly ?SerializerInterface $ser...
method onView (line 37) | public function onView(ControllerAttributeEvent $event): void
method getSubscribedEvents (line 65) | public static function getSubscribedEvents(): array
method mergeHeaders (line 75) | private function mergeHeaders(Serialize $attribute, Request $request, ...
FILE: EventListener/SessionListener.php
class SessionListener (line 24) | class SessionListener extends AbstractSessionListener
method __construct (line 26) | public function __construct(
method getSession (line 34) | protected function getSession(): ?SessionInterface
FILE: EventListener/SurrogateListener.php
class SurrogateListener (line 27) | class SurrogateListener implements EventSubscriberInterface
method __construct (line 29) | public function __construct(
method onKernelResponse (line 37) | public function onKernelResponse(ResponseEvent $event): void
method getSubscribedEvents (line 59) | public static function getSubscribedEvents(): array
FILE: EventListener/ValidateRequestListener.php
class ValidateRequestListener (line 25) | class ValidateRequestListener implements EventSubscriberInterface
method onKernelRequest (line 30) | public function onKernelRequest(RequestEvent $event): void
method getSubscribedEvents (line 44) | public static function getSubscribedEvents(): array
FILE: Exception/AccessDeniedHttpException.php
class AccessDeniedHttpException (line 18) | class AccessDeniedHttpException extends HttpException
method __construct (line 20) | public function __construct(string $message = '', ?\Throwable $previou...
FILE: Exception/BadRequestHttpException.php
class BadRequestHttpException (line 17) | class BadRequestHttpException extends HttpException
method __construct (line 19) | public function __construct(string $message = '', ?\Throwable $previou...
FILE: Exception/ConflictHttpException.php
class ConflictHttpException (line 17) | class ConflictHttpException extends HttpException
method __construct (line 19) | public function __construct(string $message = '', ?\Throwable $previou...
FILE: Exception/ControllerDoesNotReturnResponseException.php
class ControllerDoesNotReturnResponseException (line 17) | class ControllerDoesNotReturnResponseException extends \LogicException
method __construct (line 19) | public function __construct(string $message, callable $controller, str...
method parseControllerDefinition (line 38) | private function parseControllerDefinition(callable $controller): ?array
FILE: Exception/GoneHttpException.php
class GoneHttpException (line 17) | class GoneHttpException extends HttpException
method __construct (line 19) | public function __construct(string $message = '', ?\Throwable $previou...
FILE: Exception/HttpException.php
class HttpException (line 19) | class HttpException extends \RuntimeException implements HttpExceptionIn...
method __construct (line 21) | public function __construct(
method fromStatusCode (line 31) | public static function fromStatusCode(int $statusCode, string $message...
method getStatusCode (line 52) | public function getStatusCode(): int
method getHeaders (line 57) | public function getHeaders(): array
method setHeaders (line 62) | public function setHeaders(array $headers): void
FILE: Exception/HttpExceptionInterface.php
type HttpExceptionInterface (line 19) | interface HttpExceptionInterface extends \Throwable
method getStatusCode (line 24) | public function getStatusCode(): int;
method getHeaders (line 29) | public function getHeaders(): array;
FILE: Exception/InvalidMetadataException.php
class InvalidMetadataException (line 14) | class InvalidMetadataException extends \LogicException
FILE: Exception/LengthRequiredHttpException.php
class LengthRequiredHttpException (line 17) | class LengthRequiredHttpException extends HttpException
method __construct (line 19) | public function __construct(string $message = '', ?\Throwable $previou...
FILE: Exception/LockedHttpException.php
class LockedHttpException (line 17) | class LockedHttpException extends HttpException
method __construct (line 19) | public function __construct(string $message = '', ?\Throwable $previou...
FILE: Exception/MethodNotAllowedHttpException.php
class MethodNotAllowedHttpException (line 17) | class MethodNotAllowedHttpException extends HttpException
method __construct (line 22) | public function __construct(array $allow, string $message = '', ?\Thro...
FILE: Exception/NearMissValueResolverException.php
class NearMissValueResolverException (line 19) | class NearMissValueResolverException extends \RuntimeException
FILE: Exception/NotAcceptableHttpException.php
class NotAcceptableHttpException (line 17) | class NotAcceptableHttpException extends HttpException
method __construct (line 19) | public function __construct(string $message = '', ?\Throwable $previou...
FILE: Exception/NotFoundHttpException.php
class NotFoundHttpException (line 17) | class NotFoundHttpException extends HttpException
method __construct (line 19) | public function __construct(string $message = '', ?\Throwable $previou...
FILE: Exception/PreconditionFailedHttpException.php
class PreconditionFailedHttpException (line 17) | class PreconditionFailedHttpException extends HttpException
method __construct (line 19) | public function __construct(string $message = '', ?\Throwable $previou...
FILE: Exception/PreconditionRequiredHttpException.php
class PreconditionRequiredHttpException (line 19) | class PreconditionRequiredHttpException extends HttpException
method __construct (line 21) | public function __construct(string $message = '', ?\Throwable $previou...
FILE: Exception/ResolverNotFoundException.php
class ResolverNotFoundException (line 14) | class ResolverNotFoundException extends \RuntimeException
method __construct (line 19) | public function __construct(string $name, array $alternatives = [])
FILE: Exception/ServiceUnavailableHttpException.php
class ServiceUnavailableHttpException (line 17) | class ServiceUnavailableHttpException extends HttpException
method __construct (line 22) | public function __construct(int|string|null $retryAfter = null, string...
FILE: Exception/TooManyRequestsHttpException.php
class TooManyRequestsHttpException (line 19) | class TooManyRequestsHttpException extends HttpException
method __construct (line 24) | public function __construct(int|string|null $retryAfter = null, string...
FILE: Exception/UnauthorizedHttpException.php
class UnauthorizedHttpException (line 17) | class UnauthorizedHttpException extends HttpException
method __construct (line 22) | public function __construct(string $challenge, string $message = '', ?...
FILE: Exception/UnexpectedSessionUsageException.php
class UnexpectedSessionUsageException (line 17) | class UnexpectedSessionUsageException extends \LogicException
FILE: Exception/UnprocessableEntityHttpException.php
class UnprocessableEntityHttpException (line 17) | class UnprocessableEntityHttpException extends HttpException
method __construct (line 19) | public function __construct(string $message = '', ?\Throwable $previou...
FILE: Exception/UnsupportedMediaTypeHttpException.php
class UnsupportedMediaTypeHttpException (line 17) | class UnsupportedMediaTypeHttpException extends HttpException
method __construct (line 19) | public function __construct(string $message = '', ?\Throwable $previou...
FILE: Fragment/AbstractSurrogateFragmentRenderer.php
class AbstractSurrogateFragmentRenderer (line 25) | abstract class AbstractSurrogateFragmentRenderer extends RoutableFragmen...
method __construct (line 33) | public function __construct(
method render (line 55) | public function render(string|ControllerReference $uri, Request $reque...
method generateSignedFragmentUri (line 83) | private function generateSignedFragmentUri(ControllerReference $uri, R...
method containsNonScalars (line 88) | private function containsNonScalars(array $values): bool
FILE: Fragment/EsiFragmentRenderer.php
class EsiFragmentRenderer (line 19) | class EsiFragmentRenderer extends AbstractSurrogateFragmentRenderer
method getName (line 21) | public function getName(): string
FILE: Fragment/FragmentHandler.php
class FragmentHandler (line 30) | class FragmentHandler
method __construct (line 39) | public function __construct(
method addRenderer (line 52) | public function addRenderer(FragmentRendererInterface $renderer): void
method render (line 67) | public function render(string|ControllerReference $uri, string $render...
method deliver (line 94) | protected function deliver(Response $response): ?string
FILE: Fragment/FragmentRendererInterface.php
type FragmentRendererInterface (line 23) | interface FragmentRendererInterface
method render (line 28) | public function render(string|ControllerReference $uri, Request $reque...
method getName (line 33) | public function getName(): string;
FILE: Fragment/FragmentUriGenerator.php
class FragmentUriGenerator (line 25) | final class FragmentUriGenerator implements FragmentUriGeneratorInterface
method __construct (line 27) | public function __construct(
method generate (line 34) | public function generate(ControllerReference $controller, ?Request $re...
method checkNonScalar (line 76) | private function checkNonScalar(array $values): void
FILE: Fragment/FragmentUriGeneratorInterface.php
type FragmentUriGeneratorInterface (line 22) | interface FragmentUriGeneratorInterface
method generate (line 31) | public function generate(ControllerReference $controller, ?Request $re...
FILE: Fragment/HIncludeFragmentRenderer.php
class HIncludeFragmentRenderer (line 25) | class HIncludeFragmentRenderer extends RoutableFragmentRenderer
method __construct (line 30) | public function __construct(
method hasTemplating (line 41) | public function hasTemplating(): bool
method render (line 53) | public function render(string|ControllerReference $uri, Request $reque...
method getName (line 88) | public function getName(): string
FILE: Fragment/InlineFragmentRenderer.php
class InlineFragmentRenderer (line 28) | class InlineFragmentRenderer extends RoutableFragmentRenderer
method __construct (line 30) | public function __construct(
method render (line 41) | public function render(string|ControllerReference $uri, Request $reque...
method createSubRequest (line 103) | protected function createSubRequest(string $uri, Request $request): Re...
method getName (line 137) | public function getName(): string
FILE: Fragment/RoutableFragmentRenderer.php
class RoutableFragmentRenderer (line 23) | abstract class RoutableFragmentRenderer implements FragmentRendererInter...
method setFragmentPath (line 35) | public function setFragmentPath(string $path): void
method generateFragmentUri (line 46) | protected function generateFragmentUri(ControllerReference $reference,...
FILE: Fragment/SsiFragmentRenderer.php
class SsiFragmentRenderer (line 19) | class SsiFragmentRenderer extends AbstractSurrogateFragmentRenderer
method getName (line 21) | public function getName(): string
FILE: HttpCache/AbstractSurrogate.php
class AbstractSurrogate (line 24) | abstract class AbstractSurrogate implements SurrogateInterface
method __construct (line 30) | public function __construct(
method createCacheStrategy (line 38) | public function createCacheStrategy(): ResponseCacheStrategyInterface
method hasSurrogateCapability (line 43) | public function hasSurrogateCapability(Request $request): bool
method addSurrogateCapability (line 52) | public function addSurrogateCapability(Request $request): void
method needsParsing (line 60) | public function needsParsing(Response $response): bool
method handle (line 71) | public function handle(HttpCache $cache, string $uri, string $alt, boo...
method removeFromControl (line 99) | protected function removeFromControl(Response $response): void
method generateBodyEvalBoundary (line 117) | protected static function generateBodyEvalBoundary(): string
FILE: HttpCache/CacheWasLockedException.php
class CacheWasLockedException (line 17) | class CacheWasLockedException extends \Exception
FILE: HttpCache/Esi.php
class Esi (line 28) | class Esi extends AbstractSurrogate
method getName (line 30) | public function getName(): string
method addSurrogateControl (line 35) | public function addSurrogateControl(Response $response): void
method renderIncludeTag (line 42) | public function renderIncludeTag(string $uri, ?string $alt = null, boo...
method process (line 57) | public function process(Request $request, Response $response): Response
FILE: HttpCache/HttpCache.php
class HttpCache (line 31) | class HttpCache implements HttpKernelInterface, TerminableInterface
method __construct (line 85) | public function __construct(
method getStore (line 115) | public function getStore(): StoreInterface
method getTraces (line 123) | public function getTraces(): array
method addTraces (line 128) | private function addTraces(Response $response): void
method getLog (line 148) | public function getLog(): string
method getRequest (line 161) | public function getRequest(): Request
method getKernel (line 169) | public function getKernel(): HttpKernelInterface
method getSurrogate (line 179) | public function getSurrogate(): SurrogateInterface
method handle (line 184) | public function handle(Request $request, int $type = HttpKernelInterfa...
method terminate (line 245) | public function terminate(Request $request, Response $response): void
method pass (line 264) | protected function pass(Request $request, bool $catch = false): Response
method invalidate (line 280) | protected function invalidate(Request $request, bool $catch = false): ...
method lookup (line 324) | protected function lookup(Request $request, bool $catch = false): Resp...
method validate (line 369) | protected function validate(Request $request, Response $entry, bool $c...
method fetch (line 430) | protected function fetch(Request $request, bool $catch = false): Response
method forward (line 461) | protected function forward(Request $request, bool $catch = false, ?Res...
method isFreshEnough (line 530) | protected function isFreshEnough(Request $request, Response $entry): bool
method lock (line 548) | protected function lock(Request $request, Response $entry): bool
method store (line 587) | protected function store(Request $request, Response $response): void
method restoreResponseBody (line 623) | private function restoreResponseBody(Request $request, Response $respo...
method processResponseBody (line 662) | protected function processResponseBody(Request $request, Response $res...
method isPrivateRequest (line 673) | private function isPrivateRequest(Request $request): bool
method record (line 693) | private function record(Request $request, string $event): void
method getTraceKey (line 701) | private function getTraceKey(Request $request): string
method mayServeStaleWhileRevalidate (line 719) | private function mayServeStaleWhileRevalidate(Response $entry): bool
method waitForLock (line 734) | private function waitForLock(Request $request): bool
FILE: HttpCache/ResponseCacheStrategy.php
class ResponseCacheStrategy (line 25) | class ResponseCacheStrategy implements ResponseCacheStrategyInterface
method add (line 57) | public function add(Response $response): void
method update (line 113) | public function update(Response $response): void
method willMakeFinalResponseUncacheable (line 176) | private function willMakeFinalResponseUncacheable(Response $response):...
method storeRelativeAgeDirective (line 218) | private function storeRelativeAgeDirective(string $directive, ?int $va...
FILE: HttpCache/ResponseCacheStrategyInterface.php
type ResponseCacheStrategyInterface (line 26) | interface ResponseCacheStrategyInterface
method add (line 31) | public function add(Response $response): void;
method update (line 36) | public function update(Response $response): void;
FILE: HttpCache/Ssi.php
class Ssi (line 22) | class Ssi extends AbstractSurrogate
method getName (line 24) | public function getName(): string
method addSurrogateControl (line 29) | public function addSurrogateControl(Response $response): void
method renderIncludeTag (line 36) | public function renderIncludeTag(string $uri, ?string $alt = null, boo...
method process (line 41) | public function process(Request $request, Response $response): Response
FILE: HttpCache/Store.php
class Store (line 25) | class Store implements StoreInterface
method __construct (line 42) | public function __construct(
method cleanup (line 56) | public function cleanup(): void
method lock (line 72) | public function lock(Request $request): bool|string
method unlock (line 99) | public function unlock(Request $request): bool
method isLocked (line 114) | public function isLocked(Request $request): bool
method lookup (line 137) | public function lookup(Request $request): ?Response
method write (line 178) | public function write(Request $request, Response $response): string
method generateContentDigest (line 235) | protected function generateContentDigest(Response $response): string
method invalidate (line 245) | public function invalidate(Request $request): void
method requestsMatch (line 275) | private function requestsMatch(?string $vary, array $env1, array $env2...
method getMetadata (line 298) | private function getMetadata(string $key): array
method purge (line 314) | public function purge(string $url): bool
method doPurge (line 328) | private function doPurge(string $url): bool
method load (line 349) | private function load(string $key): ?string
method save (line 359) | private function save(string $key, string $data, bool $overwrite = tru...
method getPath (line 409) | public function getPath(string $key): string
method generateCacheKey (line 424) | protected function generateCacheKey(Request $request): string
method getCacheKey (line 440) | private function getCacheKey(Request $request): string
method persistRequest (line 452) | private function persistRequest(Request $request): array
method persistResponse (line 460) | private function persistResponse(Response $response): array
method restoreResponse (line 471) | private function restoreResponse(array $headers, ?string $path = null)...
FILE: HttpCache/StoreInterface.php
type StoreInterface (line 25) | interface StoreInterface
method lookup (line 30) | public function lookup(Request $request): ?Response;
method write (line 40) | public function write(Request $request, Response $response): string;
method invalidate (line 45) | public function invalidate(Request $request): void;
method lock (line 52) | public function lock(Request $request): bool|string;
method unlock (line 59) | public function unlock(Request $request): bool;
method isLocked (line 66) | public function isLocked(Request $request): bool;
method purge (line 73) | public function purge(string $url): bool;
method cleanup (line 78) | public function cleanup(): void;
FILE: HttpCache/SubRequestHandler.php
class SubRequestHandler (line 24) | class SubRequestHandler
method handle (line 26) | public static function handle(HttpKernelInterface $kernel, Request $re...
FILE: HttpCache/SurrogateInterface.php
type SurrogateInterface (line 17) | interface SurrogateInterface
method getName (line 22) | public function getName(): string;
method createCacheStrategy (line 27) | public function createCacheStrategy(): ResponseCacheStrategyInterface;
method hasSurrogateCapability (line 32) | public function hasSurrogateCapability(Request $request): bool;
method addSurrogateCapability (line 37) | public function addSurrogateCapability(Request $request): void;
method addSurrogateControl (line 44) | public function addSurrogateControl(Response $response): void;
method needsParsing (line 49) | public function needsParsing(Response $response): bool;
method renderIncludeTag (line 57) | public function renderIncludeTag(string $uri, ?string $alt = null, boo...
method process (line 62) | public function process(Request $request, Response $response): Response;
method handle (line 72) | public function handle(HttpCache $cache, string $uri, string $alt, boo...
FILE: HttpClientKernel.php
class HttpClientKernel (line 32) | final class HttpClientKernel implements HttpKernelInterface
method __construct (line 36) | public function __construct(?HttpClientInterface $client = null)
method handle (line 45) | public function handle(Request $request, int $type = HttpKernelInterfa...
method getBody (line 79) | private function getBody(Request $request): ?AbstractPart
method getHeaders (line 101) | private function getHeaders(Request $request): array
FILE: HttpKernel.php
class HttpKernel (line 55) | class HttpKernel implements HttpKernelInterface, TerminableInterface
method __construct (line 61) | public function __construct(
method handle (line 72) | public function handle(Request $request, int $type = HttpKernelInterfa...
method terminate (line 113) | public function terminate(Request $request, Response $response): void
method terminateWithException (line 126) | public function terminateWithException(\Throwable $exception, ?Request...
method handleRaw (line 158) | private function handleRaw(Request $request, int $type = self::MAIN_RE...
method filterResponse (line 217) | private function filterResponse(Response $response, Request $request, ...
method finishRequest (line 235) | private function finishRequest(Request $request, int $type, ?Controlle...
method handleThrowable (line 243) | private function handleThrowable(\Throwable $e, Request $request, int ...
method varToString (line 285) | private function varToString(mixed $var): string
FILE: HttpKernelBrowser.php
class HttpKernelBrowser (line 30) | class HttpKernelBrowser extends AbstractBrowser
method __construct (line 37) | public function __construct(
method catchExceptions (line 52) | public function catchExceptions(bool $catchExceptions): void
method doRequest (line 60) | protected function doRequest(object $request): Response
method getScript (line 74) | protected function getScript(object $request): string
method getHandleScript (line 110) | protected function getHandleScript(): string
method filterRequest (line 123) | protected function filterRequest(DomRequest $request): Request
method filterFiles (line 148) | protected function filterFiles(array $files): array
method filterResponse (line 181) | protected function filterResponse(object $response): DomResponse
FILE: HttpKernelInterface.php
type HttpKernelInterface (line 22) | interface HttpKernelInterface
method handle (line 39) | public function handle(Request $request, int $type = self::MAIN_REQUES...
FILE: Kernel.php
class Kernel (line 53) | abstract class Kernel implements KernelInterface, RebootableInterface, T...
method __construct (line 85) | public function __construct(
method __clone (line 94) | public function __clone()
method boot (line 103) | public function boot(): void
method reboot (line 131) | public function reboot(?string $warmupDir): void
method terminate (line 138) | public function terminate(Request $request, Response $response): void
method shutdown (line 149) | public function shutdown(): void
method handle (line 167) | public function handle(Request $request, int $type = HttpKernelInterfa...
method getHttpKernel (line 200) | protected function getHttpKernel(): HttpKernelInterface
method getBundles (line 205) | public function getBundles(): array
method getBundle (line 210) | public function getBundle(string $name): BundleInterface
method locateResource (line 219) | public function locateResource(string $name): string
method getEnvironment (line 243) | public function getEnvironment(): string
method isDebug (line 248) | public function isDebug(): bool
method getProjectDir (line 256) | public function getProjectDir(): string
method getContainer (line 278) | public function getContainer(): ContainerInterface
method getStartTime (line 287) | public function getStartTime(): float
method getCacheDir (line 292) | public function getCacheDir(): string
method getBuildDir (line 297) | public function getBuildDir(): string
method getShareDir (line 303) | public function getShareDir(): ?string
method getLogDir (line 309) | public function getLogDir(): string
method getCharset (line 314) | public function getCharset(): string
method initializeBundles (line 324) | protected function initializeBundles(): void
method build (line 342) | protected function build(ContainerBuilder $container): void
method getContainerClass (line 351) | protected function getContainerClass(): string
method getContainerBaseClass (line 369) | protected function getContainerBaseClass(): string
method initializeContainer (line 380) | protected function initializeContainer(): void
method getKernelParameters (line 548) | protected function getKernelParameters(): array
method buildContainer (line 585) | protected function buildContainer(): ContainerBuilder
method prepareContainer (line 608) | protected function prepareContainer(ContainerBuilder $container): void
method getContainerBuilder (line 642) | protected function getContainerBuilder(): ContainerBuilder
method dumpContainer (line 663) | protected function dumpContainer(ConfigCache $cache, ContainerBuilder ...
method getContainerLoader (line 710) | protected function getContainerLoader(ContainerInterface $container): ...
method preBoot (line 726) | private function preBoot(): ContainerInterface
method __serialize (line 774) | public function __serialize(): array
method __unserialize (line 782) | public function __unserialize(array $data): void
FILE: KernelEvents.php
class KernelEvents (line 28) | final class KernelEvents
FILE: KernelInterface.php
type KernelInterface (line 25) | interface KernelInterface extends HttpKernelInterface
method registerBundles (line 32) | public function registerBundles(): iterable;
method registerContainerConfiguration (line 37) | public function registerContainerConfiguration(LoaderInterface $loader...
method boot (line 42) | public function boot(): void;
method shutdown (line 49) | public function shutdown(): void;
method getBundles (line 56) | public function getBundles(): array;
method getBundle (line 63) | public function getBundle(string $name): BundleInterface;
method locateResource (line 80) | public function locateResource(string $name): string;
method getEnvironment (line 85) | public function getEnvironment(): string;
method isDebug (line 90) | public function isDebug(): bool;
method getProjectDir (line 95) | public function getProjectDir(): string;
method getContainer (line 100) | public function getContainer(): ContainerInterface;
method getStartTime (line 105) | public function getStartTime(): float;
method getCacheDir (line 114) | public function getCacheDir(): string;
method getBuildDir (line 124) | public function getBuildDir(): string;
method getShareDir (line 132) | public function getShareDir(): ?string;
method getLogDir (line 137) | public function getLogDir(): string;
method getCharset (line 142) | public function getCharset(): string;
FILE: Log/DebugLoggerConfigurator.php
class DebugLoggerConfigurator (line 19) | class DebugLoggerConfigurator
method __construct (line 23) | public function __construct(callable $processor, ?bool $enable = null)
method pushDebugLogger (line 30) | public function pushDebugLogger(Logger $logger): void
method getDebugLogger (line 37) | public static function getDebugLogger(mixed $logger): ?DebugLoggerInte...
FILE: Log/DebugLoggerInterface.php
type DebugLoggerInterface (line 21) | interface DebugLoggerInterface
method getLogs (line 36) | public function getLogs(?Request $request = null): array;
method countErrors (line 41) | public function countErrors(?Request $request = null): int;
method clear (line 46) | public function clear(): void;
FILE: Log/Logger.php
class Logger (line 25) | class Logger extends AbstractLogger implements DebugLoggerInterface
method __construct (line 60) | public function __construct(?string $minLevel = null, $output = null, ...
method enableDebug (line 82) | public function enableDebug(): void
method log (line 87) | public function log($level, $message, array $context = []): void
method getLogs (line 109) | public function getLogs(?Request $request = null): array
method countErrors (line 118) | public function countErrors(?Request $request = null): int
method clear (line 127) | public function clear(): void
method format (line 133) | private function format(string $level, string $message, array $context...
method record (line 160) | private function record($level, $message, array $context): void
FILE: Profiler/FileProfilerStorage.php
class FileProfilerStorage (line 19) | class FileProfilerStorage implements ProfilerStorageInterface
method __construct (line 33) | public function __construct(string $dsn)
method find (line 45) | public function find(?string $ip, ?string $url, ?int $limit, ?string $...
method purge (line 109) | public function purge(): void
method read (line 124) | public function read(string $token): ?Profile
method write (line 132) | public function write(Profile $profile): bool
method getFilename (line 206) | protected function getFilename(string $token): string
method getIndexFilename (line 218) | protected function getIndexFilename(): string
method readLineFromFile (line 230) | protected function readLineFromFile($file): mixed
method createProfileFromData (line 268) | protected function createProfileFromData(string $token, array $data, ?...
method doRead (line 297) | private function doRead($token, ?Profile $profile = null): ?Profile
method removeExpiredProfiles (line 320) | private function removeExpiredProfiles(): void
FILE: Profiler/Profile.php
class Profile (line 21) | class Profile
method __construct (line 42) | public function __construct(
method setToken (line 47) | public function setToken(string $token): void
method getToken (line 55) | public function getToken(): string
method setParent (line 63) | public function setParent(self $parent): void
method getParent (line 71) | public function getParent(): ?self
method getParentToken (line 79) | public function getParentToken(): ?string
method getIp (line 87) | public function getIp(): ?string
method setIp (line 92) | public function setIp(?string $ip): void
method getMethod (line 100) | public function getMethod(): ?string
method setMethod (line 105) | public function setMethod(string $method): void
method getUrl (line 113) | public function getUrl(): ?string
method setUrl (line 118) | public function setUrl(?string $url): void
method getTime (line 123) | public function getTime(): int
method setTime (line 128) | public function setTime(int $time): void
method setStatusCode (line 133) | public function setStatusCode(int $statusCode): void
method getStatusCode (line 138) | public function getStatusCode(): ?int
method setVirtualType (line 146) | public function setVirtualType(?string $virtualType): void
method getVirtualType (line 154) | public function getVirtualType(): ?string
method hasErrors (line 159) | public function hasErrors(): bool
method setHasErrors (line 164) | public function setHasErrors(bool $hasErrors): void
method getChildren (line 174) | public function getChildren(): array
method setChildren (line 184) | public function setChildren(array $children): void
method addChild (line 195) | public function addChild(self $child): void
method getChildByToken (line 201) | public function getChildByToken(string $token): ?self
method getCollector (line 217) | public function getCollector(string $name): DataCollectorInterface
method getCollectors (line 231) | public function getCollectors(): array
method setCollectors (line 241) | public function setCollectors(array $collectors): void
method addCollector (line 252) | public function addCollector(DataCollectorInterface $collector): void
method hasCollector (line 257) | public function hasCollector(string $name): bool
method __serialize (line 262) | public function __serialize(): array
FILE: Profiler/Profiler.php
class Profiler (line 28) | class Profiler implements ResetInterface
method __construct (line 37) | public function __construct(
method disable (line 48) | public function disable(): void
method enable (line 56) | public function enable(): void
method isEnabled (line 61) | public function isEnabled(): bool
method loadProfileFromResponse (line 69) | public function loadProfileFromResponse(Response $response): ?Profile
method loadProfile (line 81) | public function loadProfile(string $token): ?Profile
method saveProfile (line 89) | public function saveProfile(Profile $profile): bool
method purge (line 117) | public function purge(): void
method find (line 132) | public function find(?string $ip, ?string $url, ?int $limit, ?string $...
method collect (line 140) | public function collect(Request $request, Response $response, ?\Throwa...
method reset (line 179) | public function reset(): void
method all (line 190) | public function all(): array
method set (line 200) | public function set(array $collectors = []): void
method add (line 211) | public function add(DataCollectorInterface $collector): void
method has (line 221) | public function has(string $name): bool
method get (line 233) | public function get(string $name): DataCollectorInterface
method getTimestamp (line 242) | private function getTimestamp(?string $value): ?int
FILE: Profiler/ProfilerStateChecker.php
class ProfilerStateChecker (line 16) | class ProfilerStateChecker
method __construct (line 18) | public function __construct(
method isProfilerEnabled (line 24) | public function isProfilerEnabled(): bool
method isProfilerDisabled (line 29) | public function isProfilerDisabled(): bool
FILE: Profiler/ProfilerStorageInterface.php
type ProfilerStorageInterface (line 27) | interface ProfilerStorageInterface
method find (line 38) | public function find(?string $ip, ?string $url, ?int $limit, ?string $...
method read (line 45) | public function read(string $token): ?Profile;
method write (line 50) | public function write(Profile $profile): bool;
method purge (line 55) | public function purge(): void;
FILE: RebootableInterface.php
type RebootableInterface (line 19) | interface RebootableInterface
method reboot (line 29) | public function reboot(?string $warmupDir): void;
FILE: TerminableInterface.php
type TerminableInterface (line 24) | interface TerminableInterface
method terminate (line 31) | public function terminate(Request $request, Response $response): void;
FILE: Tests/Attribute/WithLogLevelTest.php
class WithLogLevelTest (line 21) | class WithLogLevelTest extends TestCase
method testWithValidLogLevel (line 23) | public function testWithValidLogLevel()
method testWithInvalidLogLevel (line 32) | public function testWithInvalidLogLevel()
FILE: Tests/Bundle/BundleTest.php
class BundleTest (line 21) | class BundleTest extends TestCase
method testGetContainerExtension (line 23) | public function testGetContainerExtension()
method testBundleNameIsGuessedFromClass (line 33) | public function testBundleNameIsGuessedFromClass()
method testBundleNameCanBeExplicitlyProvided (line 41) | public function testBundleNameCanBeExplicitlyProvided()
method testBundleAsCompilerPass (line 50) | public function testBundleAsCompilerPass()
class NamedBundle (line 74) | class NamedBundle extends Bundle
method __construct (line 76) | public function __construct()
class GuessedNameBundle (line 82) | class GuessedNameBundle extends Bundle
FILE: Tests/CacheClearer/ChainCacheClearerTest.php
class ChainCacheClearerTest (line 18) | class ChainCacheClearerTest extends TestCase
method setUpBeforeClass (line 22) | public static function setUpBeforeClass(): void
method tearDownAfterClass (line 27) | public static function tearDownAfterClass(): void
method testInjectClearersInConstructor (line 32) | public function testInjectClearersInConstructor()
FILE: Tests/CacheClearer/Psr6CacheClearerTest.php
class Psr6CacheClearerTest (line 18) | class Psr6CacheClearerTest extends TestCase
method testClearPoolsInjectedInConstructor (line 20) | public function testClearPoolsInjectedInConstructor()
method testClearPool (line 30) | public function testClearPool()
method testClearPoolThrowsExceptionOnUnreferencedPool (line 42) | public function testClearPoolThrowsExceptionOnUnreferencedPool()
FILE: Tests/CacheWarmer/CacheWarmerAggregateTest.php
class CacheWarmerAggregateTest (line 19) | class CacheWarmerAggregateTest extends TestCase
method testInjectWarmersUsingConstructor (line 21) | public function testInjectWarmersUsingConstructor()
method testWarmupDoesCallWarmupOnOptionalWarmersWhenEnableOptionalWarmersIsEnabled (line 31) | public function testWarmupDoesCallWarmupOnOptionalWarmersWhenEnableOpt...
method testWarmupDoesNotCallWarmupOnOptionalWarmersWhenEnableOptionalWarmersIsNotEnabled (line 46) | public function testWarmupDoesNotCallWarmupOnOptionalWarmersWhenEnable...
method testWarmupReturnsFilesOrClasses (line 61) | public function testWarmupReturnsFilesOrClasses()
method testWarmupChecksInvalidFiles (line 78) | public function testWarmupChecksInvalidFiles()
method testWarmupPassBuildDir (line 96) | public function testWarmupPassBuildDir()
method testWarmupOnOptionalWarmerPassBuildDir (line 109) | public function testWarmupOnOptionalWarmerPassBuildDir()
method testWarmupWhenDebugDisplaysWarmupDuration (line 126) | public function testWarmupWhenDebugDisplaysWarmupDuration()
method testWarmupWhenNotDebugDoesntDisplayWarmupDuration (line 151) | public function testWarmupWhenNotDebugDoesntDisplayWarmupDuration()
FILE: Tests/CacheWarmer/CacheWarmerTest.php
class CacheWarmerTest (line 17) | class CacheWarmerTest extends TestCase
method setUpBeforeClass (line 21) | public static function setUpBeforeClass(): void
method tearDownAfterClass (line 26) | public static function tearDownAfterClass(): void
method testWriteCacheFileCreatesTheFile (line 31) | public function testWriteCacheFileCreatesTheFile()
method testWriteNonWritableCacheFileThrowsARuntimeException (line 39) | public function testWriteNonWritableCacheFileThrowsARuntimeException()
class TestCacheWarmer (line 48) | class TestCacheWarmer extends CacheWarmer
method __construct (line 52) | public function __construct(string $file)
method warmUp (line 57) | public function warmUp(string $cacheDir, ?string $buildDir = null): array
method isOptional (line 64) | public function isOptional(): bool
FILE: Tests/Config/FileLocatorTest.php
class FileLocatorTest (line 18) | class FileLocatorTest extends TestCase
method testLocate (line 20) | public function testLocate()
FILE: Tests/Controller/ArgumentResolver/BackedEnumValueResolverTest.php
class BackedEnumValueResolverTest (line 23) | class BackedEnumValueResolverTest extends TestCase
method testSupports (line 25) | #[DataProvider('provideTestSupportsData')]
method provideTestSupportsData (line 33) | public static function provideTestSupportsData(): iterable
method testResolve (line 70) | #[DataProvider('provideTestResolveData')]
method provideTestResolveData (line 80) | public static function provideTestResolveData(): iterable
method testResolveThrowsNotFoundOnInvalidValue (line 104) | public function testResolveThrowsNotFoundOnInvalidValue()
method testResolveThrowsOnUnexpectedType (line 116) | public function testResolveThrowsOnUnexpectedType()
method testResolveThrowsOnTypeError (line 128) | public function testResolveThrowsOnTypeError()
method createRequest (line 140) | private static function createRequest(array $attributes = []): Request
method createArgumentMetadata (line 145) | private static function createArgumentMetadata(string $name, string $t...
FILE: Tests/Controller/ArgumentResolver/DateTimeValueResolverTest.php
class DateTimeValueResolverTest (line 23) | class DateTimeValueResolverTest extends TestCase
method setUp (line 27) | protected function setUp(): void
method tearDown (line 32) | protected function tearDown(): void
method getTimeZones (line 37) | public static function getTimeZones()
method getClasses (line 47) | public static function getClasses()
method testUnsupportedArgument (line 54) | public function testUnsupportedArgument()
method testFullDate (line 63) | #[DataProvider('getTimeZones')]
method testUnixTimestamp (line 80) | #[DataProvider('getTimeZones')]
method testNullableWithEmptyAttribute (line 97) | public function testNullableWithEmptyAttribute()
method testNow (line 113) | #[DataProvider('getClasses')]
method testNowWithClock (line 133) | #[DataProvider('getClasses')]
method testPreviouslyConvertedAttribute (line 154) | #[DataProvider('getClasses')]
method testCustomClass (line 169) | public function testCustomClass()
method testDateTimeImmutable (line 184) | #[DataProvider('getTimeZones')]
method testWithFormat (line 201) | #[DataProvider('getTimeZones')]
method provideInvalidDates (line 220) | public static function provideInvalidDates()
method test404Exception (line 238) | #[DataProvider('provideInvalidDates')]
method requestWithAttributes (line 249) | private static function requestWithAttributes(array $attributes): Request
class FooDateTime (line 261) | class FooDateTime extends \DateTimeImmutable
FILE: Tests/Controller/ArgumentResolver/NotTaggedControllerValueResolverTest.php
class NotTaggedControllerValueResolverTest (line 21) | class NotTaggedControllerValueResolverTest extends TestCase
method testDoNotSupportWhenControllerExists (line 23) | public function testDoNotSupportWhenControllerExists()
method testDoNotSupportEmptyController (line 35) | public function testDoNotSupportEmptyController()
method testController (line 43) | public function testController()
method testControllerWithATrailingBackSlash (line 53) | public function testControllerWithATrailingBackSlash()
method testControllerWithMethodNameStartUppercase (line 63) | public function testControllerWithMethodNameStartUppercase()
method testControllerNameIsAnArray (line 73) | public function testControllerNameIsAnArray()
method testInvokableController (line 83) | public function testInvokableController()
method requestWithAttributes (line 93) | private function requestWithAttributes(array $attributes)
FILE: Tests/Controller/ArgumentResolver/QueryParameterValueResolverTest.php
class QueryParameterValueResolverTest (line 28) | class QueryParameterValueResolverTest extends TestCase
method setUp (line 32) | protected function setUp(): void
method testSkipWhenNoAttribute (line 37) | public function testSkipWhenNoAttribute()
method testResolvingSuccessfully (line 44) | #[DataProvider('validDataProvider')]
method testResolvingWithInvalidArgumentType (line 50) | #[DataProvider('invalidArgumentTypeProvider')]
method testResolvingWithInvalidOrMissingArgument (line 59) | #[DataProvider('invalidOrMissingArgumentProvider')]
method validDataProvider (line 79) | public static function validDataProvider(): iterable
method invalidArgumentTypeProvider (line 245) | public static function invalidArgumentTypeProvider(): iterable
method invalidOrMissingArgumentProvider (line 267) | public static function invalidOrMissingArgumentProvider(): iterable
FILE: Tests/Controller/ArgumentResolver/RequestAttributeValueResolverTest.php
class RequestAttributeValueResolverTest (line 20) | class RequestAttributeValueResolverTest extends TestCase
method testValidIntWithinRangeWorks (line 22) | public function testValidIntWithinRangeWorks()
method testInvalidStringBecomes404 (line 34) | public function testInvalidStringBecomes404()
method testOutOfRangeIntBecomes404 (line 45) | public function testOutOfRangeIntBecomes404()
method testNullableIntAllowsNull (line 57) | public function testNullableIntAllowsNull()
FILE: Tests/Controller/ArgumentResolver/RequestHeaderValueResolverTest.php
class RequestHeaderValueResolverTest (line 23) | class RequestHeaderValueResolverTest extends TestCase
method provideHeaderValueWithStringType (line 25) | public static function provideHeaderValueWithStringType(): iterable
method provideHeaderValueWithArrayType (line 33) | public static function provideHeaderValueWithArrayType(): iterable
method provideHeaderValueWithAcceptHeaderType (line 73) | public static function provideHeaderValueWithAcceptHeaderType(): iterable
method provideHeaderValueWithDefaultAndNull (line 97) | public static function provideHeaderValueWithDefaultAndNull(): iterable
method testWrongType (line 103) | public function testWrongType()
method testWithStringType (line 117) | #[DataProvider('provideHeaderValueWithStringType')]
method testWithArrayType (line 134) | #[DataProvider('provideHeaderValueWithArrayType')]
method testWithAcceptHeaderType (line 151) | #[DataProvider('provideHeaderValueWithAcceptHeaderType')]
method testWithDefaultValueAndNull (line 168) | #[DataProvider('provideHeaderValueWithDefaultAndNull')]
method testCamelCaseArgumentNameMapsToKebabCaseHeader (line 183) | public function testCamelCaseArgumentNameMapsToKebabCaseHeader()
method testWithNoDefaultAndNotNullable (line 199) | public function testWithNoDefaultAndNotNullable()
method testWithNoDefaultAndNotNullableArray (line 212) | public function testWithNoDefaultAndNotNullableArray()
FILE: Tests/Controller/ArgumentResolver/RequestPayloadValueResolverTest.php
class RequestPayloadValueResolverTest (line 50) | class RequestPayloadValueResolverTest extends TestCase
method testNotTypedArgument (line 54) | public function testNotTypedArgument()
method testDefaultValueArgument (line 76) | public function testDefaultValueArgument()
method testQueryDefaultValueArgument (line 100) | public function testQueryDefaultValueArgument()
method testNullableValueArgument (line 124) | public function testNullableValueArgument()
method testQueryNullableValueArgument (line 146) | public function testQueryNullableValueArgument()
method testMapQueryStringEmpty (line 168) | public function testMapQueryStringEmpty()
method testMapRequestPayloadEmpty (line 188) | public function testMapRequestPayloadEmpty()
method testNullPayloadAndNotDefaultOrNullableArgument (line 208) | public function testNullPayloadAndNotDefaultOrNullableArgument()
method testRequestPayloadWithoutContentTypeOnNullableArgumentReturnsNull (line 233) | public function testRequestPayloadWithoutContentTypeOnNullableArgument...
method testQueryNullPayloadAndNotDefaultOrNullableArgument (line 255) | public function testQueryNullPayloadAndNotDefaultOrNullableArgument()
method testWithoutValidatorAndCouldNotDenormalize (line 280) | public function testWithoutValidatorAndCouldNotDenormalize()
method testValidationNotPassed (line 304) | public function testValidationNotPassed()
method testValidationFailedOnInvalidBackedEnum (line 335) | public function testValidationFailedOnInvalidBackedEnum()
method testValidationNotPerformedWhenPartialDenormalizationReturnsViolation (line 369) | public function testValidationNotPerformedWhenPartialDenormalizationRe...
method testUnsupportedMedia (line 399) | public function testUnsupportedMedia()
method testRequestContentValidationPassed (line 422) | public function testRequestContentValidationPassed()
method testRequestContentWithUntypedErrors (line 449) | #[TestWith([null])]
method testQueryStringValidationPassed (line 475) | public function testQueryStringValidationPassed()
method testQueryStringParameterTypeMismatch (line 503) | public function testQueryStringParameterTypeMismatch()
method testRequestInputValidationPassed (line 535) | public function testRequestInputValidationPassed()
method testRequestArrayDenormalization (line 563) | public function testRequestArrayDenormalization()
method testRequestInputTypeMismatch (line 597) | public function testRequestInputTypeMismatch()
method testItThrowsOnMissingAttributeType (line 629) | public function testItThrowsOnMissingAttributeType()
method testItThrowsOnInvalidAttributeTypeUsage (line 646) | public function testItThrowsOnInvalidAttributeTypeUsage()
method testItThrowsOnVariadicArgument (line 663) | public function testItThrowsOnVariadicArgument()
method testAcceptFormatPassed (line 679) | #[DataProvider('provideMatchedFormatContext')]
method provideMatchedFormatContext (line 702) | public static function provideMatchedFormatContext(): iterable
method testAcceptFormatNotPassed (line 741) | #[DataProvider('provideMismatchedFormatContext')]
method provideMismatchedFormatContext (line 767) | public static function provideMismatchedFormatContext(): iterable
method testValidationGroupsPassed (line 805) | #[DataProvider('provideValidationGroupsOnManyTypes')]
method testValidationGroupsNotPassed (line 832) | #[DataProvider('provideValidationGroupsOnManyTypes')]
method provideValidationGroupsOnManyTypes (line 861) | public static function provideValidationGroupsOnManyTypes(): iterable
method testQueryValidationErrorCustomStatusCode (line 894) | public function testQueryValidationErrorCustomStatusCode()
method testRequestPayloadValidationErrorCustomStatusCode (line 926) | public function testRequestPayloadValidationErrorCustomStatusCode()
method testBoolArgumentInQueryString (line 957) | #[DataProvider('provideBoolArgument')]
method testBoolArgumentInBody (line 978) | #[DataProvider('provideBoolArgument')]
method provideBoolArgument (line 999) | public static function provideBoolArgument()
method testBoolArgumentInJsonBody (line 1015) | public function testBoolArgumentInJsonBody()
method testConfigKeyForQueryString (line 1035) | public function testConfigKeyForQueryString()
method testMapRequestPayloadVariadic (line 1056) | public function testMapRequestPayloadVariadic()
method testMapRequestPayloadVariadicJson (line 1090) | public function testMapRequestPayloadVariadicJson()
method testMapRequestPayloadWithUploadedFiles (line 1120) | public function testMapRequestPayloadWithUploadedFiles()
method testExpressionAsValidationGroup (line 1151) | public function testExpressionAsValidationGroup()
method testExpressionAsValidationGroupCanUseController (line 1181) | public function testExpressionAsValidationGroupCanUseController()
method testClosureAsValidationGroup (line 1211) | public function testClosureAsValidationGroup()
method testExpressionAsValidationGroupForQueryString (line 1251) | public function testExpressionAsValidationGroupForQueryString()
method testNestedExpressionsInValidationGroupsAreNotSupported (line 1278) | public function testNestedExpressionsInValidationGroupsAreNotSupported()
method testMapRequestPayloadWithPreParsedJsonIntCoercesToFloat (line 1306) | public function testMapRequestPayloadWithPreParsedJsonIntCoercesToFloat()
method testMapRequestPayloadWithFormDataCoercesStringToBool (line 1332) | public function testMapRequestPayloadWithFormDataCoercesStringToBool()
method testMapRequestPayloadWithJsonContentTypeStringValuesCoercesToBool (line 1358) | public function testMapRequestPayloadWithJsonContentTypeStringValuesCo...
class RequestPayload (line 1385) | class RequestPayload
method __construct (line 1390) | public function __construct(public readonly float $price)
class RequestPayloadWithFile (line 1395) | class RequestPayloadWithFile extends RequestPayload
type SerializerDenormalizer (line 1400) | interface SerializerDenormalizer extends SerializerInterface, Denormaliz...
class QueryPayload (line 1404) | class QueryPayload
method __construct (line 1406) | public function __construct(public readonly float $page)
class User (line 1411) | class User
method __construct (line 1413) | public function __construct(
method getEmail (line 1421) | public function getEmail(): string
method getPassword (line 1426) | public function getPassword(): string
class RequestPayloadWithBackedEnum (line 1432) | class RequestPayloadWithBackedEnum
method __construct (line 1434) | public function __construct(public readonly RequestMethod $method)
class ObjectWithBoolArgument (line 1445) | class ObjectWithBoolArgument
method __construct (line 1447) | public function __construct(public readonly ?bool $value = null)
class FormPayloadWithBool (line 1452) | class FormPayloadWithBool
method __construct (line 1454) | public function __construct(public readonly bool $active)
class RequestPayloadDenormalizer (line 1459) | class RequestPayloadDenormalizer implements DenormalizerInterface
method __construct (line 1461) | public function __construct(private RequestPayload $payload)
method denormalize (line 1465) | public function denormalize(mixed $data, string $type, ?string $format...
method supportsDenormalization (line 1470) | public function supportsDenormalization(mixed $data, string $type, ?st...
method getSupportedTypes (line 1475) | public function getSupportedTypes(?string $format = null): array
FILE: Tests/Controller/ArgumentResolver/RequestValueResolverTest.php
class RequestValueResolverTest (line 21) | class RequestValueResolverTest extends TestCase
method testSameRequestReturned (line 23) | public function testSameRequestReturned()
method testRequestIsNotResolvedForRandomClass (line 32) | public function testRequestIsNotResolvedForRandomClass()
method testExceptionThrownForRandomRequestClass (line 40) | public function testExceptionThrownForRandomRequestClass()
FILE: Tests/Controller/ArgumentResolver/ServiceValueResolverTest.php
class ServiceValueResolverTest (line 23) | class ServiceValueResolverTest extends TestCase
method testDoNotSupportWhenControllerDoNotExists (line 25) | public function testDoNotSupportWhenControllerDoNotExists()
method testExistingController (line 34) | public function testExistingController()
method testExistingControllerWithATrailingBackSlash (line 48) | public function testExistingControllerWithATrailingBackSlash()
method testExistingControllerWithMethodNameStartUppercase (line 62) | public function testExistingControllerWithMethodNameStartUppercase()
method testControllerNameIsAnArray (line 75) | public function testControllerNameIsAnArray()
method testErrorIsTruncated (line 89) | public function testErrorIsTruncated()
method requestWithAttributes (line 106) | private function requestWithAttributes(array $attributes)
class DummyService (line 118) | class DummyService
class DummyController (line 122) | class DummyController
method index (line 124) | public function index(DummyService $dummy)
FILE: Tests/Controller/ArgumentResolver/TraceableValueResolverTest.php
class TraceableValueResolverTest (line 21) | class TraceableValueResolverTest extends TestCase
method testTimingsInResolve (line 23) | public function testTimingsInResolve()
class ResolverStub (line 51) | class ResolverStub implements ValueResolverInterface
method resolve (line 53) | public function resolve(Request $request, ArgumentMetadata $argument):...
FILE: Tests/Controller/ArgumentResolver/UidValueResolverTest.php
class UidValueResolverTest (line 26) | class UidValueResolverTest extends TestCase
method testSupports (line 28) | #[DataProvider('provideSupports')]
method provideSupports (line 34) | public static function provideSupports()
method testResolveOK (line 49) | #[DataProvider('provideResolveOK')]
method provideResolveOK (line 58) | public static function provideResolveOK()
method testResolveKO (line 73) | #[DataProvider('provideResolveKO')]
method provideResolveKO (line 85) | public static function provideResolveKO()
method testResolveAbstractClass (line 95) | public function testResolveAbstractClass()
class TestCustomUid (line 107) | class TestCustomUid extends UuidV1
class TestAbstractCustomUid (line 111) | abstract class TestAbstractCustomUid extends UuidV1
FILE: Tests/Controller/ArgumentResolver/UploadedFileValueResolverTest.php
class UploadedFileValueResolverTest (line 29) | class UploadedFileValueResolverTest extends TestCase
method testDefaults (line 33) | #[DataProvider('provideContext')]
method testEmpty (line 63) | #[DataProvider('provideContext')]
method testEmptyArrayUploadedFileArgument (line 89) | public function testEmptyArrayUploadedFileArgument()
method testEmptyArrayArgument (line 127) | #[DataProvider('provideContext')]
method testCustomName (line 154) | #[DataProvider('provideContext')]
method testConstraintsWithoutViolation (line 184) | #[DataProvider('provideContext')]
method testConstraintsWithViolation (line 214) | #[DataProvider('provideContext')]
method testConstraintsViolationHasArgumentNameAsPropertyPath (line 241) | #[DataProvider('provideContext')]
method testMultipleFilesArray (line 272) | #[DataProvider('provideContext')]
method testMultipleFilesArrayConstraints (line 304) | #[DataProvider('provideContext')]
method testSingleFileVariadic (line 331) | #[DataProvider('provideContext')]
method testMultipleFilesVariadic (line 361) | #[DataProvider('provideContext')]
method testMultipleFilesVariadicConstraints (line 393) | #[DataProvider('provideContext')]
method testShouldAllowEmptyWhenNullable (line 420) | #[DataProvider('provideContext')]
method testShouldAllowEmptyWhenNullableArray (line 448) | #[DataProvider('provideContext')]
method testShouldAllowEmptyWhenHasDefaultValue (line 476) | #[DataProvider('provideContext')]
method provideContext (line 504) | public static function provideContext(): iterable
FILE: Tests/Controller/ArgumentResolverTest.php
class ArgumentResolverTest (line 34) | class ArgumentResolverTest extends TestCase
method getResolver (line 36) | public static function getResolver(array $chainableResolvers = [], ?ar...
method testDefaultState (line 45) | public function testDefaultState()
method testGetArguments (line 51) | public function testGetArguments()
method testGetArgumentsReturnsEmptyArrayWhenNoArguments (line 60) | public function testGetArgumentsReturnsEmptyArrayWhenNoArguments()
method testGetArgumentsUsesDefaultValue (line 68) | public function testGetArgumentsUsesDefaultValue()
method testGetArgumentsOverrideDefaultValueByRequestAttribute (line 77) | public function testGetArgumentsOverrideDefaultValueByRequestAttribute()
method testGetArgumentsFromClosure (line 87) | public function testGetArgumentsFromClosure()
method testGetArgumentsUsesDefaultValueFromClosure (line 96) | public function testGetArgumentsUsesDefaultValueFromClosure()
method testGetArgumentsFromInvokableObject (line 105) | public function testGetArgumentsFromInvokableObject()
method testGetArgumentsFromFunctionName (line 119) | public function testGetArgumentsFromFunctionName()
method testGetArgumentsFailsOnUnresolvedValue (line 129) | public function testGetArgumentsFailsOnUnresolvedValue()
method testGetArgumentsInjectsRequest (line 144) | public function testGetArgumentsInjectsRequest()
method testGetArgumentsInjectsExtendingRequest (line 152) | public function testGetArgumentsInjectsExtendingRequest()
method testGetVariadicArguments (line 160) | public function testGetVariadicArguments()
method testGetVariadicArgumentsWithoutArrayInRequest (line 170) | public function testGetVariadicArgumentsWithoutArrayInRequest()
method testIfExceptionIsThrownWhenMissingAnArgument (line 181) | public function testIfExceptionIsThrownWhenMissingAnArgument()
method testGetNullableArguments (line 191) | public function testGetNullableArguments()
method testGetNullableArgumentsWithDefaults (line 202) | public function testGetNullableArgumentsWithDefaults()
method testGetSessionArguments (line 211) | public function testGetSessionArguments()
method testGetSessionArgumentsWithExtendedSession (line 221) | public function testGetSessionArgumentsWithExtendedSession()
method testGetSessionArgumentsWithInterface (line 231) | public function testGetSessionArgumentsWithInterface()
method testGetSessionMissMatchWithInterface (line 241) | public function testGetSessionMissMatchWithInterface()
method testGetSessionMissMatchWithImplementation (line 252) | public function testGetSessionMissMatchWithImplementation()
method testGetSessionMissMatchOnNull (line 263) | public function testGetSessionMissMatchOnNull()
method testTargetedResolver (line 272) | public function testTargetedResolver()
method testTargetedResolverWithDefaultValue (line 283) | public function testTargetedResolverWithDefaultValue()
method testTargetedResolverWithNullableValue (line 297) | public function testTargetedResolverWithNullableValue()
method testTargetedResolverWithRequestAttributeValue (line 307) | public function testTargetedResolverWithRequestAttributeValue()
method testDisabledResolver (line 318) | public function testDisabledResolver()
method testManyTargetedResolvers (line 329) | public function testManyTargetedResolvers()
method testUnknownTargetedResolver (line 340) | public function testUnknownTargetedResolver()
method testResolversChainCompletionWhenResolverThrowsSpecialException (line 351) | public function testResolversChainCompletionWhenResolverThrowsSpecialE...
method testExceptionListSingle (line 371) | public function testExceptionListSingle()
method testExceptionListMultiple (line 389) | public function testExceptionListMultiple()
class ArgumentResolverTestController (line 414) | class ArgumentResolverTestController
method __invoke (line 416) | public function __invoke($foo, $bar = null)
method controllerWithFoo (line 420) | public function controllerWithFoo($foo)
method controllerWithoutArguments (line 424) | public function controllerWithoutArguments()
method controllerWithFooAndDefaultBar (line 428) | public function controllerWithFooAndDefaultBar($foo, $bar = null)
method controllerWithFooBarFoobar (line 432) | public function controllerWithFooBarFoobar($foo, $bar, $foobar)
method controllerWithRequest (line 436) | public function controllerWithRequest(Request $request)
method controllerWithExtendingRequest (line 440) | public function controllerWithExtendingRequest(ExtendingRequest $request)
method controllerWithSession (line 444) | public function controllerWithSession(Session $session)
method controllerWithSessionInterface (line 448) | public function controllerWithSessionInterface(SessionInterface $session)
method controllerWithExtendingSession (line 452) | public function controllerWithExtendingSession(ExtendingSession $session)
method controllerTargetingResolver (line 456) | public function controllerTargetingResolver(#[ValueResolver(DefaultVal...
method controllerTargetingResolverWithDefaultValue (line 460) | public function controllerTargetingResolverWithDefaultValue(#[ValueRes...
method controllerTargetingResolverWithNullableValue (line 464) | public function controllerTargetingResolverWithNullableValue(#[ValueRe...
method controllerTargetingResolverWithTestEntity (line 468) | public function controllerTargetingResolverWithTestEntity(#[ValueResol...
method controllerDisablingResolver (line 472) | public function controllerDisablingResolver(#[ValueResolver(RequestAtt...
method controllerTargetingManyResolvers (line 476) | public function controllerTargetingManyResolvers(
method controllerTargetingUnknownResolver (line 483) | public function controllerTargetingUnknownResolver(
function controller_function (line 490) | function controller_function($foo, $foobar)
class TestEntityValueResolver (line 494) | class TestEntityValueResolver implements ValueResolverInterface
method resolve (line 496) | public function resolve(Request $request, ArgumentMetadata $argument):...
class Post (line 504) | class Post
method __construct (line 506) | public function __construct(
FILE: Tests/Controller/ContainerControllerResolverTest.php
class ContainerControllerResolverTest (line 21) | class ContainerControllerResolverTest extends ControllerResolverTest
method testGetControllerService (line 23) | public function testGetControllerService()
method testGetControllerInvokableService (line 40) | public function testGetControllerInvokableService()
method testGetControllerInvokableServiceWithClassNameAsName (line 56) | public function testGetControllerInvokableServiceWithClassNameAsName()
method testInstantiateControllerWhenControllerStartsWithABackslash (line 72) | #[DataProvider('getControllers')]
method getControllers (line 91) | public static function getControllers()
method testExceptionWhenUsingRemovedControllerServiceWithClassNameAsName (line 98) | public function testExceptionWhenUsingRemovedControllerServiceWithClas...
method testExceptionWhenUsingRemovedControllerService (line 122) | public function testExceptionWhenUsingRemovedControllerService()
method getUndefinedControllers (line 146) | public static function getUndefinedControllers(): array
method createControllerResolver (line 170) | protected function createControllerResolver(?LoggerInterface $logger =...
class InvokableControllerService (line 180) | class InvokableControllerService
method __construct (line 182) | public function __construct($bar) // mandatory argument to prevent aut...
method __invoke (line 186) | public function __invoke()
class ControllerTestService (line 191) | class ControllerTestService
method __construct (line 193) | public function __construct($foo)
method action (line 197) | public function action()
FILE: Tests/Controller/ControllerResolverTest.php
class ControllerResolverTest (line 22) | class ControllerResolverTest extends TestCase
method testGetControllerWithoutControllerParameter (line 24) | public function testGetControllerWithoutControllerParameter()
method testGetControllerWithLambda (line 34) | public function testGetControllerWithLambda()
method testGetControllerWithObjectAndInvokeMethod (line 44) | public function testGetControllerWithObjectAndInvokeMethod()
method testGetControllerWithObjectAndMethod (line 55) | public function testGetControllerWithObjectAndMethod()
method testGetControllerWithClassAndMethodAsArray (line 66) | public function testGetControllerWithClassAndMethodAsArray()
method testGetControllerWithClassAndMethodAsString (line 77) | public function testGetControllerWithClassAndMethodAsString()
method testGetControllerWithInvokableClass (line 88) | public function testGetControllerWithInvokableClass()
method testGetControllerOnObjectWithoutInvokeMethod (line 98) | public function testGetControllerOnObjectWithoutInvokeMethod()
method testGetControllerWithFunction (line 108) | public function testGetControllerWithFunction()
method testGetControllerWithClosure (line 118) | public function testGetControllerWithClosure()
method testGetControllerWithStaticController (line 131) | #[DataProvider('getStaticControllers')]
method getStaticControllers (line 143) | public static function getStaticControllers()
method testGetControllerWithUndefinedController (line 153) | #[DataProvider('getUndefinedControllers')]
method getUndefinedControllers (line 165) | public static function getUndefinedControllers()
method testAllowedControllerTypes (line 187) | public function testAllowedControllerTypes()
method testAllowedControllerAttributes (line 211) | public function testAllowedControllerAttributes()
method testAllowedAsControllerAttribute (line 236) | public function testAllowedAsControllerAttribute()
method createControllerResolver (line 251) | protected function createControllerResolver(?LoggerInterface $logger =...
function some_controller_function (line 257) | #[DummyController]
class ControllerTest (line 262) | class ControllerTest
method __construct (line 264) | public function __construct()
method __toString (line 268) | public function __toString(): string
method publicAction (line 273) | public function publicAction()
method privateAction (line 277) | private function privateAction()
method protectedAction (line 281) | protected function protectedAction()
method staticAction (line 285) | public static function staticAction()
class InvokableController (line 290) | #[AsController]
method __invoke (line 293) | public function __invoke($foo, $bar = null)
class TestAbstractController (line 298) | abstract class TestAbstractController
method staticAction (line 300) | public static function staticAction()
class PrivateConstructorController (line 306) | class PrivateConstructorController
method __construct (line 308) | private function __construct()
method staticAction (line 312) | public static function staticAction()
FILE: Tests/Controller/ErrorControllerTest.php
class ErrorControllerTest (line 24) | class ErrorControllerTest extends TestCase
method testInvokeController (line 26) | #[DataProvider('getInvokeControllerDataProvider')]
method getInvokeControllerDataProvider (line 38) | public static function getInvokeControllerDataProvider()
method testPreviewController (line 64) | public function testPreviewController()
FILE: Tests/Controller/TraceableArgumentResolverTest.php
class TraceableArgumentResolverTest (line 21) | class TraceableArgumentResolverTest extends TestCase
method testStopwatchEventIsStoppedWhenResolverThrows (line 23) | public function testStopwatchEventIsStoppedWhenResolverThrows()
FILE: Tests/Controller/TraceableControllerResolverTest.php
class TraceableControllerResolverTest (line 21) | class TraceableControllerResolverTest extends TestCase
method testStopwatchEventIsStoppedWhenResolverThrows (line 23) | public function testStopwatchEventIsStoppedWhenResolverThrows()
FILE: Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php
class ArgumentMetadataFactoryTest (line 24) | class ArgumentMetadataFactoryTest extends TestCase
method setUp (line 28) | protected function setUp(): void
method testSignature1 (line 33) | public function testSignature1()
method testSignature2 (line 44) | public function testSignature2()
method testSignature3 (line 55) | public function testSignature3()
method testSignature4 (line 65) | public function testSignature4()
method testSignature5 (line 76) | public function testSignature5()
method testVariadicSignature (line 86) | public function testVariadicSignature()
method testBasicTypesSignature (line 96) | public function testBasicTypesSignature()
method testNamedClosure (line 107) | public function testNamedClosure()
method testNullableTypesSignature (line 118) | public function testNullableTypesSignature()
method testAttributeSignature (line 130) | public function testAttributeSignature()
method testMultipleAttributes (line 139) | public function testMultipleAttributes()
method testIssue41478 (line 145) | public function testIssue41478()
method signature1 (line 154) | public function signature1(self $foo, array $bar, callable $baz)
method signature2 (line 158) | public function signature2(?self $foo = null, ?FakeClassThatDoesNotExi...
method signature3 (line 162) | public function signature3(FakeClassThatDoesNotExist $bar, ImportedAnd...
method signature4 (line 166) | public function signature4($foo = 'default', $bar = 500, $baz = [])
method signature5 (line 170) | public function signature5(?array $foo = null, $bar = null)
FILE: Tests/ControllerMetadata/ArgumentMetadataTest.php
class ArgumentMetadataTest (line 18) | class ArgumentMetadataTest extends TestCase
method testWithBcLayerWithDefault (line 20) | public function testWithBcLayerWithDefault()
method testDefaultValueAvailable (line 27) | public function testDefaultValueAvailable()
method testDefaultValueUnavailable (line 36) | public function testDefaultValueUnavailable()
method testGetAttributes (line 46) | public function testGetAttributes()
method testGetAttributesOfType (line 52) | public function testGetAttributesOfType()
FILE: Tests/DataCollector/ConfigDataCollectorTest.php
class ConfigDataCollectorTest (line 21) | class ConfigDataCollectorTest extends TestCase
method testCollect (line 23) | public function testCollect()
method testCollectWithoutKernel (line 53) | public function testCollectWithoutKernel()
class KernelForTest (line 82) | class KernelForTest extends Kernel
method registerBundles (line 84) | public function registerBundles(): iterable
method getBundles (line 88) | public function getBundles(): array
method registerContainerConfiguration (line 93) | public function registerContainerConfiguration(LoaderInterface $loader...
method getProjectDir (line 97) | public function getProjectDir(): string
FILE: Tests/DataCollector/DataCollectorTest.php
class DataCollectorTest (line 22) | class DataCollectorTest extends TestCase
method testCloneVarStringWithScheme (line 24) | public function testCloneVarStringWithScheme()
method testCloneVarExistingFilePath (line 33) | public function testCloneVarExistingFilePath()
method testClassPublicObjectProperty (line 41) | public function testClassPublicObjectProperty()
method testClassPublicObjectPropertyAsReference (line 54) | public function testClassPublicObjectPropertyAsReference()
method testClassUsePropertyInDestruct (line 67) | public function testClassUsePropertyInDestruct()
method testClassUsePropertyAsReferenceInDestruct (line 80) | public function testClassUsePropertyAsReferenceInDestruct()
FILE: Tests/DataCollector/DumpDataCollectorTest.php
class DumpDataCollectorTest (line 27) | class DumpDataCollectorTest extends TestCase
method testDump (line 29) | public function testDump()
method testDumpWithServerConnection (line 68) | public function testDumpWithServerConnection()
method testCollectDefault (line 86) | public function testCollectDefault()
method testCollectHtml (line 104) | public function testCollectHtml()
method testFlush (line 132) | public function testFlush()
method testFlushNothingWhenDataDumperIsProvided (line 145) | public function testFlushNothingWhenDataDumperIsProvided()
method testNullContentTypeWithNoDebugEnv (line 163) | public function testNullContentTypeWithNoDebugEnv()
FILE: Tests/DataCollector/ExceptionDataCollectorTest.php
class ExceptionDataCollectorTest (line 20) | class ExceptionDataCollectorTest extends TestCase
method testCollect (line 22) | public function testCollect()
method testCollectWithoutException (line 47) | public function testCollectWithoutException()
method testReset (line 55) | public function testReset()
FILE: Tests/DataCollector/LoggerDataCollectorTest.php
class LoggerDataCollectorTest (line 24) | class LoggerDataCollectorTest extends TestCase
method testCollectWithUnexpectedFormat (line 26) | public function testCollectWithUnexpectedFormat()
method testCollectFromDeprecationsLog (line 50) | public function testCollectFromDeprecationsLog()
method testWithMainRequest (line 96) | public function testWithMainRequest()
method testWithSubRequest (line 115) | public function testWithSubRequest()
method testCollect (line 136) | #[DataProvider('getCollectTestData')]
method getCollectTestData (line 169) | public static function getCollectTestData()
FILE: Tests/DataCollector/MemoryDataCollectorTest.php
class MemoryDataCollectorTest (line 20) | class MemoryDataCollectorTest extends TestCase
method testCollect (line 22) | public function testCollect()
method testBytesConversion (line 32) | #[DataProvider('getBytesConversionTestData')]
method getBytesConversionTestData (line 40) | public static function getBytesConversionTestData()
FILE: Tests/DataCollector/RequestDataCollectorTest.php
class RequestDataCollectorTest (line 36) | class RequestDataCollectorTest extends TestCase
method testCollect (line 38) | public function testCollect()
method testCollectWithoutRouteParams (line 69) | public function testCollectWithoutRouteParams()
method testControllerInspection (line 80) | #[DataProvider('provideControllerCallables')]
method provideControllerCallables (line 93) | public static function provideControllerCallables(): array
method testItIgnoresInvalidCallables (line 205) | public function testItIgnoresInvalidCallables()
method testItAddsRedirectedAttributesWhenRequestContainsSpecificCookie (line 216) | public function testItAddsRedirectedAttributesWhenRequestContainsSpeci...
method testItSetsARedirectCookieIfTheResponseIsARedirection (line 231) | public function testItSetsARedirectCookieIfTheResponseIsARedirection()
method testItCollectsTheRedirectionAndClearTheCookie (line 249) | public function testItCollectsTheRedirectionAndClearTheCookie()
method testItCollectsTheSessionTraceProperly (line 268) | public function testItCollectsTheSessionTraceProperly()
method testStatelessCheck (line 305) | public function testStatelessCheck()
method testItHidesPassword (line 338) | public function testItHidesPassword()
method createRequest (line 359) | protected function createRequest($routeParams = ['name' => 'foo'])
method createRequestWithSession (line 371) | private function createRequestWithSession()
method createResponse (line 381) | protected function createResponse()
method injectController (line 397) | protected function injectController($collector, $controller, $request)
method getCookieByName (line 405) | private function getCookieByName(Response $response, $name)
method testIsJson (line 416) | #[DataProvider('provideJsonContentTypes')]
method provideJsonContentTypes (line 429) | public static function provideJsonContentTypes(): array
method testGetPrettyJsonValidity (line 442) | #[DataProvider('providePrettyJson')]
method providePrettyJson (line 454) | public static function providePrettyJson(): array
method testCurlCommandGet (line 466) | public function testCurlCommandGet()
method testCurlCommandPost (line 479) | public function testCurlCommandPost()
method testCurlCommandHead (line 492) | public function testCurlCommandHead()
method testCurlCommandWithHeaders (line 504) | public function testCurlCommandWithHeaders()
method testCurlCommandWithCookies (line 519) | public function testCurlCommandWithCookies()
method testCurlCommandPutWithBody (line 532) | public function testCurlCommandPutWithBody()
method testCurlCommandDoesNotDuplicateQueryString (line 544) | public function testCurlCommandDoesNotDuplicateQueryString()
method testCurlCommandGetWithNoBody (line 556) | public function testCurlCommandGetWithNoBody()
method testCurlCommandIsEmptyStringWhenNotCollected (line 567) | public function testCurlCommandIsEmptyStringWhenNotCollected()
FILE: Tests/DataCollector/RouterDataCollectorTest.php
class RouterDataCollectorTest (line 22) | class RouterDataCollectorTest extends TestCase
method testRouteRedirectResponse (line 24) | public function testRouteRedirectResponse()
method testRouteNotRedirectResponse (line 41) | public function testRouteNotRedirectResponse()
method testReset (line 58) | public function testReset()
method testGetName (line 76) | public function testGetName()
method createControllerEvent (line 83) | protected function createControllerEvent(Request $request): Controller...
FILE: Tests/DataCollector/TimeDataCollectorTest.php
class TimeDataCollectorTest (line 23) | #[Group('time-sensitive')]
method testCollect (line 26) | public function testCollect()
method testReset (line 59) | public function testReset()
method testLateCollect (line 75) | public function testLateCollect()
method testSetEvents (line 91) | public function testSetEvents()
method testGetDurationHasEvents (line 105) | public function testGetDurationHasEvents()
method testGetDurationNotEvents (line 122) | public function testGetDurationNotEvents()
method testGetInitTimeNotEvents (line 129) | public function testGetInitTimeNotEvents()
method testGetInitTimeHasEvents (line 136) | public function testGetInitTimeHasEvents()
method testGetName (line 152) | public function testGetName()
FILE: Tests/Debug/ErrorHandlerConfiguratorTest.php
class ErrorHandlerConfiguratorTest (line 21) | class ErrorHandlerConfiguratorTest extends TestCase
method testConfigure (line 23) | public function testConfigure()
method testLevelsAssignedToLoggers (line 37) | #[DataProvider('provideLevelsAssignedToLoggers')]
method provideLevelsAssignedToLoggers (line 73) | public static function provideLevelsAssignedToLoggers(): iterable
FILE: Tests/Debug/TraceableEventDispatcherTest.php
class TraceableEventDispatcherTest (line 26) | class TraceableEventDispatcherTest extends TestCase
method testStopwatchSections (line 28) | public function testStopwatchSections()
method testStopwatchCheckControllerOnRequestEvent (line 48) | public function testStopwatchCheckControllerOnRequestEvent()
method testStopwatchStopControllerOnRequestEvent (line 64) | public function testStopwatchStopControllerOnRequestEvent()
method testAddListenerNested (line 82) | public function testAddListenerNested()
method testListenerCanRemoveItselfWhenExecuted (line 100) | public function testListenerCanRemoveItselfWhenExecuted()
method getHttpKernel (line 113) | protected function getHttpKernel($dispatcher)
FILE: Tests/DependencyInjection/ControllerArgumentValueResolverPassTest.php
class ControllerArgumentValueResolverPassTest (line 22) | class ControllerArgumentValueResolverPassTest extends TestCase
method testServicesAreOrderedAccordingToPriority (line 24) | public function testServicesAreOrderedAccordingToPriority()
method testInDebugWithStopWatchDefinition (line 56) | public function testInDebugWithStopWatchDefinition()
method testInDebugWithouStopWatchDefinition (line 93) | public function testInDebugWithouStopWatchDefinition()
method testReturningEmptyArrayWhenNoService (line 111) | public function testReturningEmptyArrayWhenNoService()
method testNoArgumentResolver (line 123) | public function testNoArgumentResolver()
FILE: Tests/DependencyInjection/ControllerAttributesListenerPassTest.php
class ControllerAttributesListenerPassTest (line 22) | class ControllerAttributesListenerPassTest extends TestCase
method testCollectsAttributeListenersByKernelEvent (line 24) | public function testCollectsAttributeListenersByKernelEvent()
method testSetsEmptyConfigurationWhenNoAttributeListenersAreRegistered (line 46) | public function testSetsEmptyConfigurationWhenNoAttributeListenersAreR...
class TestAttribute (line 64) | #[\Attribute]
class AnotherAttribute (line 69) | #[\Attribute]
FILE: Tests/DependencyInjection/FragmentRendererPassTest.php
class FragmentRendererPassTest (line 24) | class FragmentRendererPassTest extends TestCase
method testContentRendererWithoutInterface (line 30) | public function testContentRendererWithoutInterface()
method testValidContentRenderer (line 44) | public function testValidContentRenderer()
class RendererService (line 61) | class RendererService implements FragmentRendererInterface
method render (line 63) | public function render($uri, ?Request $request = null, array $options ...
method getName (line 67) | public function getName(): string
FILE: Tests/DependencyInjection/LazyLoadingFragmentHandlerTest.php
class LazyLoadingFragmentHandlerTest (line 22) | class LazyLoadingFragmentHandlerTest extends TestCase
method testRender (line 24) | public function testRender()
FILE: Tests/DependencyInjection/LoggerPassTest.php
class LoggerPassTest (line 23) | class LoggerPassTest extends TestCase
method testAlwaysSetAutowiringAlias (line 25) | public function testAlwaysSetAutowiringAlias()
method testDoNotOverrideExistingLogger (line 35) | public function testDoNotOverrideExistingLogger()
method testRegisterLogger (line 45) | public function testRegisterLogger()
method testAutowiringAliasIsPreserved (line 57) | public function testAutowiringAliasIsPreserved()
FILE: Tests/DependencyInjection/MergeExtensionConfigurationPassTest.php
class MergeExtensionConfigurationPassTest (line 21) | class MergeExtensionConfigurationPassTest extends TestCase
method testAutoloadMainExtension (line 23) | public function testAutoloadMainExtension()
method testFooBundle (line 37) | public function testFooBundle()
class LoadedExtension (line 59) | class LoadedExtension extends Extension
method load (line 61) | public function load(array $configs, ContainerBuilder $container): void
class NotLoadedExtension (line 67) | class NotLoadedExtension extends Extension
method load (line 69) | public function load(array $configs, ContainerBuilder $container): void
FILE: Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php
class RegisterControllerArgumentLocatorsPassTest (line 36) | class RegisterControllerArgumentLocatorsPassTest extends TestCase
method testInvalidClass (line 38) | public function testInvalidClass()
method testNoAction (line 53) | public function testNoAction()
method testNoArgument (line 68) | public function testNoArgument()
method testNoService (line 83) | public function testNoService()
method testInvalidMethod (line 98) | public function testInvalidMethod()
method testInvalidArgument (line 113) | public function testInvalidArgument()
method testAllActions (line 128) | public function testAllActions()
method testExplicitArgument (line 155) | public function testExplicitArgument()
method testOptionalArgument (line 176) | public function testOptionalArgument()
method testSkipSetContainer (line 196) | public function testSkipSetContainer()
method testExceptionOnNonExistentTypeHint (line 211) | public function testExceptionOnNonExistentTypeHint()
method testExceptionOnNonExistentTypeHintDifferentNamespace (line 231) | public function testExceptionOnNonExistentTypeHintDifferentNamespace()
method testNoExceptionOnNonExistentTypeHintOptionalArg (line 251) | public function testNoExceptionOnNonExistentTypeHintOptionalArg()
method testArgumentWithNoTypeHintIsOk (line 267) | public function testArgumentWithNoTypeHintIsOk()
method testControllersAreMadePublic (line 282) | public function testControllersAreMadePublic()
method testControllersAreMadeNonLazy (line 296) | public function testControllersAreMadeNonLazy()
method testBindings (line 311) | #[DataProvider('provideBindings')]
method provideBindings (line 332) | public static function provideBindings()
method testBindScalarValueToControllerArgument (line 341) | #[DataProvider('provideBindScalarValueToControllerArgument')]
method provideBindScalarValueToControllerArgument (line 365) | public static function provideBindScalarValueToControllerArgument()
method testBindingsOnChildDefinitions (line 371) | public function testBindingsOnChildDefinitions()
method testNotTaggedControllerServiceReceivesLocatorArgument (line 395) | public function testNotTaggedControllerServiceReceivesLocatorArgument()
method testAlias (line 408) | public function testAlias()
method testEnumArgumentIsIgnored (line 425) | public function testEnumArgumentIsIgnored()
method testBindWithTarget (line 441) | public function testBindWithTarget()
method testTargetAttributeUsesShortNameForControllerArguments (line 467) | public function testTargetAttributeUsesShortNameForControllerArguments()
method testResponseArgumentIsIgnored (line 491) | public function testResponseArgumentIsIgnored()
method testAutowireAttribute (line 505) | public function testAutowireAttribute()
method testAutowireIteratorAndAutowireLocatorAttributes (line 541) | public function testAutowireIteratorAndAutowireLocatorAttributes()
method testTaggedControllersAreRegisteredInControllerResolver (line 590) | public function testTaggedControllersAreRegisteredInControllerResolver()
class RegisterTestController (line 615) | class RegisterTestController
method __construct (line 617) | public function __construct(ControllerDummy $bar)
method fooAction (line 621) | public function fooAction(ControllerDummy $bar)
method barAction (line 625) | protected function barAction(ControllerDummy $bar)
class ContainerAwareRegisterTestController (line 630) | class ContainerAwareRegisterTestController
method setContainer (line 634) | public function setContainer(?ContainerInterface $container = null): void
method fooAction (line 639) | public function fooAction(ControllerDummy $bar)
class ControllerDummy (line 644) | class ControllerDummy
class NonExistentClassController (line 648) | class NonExistentClassController
method fooAction (line 650) | public function fooAction(NonExistentClass $nonExistent)
class NonExistentClassDifferentNamespaceController (line 655) | class NonExistentClassDifferentNamespaceController
method fooAction (line 657) | public function fooAction(\Acme\NonExistentClass $nonExistent)
class NonExistentClassOptionalController (line 662) | class NonExistentClassOptionalController
method fooAction (line 664) | public function fooAction(?NonExistentClass $nonExistent = null)
method barAction (line 668) | public function barAction(?NonExistentClass $nonExistent, $bar)
class ArgumentWithoutTypeController (line 673) | class ArgumentWithoutTypeController
method fooAction (line 675) | public function fooAction(string $someArg)
class NonNullableEnumArgumentWithDefaultController (line 680) | class NonNullableEnumArgumentWithDefaultController
method fooAction (line 682) | public function fooAction(Suit $suit = Suit::Spades)
class WithTarget (line 687) | class WithTarget
method fooAction (line 689) | public function fooAction(
class WithTargetShortName (line 699) | class WithTargetShortName
method fooAction (line 701) | public function fooAction(
type DummyLimiterFactoryInterface (line 708) | interface DummyLimiterFactoryInterface
method create (line 710) | public function create(mixed $key = null): object;
class DummyRateLimiterFactory (line 713) | class DummyRateLimiterFactory implements DummyLimiterFactoryInterface
method create (line 715) | public function create(mixed $key = null): object
class WithResponseArgument (line 721) | class WithResponseArgument
method fooAction (line 723) | public function fooAction(Response $response, ?Response $nullableRespo...
class CustomAutowire (line 728) | #[\Attribute(\Attribute::TARGET_PARAMETER)]
method __construct (line 731) | public function __construct(string $parameter)
type FooInterface (line 737) | interface FooInterface
method foo (line 739) | public function foo();
class WithAutowireAttribute (line 742) | class WithAutowireAttribute
method fooAction (line 744) | public function fooAction(
class WithAutowireIteratorAndAutowireLocator (line 771) | class WithAutowireIteratorAndAutowireLocator
method fooAction (line 773) | public function fooAction(
FILE: Tests/DependencyInjection/RegisterLocaleAwareServicesPassTest.php
class RegisterLocaleAwareServicesPassTest (line 22) | class RegisterLocaleAwareServicesPassTest extends TestCase
method testCompilerPass (line 24) | public function testCompilerPass()
method testListenerUnregisteredWhenNoLocaleAwareServices (line 55) | public function testListenerUnregisteredWhenNoLocaleAwareServices()
FILE: Tests/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPassTest.php
class RemoveEmptyControllerArgumentLocatorsPassTest (line 21) | class RemoveEmptyControllerArgumentLocatorsPassTest extends TestCase
method testProcess (line 23) | public function testProcess()
method testInvoke (line 64) | public function testInvoke()
class RemoveTestController1 (line 83) | class RemoveTestController1
method fooAction (line 85) | public function fooAction(\stdClass $bar, ?ClassNotInContainer $baz = ...
class RemoveTestController2 (line 90) | class RemoveTestController2
method setTestCase (line 92) | public function setTestCase(TestCase $test)
method fooAction (line 96) | public function fooAction(?ClassNotInContainer $bar = null)
class InvokableRegisterTestController (line 101) | class InvokableRegisterTestController
method __invoke (line 103) | public function __invoke(\stdClass $bar)
class ClassNotInContainer (line 108) | class ClassNotInContainer
FILE: Tests/DependencyInjection/ResettableServicePassTest.php
class ResettableServicePassTest (line 26) | class ResettableServicePassTest extends TestCase
method testCompilerPass (line 28) | public function testCompilerPass()
method testMissingMethod (line 68) | public function testMissingMethod()
method testIgnoreInvalidMethod (line 82) | public function testIgnoreInvalidMethod()
method testCompilerPassWithoutResetters (line 102) | public function testCompilerPassWithoutResetters()
FILE: Tests/DependencyInjection/ServicesResetterTest.php
class ServicesResetterTest (line 22) | class ServicesResetterTest extends TestCase
method setUp (line 24) | protected function setUp(): void
method testResetServices (line 32) | public function testResetServices()
method testResetLazyServices (line 52) | public function testResetLazyServices()
FILE: Tests/Event/ControllerArgumentsEventTest.php
class ControllerArgumentsEventTest (line 26) | class ControllerArgumentsEventTest extends TestCase
method testControllerArgumentsEvent (line 28) | public function testControllerArgumentsEvent()
method testSetAttributes (line 34) | public function testSetAttributes()
method testGetAttributes (line 43) | public function testGetAttributes()
method testGetAttributesByClassName (line 87) | public function testGetAttributesByClassName()
method testEvaluateWithClosureUsesNamedArguments (line 120) | public function testEvaluateWithClosureUsesNamedArguments()
method testEvaluateWithExpressionDelegatesToExpressionLanguage (line 138) | public function testEvaluateWithExpressionDelegatesToExpressionLanguage()
FILE: Tests/Event/ControllerAttributeEventTest.php
class ControllerAttributeEventTest (line 28) | class ControllerAttributeEventTest extends TestCase
method testEvaluateReturnsValueForNonExpressionOrClosure (line 30) | public function testEvaluateReturnsValueForNonExpressionOrClosure()
method testEvaluateDelegatesToControllerEvent (line 38) | public function testEvaluateDelegatesToControllerEvent()
method testEvaluateDelegatesToControllerArgumentsEvent (line 59) | public function testEvaluateDelegatesToControllerArgumentsEvent()
method testEvaluateDelegatesToControllerMetadata (line 81) | public function testEvaluateDelegatesToControllerMetadata()
FILE: Tests/Event/ControllerEventTest.php
class ControllerEventTest (line 29) | class ControllerEventTest extends TestCase
method testGetAttributes (line 31) | #[DataProvider('provideGetAttributes')]
method testGetAttributesByClassName (line 49) | #[DataProvider('provideGetAttributes')]
method testGetAttributesByInvalidClassName (line 62) | #[DataProvider('provideGetAttributes')]
method testControllerAttributesAreStoredInRequestAttributes (line 70) | public function testControllerAttributesAreStoredInRequestAttributes()
method testSetControllerWithAttributesStoresInRequest (line 90) | public function testSetControllerWithAttributesStoresInRequest()
method testSetControllerWithGroupedAttributesConvertsToFlat (line 107) | #[IgnoreDeprecations]
method testSetControllerWithoutAttributesRemovesFromRequestWhenControllerChanges (line 125) | public function testSetControllerWithoutAttributesRemovesFromRequestWh...
method provideGetAttributes (line 142) | public static function provideGetAttributes()
method testEvaluateWithClosureUsesArgsRequestAndController (line 150) | public function testEvaluateWithClosureUsesArgsRequestAndController()
method testEvaluateWithExpressionUsesExpressionLanguage (line 167) | public function testEvaluateWithExpressionUsesExpressionLanguage()
method testEvaluateWithExpressionRequiresExpressionLanguage (line 186) | public function testEvaluateWithExpressionRequiresExpressionLanguage()
FILE: Tests/Event/ExceptionEventTest.php
class ExceptionEventTest (line 19) | class ExceptionEventTest extends TestCase
method testAllowSuccessfulResponseIsFalseByDefault (line 21) | public function testAllowSuccessfulResponseIsFalseByDefault()
FILE: Tests/EventListener/AddRequestFormatsListenerTest.php
class AddRequestFormatsListenerTest (line 25) | class AddRequestFormatsListenerTest extends TestCase
method setUp (line 29) | protected function setUp(): void
method testIsAnEventSubscriber (line 34) | public function testIsAnEventSubscriber()
method testRegisteredEvent (line 39) | public function testRegisteredEvent()
method testSetAdditionalFormats (line 47) | public function testSetAdditionalFormats()
FILE: Tests/EventListener/CacheAttributeListenerTest.php
class CacheAttributeListenerTest (line 27) | class CacheAttributeListenerTest extends TestCase
method setUp (line 35) | protected function setUp(): void
method testWontReassignResponseWhenResponseIsUnsuccessful (line 44) | public function testWontReassignResponseWhenResponseIsUnsuccessful()
method testWontReassignResponseWhenNoConfigurationIsPresent (line 55) | public function testWontReassignResponseWhenNoConfigurationIsPresent()
method testResponseIsPublicIfSharedMaxAgeSetAndPublicNotOverridden (line 66) | public function testResponseIsPublicIfSharedMaxAgeSetAndPublicNotOverr...
method testResponseIsPublicIfConfigurationIsPublicTrue (line 76) | public function testResponseIsPublicIfConfigurationIsPublicTrue()
method testResponseIsPrivateIfConfigurationIsPublicFalse (line 86) | public function testResponseIsPrivateIfConfigurationIsPublicFalse()
method testResponseIsPublicIfConfigurationIsPublicTrueNoStoreFalse (line 96) | public function testResponseIsPublicIfConfigurationIsPublicTrueNoStore...
method testResponseKeepPublicIfConfigurationIsPublicTrueNoStoreTrue (line 107) | public function testResponseKeepPublicIfConfigurationIsPublicTrueNoSto...
method testResponseKeepPrivateNoStoreIfConfigurationIsNoStoreTrue (line 118) | public function testResponseKeepPrivateNoStoreIfConfigurationIsNoStore...
method testResponseIsPublicIfSharedMaxAgeSetAndNoStoreIsTrue (line 129) | public function testResponseIsPublicIfSharedMaxAgeSetAndNoStoreIsTrue()
method testResponseVary (line 140) | public function testResponseVary()
method testResponseVaryWhenVaryNotSet (line 151) | public function testResponseVaryWhenVaryNotSet()
method testResponseIsPrivateIfConfigurationIsPublicNotSet (line 164) | public function testResponseIsPrivateIfConfigurationIsPublicNotSet()
method testAttributeConfigurationsAreSetOnResponse (line 173) | public function testAttributeConfigurationsAreSetOnResponse()
method testCacheMaxAgeSupportsStrtotimeFormat (line 204) | public function testCacheMaxAgeSupportsStrtotimeFormat()
method testLastModifiedNotModifiedResponse (line 222) | #[TestWith(['test.getDate()'])]
method testLastModifiedHeader (line 243) | #[TestWith(['test.getDate()'])]
method testEtagNotModifiedResponse (line 269) | #[TestWith(['test.getId()'])]
method testEtagHeader (line 290) | #[TestWith(['test.getId()'])]
method testLastModifiedHeaderAndEtagHeadersClosures (line 316) | #[DataProvider('provideLastModifiedHeaderAndEtagClosureCases')]
method provideLastModifiedHeaderAndEtagClosureCases (line 342) | public static function provideLastModifiedHeaderAndEtagClosureCases():...
method testConfigurationDoesNotOverrideAlreadySetResponseHeaders (line 355) | public function testConfigurationDoesNotOverrideAlreadySetResponseHead...
method testAttribute (line 386) | public function testAttribute()
method testHasRelevantVaryHeaderBehavior (line 409) | #[DataProvider('provideVaryHeaderScenarios')]
method testAttributeRespectsExplicitPrivateFromController (line 425) | public function testAttributeRespectsExplicitPrivateFromController()
method testAttributeRespectsExplicitPublicFromController (line 437) | public function testAttributeRespectsExplicitPublicFromController()
method provideVaryHeaderScenarios (line 449) | public static function provideVaryHeaderScenarios(): \Traversable
method testCacheAppliedOnlyWhenIfEvaluatesToTrue (line 495) | #[DataProvider('provideCacheIfCases')]
method provideCacheIfCases (line 523) | public static function provideCacheIfCases(): iterable
method testErrorIsThrownWhenIfEvaluatesToNonBool (line 562) | public function testErrorIsThrownWhenIfEvaluatesToNonBool()
method createRequest (line 579) | private function createRequest(Cache ...$cache): Request
method createEventMock (line 584) | private function createEventMock(Request $request, Response $response)...
method getKernel (line 589) | private function getKernel(): Stub&HttpKernelInterface
class TestEntity (line 595) | class TestEntity
method getDate (line 597) | public function getDate()
method getId (line 602) | public function getId()
class TestController (line 608) | class TestController
method __construct (line 610) | public function __construct(public bool $cache)
method __invoke (line 614) | public function __invoke(TestEntity $test)
FILE: Tests/EventListener/ControllerAttributesListenerTest.php
class ControllerAttributesListenerTest (line 30) | class ControllerAttributesListenerTest extends TestCase
method testOnKernelControllerArgumentsDispatchesEventsForEachAttribute (line 32) | public function testOnKernelControllerArgumentsDispatchesEventsForEach...
method testOnKernelResponseDispatchesEventsInReverseOrder (line 56) | public function testOnKernelResponseDispatchesEventsInReverseOrder()
method testOnKernelResponseDoesNothingWhenNoControllerEvent (line 80) | public function testOnKernelResponseDoesNothingWhenNoControllerEvent()
method testDispatchedEventIsTheSameInstance (line 103) | public function testDispatchedEventIsTheSameInstance()
method testClassLevelAttributesAreIncluded (line 122) | public function testClassLevelAttributesAreIncluded()
method testBeforeControllerDispatchesParentAttributeListeners (line 139) | public function testBeforeControllerDispatchesParentAttributeListeners()
method testBeforeControllerSkipsWhenNoAttributeListenersAreRegistered (line 163) | public function testBeforeControllerSkipsWhenNoAttributeListenersAreRe...
method testOnKernelControllerHandlesControllerChanges (line 180) | public function testOnKernelControllerHandlesControllerChanges()
method testOnKernelControllerArgumentsHandlesControllerChanges (line 214) | public function testOnKernelControllerArgumentsHandlesControllerChanges()
method createListener (line 242) | private function createListener(?array $attributesWithListenersByEvent...
method createControllerArgumentsEvent (line 268) | private function createControllerArgumentsEvent(string $method): Contr...
method createResponseEvent (line 279) | private function createResponseEvent(string $method): ResponseEvent
FILE: Tests/EventListener/DebugHandlersListenerTest.php
class DebugHandlersListenerTest (line 33) | class DebugHandlersListenerTest extends TestCase
method testConfigure (line 35) | public function testConfigure()
method testConfigureForHttpKernelWithNoTerminateWithException (line 59) | public function testConfigureForHttpKernelWithNoTerminateWithException()
method testConsoleEvent (line 84) | public function testConsoleEvent()
method testReplaceExistingExceptionHandler (line 127) | public function testReplaceExistingExceptionHandler()
FILE: Tests/EventListener/DisallowRobotsIndexingListenerTest.php
class DisallowRobotsIndexingListenerTest (line 23) | class DisallowRobotsIndexingListenerTest extends TestCase
method testInvoke (line 25) | #[DataProvider('provideResponses')]
method provideResponses (line 38) | public static function provideResponses(): iterable
FILE: Tests/EventListener/DumpListenerTest.php
class DumpListenerTest (line 31) | class DumpListenerTest extends TestCase
method testSubscribedEvents (line 33) | public function testSubscribedEvents()
method testConfigure (line 41) | public function testConfigure()
method testConfigureWithProfilerDumper (line 70) | #[TestWith([false, false, '+foo-+bar-', []])]
class MockCloner (line 109) | class MockCloner implements ClonerInterface
method cloneVar (line 111) | public function cloneVar($var): Data
class MockDumper (line 117) | class MockDumper implements DataDumperInterface
method dump (line 119) | public function dump(Data $data): ?string
class MockProfilerDumper (line 127) | class MockProfilerDumper implements DataDumperInterface
method dump (line 131) | public function dump(Data $data): ?string
FILE: Tests/EventListener/ErrorListenerTest.php
class ErrorListenerTest (line 39) | #[Group('time-sensitive')]
method testConstruct (line 42) | public function testConstruct()
method testHandleWithoutLogger (line 54) | #[DataProvider('provider')]
method testHandleWithLogger (line 79) | #[DataProvider('provider')]
method testHandleWithLoggerAndCustomConfiguration (line 107) | public function testHandleWithLoggerAndCustomConfiguration()
method testHandleWithLogLevelAttribute (line 128) | public function testHandleWithLogLevelAttribute()
method testHandleWithLogChannel (line 143) | public function testHandleWithLogChannel()
method testHandleWithLoggerChannelNotUsed (line 172) | public function testHandleWithLoggerChannelNotUsed()
method testHandleClassImplementingInterfaceWithLogLevelAttribute (line 200) | public function testHandleClassImplementingInterfaceWithLogLevelAttrib...
method testHandleWithLogLevelAttributeAndCustomConfiguration (line 215) | public function testHandleWithLogLevelAttributeAndCustomConfiguration()
method testHandleHttpAttribute (line 234) | #[DataProvider('exceptionWithAttributeProvider')]
method testHandleCustomConfigurationAndHttpAttribute (line 246) | public function testHandleCustomConfigurationAndHttpAttribute()
method provider (line 262) | public static function provider()
method testSubRequestFormat (line 278) | public function testSubRequestFormat()
method testCSPHeaderIsRemoved (line 295) | public function testCSPHeaderIsRemoved()
method testTerminating (line 318) | public function testTerminating()
method testOnControllerArguments (line 331) | #[DataProvider('controllerProvider')]
method controllerProvider (line 352) | public static function controllerProvider()
method exceptionWithAttributeProvider (line 365) | public static function exceptionWithAttributeProvider()
class TestLogger (line 374) | class TestLogger extends Logger implements DebugLoggerInterface
method countErrors (line 376) | public function countErrors(?Request $request = null): int
method getLogs (line 381) | public function getLogs(?Request $request = null): array
class TestKernel (line 387) | class TestKernel implements HttpKernelInterface
method handle (line 389) | public function handle(Request $request, $type = self::MAIN_REQUEST, $...
class TestKernelThatThrowsException (line 400) | class TestKernelThatThrowsException implements HttpKernelInterface
method handle (line 402) | public function handle(Request $request, $type = self::MAIN_REQUEST, $...
class UserProvidedHttpStatusCodeAttribute (line 408) | #[\Attribute(\Attribute::TARGET_CLASS)]
method __construct (line 411) | public function __construct(array $headers = [])
class WithCustomUserProvidedAttribute (line 420) | #[UserProvidedHttpStatusCodeAttribute(headers: [
class WithGeneralAttribute (line 427) | #[WithHttpStatus(
type InterfaceWithGeneralAttribute (line 437) | #[WithHttpStatus(
class ImplementingInterfaceWithGeneralAttribute (line 447) | class ImplementingInterfaceWithGeneralAttribute extends \Exception imple...
class ChildOfWithGeneralAttribute (line 451) | class ChildOfWithGeneralAttribute extends WithGeneralAttribute
class WarningWithLogLevelAttribute (line 455) | #[WithLogLevel(LogLevel::WARNING)]
class ChildOfWarningWithLogLevelAttribute (line 460) | class ChildOfWarningWithLogLevelAttribute extends WarningWithLogLevelAtt...
type InterfaceWithLogLevelAttribute (line 464) | #[WithLogLevel(LogLevel::WARNING)]
class ImplementingInterfaceWithLogLevelAttribute (line 469) | class ImplementingInterfaceWithLogLevelAttribute extends \Exception impl...
FILE: Tests/EventListener/FragmentListenerTest.php
class FragmentListenerTest (line 22) | class FragmentListenerTest extends TestCase
method testOnlyTriggeredOnFragmentRoute (line 24) | public function testOnlyTriggeredOnFragmentRoute()
method testOnlyTriggeredIfControllerWasNotDefinedYet (line 39) | public function testOnlyTriggeredIfControllerWasNotDefinedYet()
method testAccessDeniedWithNonSafeMethods (line 54) | public function testAccessDeniedWithNonSafeMethods()
method testAccessDeniedWithWrongSignature (line 65) | public function testAccessDeniedWithWrongSignature()
method testWithSignature (line 76) | public function testWithSignature()
method testRemovesPathWithControllerDefined (line 90) | public function testRemovesPathWithControllerDefined()
method testRemovesPathWithControllerNotDefined (line 102) | public function testRemovesPathWithControllerNotDefined()
method createRequestEvent (line 115) | private function createRequestEvent(Request $request, int $requestType...
FILE: Tests/EventListener/IsSignatureValidAttributeListenerTest.php
class IsSignatureValidAttributeListenerTest (line 27) | class IsSignatureValidAttributeListenerTest extends TestCase
method testSubscribedEvents (line 29) | public function testSubscribedEvents()
method testControllerAttributeEventValidatesSignature (line 39) | public function testControllerAttributeEventValidatesSignature()
method testInvokableControllerWithValidSignature (line 58) | public function testInvokableControllerWithValidSignature()
method testNoAttributeSkipsValidation (line 78) | public function testNoAttributeSkipsValidation()
method testDefaultCheckRequestSucceeds (line 96) | public function testDefaultCheckRequestSucceeds()
method testCheckRequestFailsThrowsHttpException (line 115) | public function testCheckRequestFailsThrowsHttpException()
method testMultipleAttributesAllValid (line 136) | public function testMultipleAttributesAllValid()
method testValidationWithStringMethod (line 156) | public function testValidationWithStringMethod()
method testValidationWithArrayMethods (line 176) | public function testValidationWithArrayMethods()
method testValidationSkippedForNonMatchingMethod (line 196) | public function testValidationSkippedForNonMatchingMethod()
FILE: Tests/EventListener/LocaleAwareListenerTest.php
class LocaleAwareListenerTest (line 24) | class LocaleAwareListenerTest extends TestCase
method setUp (line 30) | protected function setUp(): void
method testLocaleIsSetInOnKernelRequest (line 37) | public function testLocaleIsSetInOnKernelRequest()
method testDefaultLocaleIsUsedOnExceptionsInOnKernelRequest (line 48) | public function testDefaultLocaleIsUsedOnExceptionsInOnKernelRequest()
method testLocaleIsSetInOnKernelFinishRequestWhenParentRequestExists (line 68) | public function testLocaleIsSetInOnKernelFinishRequestWhenParentReques...
method testLocaleIsSetToDefaultOnKernelFinishRequestWhenParentRequestDoesNotExist (line 82) | public function testLocaleIsSetToDefaultOnKernelFinishRequestWhenParen...
method testDefaultLocaleIsUsedOnExceptionsInOnKernelFinishRequest (line 95) | public function testDefaultLocaleIsUsedOnExceptionsInOnKernelFinishReq...
method createRequest (line 118) | private function createRequest(string $locale): Request
FILE: Tests/EventListener/LocaleListenerTest.php
class LocaleListenerTest (line 27) | class LocaleListenerTest extends TestCase
method testIsAnEventSubscriber (line 29) | public function testIsAnEventSubscriber()
method testRegisteredEvent (line 34) | public function testRegisteredEvent()
method testDefaultLocale (line 45) | public function testDefaultLocale()
method testLocaleFromRequestAttribute (line 54) | public function testLocaleFromRequestAttribute()
method testLocaleSetForRoutingContext (line 67) | public function testLocaleSetForRoutingContext()
method testRouterResetWithParentRequestOnKernelFinishRequest (line 83) | public function testRouterResetWithParentRequestOnKernelFinishRequest()
method testRequestLocaleIsNotOverridden (line 107) | public function testRequestLocaleIsNotOverridden()
method testRequestPreferredLocaleFromAcceptLanguageHeader (line 118) | public function testRequestPreferredLocaleFromAcceptLanguageHeader()
method testRequestDefaultLocaleIfNoAcceptLanguageHeaderIsPresent (line 131) | public function testRequestDefaultLocaleIfNoAcceptLanguageHeaderIsPres...
method testRequestVaryByLanguageAttributeIsSetIfUsingAcceptLanguageHeader (line 142) | public function testRequestVaryByLanguageAttributeIsSetIfUsingAcceptLa...
method testRequestSecondPreferredLocaleFromAcceptLanguageHeader (line 153) | public function testRequestSecondPreferredLocaleFromAcceptLanguageHead...
method testDontUseAcceptLanguageHeaderIfNotEnabled (line 166) | public function testDontUseAcceptLanguageHeaderIfNotEnabled()
method testRequestUnavailablePreferredLocaleFromAcceptLanguageHeader (line 179) | public function testRequestUnavailablePreferredLocaleFromAcceptLanguag...
method testDefaultLocaleReturnedWhenNoAcceptLanguageMatchAndDefaultLocaleIsNotFirstEnabledLocale (line 192) | public function testDefaultLocaleReturnedWhenNoAcceptLanguageMatchAndD...
method testRequestNoLocaleFromAcceptLanguageHeader (line 206) | public function testRequestNoLocaleFromAcceptLanguageHeader()
method testRequestAttributeLocaleNotOverriddenFromAcceptLanguageHeader (line 219) | public function testRequestAttributeLocaleNotOverriddenFromAcceptLangu...
method testEnabledLocalesFiltersEmptyValues (line 233) | public function testEnabledLocalesFiltersEmptyValues()
method testFinishRequestWithNoParentResetsRouterContextToDefault (line 247) | public function testFinishRequestWithNoParentResetsRouterContextToDefa...
method testSetDefaultLocaleSetsRouterContext (line 268) | public function testSetDefaultLocaleSetsRouterContext()
method getEvent (line 282) | private function getEvent(Request $request): RequestEvent
FILE: Tests/EventListener/ProfilerListenerTest.php
class ProfilerListenerTest (line 29) | class ProfilerListenerTest extends TestCase
method testKernelTerminate (line 34) | public function testKernelTerminate()
method testCollectParameter (line 64) | #[DataProvider('collectRequestProvider')]
method collectRequestProvider (line 89) | public static function collectRequestProvider(): iterable
FILE: Tests/EventListener/ResponseListenerTest.php
class ResponseListenerTest (line 23) | class ResponseListenerTest extends TestCase
method setUp (line 28) | protected function setUp(): void
method testFilterDoesNothingForSubRequests (line 37) | public function testFilterDoesNothingForSubRequests()
method testFilterSetsNonDefaultCharsetIfNotOverridden (line 47) | public function testFilterSetsNonDefaultCharsetIfNotOverridden()
method testFilterDoesNothingIfCharsetIsOverridden (line 60) | public function testFilterDoesNothingIfCharsetIsOverridden()
method testFiltersSetsNonDefaultCharsetIfNotOverriddenOnNonTextContentType (line 74) | public function testFiltersSetsNonDefaultCharsetIfNotOverriddenOnNonTe...
method testSetContentLanguageHeaderWhenEmptyAndAtLeast2EnabledLocalesAreConfigured (line 89) | public function testSetContentLanguageHeaderWhenEmptyAndAtLeast2Enable...
method testNotOverrideContentLanguageHeaderWhenNotEmpty (line 104) | public function testNotOverrideContentLanguageHeaderWhenNotEmpty()
method testNotSetContentLanguageHeaderWhenDisabled (line 120) | public function testNotSetContentLanguageHeaderWhenDisabled()
FILE: Tests/EventListener/RouterListenerTest.php
class RouterListenerTest (line 40) | class RouterListenerTest extends TestCase
method testPort (line 42) | #[DataProvider('getPortData')]
method getPortData (line 63) | public static function getPortData()
method createRequestEventForUri (line 73) | private function createRequestEventForUri(string $uri): RequestEvent
method testRequestMatcher (line 82) | public function testRequestMatcher()
method testSubRequestWithDifferentMethod (line 98) | public function testSubRequestWithDifferentMethod()
method testLoggingParameter (line 124) | #[DataProvider('getLoggingParameterData')]
method getLoggingParameterData (line 144) | public static function getLoggingParameterData()
method testWithBadRequest (line 152) | public function testWithBadRequest()
method testNoRoutingConfigurationResponse (line 172) | public function testNoRoutingConfigurationResponse()
method testRequestWithBadHost (line 199) | public function testRequestWithBadHost()
method testResourceNotFoundException (line 217) | public function testResourceNotFoundException()
method testMethodNotAllowedException (line 244) | public function testMethodNotAllowedException()
method testRouteMapping (line 270) | #[DataProvider('provideRouteMapping')]
method provideRouteMapping (line 292) | public static function provideRouteMapping(): iterable
FILE: Tests/EventListener/SerializeControllerResultListenerTest.php
class SerializeControllerResultListenerTest (line 26) | class SerializeControllerResultListenerTest extends TestCase
method testSerializeAttribute (line 28) | public function testSerializeAttribute()
class ProductCreated (line 72) | class ProductCreated
method __construct (line 74) | public function __construct(public readonly int $productId)
class GetApiController (line 79) | class GetApiController
method __invoke (line 81) | #[Serialize(201, ['X-Test-Header' => 'abc'], ['foo' => 'bar'])]
FILE: Tests/EventListener/SessionListenerTest.php
class SessionListenerTest (line 40) | class SessionListenerTest extends TestCase
method testSessionCookieOptions (line 42) | #[DataProvider('provideSessionOptions')]
method provideSessionOptions (line 84) | public static function provideSessionOptions(): \Generator
method testPhpBridgeAlreadyStartedSession (line 141) | #[RunInSeparateProcess]
method testSessionCookieWrittenNoCookieGiven (line 158) | #[RunInSeparateProcess]
method testSessionCookieNotWrittenCookieGiven (line 182) | #[RunInSeparateProcess]
method testNewSessionIdIsNotOverwritten (line 209) | #[RunInSeparateProcess]
method testSessionCookieClearedWhenInvalidated (line 241) | #[RunInSeparateProcess]
method testSessionCookieNotClearedWhenOtherVariablesSet (line 271) | #[RunInSeparateProcess]
method testSessionCookieSetWhenOtherNativeVariablesSet (line 295) | #[RunInSeparateProcess]
method testOnlyTriggeredOnMainRequest (line 322) | public function testOnlyTriggeredOnMainRequest()
method testSessionIsSet (line 339) | public function testSessionIsSet()
method testSessionUsesFactory (line 364) | public function testSessionUsesFactory()
method testUsesFactoryWhenNeeded (line 385) | public function testUsesFactoryWhenNeeded()
method testDontUsesFactoryWhenSessionIsNotUsed (line 407) | public function testDontUsesFactoryWhenSessionIsNotUsed()
method testResponseIsPrivateIfSessionStarted (line 425) | public function testResponseIsPrivateIfSessionStarted()
method testResponseIsStillPublicIfSessionStartedAndHeaderPresent (line 455) | public function testResponseIsStillPublicIfSessionStartedAndHeaderPres...
method testSessionSaveAndResponseHasSessionCookie (line 483) | public function testSessionSaveAndResponseHasSessionCookie()
method testUninitializedSessionUsingSessionFromRequest (line 510) | public function testUninitializedSessionUsingSessionFromRequest()
method testUninitializedSessionWithoutInitializedSession (line 530) | public function testUninitializedSessionWithoutInitializedSession()
method testResponseHeadersMaxAgeAndExpiresNotBeOverriddenIfSessionStarted (line 548) | public function testResponseHeadersMaxAgeAndExpiresNotBeOverriddenIfSe...
method testResponseHeadersMaxAgeAndExpiresDefaultValuesIfSessionStarted (line 583) | public function testResponseHeadersMaxAgeAndExpiresDefaultValuesIfSess...
method testPrivateResponseMaxAgeIsRespectedIfSessionStarted (line 611) | public function testPrivateResponseMaxAgeIsRespectedIfSessionStarted()
method testSurrogateMainRequestIsPublic (line 635) | public function testSurrogateMainRequestIsPublic()
method testGetSessionIsCalledOnce (line 675) | public function testGetSessionIsCalledOnce()
method testGetSessionSetsSessionOnMainRequest (line 705) | public function testGetSessionSetsSessionOnMainRequest()
method testSessionUsageExceptionIfStatelessAndSessionUsed (line 726) | public function testSessionUsageExceptionIfStatelessAndSessionUsed()
method testSessionUsageLogIfStatelessAndSessionUsed (line 749) | public function testSessionUsageLogIfStatelessAndSessionUsed()
method testSessionIsSavedWhenUnexpectedSessionExceptionThrown (line 775) | public function testSessionIsSavedWhenUnexpectedSessionExceptionThrown()
method testSessionUsageCallbackWhenDebugAndStateless (line 803) | public function testSessionUsageCallbackWhenDebugAndStateless()
method testSessionUsageCallbackWhenNoDebug (line 830) | public function testSessionUsageCallbackWhenNoDebug()
method testSessionUsageCallbackWhenNoStateless (line 852) | public function testSessionUsageCallbackWhenNoStateless()
method testReset (line 868) | #[RunInSeparateProcess]
method testResetUnclosedSession (line 887) | #[RunInSeparateProcess]
method createListener (line 906) | private function createListener(Request $request, SessionStorageFactor...
method createValidSessionId (line 923) | private function createValidSessionId(): string
FILE: Tests/EventListener/SurrogateListenerTest.php
class SurrogateListenerTest (line 24) | class SurrogateListenerTest extends TestCase
method testFilterDoesNothingForSubRequests (line 26) | public function testFilterDoesNothingForSubRequests()
method testFilterWhenThereIsSomeEsiIncludes (line 40) | public function testFilterWhenThereIsSomeEsiIncludes()
method testFilterWhenThereIsNoEsiIncludes (line 54) | public function testFilterWhenThereIsNoEsiIncludes()
FILE: Tests/EventListener/ValidateRequestListenerTest.php
class ValidateRequestListenerTest (line 23) | class ValidateRequestListenerTest extends TestCase
method tearDown (line 25) | protected function tearDown(): void
method testListenerThrowsWhenMainRequestHasInconsistentClientIps (line 30) | public function testListenerThrowsWhenMainRequestHasInconsistentClient...
FILE: Tests/Exception/AccessDeniedHttpExceptionTest.php
class AccessDeniedHttpExceptionTest (line 17) | class AccessDeniedHttpExceptionTest extends HttpExceptionTest
method createException (line 19) | protected function createException(string $message = '', ?\Throwable $...
FILE: Tests/Exception/BadRequestHttpExceptionTest.php
class BadRequestHttpExceptionTest (line 17) | class BadRequestHttpExceptionTest extends HttpExceptionTest
method createException (line 19) | protected function createException(string $message = '', ?\Throwable $...
FILE: Tests/Exception/ConflictHttpExceptionTest.php
class ConflictHttpExceptionTest (line 17) | class ConflictHttpExceptionTest extends HttpExceptionTest
method createException (line 19) | protected function createException(string $message = '', ?\Throwable $...
FILE: Tests/Exception/GoneHttpExceptionTest.php
class GoneHttpExceptionTest (line 17) | class GoneHttpExceptionTest extends HttpExceptionTest
method createException (line 19) | protected function createException(string $message = '', ?\Throwable $...
FILE: Tests/Exception/HttpExceptionTest.php
class HttpExceptionTest (line 18) | class HttpExceptionTest extends TestCase
method headerDataProvider (line 20) | public static function headerDataProvider()
method testHeadersDefault (line 34) | public function testHeadersDefault()
method testHeadersConstructor (line 40) | #[DataProvider('headerDataProvider')]
method testHeadersSetter (line 47) | #[DataProvider('headerDataProvider')]
method testThrowableIsAllowedForPrevious (line 55) | public function testThrowableIsAllowedForPrevious()
method testFromStatusCode (line 63) | #[DataProvider('provideStatusCode')]
method provideStatusCode (line 71) | public static function provideStatusCode()
method createException (line 93) | protected function createException(string $message = '', ?\Throwable $...
FILE: Tests/Exception/LengthRequiredHttpExceptionTest.php
class LengthRequiredHttpExceptionTest (line 17) | class LengthRequiredHttpExceptionTest extends HttpExceptionTest
method createException (line 19) | protected function createException(string $message = '', ?\Throwable $...
FILE: Tests/Exception/LockedHttpExceptionTest.php
class LockedHttpExceptionTest (line 17) | class LockedHttpExceptionTest extends HttpExceptionTest
method createException (line 19) | protected function createException(string $message = '', ?\Throwable $...
FILE: Tests/Exception/MethodNotAllowedHttpExceptionTest.php
class MethodNotAllowedHttpExceptionTest (line 18) | class MethodNotAllowedHttpExceptionTest extends HttpExceptionTest
method testHeadersDefault (line 20) | public function testHeadersDefault()
method testWithHeaderConstruct (line 26) | public function testWithHeaderConstruct()
method testHeadersSetter (line 39) | #[DataProvider('headerDataProvider')]
method createException (line 47) | protected function createException(string $message = '', ?\Throwable $...
FILE: Tests/Exception/NotAcceptableHttpExceptionTest.php
class NotAcceptableHttpExceptionTest (line 17) | class NotAcceptableHttpExceptionTest extends HttpExceptionTest
method createException (line 19) | protected function createException(string $message = '', ?\Throwable $...
FILE: Tests/Exception/NotFoundHttpExceptionTest.php
class NotFoundHttpExceptionTest (line 17) | class NotFoundHttpExceptionTest extends HttpExceptionTest
method createException (line 19) | protected function createException(string $message = '', ?\Throwable $...
FILE: Tests/Exception/PreconditionFailedHttpExceptionTest.php
class PreconditionFailedHttpExceptionTest (line 17) | class PreconditionFailedHttpExceptionTest extends HttpExceptionTest
method createException (line 19) | protected function createException(string $message = '', ?\Throwable $...
FILE: Tests/Exception/PreconditionRequiredHttpExceptionTest.php
class PreconditionRequiredHttpExceptionTest (line 17) | class PreconditionRequiredHttpExceptionTest extends HttpExceptionTest
method createException (line 19) | protected function createException(string $message = '', ?\Throwable $...
FILE: Tests/Exception/ServiceUnavailableHttpExceptionTest.php
class ServiceUnavailableHttpExceptionTest (line 18) | class ServiceUnavailableHttpExceptionTest extends HttpExceptionTest
method testHeadersDefaultRetryAfter (line 20) | public function testHeadersDefaultRetryAfter()
method testWithHeaderConstruct (line 26) | public function testWithHeaderConstruct()
method testHeadersSetter (line 39) | #[DataProvider('headerDataProvider')]
method createException (line 47) | protected function createException(string $message = '', ?\Throwable $...
FILE: Tests/Exception/TooManyRequestsHttpExceptionTest.php
class TooManyRequestsHttpExceptionTest (line 18) | class TooManyRequestsHttpExceptionTest extends HttpExceptionTest
method testHeadersDefaultRertyAfter (line 20) | public function testHeadersDefaultRertyAfter()
method testWithHeaderConstruct (line 26) | public function testWithHeaderConstruct()
method testHeadersSetter (line 39) | #[DataProvider('headerDataProvider')]
method createException (line 47) | protected function createException(string $message = '', ?\Throwable $...
FILE: Tests/Exception/UnauthorizedHttpExceptionTest.php
class UnauthorizedHttpExceptionTest (line 18) | class UnauthorizedHttpExceptionTest extends HttpExceptionTest
method testHeadersDefault (line 20) | public function testHeadersDefault()
method testWithHeaderConstruct (line 26) | public function testWithHeaderConstruct()
method testHeadersSetter (line 39) | #[DataProvider('headerDataProvider')]
method createException (line 47) | protected function createException(string $message = '', ?\Throwable $...
FILE: Tests/Exception/UnprocessableEntityHttpExceptionTest.php
class UnprocessableEntityHttpExceptionTest (line 17) | class UnprocessableEntityHttpExceptionTest extends HttpExceptionTest
method createException (line 19) | protected function createException(string $message = '', ?\Throwable $...
FILE: Tests/Exception/UnsupportedMediaTypeHttpExceptionTest.php
class UnsupportedMediaTypeHttpExceptionTest (line 17) | class UnsupportedMediaTypeHttpExceptionTest extends HttpExceptionTest
method createException (line 19) | protected function createException(string $message = '', ?\Throwable $...
FILE: Tests/Fixtures/AcmeFooBundle/AcmeFooBundle.php
class AcmeFooBundle (line 19) | class AcmeFooBundle extends AbstractBundle
method configure (line 21) | public function configure(DefinitionConfigurator $definition): void
method prependExtension (line 32) | public function prependExtension(ContainerConfigurator $container, Con...
method loadExtension (line 37) | public function loadExtension(array $config, ContainerConfigurator $co...
FILE: Tests/Fixtures/Attribute/Bar.php
class Bar (line 14) | #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Att...
method __construct (line 17) | public function __construct(
FILE: Tests/Fixtures/Attribute/Baz.php
class Baz (line 14) | #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Att...
FILE: Tests/Fixtures/Attribute/Buz.php
class Buz (line 14) | #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD)]
FILE: Tests/Fixtures/Attribute/Foo.php
class Foo (line 14) | #[\Attribute(\Attribute::TARGET_PARAMETER)]
method __construct (line 19) | public function __construct($foo)
FILE: Tests/Fixtures/Attribute/Qux.php
class Qux (line 14) | #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD)]
FILE: Tests/Fixtures/Attribute/SubBuz.php
class SubBuz (line 14) | #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD)]
FILE: Tests/Fixtures/BundleCompilerPass/BundleAsCompilerPassBundle.php
class BundleAsCompilerPassBundle (line 18) | class BundleAsCompilerPassBundle extends AbstractBundle implements Compi...
method process (line 20) | public function process(ContainerBuilder $container): void
FILE: Tests/Fixtures/ClearableService.php
class ClearableService (line 5) | class ClearableService
method clear (line 9) | public function clear()
FILE: Tests/Fixtures/Controller/AttributeController.php
class AttributeController (line 18) | #[Bar('class'), Undefined('class')]
method __invoke (line 21) | #[Bar('method'), Baz, Undefined('method')]
method action (line 26) | public function action(#[Foo('bar')] string $baz)
method multiAttributeArg (line 30) | public function multiAttributeArg(#[Foo('bar'), Undefined('bar')] stri...
method issue41478 (line 34) | public function issue41478(#[Foo('bar')] string $baz, string $bat)
FILE: Tests/Fixtures/Controller/BasicTypesController.php
class BasicTypesController (line 14) | class BasicTypesController
method action (line 16) | public function action(string $foo, int $bar, float $baz)
FILE: Tests/Fixtures/Controller/CacheAttributeController.php
class CacheAttributeController (line 16) | #[Cache(smaxage: 20)]
method foo (line 22) | #[Cache(smaxage: 25)]
method bar (line 27) | public function bar()
FILE: Tests/Fixtures/Controller/ControllerAttributesController.php
class ControllerAttributesController (line 18) | #[Buz]
method buzQuxAction (line 21) | #[Buz]
method buzAction (line 27) | #[Buz]
method subBuzAction (line 32) | #[SubBuz]
method noAttributeAction (line 37) | public function noAttributeAction()
FILE: Tests/Fixtures/Controller/ExtendingRequest.php
class ExtendingRequest (line 16) | class ExtendingRequest extends Request
FILE: Tests/Fixtures/Controller/ExtendingSession.php
class ExtendingSession (line 16) | class ExtendingSession extends Session
FILE: Tests/Fixtures/Controller/NullableController.php
class NullableController (line 14) | class NullableController
method action (line 16) | public function action(?string $foo, ?\stdClass $bar, ?string $baz = '...
FILE: Tests/Fixtures/Controller/VariadicController.php
class VariadicController (line 14) | class VariadicController
method action (line 16) | public function action($foo, ...$bar)
FILE: Tests/Fixtures/DataCollector/CloneVarDataCollector.php
class CloneVarDataCollector (line 19) | final class CloneVarDataCollector extends DataCollector
method __construct (line 23) | public function __construct($varToClone)
method collect (line 28) | public function collect(Request $request, Response $response, ?\Throwa...
method getData (line 33) | public function getData(): Data
method getName (line 38) | public function getName(): string
FILE: Tests/Fixtures/DataCollector/DummyController.php
class DummyController (line 14) | class DummyController
method staticControllerMethod (line 19) | public static function staticControllerMethod()
method __call (line 27) | public function __call(string $method, array $args)
method __callStatic (line 35) | public static function __callStatic(string $method, array $args)
method __invoke (line 40) | public function __invoke()
method regularCallable (line 45) | public function regularCallable()
FILE: Tests/Fixtures/ExtensionNotValidBundle/DependencyInjection/ExtensionNotValidExtension.php
class ExtensionNotValidExtension (line 14) | class ExtensionNotValidExtension
method getAlias (line 16) | public function getAlias()
FILE: Tests/Fixtures/ExtensionNotValidBundle/ExtensionNotValidBundle.php
class ExtensionNotValidBundle (line 16) | class ExtensionNotValidBundle extends Bundle
FILE: Tests/Fixtures/ExtensionPresentBundle/DependencyInjection/ExtensionPresentExtension.php
class ExtensionPresentExtension (line 17) | class ExtensionPresentExtension extends Extension
method load (line 19) | public function load(array $configs, ContainerBuilder $container): void
FILE: Tests/Fixtures/ExtensionPresentBundle/ExtensionPresentBundle.php
class ExtensionPresentBundle (line 16) | class ExtensionPresentBundle extends Bundle
FILE: Tests/Fixtures/IsSignatureValidAttributeController.php
class IsSignatureValidAttributeController (line 16) | #[IsSignatureValid]
method __invoke (line 19) | public function __invoke()
FILE: Tests/Fixtures/IsSignatureValidAttributeMethodsController.php
class IsSignatureValidAttributeMethodsController (line 16) | class IsSignatureValidAttributeMethodsController
method noAttribute (line 18) | public function noAttribute()
method withDefaultBehavior (line 22) | #[IsSignatureValid]
method withMultiple (line 27) | #[IsSignatureValid]
method withPostOnly (line 33) | #[IsSignatureValid(methods: 'POST')]
method withGetAndPost (line 38) | #[IsSignatureValid(methods: ['GET', 'POST'])]
FILE: Tests/Fixtures/KernelWithoutBundles.php
class KernelWithoutBundles (line 18) | class KernelWithoutBundles extends Kernel
method registerBundles (line 20) | public function registerBundles(): iterable
method registerContainerConfiguration (line 25) | public function registerContainerConfiguration(LoaderInterface $loader...
method getProjectDir (line 29) | public function getProjectDir(): string
method build (line 34) | protected function build(ContainerBuilder $container): void
FILE: Tests/Fixtures/LazyResettableService.php
class LazyResettableService (line 14) | class LazyResettableService extends \stdClass
method foo (line 18) | public function foo(): bool
method reset (line 23) | public function reset(): void
FILE: Tests/Fixtures/MockableUploadFileWithClientSize.php
class MockableUploadFileWithClientSize (line 16) | class MockableUploadFileWithClientSize extends UploadedFile
method getClientSize (line 18) | public function getClientSize(): int
FILE: Tests/Fixtures/MultiResettableService.php
class MultiResettableService (line 5) | class MultiResettableService
method resetFirst (line 10) | public function resetFirst()
method resetSecond (line 15) | public function resetSecond()
FILE: Tests/Fixtures/ResettableService.php
class ResettableService (line 5) | class ResettableService
method reset (line 9) | public function reset()
FILE: Tests/Fixtures/TestClient.php
class TestClient (line 16) | class TestClient extends HttpKernelBrowser
method getScript (line 18) | protected function getScript($request): string
FILE: Tests/Fixtures/UsePropertyInDestruct.php
class UsePropertyInDestruct (line 5) | class UsePropertyInDestruct
method __destruct (line 10) | public function __destruct()
FILE: Tests/Fixtures/WithPublicObjectProperty.php
class WithPublicObjectProperty (line 5) | class WithPublicObjectProperty
FILE: Tests/Fragment/EsiFragmentRendererTest.php
class EsiFragmentRendererTest (line 22) | class EsiFragmentRendererTest extends TestCase
method testRenderFallbackToInlineStrategyIfEsiNotSupported (line 24) | public function testRenderFallbackToInlineStrategyIfEsiNotSupported()
method testRenderFallbackWithScalar (line 30) | public function testRenderFallbackWithScalar()
method testRender (line 38) | public function testRender()
method testRenderControllerReference (line 51) | public function testRenderControllerReference()
method testRenderControllerReferenceWithAbsoluteUri (line 69) | public function testRenderControllerReferenceWithAbsoluteUri()
method testRenderControllerReferenceWithoutSignerThrowsException (line 87) | public function testRenderControllerReferenceWithoutSignerThrowsExcept...
method testRenderAltControllerReferenceWithoutSignerThrowsException (line 99) | public function testRenderAltControllerReferenceWithoutSignerThrowsExc...
method getInlineStrategy (line 111) | private function getInlineStrategy($called = false)
FILE: Tests/Fragment/FragmentHandlerTest.php
class FragmentHandlerTest (line 22) | class FragmentHandlerTest extends TestCase
method setUp (line 26) | protected function setUp(): void
method testRenderWhenRendererDoesNotExist (line 32) | public function testRenderWhenRendererDoesNotExist()
method testRenderWithUnknownRenderer (line 39) | public function testRenderWithUnknownRenderer()
method testDeliverWithUnsuccessfulResponse (line 47) | public function testDeliverWithUnsuccessfulResponse()
method testRender (line 65) | public function testRender()
method getHandler (line 85) | protected function getHandler($returnValue, $arguments = [])
FILE: Tests/Fragment/HIncludeFragmentRendererTest.php
class HIncludeFragmentRendererTest (line 22) | class HIncludeFragmentRendererTest extends TestCase
method testRenderExceptionWhenControllerAndNoSigner (line 24) | public function testRenderExceptionWhenControllerAndNoSigner()
method testRenderWithControllerAndSigner (line 31) | public function testRenderWithControllerAndSigner()
method testRenderWithUri (line 38) | public function testRenderWithUri()
method testRenderWithDefault (line 47) | public function testRenderWithDefault()
method testRenderWithAttributesOptions (line 62) | public function testRenderWithAttributesOptions()
method testRenderWithTwigAndDefaultText (line 77) | public function testRenderWithTwigAndDefaultText()
FILE: Tests/Fragment/InlineFragmentRendererTest.php
class InlineFragmentRendererTest (line 30) | #[Group('time-sensitive')]
method testRender (line 33) | public function testRender()
method testRenderWithControllerReference (line 40) | public function testRenderWithControllerReference()
method testRenderWithObjectsAsAttributes (line 47) | public function testRenderWithObjectsAsAttributes()
method testRenderWithTrustedHeaderDisabled (line 63) | public function testRenderWithTrustedHeaderDisabled()
method testRenderExceptionNoIgnoreErrors (line 77) | public function testRenderExceptionNoIgnoreErrors()
method testRenderExceptionIgnoreErrors (line 88) | public function testRenderExceptionIgnoreErrors()
method testRenderExceptionIgnoreErrorsWithAlt (line 102) | public function testRenderExceptionIgnoreErrorsWithAlt()
method getKernel (line 119) | private function getKernel($returnValue)
method testExceptionInSubRequestsDoesNotMangleOutputBuffers (line 137) | public function testExceptionInSubRequestsDoesNotMangleOutputBuffers()
method testLocaleAndFormatAreKeptInSubrequest (line 170) | public function testLocaleAndFormatAreKeptInSubrequest()
method testESIHeaderIsKeptInSubrequest (line 190) | public function testESIHeaderIsKeptInSubrequest()
method testESIHeaderIsKeptInSubrequestWithTrustedHeaderDisabled (line 209) | public function testESIHeaderIsKeptInSubrequestWithTrustedHeaderDisabl...
method testHeadersPossiblyResultingIn304AreNotAssignedToSubrequest (line 218) | public function testHeadersPossiblyResultingIn304AreNotAssignedToSubre...
method testFirstTrustedProxyIsSetAsRemote (line 231) | public function testFirstTrustedProxyIsSetAsRemote()
method testIpAddressOfRangedTrustedProxyIsSetAsRemote (line 252) | public function testIpAddressOfRangedTrustedProxyIsSetAsRemote()
method testStatelessAttributeIsForwardedByDefault (line 273) | public function testStatelessAttributeIsForwardedByDefault()
method testStatelessAttributeCanBeDisabled (line 288) | public function testStatelessAttributeCanBeDisabled()
method getKernel
Condensed preview — 339 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,555K chars).
[
{
"path": ".gitattributes",
"chars": 74,
"preview": "/Tests export-ignore\n/phpunit.xml.dist export-ignore\n/.git* export-ignore\n"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 278,
"preview": "Please do not submit any Pull Requests here. They will be closed.\n---\n\nPlease submit your PR here instead:\nhttps://githu"
},
{
"path": ".github/workflows/close-pull-request.yml",
"chars": 544,
"preview": "name: Close Pull Request\n\non:\n pull_request_target:\n types: [opened]\n\njobs:\n run:\n runs-on: ubuntu-latest\n st"
},
{
"path": ".gitignore",
"chars": 77,
"preview": "vendor/\ncomposer.lock\nphpunit.xml\nTests/Fixtures/cache/\nTests/Fixtures/logs/\n"
},
{
"path": "Attribute/AsController.php",
"chars": 623,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Attribute/AsTargetedValueResolver.php",
"chars": 608,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Attribute/Cache.php",
"chars": 4972,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Attribute/IsSignatureValid.php",
"chars": 1305,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Attribute/MapDateTime.php",
"chars": 1277,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Attribute/MapQueryParameter.php",
"chars": 1842,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Attribute/MapQueryString.php",
"chars": 2128,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Attribute/MapRequestHeader.php",
"chars": 1172,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Attribute/MapRequestPayload.php",
"chars": 2498,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Attribute/MapUploadedFile.php",
"chars": 1067,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Attribute/Serialize.php",
"chars": 919,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Attribute/ValueResolver.php",
"chars": 967,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Attribute/WithHttpStatus.php",
"chars": 790,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Attribute/WithLogLevel.php",
"chars": 841,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Bundle/AbstractBundle.php",
"chars": 1927,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Bundle/Bundle.php",
"chars": 4311,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Bundle/BundleExtension.php",
"chars": 2232,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Bundle/BundleInterface.php",
"chars": 1526,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "CHANGELOG.md",
"chars": 26503,
"preview": "CHANGELOG\n=========\n\n8.1\n---\n\n * Add `#[MapRequestHeader]` to map a header from `Request` to a controller argument\n * Ad"
},
{
"path": "CacheClearer/CacheClearerInterface.php",
"chars": 519,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "CacheClearer/ChainCacheClearer.php",
"chars": 778,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "CacheClearer/Psr6CacheClearer.php",
"chars": 1629,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "CacheWarmer/CacheWarmer.php",
"chars": 886,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "CacheWarmer/CacheWarmerAggregate.php",
"chars": 4541,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "CacheWarmer/CacheWarmerInterface.php",
"chars": 751,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "CacheWarmer/WarmableInterface.php",
"chars": 826,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Config/FileLocator.php",
"chars": 1050,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ArgumentResolver/BackedEnumValueResolver.php",
"chars": 2436,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ArgumentResolver/DateTimeValueResolver.php",
"chars": 2871,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ArgumentResolver/DefaultValueResolver.php",
"chars": 1069,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ArgumentResolver/NotTaggedControllerValueResolver.php",
"chars": 2124,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ArgumentResolver/QueryParameterValueResolver.php",
"chars": 5274,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ArgumentResolver/RequestAttributeValueResolver.php",
"chars": 2288,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ArgumentResolver/RequestHeaderValueResolver.php",
"chars": 2469,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ArgumentResolver/RequestPayloadValueResolver.php",
"chars": 15886,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ArgumentResolver/RequestValueResolver.php",
"chars": 1320,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ArgumentResolver/ServiceValueResolver.php",
"chars": 2520,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ArgumentResolver/SessionValueResolver.php",
"chars": 1135,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ArgumentResolver/TraceableValueResolver.php",
"chars": 1190,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ArgumentResolver/UidValueResolver.php",
"chars": 1303,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ArgumentResolver/VariadicValueResolver.php",
"chars": 1281,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ArgumentResolver.php",
"chars": 6148,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ArgumentResolverInterface.php",
"chars": 838,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ContainerControllerResolver.php",
"chars": 2183,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ControllerReference.php",
"chars": 1287,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ControllerResolver.php",
"chars": 9730,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ControllerResolverInterface.php",
"chars": 1372,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ErrorController.php",
"chars": 1870,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/TraceableArgumentResolver.php",
"chars": 1009,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/TraceableControllerResolver.php",
"chars": 930,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Controller/ValueResolverInterface.php",
"chars": 713,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "ControllerMetadata/ArgumentMetadata.php",
"chars": 3527,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "ControllerMetadata/ArgumentMetadataFactory.php",
"chars": 2405,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "ControllerMetadata/ArgumentMetadataFactoryInterface.php",
"chars": 619,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DataCollector/AjaxDataCollector.php",
"chars": 832,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DataCollector/ConfigDataCollector.php",
"chars": 8678,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DataCollector/DataCollector.php",
"chars": 2857,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DataCollector/DataCollectorInterface.php",
"chars": 855,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DataCollector/DumpDataCollector.php",
"chars": 10561,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DataCollector/EventDataCollector.php",
"chars": 4336,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DataCollector/ExceptionDataCollector.php",
"chars": 1600,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DataCollector/LateDataCollectorInterface.php",
"chars": 524,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DataCollector/LoggerDataCollector.php",
"chars": 10871,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DataCollector/MemoryDataCollector.php",
"chars": 2218,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DataCollector/RequestDataCollector.php",
"chars": 18327,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DataCollector/RouterDataCollector.php",
"chars": 2351,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DataCollector/TimeDataCollector.php",
"chars": 3348,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Debug/ErrorHandlerConfigurator.php",
"chars": 3520,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Debug/TraceableEventDispatcher.php",
"chars": 3685,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Debug/VirtualRequestStack.php",
"chars": 1580,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DependencyInjection/ConfigurableExtension.php",
"chars": 1322,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DependencyInjection/ControllerArgumentValueResolverPass.php",
"chars": 3066,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DependencyInjection/ControllerAttributesListenerPass.php",
"chars": 2011,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DependencyInjection/Extension.php",
"chars": 785,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DependencyInjection/FragmentRendererPass.php",
"chars": 2085,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DependencyInjection/LazyLoadingFragmentHandler.php",
"chars": 1417,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DependencyInjection/LoggerPass.php",
"chars": 1490,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DependencyInjection/MergeExtensionConfigurationPass.php",
"chars": 1131,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DependencyInjection/RegisterControllerArgumentLocatorsPass.php",
"chars": 12042,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DependencyInjection/RegisterLocaleAwareServicesPass.php",
"chars": 1392,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php",
"chars": 2778,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DependencyInjection/ResettableServicePass.php",
"chars": 2145,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DependencyInjection/ServicesResetter.php",
"chars": 1696,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "DependencyInjection/ServicesResetterInterface.php",
"chars": 446,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Event/ControllerArgumentsEvent.php",
"chars": 3813,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Event/ControllerArgumentsMetadata.php",
"chars": 1256,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Event/ControllerAttributeEvent.php",
"chars": 2522,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Event/ControllerEvent.php",
"chars": 5796,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Event/ControllerMetadata.php",
"chars": 1393,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Event/ExceptionEvent.php",
"chars": 2180,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Event/FinishRequestEvent.php",
"chars": 825,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Event/KernelEvent.php",
"chars": 1782,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Event/RequestEvent.php",
"chars": 1262,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Event/ResponseEvent.php",
"chars": 1253,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Event/TerminateEvent.php",
"chars": 1066,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Event/ViewEvent.php",
"chars": 2760,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "EventListener/AbstractSessionListener.php",
"chars": 12458,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "EventListener/AddRequestFormatsListener.php",
"chars": 1155,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "EventListener/CacheAttributeListener.php",
"chars": 10964,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "EventListener/ControllerAttributesListener.php",
"chars": 4410,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "EventListener/DebugHandlersListener.php",
"chars": 4704,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "EventListener/DisallowRobotsIndexingListener.php",
"chars": 1100,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "EventListener/DumpListener.php",
"chars": 2311,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "EventListener/ErrorListener.php",
"chars": 9763,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "EventListener/FragmentListener.php",
"chars": 2894,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "EventListener/IsSignatureValidAttributeListener.php",
"chars": 2419,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "EventListener/LocaleAwareListener.php",
"chars": 2296,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "EventListener/LocaleListener.php",
"chars": 3000,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "EventListener/ProfilerListener.php",
"chars": 5091,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "EventListener/ResponseListener.php",
"chars": 1752,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "EventListener/RouterListener.php",
"chars": 7650,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "EventListener/SerializeControllerResultAttributeListener.php",
"chars": 2974,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "EventListener/SessionListener.php",
"chars": 1029,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "EventListener/SurrogateListener.php",
"chars": 1751,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "EventListener/ValidateRequestListener.php",
"chars": 1173,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/AccessDeniedHttpException.php",
"chars": 654,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/BadRequestHttpException.php",
"chars": 599,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/ConflictHttpException.php",
"chars": 597,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/ControllerDoesNotReturnResponseException.php",
"chars": 2290,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/GoneHttpException.php",
"chars": 593,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/HttpException.php",
"chars": 2546,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/HttpExceptionInterface.php",
"chars": 622,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/InvalidMetadataException.php",
"chars": 348,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/LengthRequiredHttpException.php",
"chars": 603,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/LockedHttpException.php",
"chars": 599,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/MethodNotAllowedHttpException.php",
"chars": 760,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/NearMissValueResolverException.php",
"chars": 581,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/NotAcceptableHttpException.php",
"chars": 602,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/NotFoundHttpException.php",
"chars": 604,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/PreconditionFailedHttpException.php",
"chars": 607,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/PreconditionRequiredHttpException.php",
"chars": 655,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/ResolverNotFoundException.php",
"chars": 892,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/ServiceUnavailableHttpException.php",
"chars": 864,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/TooManyRequestsHttpException.php",
"chars": 907,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/UnauthorizedHttpException.php",
"chars": 754,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/UnexpectedSessionUsageException.php",
"chars": 416,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/UnprocessableEntityHttpException.php",
"chars": 617,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Exception/UnsupportedMediaTypeHttpException.php",
"chars": 609,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Fragment/AbstractSurrogateFragmentRenderer.php",
"chars": 3712,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Fragment/EsiFragmentRenderer.php",
"chars": 534,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Fragment/FragmentHandler.php",
"chars": 3624,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Fragment/FragmentRendererInterface.php",
"chars": 876,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Fragment/FragmentUriGenerator.php",
"chars": 3361,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Fragment/FragmentUriGeneratorInterface.php",
"chars": 1034,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Fragment/HIncludeFragmentRenderer.php",
"chars": 3134,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Fragment/InlineFragmentRenderer.php",
"chars": 5288,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Fragment/RoutableFragmentRenderer.php",
"chars": 1498,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Fragment/SsiFragmentRenderer.php",
"chars": 534,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "HttpCache/AbstractSurrogate.php",
"chars": 4414,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "HttpCache/CacheWasLockedException.php",
"chars": 363,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "HttpCache/Esi.php",
"chars": 3280,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "HttpCache/HttpCache.php",
"chars": 26647,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "HttpCache/ResponseCacheStrategy.php",
"chars": 8682,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "HttpCache/ResponseCacheStrategyInterface.php",
"chars": 1013,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * This code i"
},
{
"path": "HttpCache/Ssi.php",
"chars": 2560,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "HttpCache/Store.php",
"chars": 14710,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * This code i"
},
{
"path": "HttpCache/StoreInterface.php",
"chars": 2186,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * This code i"
},
{
"path": "HttpCache/SubRequestHandler.php",
"chars": 3924,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "HttpCache/SurrogateInterface.php",
"chars": 2116,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "HttpClientKernel.php",
"chars": 4120,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "HttpKernel.php",
"chars": 12160,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "HttpKernelBrowser.php",
"chars": 6065,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "HttpKernelInterface.php",
"chars": 1227,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Kernel.php",
"chars": 28768,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "KernelEvents.php",
"chars": 4142,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "KernelInterface.php",
"chars": 4036,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "LICENSE",
"chars": 1068,
"preview": "Copyright (c) 2004-present Fabien Potencier\n\nPermission is hereby granted, free of charge, to any person obtaining a cop"
},
{
"path": "Log/DebugLoggerConfigurator.php",
"chars": 1327,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Log/DebugLoggerInterface.php",
"chars": 1031,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Log/Logger.php",
"chars": 5834,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Profiler/FileProfilerStorage.php",
"chars": 10775,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Profiler/Profile.php",
"chars": 5733,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Profiler/Profiler.php",
"chars": 7180,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Profiler/ProfilerStateChecker.php",
"chars": 742,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Profiler/ProfilerStorageInterface.php",
"chars": 1711,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "README.md",
"chars": 676,
"preview": "HttpKernel Component\n====================\n\nThe HttpKernel component provides a structured process for converting a Reque"
},
{
"path": "RebootableInterface.php",
"chars": 793,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Resources/welcome.html.php",
"chars": 40432,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "TerminableInterface.php",
"chars": 916,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Tests/Attribute/WithLogLevelTest.php",
"chars": 951,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Tests/Bundle/BundleTest.php",
"chars": 2456,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Tests/CacheClearer/ChainCacheClearerTest.php",
"chars": 1125,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Tests/CacheClearer/Psr6CacheClearerTest.php",
"chars": 1367,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Tests/CacheWarmer/CacheWarmerAggregateTest.php",
"chars": 5300,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Tests/CacheWarmer/CacheWarmerTest.php",
"chars": 1677,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Tests/Config/FileLocatorTest.php",
"chars": 1106,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Tests/Controller/ArgumentResolver/BackedEnumValueResolverTest.php",
"chars": 5370,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Tests/Controller/ArgumentResolver/DateTimeValueResolverTest.php",
"chars": 10083,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Tests/Controller/ArgumentResolver/NotTaggedControllerValueResolverTest.php",
"chars": 5337,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Tests/Controller/ArgumentResolver/QueryParameterValueResolverTest.php",
"chars": 15757,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Tests/Controller/ArgumentResolver/RequestAttributeValueResolverTest.php",
"chars": 2372,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Tests/Controller/ArgumentResolver/RequestHeaderValueResolverTest.php",
"chars": 7283,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Tests/Controller/ArgumentResolver/RequestPayloadValueResolverTest.php",
"chars": 64956,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Tests/Controller/ArgumentResolver/RequestValueResolverTest.php",
"chars": 1846,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Tests/Controller/ArgumentResolver/ServiceValueResolverTest.php",
"chars": 5172,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
},
{
"path": "Tests/Controller/ArgumentResolver/TraceableValueResolverTest.php",
"chars": 1907,
"preview": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the ful"
}
]
// ... and 139 more files (download for full content)
About this extraction
This page contains the full source code of the symfony/http-kernel GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 339 files (1.4 MB), approximately 352.9k tokens, and a symbol index with 2408 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.