diff --git a/.github/expected-missing-return-types.diff b/.github/expected-missing-return-types.diff index 667d76787aecb..20e75c16130bd 100644 --- a/.github/expected-missing-return-types.diff +++ b/.github/expected-missing-return-types.diff @@ -205,16 +205,6 @@ diff --git a/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php b/src/Symfony/ + public function configureOptions(OptionsResolver $resolver): void { parent::configureOptions($resolver); -diff --git a/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php b/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php ---- a/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php -+++ b/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php -@@ -56,5 +56,5 @@ class DbalLogger implements SQLLogger - * @return void - */ -- protected function log(string $message, array $params) -+ protected function log(string $message, array $params): void - { - $this->logger->debug($message, $params); diff --git a/src/Symfony/Bridge/Doctrine/Messenger/DoctrineClearEntityManagerWorkerSubscriber.php b/src/Symfony/Bridge/Doctrine/Messenger/DoctrineClearEntityManagerWorkerSubscriber.php --- a/src/Symfony/Bridge/Doctrine/Messenger/DoctrineClearEntityManagerWorkerSubscriber.php +++ b/src/Symfony/Bridge/Doctrine/Messenger/DoctrineClearEntityManagerWorkerSubscriber.php @@ -249,23 +239,6 @@ diff --git a/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvid + public function createNewToken(PersistentTokenInterface $token): void { $sql = 'INSERT INTO rememberme_token (class, username, series, value, lastUsed) VALUES (:class, :username, :series, :value, :lastUsed)'; -diff --git a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/LegacyQueryMock.php b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/LegacyQueryMock.php ---- a/src/Symfony/Bridge/Doctrine/Tests/Fixtures/LegacyQueryMock.php -+++ b/src/Symfony/Bridge/Doctrine/Tests/Fixtures/LegacyQueryMock.php -@@ -24,5 +24,5 @@ class LegacyQueryMock extends AbstractQuery - * @return array|string - */ -- public function getSQL() -+ public function getSQL(): array|string - { - } -@@ -31,5 +31,5 @@ class LegacyQueryMock extends AbstractQuery - * @return Result|int - */ -- protected function _doExecute() -+ protected function _doExecute(): Result|int - { - } diff --git a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php --- a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php +++ b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php @@ -499,7 +472,7 @@ diff --git a/src/Symfony/Bundle/DebugBundle/DebugBundle.php b/src/Symfony/Bundle diff --git a/src/Symfony/Bundle/DebugBundle/DependencyInjection/Compiler/DumpDataCollectorPass.php b/src/Symfony/Bundle/DebugBundle/DependencyInjection/Compiler/DumpDataCollectorPass.php --- a/src/Symfony/Bundle/DebugBundle/DependencyInjection/Compiler/DumpDataCollectorPass.php +++ b/src/Symfony/Bundle/DebugBundle/DependencyInjection/Compiler/DumpDataCollectorPass.php -@@ -26,5 +26,5 @@ class DumpDataCollectorPass implements CompilerPassInterface +@@ -27,5 +27,5 @@ class DumpDataCollectorPass implements CompilerPassInterface * @return void */ - public function process(ContainerBuilder $container) @@ -536,7 +509,7 @@ diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/AbstractConfigCommand.ph diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Application.php b/src/Symfony/Bundle/FrameworkBundle/Console/Application.php --- a/src/Symfony/Bundle/FrameworkBundle/Console/Application.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Application.php -@@ -142,5 +142,5 @@ class Application extends BaseApplication +@@ -174,5 +174,5 @@ class Application extends BaseApplication * @return void */ - protected function registerCommands() @@ -563,7 +536,7 @@ diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/Add diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php -@@ -26,5 +26,5 @@ class AddExpressionLanguageProvidersPass implements CompilerPassInterface +@@ -30,5 +30,5 @@ class AddExpressionLanguageProvidersPass implements CompilerPassInterface * @return void */ - public function process(ContainerBuilder $container) @@ -593,7 +566,7 @@ diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/Con diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/DataCollectorTranslatorPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/DataCollectorTranslatorPass.php --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/DataCollectorTranslatorPass.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/DataCollectorTranslatorPass.php -@@ -24,5 +24,5 @@ class DataCollectorTranslatorPass implements CompilerPassInterface +@@ -28,5 +28,5 @@ class DataCollectorTranslatorPass implements CompilerPassInterface * @return void */ - public function process(ContainerBuilder $container) @@ -603,7 +576,7 @@ diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/Dat diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/LoggingTranslatorPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/LoggingTranslatorPass.php --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/LoggingTranslatorPass.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/LoggingTranslatorPass.php -@@ -26,5 +26,5 @@ class LoggingTranslatorPass implements CompilerPassInterface +@@ -30,5 +30,5 @@ class LoggingTranslatorPass implements CompilerPassInterface * @return void */ - public function process(ContainerBuilder $container) @@ -653,7 +626,7 @@ diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/Tes diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/UnusedTagsPass.php -@@ -109,5 +109,5 @@ class UnusedTagsPass implements CompilerPassInterface +@@ -110,5 +110,5 @@ class UnusedTagsPass implements CompilerPassInterface * @return void */ - public function process(ContainerBuilder $container) @@ -663,7 +636,7 @@ diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/Unu diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php -@@ -25,5 +25,5 @@ class WorkflowGuardListenerPass implements CompilerPassInterface +@@ -29,5 +29,5 @@ class WorkflowGuardListenerPass implements CompilerPassInterface * @return void */ - public function process(ContainerBuilder $container) @@ -673,14 +646,14 @@ diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/Wor diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php -@@ -210,5 +210,5 @@ class FrameworkExtension extends Extension +@@ -213,5 +213,5 @@ class FrameworkExtension extends Extension * @throws LogicException */ - public function load(array $configs, ContainerBuilder $container) + public function load(array $configs, ContainerBuilder $container): void { $loader = new PhpFileLoader($container, new FileLocator(\dirname(__DIR__).'/Resources/config')); -@@ -2953,5 +2953,5 @@ class FrameworkExtension extends Extension +@@ -2971,5 +2971,5 @@ class FrameworkExtension extends Extension * @return void */ - public static function registerRateLimiter(ContainerBuilder $container, string $name, array $limiterConfig) @@ -690,14 +663,14 @@ diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExt diff --git a/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php b/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php --- a/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php +++ b/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php -@@ -94,5 +94,5 @@ class FrameworkBundle extends Bundle +@@ -95,5 +95,5 @@ class FrameworkBundle extends Bundle * @return void */ - public function boot() + public function boot(): void { $_ENV['DOCTRINE_DEPRECATIONS'] = $_SERVER['DOCTRINE_DEPRECATIONS'] ??= 'trigger'; -@@ -119,5 +119,5 @@ class FrameworkBundle extends Bundle +@@ -120,5 +120,5 @@ class FrameworkBundle extends Bundle * @return void */ - public function build(ContainerBuilder $container) @@ -741,7 +714,7 @@ diff --git a/src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php b/src/Symfony/ diff --git a/src/Symfony/Bundle/FrameworkBundle/Routing/AttributeRouteControllerLoader.php b/src/Symfony/Bundle/FrameworkBundle/Routing/AttributeRouteControllerLoader.php --- a/src/Symfony/Bundle/FrameworkBundle/Routing/AttributeRouteControllerLoader.php +++ b/src/Symfony/Bundle/FrameworkBundle/Routing/AttributeRouteControllerLoader.php -@@ -31,5 +31,5 @@ class AttributeRouteControllerLoader extends AttributeClassLoader +@@ -29,5 +29,5 @@ class AttributeRouteControllerLoader extends AttributeClassLoader * @return void */ - protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, object $annot) @@ -894,7 +867,7 @@ diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Fact */ - public function addConfiguration(NodeDefinition $builder); + public function addConfiguration(NodeDefinition $builder): void; - + /** diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php @@ -952,13 +925,13 @@ diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/User */ - public function create(ContainerBuilder $container, string $id, array $config); + public function create(ContainerBuilder $container, string $id, array $config): void; - + /** * @return string */ - public function getKey(); + public function getKey(): string; - + /** * @return void */ @@ -1204,7 +1177,7 @@ diff --git a/src/Symfony/Component/BrowserKit/AbstractBrowser.php b/src/Symfony/ */ - abstract protected function doRequest(object $request); + abstract protected function doRequest(object $request): object; - + /** @@ -467,5 +467,5 @@ abstract class AbstractBrowser * @throws LogicException When this abstract class is not implemented @@ -1491,7 +1464,7 @@ diff --git a/src/Symfony/Component/Cache/Traits/FilesystemCommonTrait.php b/src/ + protected function doUnlink(string $file): bool { return @unlink($file); -@@ -167,5 +167,5 @@ trait FilesystemCommonTrait +@@ -176,5 +176,5 @@ trait FilesystemCommonTrait * @return void */ - public function __wakeup() @@ -1682,7 +1655,7 @@ diff --git a/src/Symfony/Component/Config/Definition/BaseNode.php b/src/Symfony/ */ - abstract protected function validateType(mixed $value); + abstract protected function validateType(mixed $value): void; - + /** diff --git a/src/Symfony/Component/Config/Definition/BooleanNode.php b/src/Symfony/Component/Config/Definition/BooleanNode.php --- a/src/Symfony/Component/Config/Definition/BooleanNode.php @@ -2027,21 +2000,21 @@ diff --git a/src/Symfony/Component/Config/Loader/LoaderInterface.php b/src/Symfo */ - public function load(mixed $resource, string $type = null); + public function load(mixed $resource, string $type = null): mixed; - + /** @@ -35,5 +35,5 @@ interface LoaderInterface * @return bool */ - public function supports(mixed $resource, string $type = null); + public function supports(mixed $resource, string $type = null): bool; - + /** @@ -42,5 +42,5 @@ interface LoaderInterface * @return LoaderResolverInterface */ - public function getResolver(); + public function getResolver(): LoaderResolverInterface; - + /** @@ -49,4 +49,4 @@ interface LoaderInterface * @return void @@ -2077,7 +2050,7 @@ diff --git a/src/Symfony/Component/Config/ResourceCheckerInterface.php b/src/Sym */ - public function supports(ResourceInterface $metadata); + public function supports(ResourceInterface $metadata): bool; - + /** @@ -42,4 +42,4 @@ interface ResourceCheckerInterface * @return bool @@ -2394,14 +2367,14 @@ diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterInterface.ph */ - public function setDecorated(bool $decorated); + public function setDecorated(bool $decorated): void; - + /** @@ -36,5 +36,5 @@ interface OutputFormatterInterface * @return void */ - public function setStyle(string $name, OutputFormatterStyleInterface $style); + public function setStyle(string $name, OutputFormatterStyleInterface $style): void; - + /** diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php b/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php --- a/src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php @@ -2449,35 +2422,35 @@ diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterStyleInterfa */ - public function setForeground(?string $color); + public function setForeground(?string $color): void; - + /** @@ -31,5 +31,5 @@ interface OutputFormatterStyleInterface * @return void */ - public function setBackground(?string $color); + public function setBackground(?string $color): void; - + /** @@ -38,5 +38,5 @@ interface OutputFormatterStyleInterface * @return void */ - public function setOption(string $option); + public function setOption(string $option): void; - + /** @@ -45,5 +45,5 @@ interface OutputFormatterStyleInterface * @return void */ - public function unsetOption(string $option); + public function unsetOption(string $option): void; - + /** @@ -52,5 +52,5 @@ interface OutputFormatterStyleInterface * @return void */ - public function setOptions(array $options); + public function setOptions(array $options): void; - + /** diff --git a/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php b/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php --- a/src/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php @@ -2554,7 +2527,7 @@ diff --git a/src/Symfony/Component/Console/Helper/HelperInterface.php b/src/Symf */ - public function setHelperSet(?HelperSet $helperSet); + public function setHelperSet(?HelperSet $helperSet): void; - + /** @@ -36,4 +36,4 @@ interface HelperInterface * @return string @@ -2727,7 +2700,7 @@ diff --git a/src/Symfony/Component/Console/Input/Input.php b/src/Symfony/Compone */ - abstract protected function parse(); + abstract protected function parse(): void; - + /** * @return void */ @@ -2842,49 +2815,49 @@ diff --git a/src/Symfony/Component/Console/Input/InputInterface.php b/src/Symfon */ - public function getParameterOption(string|array $values, string|bool|int|float|array|null $default = false, bool $onlyParams = false); + public function getParameterOption(string|array $values, string|bool|int|float|array|null $default = false, bool $onlyParams = false): mixed; - + /** @@ -66,5 +66,5 @@ interface InputInterface * @throws RuntimeException */ - public function bind(InputDefinition $definition); + public function bind(InputDefinition $definition): void; - + /** @@ -75,5 +75,5 @@ interface InputInterface * @throws RuntimeException When not enough arguments are given */ - public function validate(); + public function validate(): void; - + /** @@ -91,5 +91,5 @@ interface InputInterface * @throws InvalidArgumentException When argument given doesn't exist */ - public function getArgument(string $name); + public function getArgument(string $name): mixed; - + /** @@ -100,5 +100,5 @@ interface InputInterface * @throws InvalidArgumentException When argument given doesn't exist */ - public function setArgument(string $name, mixed $value); + public function setArgument(string $name, mixed $value): void; - + /** @@ -121,5 +121,5 @@ interface InputInterface * @throws InvalidArgumentException When option given doesn't exist */ - public function getOption(string $name); + public function getOption(string $name): mixed; - + /** @@ -130,5 +130,5 @@ interface InputInterface * @throws InvalidArgumentException When option given doesn't exist */ - public function setOption(string $name, mixed $value); + public function setOption(string $name, mixed $value): void; - + /** @@ -147,4 +147,4 @@ interface InputInterface * @return void @@ -2910,7 +2883,7 @@ diff --git a/src/Symfony/Component/Console/Input/StreamableInputInterface.php b/ */ - public function setStream($stream); + public function setStream($stream): void; - + /** diff --git a/src/Symfony/Component/Console/Output/BufferedOutput.php b/src/Symfony/Component/Console/Output/BufferedOutput.php --- a/src/Symfony/Component/Console/Output/BufferedOutput.php @@ -2961,7 +2934,7 @@ diff --git a/src/Symfony/Component/Console/Output/ConsoleOutputInterface.php b/s */ - public function setErrorOutput(OutputInterface $error); + public function setErrorOutput(OutputInterface $error): void; - + public function section(): ConsoleSectionOutput; diff --git a/src/Symfony/Component/Console/Output/ConsoleSectionOutput.php b/src/Symfony/Component/Console/Output/ConsoleSectionOutput.php --- a/src/Symfony/Component/Console/Output/ConsoleSectionOutput.php @@ -3077,35 +3050,35 @@ diff --git a/src/Symfony/Component/Console/Output/OutputInterface.php b/src/Symf */ - public function write(string|iterable $messages, bool $newline = false, int $options = 0); + public function write(string|iterable $messages, bool $newline = false, int $options = 0): void; - + /** @@ -50,5 +50,5 @@ interface OutputInterface * @return void */ - public function writeln(string|iterable $messages, int $options = 0); + public function writeln(string|iterable $messages, int $options = 0): void; - + /** @@ -59,5 +59,5 @@ interface OutputInterface * @return void */ - public function setVerbosity(int $level); + public function setVerbosity(int $level): void; - + /** @@ -93,5 +93,5 @@ interface OutputInterface * @return void */ - public function setDecorated(bool $decorated); + public function setDecorated(bool $decorated): void; - + /** @@ -103,5 +103,5 @@ interface OutputInterface * @return void */ - public function setFormatter(OutputFormatterInterface $formatter); + public function setFormatter(OutputFormatterInterface $formatter): void; - + /** diff --git a/src/Symfony/Component/Console/Output/StreamOutput.php b/src/Symfony/Component/Console/Output/StreamOutput.php --- a/src/Symfony/Component/Console/Output/StreamOutput.php @@ -3197,91 +3170,91 @@ diff --git a/src/Symfony/Component/Console/Style/StyleInterface.php b/src/Symfon */ - public function title(string $message); + public function title(string $message): void; - + /** @@ -31,5 +31,5 @@ interface StyleInterface * @return void */ - public function section(string $message); + public function section(string $message): void; - + /** @@ -38,5 +38,5 @@ interface StyleInterface * @return void */ - public function listing(array $elements); + public function listing(array $elements): void; - + /** @@ -45,5 +45,5 @@ interface StyleInterface * @return void */ - public function text(string|array $message); + public function text(string|array $message): void; - + /** @@ -52,5 +52,5 @@ interface StyleInterface * @return void */ - public function success(string|array $message); + public function success(string|array $message): void; - + /** @@ -59,5 +59,5 @@ interface StyleInterface * @return void */ - public function error(string|array $message); + public function error(string|array $message): void; - + /** @@ -66,5 +66,5 @@ interface StyleInterface * @return void */ - public function warning(string|array $message); + public function warning(string|array $message): void; - + /** @@ -73,5 +73,5 @@ interface StyleInterface * @return void */ - public function note(string|array $message); + public function note(string|array $message): void; - + /** @@ -80,5 +80,5 @@ interface StyleInterface * @return void */ - public function caution(string|array $message); + public function caution(string|array $message): void; - + /** @@ -87,5 +87,5 @@ interface StyleInterface * @return void */ - public function table(array $headers, array $rows); + public function table(array $headers, array $rows): void; - + /** @@ -114,5 +114,5 @@ interface StyleInterface * @return void */ - public function newLine(int $count = 1); + public function newLine(int $count = 1): void; - + /** @@ -121,5 +121,5 @@ interface StyleInterface * @return void */ - public function progressStart(int $max = 0); + public function progressStart(int $max = 0): void; - + /** @@ -128,5 +128,5 @@ interface StyleInterface * @return void */ - public function progressAdvance(int $step = 1); + public function progressAdvance(int $step = 1): void; - + /** @@ -135,4 +135,4 @@ interface StyleInterface * @return void @@ -3667,13 +3640,13 @@ diff --git a/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionCo $parameters = $container->getParameterBag()->all(); @@ -169,10 +169,10 @@ class MergeExtensionConfigurationContainerBuilder extends ContainerBuilder } - + - public function registerExtension(ExtensionInterface $extension) + public function registerExtension(ExtensionInterface $extension): void { throw new LogicException(sprintf('You cannot register extension "%s" from "%s". Extensions must be registered before the container is compiled.', get_debug_type($extension), $this->extensionClass)); } - + - public function compile(bool $resolveEnvPlaceholders = false) + public function compile(bool $resolveEnvPlaceholders = false): void { @@ -4097,14 +4070,14 @@ diff --git a/src/Symfony/Component/DependencyInjection/ContainerInterface.php b/ */ - public function set(string $id, ?object $service); + public function set(string $id, ?object $service): void; - + /** @@ -62,5 +62,5 @@ interface ContainerInterface extends PsrContainerInterface * @throws ParameterNotFoundException if the parameter is not defined */ - public function getParameter(string $name); + public function getParameter(string $name): array|bool|string|int|float|\UnitEnum|null; - + public function hasParameter(string $name): bool; @@ -69,4 +69,4 @@ interface ContainerInterface extends PsrContainerInterface * @return void @@ -4259,21 +4232,21 @@ diff --git a/src/Symfony/Component/DependencyInjection/Extension/ExtensionInterf */ - public function load(array $configs, ContainerBuilder $container); + public function load(array $configs, ContainerBuilder $container): void; - + /** @@ -37,5 +37,5 @@ interface ExtensionInterface * @return string */ - public function getNamespace(); + public function getNamespace(): string; - + /** @@ -44,5 +44,5 @@ interface ExtensionInterface * @return string|false */ - public function getXsdValidationBasePath(); + public function getXsdValidationBasePath(): string|false; - + /** @@ -53,4 +53,4 @@ interface ExtensionInterface * @return string @@ -4348,7 +4321,7 @@ diff --git a/src/Symfony/Component/DependencyInjection/ParameterBag/ContainerBag */ - public function resolveValue(mixed $value); + public function resolveValue(mixed $value): mixed; - + /** diff --git a/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php b/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php --- a/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php @@ -4479,42 +4452,42 @@ diff --git a/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag */ - public function clear(); + public function clear(): void; - + /** @@ -38,5 +38,5 @@ interface ParameterBagInterface * @throws LogicException if the parameter cannot be added */ - public function add(array $parameters); + public function add(array $parameters): void; - + /** @@ -57,5 +57,5 @@ interface ParameterBagInterface * @return void */ - public function remove(string $name); + public function remove(string $name): void; - + /** @@ -66,5 +66,5 @@ interface ParameterBagInterface * @throws LogicException if the parameter cannot be set */ - public function set(string $name, array|bool|string|int|float|\UnitEnum|null $value); + public function set(string $name, array|bool|string|int|float|\UnitEnum|null $value): void; - + /** @@ -78,5 +78,5 @@ interface ParameterBagInterface * @return void */ - public function resolve(); + public function resolve(): void; - + /** @@ -87,5 +87,5 @@ interface ParameterBagInterface * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist */ - public function resolveValue(mixed $value); + public function resolveValue(mixed $value): mixed; - + /** diff --git a/src/Symfony/Component/DependencyInjection/ServiceLocator.php b/src/Symfony/Component/DependencyInjection/ServiceLocator.php --- a/src/Symfony/Component/DependencyInjection/ServiceLocator.php @@ -4909,27 +4882,27 @@ diff --git a/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php */ - public function addListener(string $eventName, callable $listener, int $priority = 0); + public function addListener(string $eventName, callable $listener, int $priority = 0): void; - + /** @@ -41,5 +41,5 @@ interface EventDispatcherInterface extends ContractsEventDispatcherInterface * @return void */ - public function addSubscriber(EventSubscriberInterface $subscriber); + public function addSubscriber(EventSubscriberInterface $subscriber): void; - + /** @@ -48,10 +48,10 @@ interface EventDispatcherInterface extends ContractsEventDispatcherInterface * @return void */ - public function removeListener(string $eventName, callable $listener); + public function removeListener(string $eventName, callable $listener): void; - + /** * @return void */ - public function removeSubscriber(EventSubscriberInterface $subscriber); + public function removeSubscriber(EventSubscriberInterface $subscriber): void; - + /** diff --git a/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php b/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php --- a/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php @@ -5315,7 +5288,7 @@ diff --git a/src/Symfony/Component/Form/AbstractRendererEngine.php b/src/Symfony */ - abstract protected function loadResourceForBlockName(string $cacheKey, FormView $view, string $blockName); + abstract protected function loadResourceForBlockName(string $cacheKey, FormView $view, string $blockName): bool; - + /** diff --git a/src/Symfony/Component/Form/AbstractType.php b/src/Symfony/Component/Form/AbstractType.php --- a/src/Symfony/Component/Form/AbstractType.php @@ -5648,7 +5621,7 @@ diff --git a/src/Symfony/Component/Form/DataMapperInterface.php b/src/Symfony/Co */ - public function mapDataToForms(mixed $viewData, \Traversable $forms); + public function mapDataToForms(mixed $viewData, \Traversable $forms): void; - + /** @@ -63,4 +63,4 @@ interface DataMapperInterface * @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported @@ -5664,7 +5637,7 @@ diff --git a/src/Symfony/Component/Form/DataTransformerInterface.php b/src/Symfo */ - public function transform(mixed $value); + public function transform(mixed $value): mixed; - + /** @@ -96,4 +96,4 @@ interface DataTransformerInterface * @throws TransformationFailedException when the transformation fails @@ -6534,49 +6507,49 @@ diff --git a/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollecto */ - public function collectConfiguration(FormInterface $form); + public function collectConfiguration(FormInterface $form): void; - + /** @@ -36,5 +36,5 @@ interface FormDataCollectorInterface extends DataCollectorInterface * @return void */ - public function collectDefaultData(FormInterface $form); + public function collectDefaultData(FormInterface $form): void; - + /** @@ -43,5 +43,5 @@ interface FormDataCollectorInterface extends DataCollectorInterface * @return void */ - public function collectSubmittedData(FormInterface $form); + public function collectSubmittedData(FormInterface $form): void; - + /** @@ -50,5 +50,5 @@ interface FormDataCollectorInterface extends DataCollectorInterface * @return void */ - public function collectViewVariables(FormView $view); + public function collectViewVariables(FormView $view): void; - + /** @@ -57,5 +57,5 @@ interface FormDataCollectorInterface extends DataCollectorInterface * @return void */ - public function associateFormWithView(FormInterface $form, FormView $view); + public function associateFormWithView(FormInterface $form, FormView $view): void; - + /** @@ -67,5 +67,5 @@ interface FormDataCollectorInterface extends DataCollectorInterface * @return void */ - public function buildPreliminaryFormTree(FormInterface $form); + public function buildPreliminaryFormTree(FormInterface $form): void; - + /** @@ -89,5 +89,5 @@ interface FormDataCollectorInterface extends DataCollectorInterface * @return void */ - public function buildFinalFormTree(FormInterface $form, FormView $view); + public function buildFinalFormTree(FormInterface $form, FormView $view): void; - + /** diff --git a/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php b/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php --- a/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php @@ -6632,7 +6605,7 @@ diff --git a/src/Symfony/Component/Form/Extension/HtmlSanitizer/Type/TextTypeHtm diff --git a/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php b/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php --- a/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php +++ b/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php -@@ -39,5 +39,5 @@ class HttpFoundationRequestHandler implements RequestHandlerInterface +@@ -40,5 +40,5 @@ class HttpFoundationRequestHandler implements RequestHandlerInterface * @return void */ - public function handleRequest(FormInterface $form, mixed $request = null) @@ -6807,7 +6780,7 @@ diff --git a/src/Symfony/Component/Form/FormConfigBuilderInterface.php b/src/Sym */ - public function setFormFactory(FormFactoryInterface $formFactory); + public function setFormFactory(FormFactoryInterface $formFactory): static; - + /** diff --git a/src/Symfony/Component/Form/FormError.php b/src/Symfony/Component/Form/FormError.php --- a/src/Symfony/Component/Form/FormError.php @@ -6847,7 +6820,7 @@ diff --git a/src/Symfony/Component/Form/FormRendererEngineInterface.php b/src/Sy */ - public function setTheme(FormView $view, mixed $themes, bool $useDefaultThemes = true); + public function setTheme(FormView $view, mixed $themes, bool $useDefaultThemes = true): void; - + /** @@ -133,4 +133,4 @@ interface FormRendererEngineInterface * @return string @@ -6863,7 +6836,7 @@ diff --git a/src/Symfony/Component/Form/FormRendererInterface.php b/src/Symfony/ */ - public function setTheme(FormView $view, mixed $themes, bool $useDefaultThemes = true); + public function setTheme(FormView $view, mixed $themes, bool $useDefaultThemes = true): void; - + /** diff --git a/src/Symfony/Component/Form/FormTypeExtensionInterface.php b/src/Symfony/Component/Form/FormTypeExtensionInterface.php --- a/src/Symfony/Component/Form/FormTypeExtensionInterface.php @@ -6873,21 +6846,21 @@ diff --git a/src/Symfony/Component/Form/FormTypeExtensionInterface.php b/src/Sym */ - public function configureOptions(OptionsResolver $resolver); + public function configureOptions(OptionsResolver $resolver): void; - + /** @@ -43,5 +43,5 @@ interface FormTypeExtensionInterface * @see FormTypeInterface::buildForm() */ - public function buildForm(FormBuilderInterface $builder, array $options); + public function buildForm(FormBuilderInterface $builder, array $options): void; - + /** @@ -57,5 +57,5 @@ interface FormTypeExtensionInterface * @see FormTypeInterface::buildView() */ - public function buildView(FormView $view, FormInterface $form, array $options); + public function buildView(FormView $view, FormInterface $form, array $options): void; - + /** @@ -71,4 +71,4 @@ interface FormTypeExtensionInterface * @see FormTypeInterface::finishView() @@ -6903,21 +6876,21 @@ diff --git a/src/Symfony/Component/Form/FormTypeGuesserInterface.php b/src/Symfo */ - public function guessType(string $class, string $property); + public function guessType(string $class, string $property): ?Guess\TypeGuess; - + /** @@ -29,5 +29,5 @@ interface FormTypeGuesserInterface * @return Guess\ValueGuess|null */ - public function guessRequired(string $class, string $property); + public function guessRequired(string $class, string $property): ?Guess\ValueGuess; - + /** @@ -36,5 +36,5 @@ interface FormTypeGuesserInterface * @return Guess\ValueGuess|null */ - public function guessMaxLength(string $class, string $property); + public function guessMaxLength(string $class, string $property): ?Guess\ValueGuess; - + /** @@ -43,4 +43,4 @@ interface FormTypeGuesserInterface * @return Guess\ValueGuess|null @@ -6933,35 +6906,35 @@ diff --git a/src/Symfony/Component/Form/FormTypeInterface.php b/src/Symfony/Comp */ - public function getParent(); + public function getParent(): ?string; - + /** @@ -34,5 +34,5 @@ interface FormTypeInterface * @return void */ - public function configureOptions(OptionsResolver $resolver); + public function configureOptions(OptionsResolver $resolver): void; - + /** @@ -48,5 +48,5 @@ interface FormTypeInterface * @see FormTypeExtensionInterface::buildForm() */ - public function buildForm(FormBuilderInterface $builder, array $options); + public function buildForm(FormBuilderInterface $builder, array $options): void; - + /** @@ -66,5 +66,5 @@ interface FormTypeInterface * @see FormTypeExtensionInterface::buildView() */ - public function buildView(FormView $view, FormInterface $form, array $options); + public function buildView(FormView $view, FormInterface $form, array $options): void; - + /** @@ -85,5 +85,5 @@ interface FormTypeInterface * @see FormTypeExtensionInterface::finishView() */ - public function finishView(FormView $view, FormInterface $form, array $options); + public function finishView(FormView $view, FormInterface $form, array $options): void; - + /** @@ -95,4 +95,4 @@ interface FormTypeInterface * @return string @@ -6982,7 +6955,7 @@ diff --git a/src/Symfony/Component/Form/FormView.php b/src/Symfony/Component/For diff --git a/src/Symfony/Component/Form/NativeRequestHandler.php b/src/Symfony/Component/Form/NativeRequestHandler.php --- a/src/Symfony/Component/Form/NativeRequestHandler.php +++ b/src/Symfony/Component/Form/NativeRequestHandler.php -@@ -45,5 +45,5 @@ class NativeRequestHandler implements RequestHandlerInterface +@@ -46,5 +46,5 @@ class NativeRequestHandler implements RequestHandlerInterface * @throws Exception\UnexpectedTypeException If the $request is not null */ - public function handleRequest(FormInterface $form, mixed $request = null) @@ -6997,7 +6970,7 @@ diff --git a/src/Symfony/Component/Form/RequestHandlerInterface.php b/src/Symfon */ - public function handleRequest(FormInterface $form, mixed $request = null); + public function handleRequest(FormInterface $form, mixed $request = null): void; - + /** diff --git a/src/Symfony/Component/Form/ResolvedFormType.php b/src/Symfony/Component/Form/ResolvedFormType.php --- a/src/Symfony/Component/Form/ResolvedFormType.php @@ -7031,21 +7004,21 @@ diff --git a/src/Symfony/Component/Form/ResolvedFormTypeInterface.php b/src/Symf */ - public function buildForm(FormBuilderInterface $builder, array $options); + public function buildForm(FormBuilderInterface $builder, array $options): void; - + /** @@ -69,5 +69,5 @@ interface ResolvedFormTypeInterface * @return void */ - public function buildView(FormView $view, FormInterface $form, array $options); + public function buildView(FormView $view, FormInterface $form, array $options): void; - + /** @@ -78,5 +78,5 @@ interface ResolvedFormTypeInterface * @return void */ - public function finishView(FormView $view, FormInterface $form, array $options); + public function finishView(FormView $view, FormInterface $form, array $options): void; - + /** diff --git a/src/Symfony/Component/Form/Util/OrderedHashMapIterator.php b/src/Symfony/Component/Form/Util/OrderedHashMapIterator.php --- a/src/Symfony/Component/Form/Util/OrderedHashMapIterator.php @@ -7529,14 +7502,14 @@ diff --git a/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag */ - public function set(string $name, mixed $value); + public function set(string $name, mixed $value): void; - + /** @@ -48,5 +48,5 @@ interface AttributeBagInterface extends SessionBagInterface * @return void */ - public function replace(array $attributes); + public function replace(array $attributes): void; - + /** diff --git a/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php b/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php --- a/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php @@ -7622,21 +7595,21 @@ diff --git a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterfac */ - public function add(string $type, mixed $message); + public function add(string $type, mixed $message): void; - + /** @@ -33,5 +33,5 @@ interface FlashBagInterface extends SessionBagInterface * @return void */ - public function set(string $type, string|array $messages); + public function set(string $type, string|array $messages): void; - + /** @@ -65,5 +65,5 @@ interface FlashBagInterface extends SessionBagInterface * @return void */ - public function setAll(array $messages); + public function setAll(array $messages): void; - + /** diff --git a/src/Symfony/Component/HttpFoundation/Session/Session.php b/src/Symfony/Component/HttpFoundation/Session/Session.php --- a/src/Symfony/Component/HttpFoundation/Session/Session.php @@ -7698,7 +7671,7 @@ diff --git a/src/Symfony/Component/HttpFoundation/Session/SessionBagInterface.ph */ - public function initialize(array &$array); + public function initialize(array &$array): void; - + /** diff --git a/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php b/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php --- a/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php @@ -7708,49 +7681,49 @@ diff --git a/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php b */ - public function setId(string $id); + public function setId(string $id): void; - + /** @@ -50,5 +50,5 @@ interface SessionInterface * @return void */ - public function setName(string $name); + public function setName(string $name): void; - + /** @@ -86,5 +86,5 @@ interface SessionInterface * @return void */ - public function save(); + public function save(): void; - + /** @@ -103,5 +103,5 @@ interface SessionInterface * @return void */ - public function set(string $name, mixed $value); + public function set(string $name, mixed $value): void; - + /** @@ -115,5 +115,5 @@ interface SessionInterface * @return void */ - public function replace(array $attributes); + public function replace(array $attributes): void; - + /** @@ -129,5 +129,5 @@ interface SessionInterface * @return void */ - public function clear(); + public function clear(): void; - + /** @@ -141,5 +141,5 @@ interface SessionInterface * @return void */ - public function registerBag(SessionBagInterface $bag); + public function registerBag(SessionBagInterface $bag): void; - + /** diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php @@ -7956,35 +7929,35 @@ diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorage */ - public function setId(string $id); + public function setId(string $id): void; - + /** @@ -56,5 +56,5 @@ interface SessionStorageInterface * @return void */ - public function setName(string $name); + public function setName(string $name): void; - + /** @@ -100,5 +100,5 @@ interface SessionStorageInterface * is already closed */ - public function save(); + public function save(): void; - + /** @@ -107,5 +107,5 @@ interface SessionStorageInterface * @return void */ - public function clear(); + public function clear(): void; - + /** @@ -121,5 +121,5 @@ interface SessionStorageInterface * @return void */ - public function registerBag(SessionBagInterface $bag); + public function registerBag(SessionBagInterface $bag): void; - + public function getMetadataBag(): MetadataBag; diff --git a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php --- a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php @@ -8025,21 +7998,21 @@ diff --git a/src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php b/src/S */ - public function boot(); + public function boot(): void; - + /** @@ -35,5 +35,5 @@ interface BundleInterface * @return void */ - public function shutdown(); + public function shutdown(): void; - + /** @@ -44,5 +44,5 @@ interface BundleInterface * @return void */ - public function build(ContainerBuilder $container); + public function build(ContainerBuilder $container): void; - + /** @@ -71,4 +71,4 @@ interface BundleInterface * @return void @@ -8126,7 +8099,7 @@ diff --git a/src/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterfa */ - public function collect(Request $request, Response $response, \Throwable $exception = null); + public function collect(Request $request, Response $response, \Throwable $exception = null): void; - + /** @@ -35,4 +35,4 @@ interface DataCollectorInterface extends ResetInterface * @return string @@ -8306,7 +8279,7 @@ diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/FragmentRender diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/LoggerPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/LoggerPass.php --- a/src/Symfony/Component/HttpKernel/DependencyInjection/LoggerPass.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/LoggerPass.php -@@ -30,5 +30,5 @@ class LoggerPass implements CompilerPassInterface +@@ -29,5 +29,5 @@ class LoggerPass implements CompilerPassInterface * @return void */ - public function process(ContainerBuilder $container) @@ -8537,7 +8510,7 @@ diff --git a/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategyInt */ - public function add(Response $response); + public function add(Response $response): void; - + /** @@ -38,4 +38,4 @@ interface ResponseCacheStrategyInterface * @return void @@ -8587,7 +8560,7 @@ diff --git a/src/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php b/src */ - public function invalidate(Request $request); + public function invalidate(Request $request): void; - + /** @@ -80,4 +80,4 @@ interface StoreInterface * @return void @@ -8603,14 +8576,14 @@ diff --git a/src/Symfony/Component/HttpKernel/HttpCache/SurrogateInterface.php b */ - public function addSurrogateCapability(Request $request); + public function addSurrogateCapability(Request $request): void; - + /** @@ -46,5 +46,5 @@ interface SurrogateInterface * @return void */ - public function addSurrogateControl(Response $response); + public function addSurrogateControl(Response $response): void; - + /** diff --git a/src/Symfony/Component/HttpKernel/HttpKernel.php b/src/Symfony/Component/HttpKernel/HttpKernel.php --- a/src/Symfony/Component/HttpKernel/HttpKernel.php @@ -8705,21 +8678,21 @@ diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component + protected function initializeContainer(): void { $class = $this->getContainerClass(); -@@ -614,5 +614,5 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl +@@ -618,5 +618,5 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl * @return void */ - protected function prepareContainer(ContainerBuilder $container) + protected function prepareContainer(ContainerBuilder $container): void { $extensions = []; -@@ -667,5 +667,5 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl +@@ -671,5 +671,5 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl * @return void */ - protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container, string $class, string $baseClass) + protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container, string $class, string $baseClass): void { // cache the container -@@ -843,5 +843,5 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl +@@ -847,5 +847,5 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl * @return void */ - public function __wakeup() @@ -8734,21 +8707,21 @@ diff --git a/src/Symfony/Component/HttpKernel/KernelInterface.php b/src/Symfony/ */ - public function registerContainerConfiguration(LoaderInterface $loader); + public function registerContainerConfiguration(LoaderInterface $loader): void; - + /** @@ -44,5 +44,5 @@ interface KernelInterface extends HttpKernelInterface * @return void */ - public function boot(); + public function boot(): void; - + /** @@ -53,5 +53,5 @@ interface KernelInterface extends HttpKernelInterface * @return void */ - public function shutdown(); + public function shutdown(): void; - + /** diff --git a/src/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php b/src/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php --- a/src/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php @@ -8758,14 +8731,14 @@ diff --git a/src/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php b/src */ - public function getLogs(Request $request = null); + public function getLogs(Request $request = null): array; - + /** @@ -41,5 +41,5 @@ interface DebugLoggerInterface * @return int */ - public function countErrors(Request $request = null); + public function countErrors(Request $request = null): int; - + /** @@ -48,4 +48,4 @@ interface DebugLoggerInterface * @return void @@ -8776,14 +8749,14 @@ diff --git a/src/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php b/src diff --git a/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php --- a/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php -@@ -102,5 +102,5 @@ class FileProfilerStorage implements ProfilerStorageInterface +@@ -113,5 +113,5 @@ class FileProfilerStorage implements ProfilerStorageInterface * @return void */ - public function purge() + public function purge(): void { $flags = \FilesystemIterator::SKIP_DOTS; -@@ -260,5 +260,5 @@ class FileProfilerStorage implements ProfilerStorageInterface +@@ -273,5 +273,5 @@ class FileProfilerStorage implements ProfilerStorageInterface * @return Profile */ - protected function createProfileFromData(string $token, array $data, Profile $parent = null) @@ -8793,77 +8766,77 @@ diff --git a/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php b diff --git a/src/Symfony/Component/HttpKernel/Profiler/Profile.php b/src/Symfony/Component/HttpKernel/Profiler/Profile.php --- a/src/Symfony/Component/HttpKernel/Profiler/Profile.php +++ b/src/Symfony/Component/HttpKernel/Profiler/Profile.php -@@ -48,5 +48,5 @@ class Profile +@@ -49,5 +49,5 @@ class Profile * @return void */ - public function setToken(string $token) + public function setToken(string $token): void { $this->token = $token; -@@ -66,5 +66,5 @@ class Profile +@@ -67,5 +67,5 @@ class Profile * @return void */ - public function setParent(self $parent) + public function setParent(self $parent): void { $this->parent = $parent; -@@ -98,5 +98,5 @@ class Profile +@@ -99,5 +99,5 @@ class Profile * @return void */ - public function setIp(?string $ip) + public function setIp(?string $ip): void { $this->ip = $ip; -@@ -114,5 +114,5 @@ class Profile +@@ -115,5 +115,5 @@ class Profile * @return void */ - public function setMethod(string $method) + public function setMethod(string $method): void { $this->method = $method; -@@ -130,5 +130,5 @@ class Profile +@@ -131,5 +131,5 @@ class Profile * @return void */ - public function setUrl(?string $url) + public function setUrl(?string $url): void { $this->url = $url; -@@ -143,5 +143,5 @@ class Profile +@@ -144,5 +144,5 @@ class Profile * @return void */ - public function setTime(int $time) + public function setTime(int $time): void { $this->time = $time; -@@ -151,5 +151,5 @@ class Profile +@@ -152,5 +152,5 @@ class Profile * @return void */ - public function setStatusCode(int $statusCode) + public function setStatusCode(int $statusCode): void { $this->statusCode = $statusCode; -@@ -178,5 +178,5 @@ class Profile +@@ -195,5 +195,5 @@ class Profile * @return void */ - public function setChildren(array $children) + public function setChildren(array $children): void { $this->children = []; -@@ -191,5 +191,5 @@ class Profile +@@ -208,5 +208,5 @@ class Profile * @return void */ - public function addChild(self $child) + public function addChild(self $child): void { $this->children[] = $child; -@@ -239,5 +239,5 @@ class Profile +@@ -256,5 +256,5 @@ class Profile * @return void */ - public function setCollectors(array $collectors) + public function setCollectors(array $collectors): void { $this->collectors = []; -@@ -252,5 +252,5 @@ class Profile +@@ -269,5 +269,5 @@ class Profile * @return void */ - public function addCollector(DataCollectorInterface $collector) @@ -8894,21 +8867,21 @@ diff --git a/src/Symfony/Component/HttpKernel/Profiler/Profiler.php b/src/Symfon + public function purge(): void { $this->storage->purge(); -@@ -172,5 +172,5 @@ class Profiler implements ResetInterface +@@ -179,5 +179,5 @@ class Profiler implements ResetInterface * @return void */ - public function reset() + public function reset(): void { foreach ($this->collectors as $collector) { -@@ -195,5 +195,5 @@ class Profiler implements ResetInterface +@@ -202,5 +202,5 @@ class Profiler implements ResetInterface * @return void */ - public function set(array $collectors = []) + public function set(array $collectors = []): void { $this->collectors = []; -@@ -208,5 +208,5 @@ class Profiler implements ResetInterface +@@ -215,5 +215,5 @@ class Profiler implements ResetInterface * @return void */ - public function add(DataCollectorInterface $collector) @@ -8918,7 +8891,7 @@ diff --git a/src/Symfony/Component/HttpKernel/Profiler/Profiler.php b/src/Symfon diff --git a/src/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php b/src/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php --- a/src/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php +++ b/src/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php -@@ -53,4 +53,4 @@ interface ProfilerStorageInterface +@@ -55,4 +55,4 @@ interface ProfilerStorageInterface * @return void */ - public function purge(); @@ -9018,28 +8991,28 @@ diff --git a/src/Symfony/Component/Ldap/Adapter/EntryManagerInterface.php b/src/ */ - public function add(Entry $entry); + public function add(Entry $entry): static; - + /** @@ -41,5 +41,5 @@ interface EntryManagerInterface * @throws LdapException */ - public function update(Entry $entry); + public function update(Entry $entry): static; - + /** @@ -51,5 +51,5 @@ interface EntryManagerInterface * @throws LdapException */ - public function move(Entry $entry, string $newParent); + public function move(Entry $entry, string $newParent): static; - + /** @@ -61,5 +61,5 @@ interface EntryManagerInterface * @throws LdapException */ - public function rename(Entry $entry, string $newRdn, bool $removeOldRdn = true); + public function rename(Entry $entry, string $newRdn, bool $removeOldRdn = true): static; - + /** @@ -71,4 +71,4 @@ interface EntryManagerInterface * @throws LdapException @@ -9179,7 +9152,7 @@ diff --git a/src/Symfony/Component/Ldap/LdapInterface.php b/src/Symfony/Componen */ - public function bind(string $dn = null, #[\SensitiveParameter] string $password = null); + public function bind(string $dn = null, #[\SensitiveParameter] string $password = null): void; - + /** diff --git a/src/Symfony/Component/Ldap/Security/CheckLdapCredentialsListener.php b/src/Symfony/Component/Ldap/Security/CheckLdapCredentialsListener.php --- a/src/Symfony/Component/Ldap/Security/CheckLdapCredentialsListener.php @@ -9234,14 +9207,14 @@ diff --git a/src/Symfony/Component/Lock/LockInterface.php b/src/Symfony/Componen */ - public function refresh(float $ttl = null); + public function refresh(float $ttl = null): void; - + /** @@ -56,5 +56,5 @@ interface LockInterface * @throws LockReleasingException If the lock cannot be released */ - public function release(); + public function release(): void; - + public function isExpired(): bool; diff --git a/src/Symfony/Component/Lock/PersistingStoreInterface.php b/src/Symfony/Component/Lock/PersistingStoreInterface.php --- a/src/Symfony/Component/Lock/PersistingStoreInterface.php @@ -9251,14 +9224,14 @@ diff --git a/src/Symfony/Component/Lock/PersistingStoreInterface.php b/src/Symfo */ - public function save(Key $key); + public function save(Key $key): void; - + /** @@ -38,5 +38,5 @@ interface PersistingStoreInterface * @throws LockReleasingException */ - public function delete(Key $key); + public function delete(Key $key): void; - + /** @@ -54,4 +54,4 @@ interface PersistingStoreInterface * @throws LockConflictedException @@ -9897,28 +9870,28 @@ diff --git a/src/Symfony/Component/Mime/Header/HeaderInterface.php b/src/Symfony */ - public function setBody(mixed $body); + public function setBody(mixed $body): void; - + /** @@ -38,5 +38,5 @@ interface HeaderInterface * @return void */ - public function setCharset(string $charset); + public function setCharset(string $charset): void; - + public function getCharset(): ?string; @@ -45,5 +45,5 @@ interface HeaderInterface * @return void */ - public function setLanguage(string $lang); + public function setLanguage(string $lang): void; - + public function getLanguage(): ?string; @@ -54,5 +54,5 @@ interface HeaderInterface * @return void */ - public function setMaxLineLength(int $lineLength); + public function setMaxLineLength(int $lineLength): void; - + public function getMaxLineLength(): int; diff --git a/src/Symfony/Component/Mime/Header/UnstructuredHeader.php b/src/Symfony/Component/Mime/Header/UnstructuredHeader.php --- a/src/Symfony/Component/Mime/Header/UnstructuredHeader.php @@ -10183,7 +10156,7 @@ diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccessorInterface.php */ - public function setValue(object|array &$objectOrArray, string|PropertyPathInterface $propertyPath, mixed $value); + public function setValue(object|array &$objectOrArray, string|PropertyPathInterface $propertyPath, mixed $value): void; - + /** diff --git a/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php b/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php --- a/src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php @@ -10245,35 +10218,35 @@ diff --git a/src/Symfony/Component/PropertyAccess/PropertyPathInterface.php b/sr */ - public function getLength(); + public function getLength(): int; - + /** @@ -45,5 +45,5 @@ interface PropertyPathInterface extends \Traversable, \Stringable * @return self|null */ - public function getParent(); + public function getParent(): ?\Symfony\Component\PropertyAccess\PropertyPathInterface; - + /** @@ -52,5 +52,5 @@ interface PropertyPathInterface extends \Traversable, \Stringable * @return list */ - public function getElements(); + public function getElements(): array; - + /** @@ -63,5 +63,5 @@ interface PropertyPathInterface extends \Traversable, \Stringable * @throws Exception\OutOfBoundsException If the offset is invalid */ - public function getElement(int $index); + public function getElement(int $index): string; - + /** @@ -74,5 +74,5 @@ interface PropertyPathInterface extends \Traversable, \Stringable * @throws Exception\OutOfBoundsException If the offset is invalid */ - public function isProperty(int $index); + public function isProperty(int $index): bool; - + /** @@ -85,4 +85,4 @@ interface PropertyPathInterface extends \Traversable, \Stringable * @throws Exception\OutOfBoundsException If the offset is invalid @@ -10299,7 +10272,7 @@ diff --git a/src/Symfony/Component/PropertyInfo/PropertyAccessExtractorInterface */ - public function isReadable(string $class, string $property, array $context = []); + public function isReadable(string $class, string $property, array $context = []): ?bool; - + /** @@ -31,4 +31,4 @@ interface PropertyAccessExtractorInterface * @return bool|null @@ -10325,9 +10298,9 @@ diff --git a/src/Symfony/Component/PropertyInfo/PropertyTypeExtractorInterface.p - public function getTypes(string $class, string $property, array $context = []); + public function getTypes(string $class, string $property, array $context = []): ?array; } -diff --git a/src/Symfony/Component/Routing/Annotation/Route.php b/src/Symfony/Component/Routing/Annotation/Route.php ---- a/src/Symfony/Component/Routing/Annotation/Route.php -+++ b/src/Symfony/Component/Routing/Annotation/Route.php +diff --git a/src/Symfony/Component/Routing/Attribute/Route.php b/src/Symfony/Component/Routing/Attribute/Route.php +--- a/src/Symfony/Component/Routing/Attribute/Route.php ++++ b/src/Symfony/Component/Routing/Attribute/Route.php @@ -80,5 +80,5 @@ class Route * @return void */ @@ -10479,7 +10452,7 @@ diff --git a/src/Symfony/Component/Routing/Generator/ConfigurableRequirementsInt */ - public function setStrictRequirements(?bool $enabled); + public function setStrictRequirements(?bool $enabled): void; - + /** diff --git a/src/Symfony/Component/Routing/Generator/UrlGenerator.php b/src/Symfony/Component/Routing/Generator/UrlGenerator.php --- a/src/Symfony/Component/Routing/Generator/UrlGenerator.php @@ -10508,40 +10481,40 @@ diff --git a/src/Symfony/Component/Routing/Loader/AttributeClassLoader.php b/src + public function setRouteAnnotationClass(string $class): void { $this->routeAnnotationClass = $class; -@@ -177,5 +177,5 @@ abstract class AttributeClassLoader implements LoaderInterface +@@ -175,5 +175,5 @@ abstract class AttributeClassLoader implements LoaderInterface * @return void */ - protected function addRoute(RouteCollection $collection, object $annot, array $globals, \ReflectionClass $class, \ReflectionMethod $method) + protected function addRoute(RouteCollection $collection, object $annot, array $globals, \ReflectionClass $class, \ReflectionMethod $method): void { if ($annot->getEnv() && $annot->getEnv() !== $this->env) { -@@ -284,5 +284,5 @@ abstract class AttributeClassLoader implements LoaderInterface +@@ -282,5 +282,5 @@ abstract class AttributeClassLoader implements LoaderInterface * @return string */ - protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method) + protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method): string { $name = str_replace('\\', '_', $class->name).'_'.$method->name; -@@ -299,5 +299,5 @@ abstract class AttributeClassLoader implements LoaderInterface +@@ -297,5 +297,5 @@ abstract class AttributeClassLoader implements LoaderInterface * @return array */ - protected function getGlobals(\ReflectionClass $class) + protected function getGlobals(\ReflectionClass $class): array { $globals = $this->resetGlobals(); -@@ -384,5 +384,5 @@ abstract class AttributeClassLoader implements LoaderInterface +@@ -382,5 +382,5 @@ abstract class AttributeClassLoader implements LoaderInterface * @return Route */ - protected function createRoute(string $path, array $defaults, array $requirements, array $options, ?string $host, array $schemes, array $methods, ?string $condition) + protected function createRoute(string $path, array $defaults, array $requirements, array $options, ?string $host, array $schemes, array $methods, ?string $condition): Route { return new Route($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition); -@@ -392,5 +392,5 @@ abstract class AttributeClassLoader implements LoaderInterface +@@ -390,5 +390,5 @@ abstract class AttributeClassLoader implements LoaderInterface * @return void */ - abstract protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, object $annot); + abstract protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, object $annot): void; - + /** diff --git a/src/Symfony/Component/Routing/Loader/Configurator/CollectionConfigurator.php b/src/Symfony/Component/Routing/Loader/Configurator/CollectionConfigurator.php --- a/src/Symfony/Component/Routing/Loader/Configurator/CollectionConfigurator.php @@ -10670,7 +10643,7 @@ diff --git a/src/Symfony/Component/Routing/RequestContextAwareInterface.php b/sr */ - public function setContext(RequestContext $context); + public function setContext(RequestContext $context): void; - + /** diff --git a/src/Symfony/Component/Routing/RouteCollection.php b/src/Symfony/Component/Routing/RouteCollection.php --- a/src/Symfony/Component/Routing/RouteCollection.php @@ -10852,21 +10825,21 @@ diff --git a/src/Symfony/Component/Security/Core/Authentication/RememberMe/Token */ - public function loadTokenBySeries(string $series); + public function loadTokenBySeries(string $series): PersistentTokenInterface; - + /** @@ -35,5 +35,5 @@ interface TokenProviderInterface * @return void */ - public function deleteTokenBySeries(string $series); + public function deleteTokenBySeries(string $series): void; - + /** @@ -46,5 +46,5 @@ interface TokenProviderInterface * @throws TokenNotFoundException if the token is not found */ - public function updateToken(string $series, #[\SensitiveParameter] string $tokenValue, \DateTime $lastUsed); + public function updateToken(string $series, #[\SensitiveParameter] string $tokenValue, \DateTime $lastUsed): void; - + /** @@ -53,4 +53,4 @@ interface TokenProviderInterface * @return void @@ -10970,28 +10943,28 @@ diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/TokenInter */ - public function setUser(UserInterface $user); + public function setUser(UserInterface $user): void; - + /** @@ -62,5 +62,5 @@ interface TokenInterface extends \Stringable * @return void */ - public function eraseCredentials(); + public function eraseCredentials(): void; - + public function getAttributes(): array; @@ -71,5 +71,5 @@ interface TokenInterface extends \Stringable * @return void */ - public function setAttributes(array $attributes); + public function setAttributes(array $attributes): void; - + public function hasAttribute(string $name): bool; @@ -83,5 +83,5 @@ interface TokenInterface extends \Stringable * @return void */ - public function setAttribute(string $name, mixed $value); + public function setAttribute(string $name, mixed $value): void; - + /** diff --git a/src/Symfony/Component/Security/Core/Authorization/Voter/RoleHierarchyVoter.php b/src/Symfony/Component/Security/Core/Authorization/Voter/RoleHierarchyVoter.php --- a/src/Symfony/Component/Security/Core/Authorization/Voter/RoleHierarchyVoter.php @@ -11148,7 +11121,7 @@ diff --git a/src/Symfony/Component/Security/Core/User/UserCheckerInterface.php b */ - public function checkPreAuth(UserInterface $user); + public function checkPreAuth(UserInterface $user): void; - + /** @@ -40,4 +40,4 @@ interface UserCheckerInterface * @throws AccountStatusException @@ -11164,7 +11137,7 @@ diff --git a/src/Symfony/Component/Security/Core/User/UserInterface.php b/src/Sy */ - public function eraseCredentials(); + public function eraseCredentials(): void; - + /** diff --git a/src/Symfony/Component/Security/Core/User/UserProviderInterface.php b/src/Symfony/Component/Security/Core/User/UserProviderInterface.php --- a/src/Symfony/Component/Security/Core/User/UserProviderInterface.php @@ -11174,14 +11147,14 @@ diff --git a/src/Symfony/Component/Security/Core/User/UserProviderInterface.php */ - public function refreshUser(UserInterface $user); + public function refreshUser(UserInterface $user): UserInterface; - + /** @@ -56,5 +56,5 @@ interface UserProviderInterface * @return bool */ - public function supportsClass(string $class); + public function supportsClass(string $class): bool; - + /** diff --git a/src/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php b/src/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php --- a/src/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php @@ -11244,7 +11217,7 @@ diff --git a/src/Symfony/Component/Security/Csrf/TokenStorage/TokenStorageInterf */ - public function setToken(string $tokenId, #[\SensitiveParameter] string $token); + public function setToken(string $tokenId, #[\SensitiveParameter] string $token): void; - + /** diff --git a/src/Symfony/Component/Security/Http/AccessMap.php b/src/Symfony/Component/Security/Http/AccessMap.php --- a/src/Symfony/Component/Security/Http/AccessMap.php @@ -11354,7 +11327,7 @@ diff --git a/src/Symfony/Component/Security/Http/Firewall/FirewallListenerInterf */ - public function authenticate(RequestEvent $event); + public function authenticate(RequestEvent $event): void; - + /** diff --git a/src/Symfony/Component/Security/Http/FirewallMap.php b/src/Symfony/Component/Security/Http/FirewallMap.php --- a/src/Symfony/Component/Security/Http/FirewallMap.php @@ -11429,14 +11402,14 @@ diff --git a/src/Symfony/Component/Semaphore/PersistingStoreInterface.php b/src/ */ - public function save(Key $key, float $ttlInSecond); + public function save(Key $key, float $ttlInSecond): void; - + /** @@ -38,5 +38,5 @@ interface PersistingStoreInterface * @throws SemaphoreReleasingException */ - public function delete(Key $key); + public function delete(Key $key): void; - + /** @@ -52,4 +52,4 @@ interface PersistingStoreInterface * @throws SemaphoreExpiredException @@ -11452,14 +11425,14 @@ diff --git a/src/Symfony/Component/Semaphore/SemaphoreInterface.php b/src/Symfon */ - public function refresh(float $ttlInSecond = null); + public function refresh(float $ttlInSecond = null): void; - + /** @@ -52,5 +52,5 @@ interface SemaphoreInterface * @throws SemaphoreReleasingException If the semaphore cannot be released */ - public function release(); + public function release(): void; - + public function isExpired(): bool; diff --git a/src/Symfony/Component/Semaphore/Store/RedisStore.php b/src/Symfony/Component/Semaphore/Store/RedisStore.php --- a/src/Symfony/Component/Semaphore/Store/RedisStore.php @@ -11485,9 +11458,9 @@ diff --git a/src/Symfony/Component/Semaphore/Store/RedisStore.php b/src/Symfony/ + public function delete(Key $key): void { $script = ' -diff --git a/src/Symfony/Component/Serializer/Annotation/MaxDepth.php b/src/Symfony/Component/Serializer/Annotation/MaxDepth.php ---- a/src/Symfony/Component/Serializer/Annotation/MaxDepth.php -+++ b/src/Symfony/Component/Serializer/Annotation/MaxDepth.php +diff --git a/src/Symfony/Component/Serializer/Attribute/MaxDepth.php b/src/Symfony/Component/Serializer/Attribute/MaxDepth.php +--- a/src/Symfony/Component/Serializer/Attribute/MaxDepth.php ++++ b/src/Symfony/Component/Serializer/Attribute/MaxDepth.php @@ -36,5 +36,5 @@ class MaxDepth * @return int */ @@ -11513,7 +11486,7 @@ diff --git a/src/Symfony/Component/Serializer/Encoder/DecoderInterface.php b/src */ - public function decode(string $data, string $format, array $context = []); + public function decode(string $data, string $format, array $context = []): mixed; - + /** @@ -44,4 +44,4 @@ interface DecoderInterface * @return bool @@ -11584,14 +11557,14 @@ diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalize */ - abstract protected function extractAttributes(object $object, string $format = null, array $context = []); + abstract protected function extractAttributes(object $object, string $format = null, array $context = []): array; - + /** @@ -294,5 +294,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer * @return mixed */ - abstract protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []); + abstract protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []): mixed; - + /** @@ -301,5 +301,5 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer * @return bool @@ -11612,7 +11585,7 @@ diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalize */ - abstract protected function setAttributeValue(object $object, string $attribute, mixed $value, string $format = null, array $context = []); + abstract protected function setAttributeValue(object $object, string $attribute, mixed $value, string $format = null, array $context = []): void; - + /** diff --git a/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php b/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php --- a/src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php @@ -11640,14 +11613,14 @@ diff --git a/src/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.p */ - public function denormalize(mixed $data, string $type, string $format = null, array $context = []); + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed; - + /** @@ -59,5 +59,5 @@ interface DenormalizerInterface * @return bool */ - public function supportsDenormalization(mixed $data, string $type, string $format = null /* , array $context = [] */); + public function supportsDenormalization(mixed $data, string $type, string $format = null /* , array $context = [] */): bool; - + /** diff --git a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php --- a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php @@ -11686,14 +11659,14 @@ diff --git a/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php */ - public function normalize(mixed $object, string $format = null, array $context = []); + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null; - + /** @@ -50,5 +50,5 @@ interface NormalizerInterface * @return bool */ - public function supportsNormalization(mixed $data, string $format = null /* , array $context = [] */); + public function supportsNormalization(mixed $data, string $format = null /* , array $context = [] */): bool; - + /** diff --git a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php --- a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php @@ -11823,14 +11796,14 @@ diff --git a/src/Symfony/Component/Templating/Helper/HelperInterface.php b/src/S */ - public function getName(); + public function getName(): string; - + /** @@ -35,5 +35,5 @@ interface HelperInterface * @return void */ - public function setCharset(string $charset); + public function setCharset(string $charset): void; - + /** diff --git a/src/Symfony/Component/Templating/Helper/SlotsHelper.php b/src/Symfony/Component/Templating/Helper/SlotsHelper.php --- a/src/Symfony/Component/Templating/Helper/SlotsHelper.php @@ -11981,7 +11954,7 @@ diff --git a/src/Symfony/Component/Translation/CatalogueMetadataAwareInterface.p */ - public function setCatalogueMetadata(string $key, mixed $value, string $domain = 'messages'); + public function setCatalogueMetadata(string $key, mixed $value, string $domain = 'messages'): void; - + /** @@ -45,4 +45,4 @@ interface CatalogueMetadataAwareInterface * @return void @@ -12009,7 +11982,7 @@ diff --git a/src/Symfony/Component/Translation/DataCollectorTranslator.php b/src + public function setLocale(string $locale): void { $this->translator->setLocale($locale); -@@ -99,5 +99,5 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter +@@ -96,5 +96,5 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter * @return mixed */ - public function __call(string $method, array $args) @@ -12100,7 +12073,7 @@ diff --git a/src/Symfony/Component/Translation/Extractor/AbstractFileExtractor.p */ - abstract protected function canBeExtracted(string $file); + abstract protected function canBeExtracted(string $file): bool; - + /** * @return iterable */ @@ -12139,7 +12112,7 @@ diff --git a/src/Symfony/Component/Translation/Extractor/ExtractorInterface.php */ - public function extract(string|iterable $resource, MessageCatalogue $catalogue); + public function extract(string|iterable $resource, MessageCatalogue $catalogue): void; - + /** @@ -36,4 +36,4 @@ interface ExtractorInterface * @return void @@ -12279,35 +12252,35 @@ diff --git a/src/Symfony/Component/Translation/MessageCatalogueInterface.php b/s */ - public function set(string $id, string $translation, string $domain = 'messages'); + public function set(string $id, string $translation, string $domain = 'messages'): void; - + /** @@ -83,5 +83,5 @@ interface MessageCatalogueInterface * @return void */ - public function replace(array $messages, string $domain = 'messages'); + public function replace(array $messages, string $domain = 'messages'): void; - + /** @@ -93,5 +93,5 @@ interface MessageCatalogueInterface * @return void */ - public function add(array $messages, string $domain = 'messages'); + public function add(array $messages, string $domain = 'messages'): void; - + /** @@ -102,5 +102,5 @@ interface MessageCatalogueInterface * @return void */ - public function addCatalogue(self $catalogue); + public function addCatalogue(self $catalogue): void; - + /** @@ -112,5 +112,5 @@ interface MessageCatalogueInterface * @return void */ - public function addFallbackCatalogue(self $catalogue); + public function addFallbackCatalogue(self $catalogue): void; - + /** @@ -131,4 +131,4 @@ interface MessageCatalogueInterface * @return void @@ -12323,7 +12296,7 @@ diff --git a/src/Symfony/Component/Translation/MetadataAwareInterface.php b/src/ */ - public function setMetadata(string $key, mixed $value, string $domain = 'messages'); + public function setMetadata(string $key, mixed $value, string $domain = 'messages'): void; - + /** @@ -45,4 +45,4 @@ interface MetadataAwareInterface * @return void @@ -12522,7 +12495,7 @@ diff --git a/src/Symfony/Component/Validator/ConstraintValidatorInterface.php b/ */ - public function initialize(ExecutionContextInterface $context); + public function initialize(ExecutionContextInterface $context): void; - + /** @@ -31,4 +31,4 @@ interface ConstraintValidatorInterface * @return void @@ -12569,21 +12542,21 @@ diff --git a/src/Symfony/Component/Validator/ConstraintViolationListInterface.ph */ - public function add(ConstraintViolationInterface $violation); + public function add(ConstraintViolationInterface $violation): void; - + /** @@ -38,5 +38,5 @@ interface ConstraintViolationListInterface extends \Traversable, \Countable, \Ar * @return void */ - public function addAll(self $otherList); + public function addAll(self $otherList): void; - + /** @@ -63,5 +63,5 @@ interface ConstraintViolationListInterface extends \Traversable, \Countable, \Ar * @return void */ - public function set(int $offset, ConstraintViolationInterface $violation); + public function set(int $offset, ConstraintViolationInterface $violation): void; - + /** @@ -72,4 +72,4 @@ interface ConstraintViolationListInterface extends \Traversable, \Countable, \Ar * @return void @@ -13147,42 +13120,42 @@ diff --git a/src/Symfony/Component/Validator/Context/ExecutionContextInterface.p */ - public function addViolation(string $message, array $params = []); + public function addViolation(string $message, array $params = []): void; - + /** @@ -127,5 +127,5 @@ interface ExecutionContextInterface * @return void */ - public function setNode(mixed $value, ?object $object, ?MetadataInterface $metadata, string $propertyPath); + public function setNode(mixed $value, ?object $object, ?MetadataInterface $metadata, string $propertyPath): void; - + /** @@ -136,5 +136,5 @@ interface ExecutionContextInterface * @return void */ - public function setGroup(?string $group); + public function setGroup(?string $group): void; - + /** @@ -143,5 +143,5 @@ interface ExecutionContextInterface * @return void */ - public function setConstraint(Constraint $constraint); + public function setConstraint(Constraint $constraint): void; - + /** @@ -154,5 +154,5 @@ interface ExecutionContextInterface * @return void */ - public function markGroupAsValidated(string $cacheKey, string $groupHash); + public function markGroupAsValidated(string $cacheKey, string $groupHash): void; - + /** @@ -173,5 +173,5 @@ interface ExecutionContextInterface * @return void */ - public function markConstraintAsValidated(string $cacheKey, string $constraintHash); + public function markConstraintAsValidated(string $cacheKey, string $constraintHash): void; - + /** diff --git a/src/Symfony/Component/Validator/DependencyInjection/AddAutoMappingConfigurationPass.php b/src/Symfony/Component/Validator/DependencyInjection/AddAutoMappingConfigurationPass.php --- a/src/Symfony/Component/Validator/DependencyInjection/AddAutoMappingConfigurationPass.php @@ -13247,14 +13220,14 @@ diff --git a/src/Symfony/Component/Validator/Exception/ValidationFailedException diff --git a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php --- a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php -@@ -317,5 +317,5 @@ class ClassMetadata extends GenericMetadata implements ClassMetadataInterface +@@ -325,5 +325,5 @@ class ClassMetadata extends GenericMetadata implements ClassMetadataInterface * @return void */ - public function mergeConstraints(self $source) + public function mergeConstraints(self $source): void { if ($source->isGroupSequenceProvider()) { -@@ -427,5 +427,5 @@ class ClassMetadata extends GenericMetadata implements ClassMetadataInterface +@@ -436,5 +436,5 @@ class ClassMetadata extends GenericMetadata implements ClassMetadataInterface * @throws GroupDefinitionException */ - public function setGroupSequenceProvider(bool $active) @@ -13299,7 +13272,7 @@ diff --git a/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.ph - abstract protected function createValidator(); + abstract protected function createValidator(): ConstraintValidatorInterface; } - + diff --git a/src/Symfony/Component/Validator/Validator/TraceableValidator.php b/src/Symfony/Component/Validator/Validator/TraceableValidator.php --- a/src/Symfony/Component/Validator/Validator/TraceableValidator.php +++ b/src/Symfony/Component/Validator/Validator/TraceableValidator.php @@ -14187,21 +14160,21 @@ diff --git a/src/Symfony/Component/VarDumper/Cloner/DumperInterface.php b/src/Sy */ - public function dumpScalar(Cursor $cursor, string $type, string|int|float|bool|null $value); + public function dumpScalar(Cursor $cursor, string $type, string|int|float|bool|null $value): void; - + /** @@ -35,5 +35,5 @@ interface DumperInterface * @return void */ - public function dumpString(Cursor $cursor, string $str, bool $bin, int $cut); + public function dumpString(Cursor $cursor, string $str, bool $bin, int $cut): void; - + /** @@ -46,5 +46,5 @@ interface DumperInterface * @return void */ - public function enterHash(Cursor $cursor, int $type, string|int|null $class, bool $hasChild); + public function enterHash(Cursor $cursor, int $type, string|int|null $class, bool $hasChild): void; - + /** @@ -58,4 +58,4 @@ interface DumperInterface * @return void @@ -14684,7 +14657,7 @@ diff --git a/src/Symfony/Contracts/Translation/LocaleAwareInterface.php b/src/Sy */ - public function setLocale(string $locale); + public function setLocale(string $locale): void; - + /** diff --git a/src/Symfony/Contracts/Translation/TranslatorTrait.php b/src/Symfony/Contracts/Translation/TranslatorTrait.php --- a/src/Symfony/Contracts/Translation/TranslatorTrait.php diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/SerializerModelFixture.php b/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/SerializerModelFixture.php index 6c0cc210eac95..e945a07649f76 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/SerializerModelFixture.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/Fixtures/SerializerModelFixture.php @@ -2,7 +2,7 @@ namespace Symfony\Bridge\Twig\Tests\Extension\Fixtures; -use Symfony\Component\Serializer\Annotation\Groups; +use Symfony\Component\Serializer\Attribute\Groups; /** * @author Jesse Rushlow diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/RoutingConditionServiceBundle/Controller/DefaultController.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/RoutingConditionServiceBundle/Controller/DefaultController.php index feaa957e77d46..573c81cb485b3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/RoutingConditionServiceBundle/Controller/DefaultController.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/RoutingConditionServiceBundle/Controller/DefaultController.php @@ -12,7 +12,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\RoutingConditionServiceBundle\Controller; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; class DefaultController { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/AnnotatedController.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/AnnotatedController.php index 2bee3d0b833e1..1fdb31dccebe8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/AnnotatedController.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/AnnotatedController.php @@ -13,7 +13,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; class AnnotatedController { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/UidController.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/UidController.php index 2653f9fbcf82b..91f681414e545 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/UidController.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/UidController.php @@ -12,7 +12,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Controller; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Uid\Ulid; use Symfony\Component\Uid\UuidV1; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php index 11f756ee04e98..6f7c84d8bddc1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php @@ -18,7 +18,7 @@ use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Kernel; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; class FlexStyleMicroKernel extends Kernel diff --git a/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Dummy.php b/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Dummy.php index fabf1a0f767ea..ec3bb8da4e200 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Dummy.php +++ b/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Dummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\PropertyInfo\Tests\Fixtures; -use Symfony\Component\Serializer\Annotation\Groups; +use Symfony\Component\Serializer\Attribute\Groups; /** * @author Kévin Dunglas diff --git a/src/Symfony/Component/PropertyInfo/Tests/Fixtures/IgnorePropertyDummy.php b/src/Symfony/Component/PropertyInfo/Tests/Fixtures/IgnorePropertyDummy.php index 39d29638a35af..9216ff801b27d 100644 --- a/src/Symfony/Component/PropertyInfo/Tests/Fixtures/IgnorePropertyDummy.php +++ b/src/Symfony/Component/PropertyInfo/Tests/Fixtures/IgnorePropertyDummy.php @@ -11,8 +11,8 @@ namespace Symfony\Component\PropertyInfo\Tests\Fixtures; -use Symfony\Component\Serializer\Annotation\Groups; -use Symfony\Component\Serializer\Annotation\Ignore; +use Symfony\Component\Serializer\Attribute\Groups; +use Symfony\Component\Serializer\Attribute\Ignore; /** * @author Vadim Borodavko diff --git a/src/Symfony/Component/Routing/Annotation/Route.php b/src/Symfony/Component/Routing/Annotation/Route.php index bb8423101dee8..5c497fc281422 100644 --- a/src/Symfony/Component/Routing/Annotation/Route.php +++ b/src/Symfony/Component/Routing/Annotation/Route.php @@ -11,245 +11,13 @@ namespace Symfony\Component\Routing\Annotation; -/** - * Annotation class for @Route(). - * - * @Annotation - * @NamedArgumentConstructor - * @Target({"CLASS", "METHOD"}) - * - * @author Fabien Potencier - * @author Alexander M. Turek - */ -#[\Attribute(\Attribute::IS_REPEATABLE | \Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD)] -class Route -{ - private ?string $path = null; - private array $localizedPaths = []; - private array $methods; - private array $schemes; - - /** - * @param array $requirements - * @param string[]|string $methods - * @param string[]|string $schemes - */ - public function __construct( - string|array $path = null, - private ?string $name = null, - private array $requirements = [], - private array $options = [], - private array $defaults = [], - private ?string $host = null, - array|string $methods = [], - array|string $schemes = [], - private ?string $condition = null, - private ?int $priority = null, - string $locale = null, - string $format = null, - bool $utf8 = null, - bool $stateless = null, - private ?string $env = null - ) { - if (\is_array($path)) { - $this->localizedPaths = $path; - } else { - $this->path = $path; - } - $this->setMethods($methods); - $this->setSchemes($schemes); - - if (null !== $locale) { - $this->defaults['_locale'] = $locale; - } - - if (null !== $format) { - $this->defaults['_format'] = $format; - } - - if (null !== $utf8) { - $this->options['utf8'] = $utf8; - } - - if (null !== $stateless) { - $this->defaults['_stateless'] = $stateless; - } - } - - /** - * @return void - */ - public function setPath(string $path) - { - $this->path = $path; - } - - /** - * @return string|null - */ - public function getPath() - { - return $this->path; - } - - /** - * @return void - */ - public function setLocalizedPaths(array $localizedPaths) - { - $this->localizedPaths = $localizedPaths; - } - - public function getLocalizedPaths(): array - { - return $this->localizedPaths; - } - - /** - * @return void - */ - public function setHost(string $pattern) - { - $this->host = $pattern; - } - - /** - * @return string|null - */ - public function getHost() - { - return $this->host; - } - - /** - * @return void - */ - public function setName(string $name) - { - $this->name = $name; - } - - /** - * @return string|null - */ - public function getName() - { - return $this->name; - } - - /** - * @return void - */ - public function setRequirements(array $requirements) - { - $this->requirements = $requirements; - } - - /** - * @return array - */ - public function getRequirements() - { - return $this->requirements; - } +// do not deprecate in 6.4/7.0, to make it easier for the ecosystem to support 6.4, 7.4 and 8.0 simultaneously - /** - * @return void - */ - public function setOptions(array $options) - { - $this->options = $options; - } - - /** - * @return array - */ - public function getOptions() - { - return $this->options; - } - - /** - * @return void - */ - public function setDefaults(array $defaults) - { - $this->defaults = $defaults; - } - - /** - * @return array - */ - public function getDefaults() - { - return $this->defaults; - } - - /** - * @return void - */ - public function setSchemes(array|string $schemes) - { - $this->schemes = (array) $schemes; - } - - /** - * @return array - */ - public function getSchemes() - { - return $this->schemes; - } - - /** - * @return void - */ - public function setMethods(array|string $methods) - { - $this->methods = (array) $methods; - } - - /** - * @return array - */ - public function getMethods() - { - return $this->methods; - } - - /** - * @return void - */ - public function setCondition(?string $condition) - { - $this->condition = $condition; - } - - /** - * @return string|null - */ - public function getCondition() - { - return $this->condition; - } - - public function setPriority(int $priority): void - { - $this->priority = $priority; - } - - public function getPriority(): ?int - { - return $this->priority; - } - - public function setEnv(?string $env): void - { - $this->env = $env; - } +class_exists(\Symfony\Component\Routing\Attribute\Route::class); - public function getEnv(): ?string +if (false) { + #[\Attribute(\Attribute::IS_REPEATABLE | \Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD)] + class Route { - return $this->env; } } diff --git a/src/Symfony/Component/Routing/Attribute/Route.php b/src/Symfony/Component/Routing/Attribute/Route.php new file mode 100644 index 0000000000000..398a4dd70d9b4 --- /dev/null +++ b/src/Symfony/Component/Routing/Attribute/Route.php @@ -0,0 +1,259 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Routing\Attribute; + +/** + * Annotation class for @Route(). + * + * @Annotation + * @NamedArgumentConstructor + * @Target({"CLASS", "METHOD"}) + * + * @author Fabien Potencier + * @author Alexander M. Turek + */ +#[\Attribute(\Attribute::IS_REPEATABLE | \Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD)] +class Route +{ + private ?string $path = null; + private array $localizedPaths = []; + private array $methods; + private array $schemes; + + /** + * @param array $requirements + * @param string[]|string $methods + * @param string[]|string $schemes + */ + public function __construct( + string|array $path = null, + private ?string $name = null, + private array $requirements = [], + private array $options = [], + private array $defaults = [], + private ?string $host = null, + array|string $methods = [], + array|string $schemes = [], + private ?string $condition = null, + private ?int $priority = null, + string $locale = null, + string $format = null, + bool $utf8 = null, + bool $stateless = null, + private ?string $env = null + ) { + if (\is_array($path)) { + $this->localizedPaths = $path; + } else { + $this->path = $path; + } + $this->setMethods($methods); + $this->setSchemes($schemes); + + if (null !== $locale) { + $this->defaults['_locale'] = $locale; + } + + if (null !== $format) { + $this->defaults['_format'] = $format; + } + + if (null !== $utf8) { + $this->options['utf8'] = $utf8; + } + + if (null !== $stateless) { + $this->defaults['_stateless'] = $stateless; + } + } + + /** + * @return void + */ + public function setPath(string $path) + { + $this->path = $path; + } + + /** + * @return string|null + */ + public function getPath() + { + return $this->path; + } + + /** + * @return void + */ + public function setLocalizedPaths(array $localizedPaths) + { + $this->localizedPaths = $localizedPaths; + } + + public function getLocalizedPaths(): array + { + return $this->localizedPaths; + } + + /** + * @return void + */ + public function setHost(string $pattern) + { + $this->host = $pattern; + } + + /** + * @return string|null + */ + public function getHost() + { + return $this->host; + } + + /** + * @return void + */ + public function setName(string $name) + { + $this->name = $name; + } + + /** + * @return string|null + */ + public function getName() + { + return $this->name; + } + + /** + * @return void + */ + public function setRequirements(array $requirements) + { + $this->requirements = $requirements; + } + + /** + * @return array + */ + public function getRequirements() + { + return $this->requirements; + } + + /** + * @return void + */ + public function setOptions(array $options) + { + $this->options = $options; + } + + /** + * @return array + */ + public function getOptions() + { + return $this->options; + } + + /** + * @return void + */ + public function setDefaults(array $defaults) + { + $this->defaults = $defaults; + } + + /** + * @return array + */ + public function getDefaults() + { + return $this->defaults; + } + + /** + * @return void + */ + public function setSchemes(array|string $schemes) + { + $this->schemes = (array) $schemes; + } + + /** + * @return array + */ + public function getSchemes() + { + return $this->schemes; + } + + /** + * @return void + */ + public function setMethods(array|string $methods) + { + $this->methods = (array) $methods; + } + + /** + * @return array + */ + public function getMethods() + { + return $this->methods; + } + + /** + * @return void + */ + public function setCondition(?string $condition) + { + $this->condition = $condition; + } + + /** + * @return string|null + */ + public function getCondition() + { + return $this->condition; + } + + public function setPriority(int $priority): void + { + $this->priority = $priority; + } + + public function getPriority(): ?int + { + return $this->priority; + } + + public function setEnv(?string $env): void + { + $this->env = $env; + } + + public function getEnv(): ?string + { + return $this->env; + } +} + +if (!class_exists(\Symfony\Component\Routing\Annotation\Route::class, false)) { + class_alias(Route::class, \Symfony\Component\Routing\Annotation\Route::class); +} diff --git a/src/Symfony/Component/Routing/CHANGELOG.md b/src/Symfony/Component/Routing/CHANGELOG.md index ef1a218e53c05..693ab8bf9241a 100644 --- a/src/Symfony/Component/Routing/CHANGELOG.md +++ b/src/Symfony/Component/Routing/CHANGELOG.md @@ -12,6 +12,7 @@ CHANGELOG * Deprecate `AnnotationDirectoryLoader`, use `AttributeDirectoryLoader` instead * Deprecate `AnnotationFileLoader`, use `AttributeFileLoader` instead * Add `AddExpressionLanguageProvidersPass` (moved from `FrameworkBundle`) + * Add aliases for all classes in the `Annotation` namespace to `Attribute` 6.2 --- diff --git a/src/Symfony/Component/Routing/Loader/AttributeClassLoader.php b/src/Symfony/Component/Routing/Loader/AttributeClassLoader.php index 6866ecf98f6d1..cd12b87155a40 100644 --- a/src/Symfony/Component/Routing/Loader/AttributeClassLoader.php +++ b/src/Symfony/Component/Routing/Loader/AttributeClassLoader.php @@ -15,7 +15,7 @@ use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\Config\Loader\LoaderResolverInterface; use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\Routing\Annotation\Route as RouteAnnotation; +use Symfony\Component\Routing\Attribute\Route as RouteAnnotation; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; diff --git a/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php b/src/Symfony/Component/Routing/Tests/Attribute/RouteTest.php similarity index 98% rename from src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php rename to src/Symfony/Component/Routing/Tests/Attribute/RouteTest.php index de671ed961e8a..a603e0550bc30 100644 --- a/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php +++ b/src/Symfony/Component/Routing/Tests/Attribute/RouteTest.php @@ -13,7 +13,7 @@ use Doctrine\Common\Annotations\AnnotationReader; use PHPUnit\Framework\TestCase; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures\FooController; use Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures\FooController as FooAttributesController; diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/ActionPathController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/ActionPathController.php index b96c4d658e740..ae063f4bb0ea3 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/ActionPathController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/ActionPathController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; class ActionPathController { diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/BazClass.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/BazClass.php index e610806df4620..1626c42c6f023 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/BazClass.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/BazClass.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; /** * @Route("/1", name="route1", schemes={"https"}, methods={"GET"}) diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/DefaultValueController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/DefaultValueController.php index c5e0c20d356e1..80053da10a589 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/DefaultValueController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/DefaultValueController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Routing\Tests\Fixtures\Enum\TestIntBackedEnum; use Symfony\Component\Routing\Tests\Fixtures\Enum\TestStringBackedEnum; diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/EncodingClass.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/EncodingClass.php index 52c7b267276ad..d126293c1bca9 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/EncodingClass.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/EncodingClass.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; class EncodingClass { diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/ExplicitLocalizedActionPathController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/ExplicitLocalizedActionPathController.php index e832c6b37740a..0c6338c878204 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/ExplicitLocalizedActionPathController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/ExplicitLocalizedActionPathController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; class ExplicitLocalizedActionPathController { diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/FooController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/FooController.php index 2eea313bba5a2..c638cb72ca532 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/FooController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/FooController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; class FooController { diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/GlobalDefaultsClass.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/GlobalDefaultsClass.php index a41a75bfef5b3..8e02006b4aa40 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/GlobalDefaultsClass.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/GlobalDefaultsClass.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; /** * @Route("/defaults", methods="GET", schemes="https", locale="g_locale", format="g_format") diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/InvokableController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/InvokableController.php index c70793a81d7a8..ff45d99cc156b 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/InvokableController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/InvokableController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; /** * @Route("/here", name="lol", methods={"GET", "POST"}, schemes={"https"}) diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/InvokableLocalizedController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/InvokableLocalizedController.php index d9633b9f38442..8e3bdc532aeca 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/InvokableLocalizedController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/InvokableLocalizedController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; /** * @Route(path={"nl": "/hier", "en": "/here"}, name="action") diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/InvokableMethodController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/InvokableMethodController.php index 08986249305f0..da80b4defb102 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/InvokableMethodController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/InvokableMethodController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; class InvokableMethodController { diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedActionPathController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedActionPathController.php index be6a35669029e..b2e823a5dad9c 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedActionPathController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedActionPathController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; class LocalizedActionPathController { diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedMethodActionControllers.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedMethodActionControllers.php index cadf3d1b1e304..403f206c25f1c 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedMethodActionControllers.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedMethodActionControllers.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; /** * @Route(path={"en": "/the/path", "nl": "/het/pad"}) diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedPrefixLocalizedActionController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedPrefixLocalizedActionController.php index 68f51b4821b10..ed748c0ed49dd 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedPrefixLocalizedActionController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedPrefixLocalizedActionController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; /** * @Route(path={"nl": "/nl", "en": "/en"}) diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedPrefixMissingLocaleActionController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedPrefixMissingLocaleActionController.php index a06e44e8492b3..e65370dd8a361 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedPrefixMissingLocaleActionController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedPrefixMissingLocaleActionController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; /** * @Route(path={"nl": "/nl"}) diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedPrefixMissingRouteLocaleActionController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedPrefixMissingRouteLocaleActionController.php index 8c9d96bcd410c..f48f178172b2d 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedPrefixMissingRouteLocaleActionController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedPrefixMissingRouteLocaleActionController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; /** * @Route(path={"nl": "/nl", "en": "/en"}) diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedPrefixWithRouteWithoutLocale.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedPrefixWithRouteWithoutLocale.php index 91dceb3319864..488c9270bfb78 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedPrefixWithRouteWithoutLocale.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/LocalizedPrefixWithRouteWithoutLocale.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; /** * @Route(path={"en": "/en", "nl": "/nl"}) diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/MethodActionControllers.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/MethodActionControllers.php index b4c2f253918d4..c36efea90a1a2 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/MethodActionControllers.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/MethodActionControllers.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; /** * @Route("/the/path") diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/MethodsAndSchemes.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/MethodsAndSchemes.php index 216772121902f..a4657f28c5588 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/MethodsAndSchemes.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/MethodsAndSchemes.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; final class MethodsAndSchemes { diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/MissingRouteNameController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/MissingRouteNameController.php index 7a4afb1e7347a..b6584cef9ccdb 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/MissingRouteNameController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/MissingRouteNameController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; class MissingRouteNameController { diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/NothingButNameController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/NothingButNameController.php index 5aa1b07c77c17..c78b1666069ab 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/NothingButNameController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/NothingButNameController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; class NothingButNameController { diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/PrefixedActionLocalizedRouteController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/PrefixedActionLocalizedRouteController.php index 0b07d63df6ce5..8fd8e1708610d 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/PrefixedActionLocalizedRouteController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/PrefixedActionLocalizedRouteController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; /** * @Route("/prefix") diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/PrefixedActionPathController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/PrefixedActionPathController.php index 04c1d044b29c7..077f1122b4a26 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/PrefixedActionPathController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/PrefixedActionPathController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; /** * @Route("/prefix", host="frankdejonge.nl", condition="lol=fun") diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/RequirementsWithoutPlaceholderNameController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/RequirementsWithoutPlaceholderNameController.php index 301f9691d138b..050ed3754a554 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/RequirementsWithoutPlaceholderNameController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/RequirementsWithoutPlaceholderNameController.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; /** * @Route("/", requirements={"foo", "\d+"}) diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/RouteWithEnv.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/RouteWithEnv.php index dcc94e7a174e3..150f2eb17f999 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/RouteWithEnv.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/RouteWithEnv.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; /** * @Route(env="some-env") diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/RouteWithPrefixController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/RouteWithPrefixController.php index a98a527ad34a3..3263b353b2da9 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/RouteWithPrefixController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/RouteWithPrefixController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; /** * @Route("/prefix") diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/Utf8ActionControllers.php b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/Utf8ActionControllers.php index ea5505f779efb..24d46f1a7caff 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/Utf8ActionControllers.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AnnotationFixtures/Utf8ActionControllers.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AnnotationFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; /** * @Route("/test", utf8=true) diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/ActionPathController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/ActionPathController.php index 14be396109ffb..d0318707d4b85 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/ActionPathController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/ActionPathController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; class ActionPathController { diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/BazClass.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/BazClass.php index 5de0993f37cb9..59eeb7642f653 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/BazClass.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/BazClass.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; #[ Route(path: '/1', name: 'route1', schemes: ['https'], methods: ['GET']), diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/DefaultValueController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/DefaultValueController.php index 4d0df50698c22..dc5d0c4e52ee3 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/DefaultValueController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/DefaultValueController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Routing\Tests\Fixtures\Enum\TestIntBackedEnum; use Symfony\Component\Routing\Tests\Fixtures\Enum\TestStringBackedEnum; diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/EncodingClass.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/EncodingClass.php index 36ab4dba450df..5df402e0b6b44 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/EncodingClass.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/EncodingClass.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; class EncodingClass { diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/ExplicitLocalizedActionPathController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/ExplicitLocalizedActionPathController.php index 3445fa2c57d22..0dc2febcb2f07 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/ExplicitLocalizedActionPathController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/ExplicitLocalizedActionPathController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; class ExplicitLocalizedActionPathController { diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/FooController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/FooController.php index d34855913a6dc..adbd038ad9f73 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/FooController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/FooController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; class FooController { diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/GlobalDefaultsClass.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/GlobalDefaultsClass.php index dfeb7ac915bdc..be6981c1e18ac 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/GlobalDefaultsClass.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/GlobalDefaultsClass.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; #[Route(path: '/defaults', methods: ['GET'], schemes: ['https'], locale: 'g_locale', format: 'g_format')] class GlobalDefaultsClass diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/InvokableController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/InvokableController.php index 9a3f729622b2d..cd0a7cd47ca6a 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/InvokableController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/InvokableController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; #[Route(path: '/here', name: 'lol', methods: ["GET", "POST"], schemes: ['https'])] class InvokableController diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/InvokableLocalizedController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/InvokableLocalizedController.php index 7427a18a9abed..3c97a17c9793a 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/InvokableLocalizedController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/InvokableLocalizedController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; #[Route(path: ["nl" => "/hier", "en" => "/here"], name: 'action')] class InvokableLocalizedController diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/InvokableMethodController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/InvokableMethodController.php index d14ec1be65439..f5c5031785a24 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/InvokableMethodController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/InvokableMethodController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; class InvokableMethodController { diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedActionPathController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedActionPathController.php index 96f0a8e22af2f..69ac3319655b6 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedActionPathController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedActionPathController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; class LocalizedActionPathController { diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedMethodActionControllers.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedMethodActionControllers.php index afc8f7f905117..719452267faac 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedMethodActionControllers.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedMethodActionControllers.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; #[Route(path: ['en' => '/the/path', 'nl' => '/het/pad'])] class LocalizedMethodActionControllers diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedPrefixLocalizedActionController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedPrefixLocalizedActionController.php index af74fb4a5b66a..36f8da44366a7 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedPrefixLocalizedActionController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedPrefixLocalizedActionController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; #[Route(path: ['nl' => '/nl', 'en' => '/en'])] class LocalizedPrefixLocalizedActionController diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedPrefixMissingLocaleActionController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedPrefixMissingLocaleActionController.php index e861c9d5efcc0..043bd077acbcd 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedPrefixMissingLocaleActionController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedPrefixMissingLocaleActionController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; #[Route(path: ['nl' => '/nl'])] class LocalizedPrefixMissingLocaleActionController diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedPrefixMissingRouteLocaleActionController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedPrefixMissingRouteLocaleActionController.php index e726c98f0300a..fea14f45577d2 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedPrefixMissingRouteLocaleActionController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedPrefixMissingRouteLocaleActionController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; #[Route(path: ['nl' => '/nl', 'en' => '/en'])] class LocalizedPrefixMissingRouteLocaleActionController diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedPrefixWithRouteWithoutLocale.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedPrefixWithRouteWithoutLocale.php index 6edda5b7e5822..dc6ee12d3dc5c 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedPrefixWithRouteWithoutLocale.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/LocalizedPrefixWithRouteWithoutLocale.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; #[Route(path: ['en' => '/en', 'nl' => '/nl'])] class LocalizedPrefixWithRouteWithoutLocale diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/MethodActionControllers.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/MethodActionControllers.php index 2891de1351575..a6ce03ae374b5 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/MethodActionControllers.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/MethodActionControllers.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; #[Route('/the/path')] class MethodActionControllers diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/MethodsAndSchemes.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/MethodsAndSchemes.php index 47ffc7031de3b..babcf1330af68 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/MethodsAndSchemes.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/MethodsAndSchemes.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; final class MethodsAndSchemes { diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/MissingRouteNameController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/MissingRouteNameController.php index 6b8d6a3825319..0c056071e3432 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/MissingRouteNameController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/MissingRouteNameController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; class MissingRouteNameController { diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/NothingButNameController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/NothingButNameController.php index d8e5b9271e64d..7f56161800e6c 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/NothingButNameController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/NothingButNameController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; class NothingButNameController { diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/PrefixedActionLocalizedRouteController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/PrefixedActionLocalizedRouteController.php index c8fd63897af8c..fa02f8bafeff5 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/PrefixedActionLocalizedRouteController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/PrefixedActionLocalizedRouteController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; #[Route('/prefix')] class PrefixedActionLocalizedRouteController diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/PrefixedActionPathController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/PrefixedActionPathController.php index 934da3061f41b..f6a6fb6b6ee33 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/PrefixedActionPathController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/PrefixedActionPathController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; #[Route(path: '/prefix', host: 'frankdejonge.nl', condition: 'lol=fun')] class PrefixedActionPathController diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/RequirementsWithoutPlaceholderNameController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/RequirementsWithoutPlaceholderNameController.php index 9f00a23c5f8a7..80c79c7a40e2c 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/RequirementsWithoutPlaceholderNameController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/RequirementsWithoutPlaceholderNameController.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; #[Route(path: '/', requirements: ['foo', '\d+'])] class RequirementsWithoutPlaceholderNameController diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/RouteWithEnv.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/RouteWithEnv.php index e82a8136ba75d..31f6c39bca657 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/RouteWithEnv.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/RouteWithEnv.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; #[Route(env: 'some-env')] class RouteWithEnv diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/RouteWithPrefixController.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/RouteWithPrefixController.php index e859692a828a9..fb0748994f62e 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/RouteWithPrefixController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/RouteWithPrefixController.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; #[Route('/prefix')] class RouteWithPrefixController diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/Utf8ActionControllers.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/Utf8ActionControllers.php index 19dc890fc8da9..2de4e3a1467eb 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/Utf8ActionControllers.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributeFixtures/Utf8ActionControllers.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; #[Route('/test', utf8: true)] class Utf8ActionControllers diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/AttributedClasses/AbstractClass.php b/src/Symfony/Component/Routing/Tests/Fixtures/AttributedClasses/AbstractClass.php index f6bf3f851a57c..39b035758006e 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/AttributedClasses/AbstractClass.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/AttributedClasses/AbstractClass.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\AttributedClasses; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; abstract class AbstractClass { diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/OtherAnnotatedClasses/VariadicClass.php b/src/Symfony/Component/Routing/Tests/Fixtures/OtherAnnotatedClasses/VariadicClass.php index 01c14ed658294..07044437bc2fc 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/OtherAnnotatedClasses/VariadicClass.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/OtherAnnotatedClasses/VariadicClass.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\OtherAnnotatedClasses; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; class VariadicClass { diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/MyController.php b/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/MyController.php index faa72826fac0a..4ca7836ce8a16 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/MyController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/MyController.php @@ -12,7 +12,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\Psr4Controllers; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; #[Route('/my/route', name: 'my_route')] final class MyController diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/SubNamespace/EvenDeeperNamespace/MyOtherController.php b/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/SubNamespace/EvenDeeperNamespace/MyOtherController.php index a5e43d8f22f55..6896b70bb8670 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/SubNamespace/EvenDeeperNamespace/MyOtherController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/SubNamespace/EvenDeeperNamespace/MyOtherController.php @@ -12,7 +12,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\Psr4Controllers\SubNamespace\EvenDeeperNamespace; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; #[Route('/my/other/route', name: 'my_other_controller_', methods: ['PUT'])] final class MyOtherController diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/SubNamespace/MyAbstractController.php b/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/SubNamespace/MyAbstractController.php index 30d8bbdb65bcc..b36b0538ff507 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/SubNamespace/MyAbstractController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/SubNamespace/MyAbstractController.php @@ -12,7 +12,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\Psr4Controllers\SubNamespace; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; abstract class MyAbstractController { diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/SubNamespace/MyChildController.php b/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/SubNamespace/MyChildController.php index a6d0333577079..6ff1fe3f1d0ba 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/SubNamespace/MyChildController.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/SubNamespace/MyChildController.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\Psr4Controllers\SubNamespace; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; #[Route('/my/child/controller', name: 'my_child_controller_')] final class MyChildController extends MyAbstractController diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/SubNamespace/MyControllerWithATrait.php b/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/SubNamespace/MyControllerWithATrait.php index 598734a3653f8..6fe9a0c1c7c75 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/SubNamespace/MyControllerWithATrait.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/SubNamespace/MyControllerWithATrait.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\Psr4Controllers\SubNamespace; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; #[Route('/my/controller/with/a/trait', name: 'my_controller_')] final class MyControllerWithATrait implements IrrelevantInterface diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/SubNamespace/SomeSharedImplementation.php b/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/SubNamespace/SomeSharedImplementation.php index 736ae6db197db..a132506697eed 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/SubNamespace/SomeSharedImplementation.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/Psr4Controllers/SubNamespace/SomeSharedImplementation.php @@ -12,7 +12,7 @@ namespace Symfony\Component\Routing\Tests\Fixtures\Psr4Controllers\SubNamespace; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Attribute\Route; trait SomeSharedImplementation { diff --git a/src/Symfony/Component/Serializer/Annotation/Context.php b/src/Symfony/Component/Serializer/Annotation/Context.php index b417d650507ef..eef8331481f75 100644 --- a/src/Symfony/Component/Serializer/Annotation/Context.php +++ b/src/Symfony/Component/Serializer/Annotation/Context.php @@ -11,63 +11,13 @@ namespace Symfony\Component\Serializer\Annotation; -use Symfony\Component\Serializer\Exception\InvalidArgumentException; +// do not deprecate in 6.4/7.0, to make it easier for the ecosystem to support 6.4, 7.4 and 8.0 simultaneously -/** - * Annotation class for @Context(). - * - * @Annotation - * @NamedArgumentConstructor - * @Target({"PROPERTY", "METHOD"}) - * - * @author Maxime Steinhausser - */ -#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class Context -{ - private array $groups; - - /** - * @param string|string[] $groups - * - * @throws InvalidArgumentException - */ - public function __construct( - private readonly array $context = [], - private readonly array $normalizationContext = [], - private readonly array $denormalizationContext = [], - string|array $groups = [], - ) { - if (!$context && !$normalizationContext && !$denormalizationContext) { - throw new InvalidArgumentException(sprintf('At least one of the "context", "normalizationContext", or "denormalizationContext" options must be provided as a non-empty array to "%s".', static::class)); - } - - $this->groups = (array) $groups; - - foreach ($this->groups as $group) { - if (!\is_string($group)) { - throw new InvalidArgumentException(sprintf('Parameter "groups" given to "%s" must be a string or an array of strings, "%s" given.', static::class, get_debug_type($group))); - } - } - } - - public function getContext(): array - { - return $this->context; - } - - public function getNormalizationContext(): array - { - return $this->normalizationContext; - } - - public function getDenormalizationContext(): array - { - return $this->denormalizationContext; - } +class_exists(\Symfony\Component\Serializer\Attribute\Context::class); - public function getGroups(): array +if (false) { + #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] + class Context { - return $this->groups; } } diff --git a/src/Symfony/Component/Serializer/Annotation/DiscriminatorMap.php b/src/Symfony/Component/Serializer/Annotation/DiscriminatorMap.php index ad335ec41b13c..89b2ae9e8e20f 100644 --- a/src/Symfony/Component/Serializer/Annotation/DiscriminatorMap.php +++ b/src/Symfony/Component/Serializer/Annotation/DiscriminatorMap.php @@ -11,40 +11,11 @@ namespace Symfony\Component\Serializer\Annotation; -use Symfony\Component\Serializer\Exception\InvalidArgumentException; +class_exists(\Symfony\Component\Serializer\Attribute\DiscriminatorMap::class); -/** - * Annotation class for @DiscriminatorMap(). - * - * @Annotation - * @NamedArgumentConstructor - * @Target({"CLASS"}) - * - * @author Samuel Roze - */ -#[\Attribute(\Attribute::TARGET_CLASS)] -class DiscriminatorMap -{ - public function __construct( - private readonly string $typeProperty, - private readonly array $mapping, - ) { - if (empty($typeProperty)) { - throw new InvalidArgumentException(sprintf('Parameter "typeProperty" given to "%s" cannot be empty.', static::class)); - } - - if (empty($mapping)) { - throw new InvalidArgumentException(sprintf('Parameter "mapping" given to "%s" cannot be empty.', static::class)); - } - } - - public function getTypeProperty(): string - { - return $this->typeProperty; - } - - public function getMapping(): array +if (false) { + #[\Attribute(\Attribute::TARGET_CLASS)] + class DiscriminatorMap { - return $this->mapping; } } diff --git a/src/Symfony/Component/Serializer/Annotation/Groups.php b/src/Symfony/Component/Serializer/Annotation/Groups.php index 558978cda31b3..89338b05ccb57 100644 --- a/src/Symfony/Component/Serializer/Annotation/Groups.php +++ b/src/Symfony/Component/Serializer/Annotation/Groups.php @@ -11,48 +11,11 @@ namespace Symfony\Component\Serializer\Annotation; -use Symfony\Component\Serializer\Exception\InvalidArgumentException; +class_exists(\Symfony\Component\Serializer\Attribute\Groups::class); -/** - * Annotation class for @Groups(). - * - * @Annotation - * @NamedArgumentConstructor - * @Target({"PROPERTY", "METHOD", "CLASS"}) - * - * @author Kévin Dunglas - */ -#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY | \Attribute::TARGET_CLASS)] -class Groups -{ - /** - * @var string[] - */ - private readonly array $groups; - - /** - * @param string|string[] $groups - */ - public function __construct(string|array $groups) - { - $this->groups = (array) $groups; - - if (!$this->groups) { - throw new InvalidArgumentException(sprintf('Parameter given to "%s" cannot be empty.', static::class)); - } - - foreach ($this->groups as $group) { - if (!\is_string($group) || '' === $group) { - throw new InvalidArgumentException(sprintf('Parameter given to "%s" must be a string or an array of non-empty strings.', static::class)); - } - } - } - - /** - * @return string[] - */ - public function getGroups(): array +if (false) { + #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY | \Attribute::TARGET_CLASS)] + class Groups { - return $this->groups; } } diff --git a/src/Symfony/Component/Serializer/Annotation/Ignore.php b/src/Symfony/Component/Serializer/Annotation/Ignore.php index b09e7007a4a4d..219ea725b52c5 100644 --- a/src/Symfony/Component/Serializer/Annotation/Ignore.php +++ b/src/Symfony/Component/Serializer/Annotation/Ignore.php @@ -11,15 +11,11 @@ namespace Symfony\Component\Serializer\Annotation; -/** - * Annotation class for @Ignore(). - * - * @Annotation - * @Target({"PROPERTY", "METHOD"}) - * - * @author Kévin Dunglas - */ -#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] -final class Ignore -{ +class_exists(\Symfony\Component\Serializer\Attribute\Ignore::class); + +if (false) { + #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] + final class Ignore + { + } } diff --git a/src/Symfony/Component/Serializer/Annotation/MaxDepth.php b/src/Symfony/Component/Serializer/Annotation/MaxDepth.php index 8e03f320237ef..591e68ed95c21 100644 --- a/src/Symfony/Component/Serializer/Annotation/MaxDepth.php +++ b/src/Symfony/Component/Serializer/Annotation/MaxDepth.php @@ -11,32 +11,11 @@ namespace Symfony\Component\Serializer\Annotation; -use Symfony\Component\Serializer\Exception\InvalidArgumentException; +class_exists(\Symfony\Component\Serializer\Attribute\MaxDepth::class); -/** - * Annotation class for @MaxDepth(). - * - * @Annotation - * @NamedArgumentConstructor - * @Target({"PROPERTY", "METHOD"}) - * - * @author Kévin Dunglas - */ -#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] -class MaxDepth -{ - public function __construct(private readonly int $maxDepth) - { - if ($maxDepth <= 0) { - throw new InvalidArgumentException(sprintf('Parameter given to "%s" must be a positive integer.', static::class)); - } - } - - /** - * @return int - */ - public function getMaxDepth() +if (false) { + #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] + class MaxDepth { - return $this->maxDepth; } } diff --git a/src/Symfony/Component/Serializer/Annotation/SerializedName.php b/src/Symfony/Component/Serializer/Annotation/SerializedName.php index 47082dec227e3..97c6e0aec2143 100644 --- a/src/Symfony/Component/Serializer/Annotation/SerializedName.php +++ b/src/Symfony/Component/Serializer/Annotation/SerializedName.php @@ -11,29 +11,11 @@ namespace Symfony\Component\Serializer\Annotation; -use Symfony\Component\Serializer\Exception\InvalidArgumentException; +class_exists(\Symfony\Component\Serializer\Attribute\SerializedName::class); -/** - * Annotation class for @SerializedName(). - * - * @Annotation - * @NamedArgumentConstructor - * @Target({"PROPERTY", "METHOD"}) - * - * @author Fabien Bourigault - */ -#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] -final class SerializedName -{ - public function __construct(private readonly string $serializedName) - { - if ('' === $serializedName) { - throw new InvalidArgumentException(sprintf('Parameter given to "%s" must be a non-empty string.', self::class)); - } - } - - public function getSerializedName(): string +if (false) { + #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] + final class SerializedName { - return $this->serializedName; } } diff --git a/src/Symfony/Component/Serializer/Annotation/SerializedPath.php b/src/Symfony/Component/Serializer/Annotation/SerializedPath.php index fa0c271459e49..f555a1086ac95 100644 --- a/src/Symfony/Component/Serializer/Annotation/SerializedPath.php +++ b/src/Symfony/Component/Serializer/Annotation/SerializedPath.php @@ -11,35 +11,11 @@ namespace Symfony\Component\Serializer\Annotation; -use Symfony\Component\PropertyAccess\Exception\InvalidPropertyPathException; -use Symfony\Component\PropertyAccess\PropertyPath; -use Symfony\Component\Serializer\Exception\InvalidArgumentException; +class_exists(\Symfony\Component\Serializer\Attribute\SerializedPath::class); -/** - * Annotation class for @SerializedPath(). - * - * @Annotation - * @NamedArgumentConstructor - * @Target({"PROPERTY", "METHOD"}) - * - * @author Tobias Bönner - */ -#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] -final class SerializedPath -{ - private PropertyPath $serializedPath; - - public function __construct(string $serializedPath) - { - try { - $this->serializedPath = new PropertyPath($serializedPath); - } catch (InvalidPropertyPathException $pathException) { - throw new InvalidArgumentException(sprintf('Parameter given to "%s" must be a valid property path.', self::class)); - } - } - - public function getSerializedPath(): PropertyPath +if (false) { + #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] + final class SerializedPath { - return $this->serializedPath; } } diff --git a/src/Symfony/Component/Serializer/Attribute/Context.php b/src/Symfony/Component/Serializer/Attribute/Context.php new file mode 100644 index 0000000000000..baa958839780d --- /dev/null +++ b/src/Symfony/Component/Serializer/Attribute/Context.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Attribute; + +use Symfony\Component\Serializer\Exception\InvalidArgumentException; + +/** + * Annotation class for @Context(). + * + * @Annotation + * @NamedArgumentConstructor + * @Target({"PROPERTY", "METHOD"}) + * + * @author Maxime Steinhausser + */ +#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] +class Context +{ + private array $groups; + + /** + * @param string|string[] $groups + * + * @throws InvalidArgumentException + */ + public function __construct( + private readonly array $context = [], + private readonly array $normalizationContext = [], + private readonly array $denormalizationContext = [], + string|array $groups = [], + ) { + if (!$context && !$normalizationContext && !$denormalizationContext) { + throw new InvalidArgumentException(sprintf('At least one of the "context", "normalizationContext", or "denormalizationContext" options must be provided as a non-empty array to "%s".', static::class)); + } + + $this->groups = (array) $groups; + + foreach ($this->groups as $group) { + if (!\is_string($group)) { + throw new InvalidArgumentException(sprintf('Parameter "groups" given to "%s" must be a string or an array of strings, "%s" given.', static::class, get_debug_type($group))); + } + } + } + + public function getContext(): array + { + return $this->context; + } + + public function getNormalizationContext(): array + { + return $this->normalizationContext; + } + + public function getDenormalizationContext(): array + { + return $this->denormalizationContext; + } + + public function getGroups(): array + { + return $this->groups; + } +} + +if (!class_exists(\Symfony\Component\Serializer\Annotation\Context::class, false)) { + class_alias(Context::class, \Symfony\Component\Serializer\Annotation\Context::class); +} diff --git a/src/Symfony/Component/Serializer/Attribute/DiscriminatorMap.php b/src/Symfony/Component/Serializer/Attribute/DiscriminatorMap.php new file mode 100644 index 0000000000000..4c1f23722eb52 --- /dev/null +++ b/src/Symfony/Component/Serializer/Attribute/DiscriminatorMap.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Attribute; + +use Symfony\Component\Serializer\Exception\InvalidArgumentException; + +/** + * Annotation class for @DiscriminatorMap(). + * + * @Annotation + * @NamedArgumentConstructor + * @Target({"CLASS"}) + * + * @author Samuel Roze + */ +#[\Attribute(\Attribute::TARGET_CLASS)] +class DiscriminatorMap +{ + public function __construct( + private readonly string $typeProperty, + private readonly array $mapping, + ) { + if (empty($typeProperty)) { + throw new InvalidArgumentException(sprintf('Parameter "typeProperty" given to "%s" cannot be empty.', static::class)); + } + + if (empty($mapping)) { + throw new InvalidArgumentException(sprintf('Parameter "mapping" given to "%s" cannot be empty.', static::class)); + } + } + + public function getTypeProperty(): string + { + return $this->typeProperty; + } + + public function getMapping(): array + { + return $this->mapping; + } +} + +if (!class_exists(\Symfony\Component\Serializer\Annotation\DiscriminatorMap::class, false)) { + class_alias(DiscriminatorMap::class, \Symfony\Component\Serializer\Annotation\DiscriminatorMap::class); +} diff --git a/src/Symfony/Component/Serializer/Attribute/Groups.php b/src/Symfony/Component/Serializer/Attribute/Groups.php new file mode 100644 index 0000000000000..9a351910aed57 --- /dev/null +++ b/src/Symfony/Component/Serializer/Attribute/Groups.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Attribute; + +use Symfony\Component\Serializer\Exception\InvalidArgumentException; + +/** + * Annotation class for @Groups(). + * + * @Annotation + * @NamedArgumentConstructor + * @Target({"PROPERTY", "METHOD", "CLASS"}) + * + * @author Kévin Dunglas + */ +#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY | \Attribute::TARGET_CLASS)] +class Groups +{ + /** + * @var string[] + */ + private readonly array $groups; + + /** + * @param string|string[] $groups + */ + public function __construct(string|array $groups) + { + $this->groups = (array) $groups; + + if (!$this->groups) { + throw new InvalidArgumentException(sprintf('Parameter given to "%s" cannot be empty.', static::class)); + } + + foreach ($this->groups as $group) { + if (!\is_string($group) || '' === $group) { + throw new InvalidArgumentException(sprintf('Parameter given to "%s" must be a string or an array of non-empty strings.', static::class)); + } + } + } + + /** + * @return string[] + */ + public function getGroups(): array + { + return $this->groups; + } +} + +if (!class_exists(\Symfony\Component\Serializer\Annotation\Groups::class, false)) { + class_alias(Groups::class, \Symfony\Component\Serializer\Annotation\Groups::class); +} diff --git a/src/Symfony/Component/Serializer/Attribute/Ignore.php b/src/Symfony/Component/Serializer/Attribute/Ignore.php new file mode 100644 index 0000000000000..688a1f3f44451 --- /dev/null +++ b/src/Symfony/Component/Serializer/Attribute/Ignore.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Attribute; + +/** + * Annotation class for @Ignore(). + * + * @Annotation + * @Target({"PROPERTY", "METHOD"}) + * + * @author Kévin Dunglas + */ +#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] +final class Ignore +{ +} + +if (!class_exists(\Symfony\Component\Serializer\Annotation\Ignore::class, false)) { + class_alias(Ignore::class, \Symfony\Component\Serializer\Annotation\Ignore::class); +} diff --git a/src/Symfony/Component/Serializer/Attribute/MaxDepth.php b/src/Symfony/Component/Serializer/Attribute/MaxDepth.php new file mode 100644 index 0000000000000..3ecfcb993755d --- /dev/null +++ b/src/Symfony/Component/Serializer/Attribute/MaxDepth.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Attribute; + +use Symfony\Component\Serializer\Exception\InvalidArgumentException; + +/** + * Annotation class for @MaxDepth(). + * + * @Annotation + * @NamedArgumentConstructor + * @Target({"PROPERTY", "METHOD"}) + * + * @author Kévin Dunglas + */ +#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] +class MaxDepth +{ + public function __construct(private readonly int $maxDepth) + { + if ($maxDepth <= 0) { + throw new InvalidArgumentException(sprintf('Parameter given to "%s" must be a positive integer.', static::class)); + } + } + + /** + * @return int + */ + public function getMaxDepth() + { + return $this->maxDepth; + } +} + +if (!class_exists(\Symfony\Component\Serializer\Annotation\MaxDepth::class, false)) { + class_alias(MaxDepth::class, \Symfony\Component\Serializer\Annotation\MaxDepth::class); +} diff --git a/src/Symfony/Component/Serializer/Attribute/SerializedName.php b/src/Symfony/Component/Serializer/Attribute/SerializedName.php new file mode 100644 index 0000000000000..a2651282fc08d --- /dev/null +++ b/src/Symfony/Component/Serializer/Attribute/SerializedName.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Attribute; + +use Symfony\Component\Serializer\Exception\InvalidArgumentException; + +/** + * Annotation class for @SerializedName(). + * + * @Annotation + * @NamedArgumentConstructor + * @Target({"PROPERTY", "METHOD"}) + * + * @author Fabien Bourigault + */ +#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] +final class SerializedName +{ + public function __construct(private readonly string $serializedName) + { + if ('' === $serializedName) { + throw new InvalidArgumentException(sprintf('Parameter given to "%s" must be a non-empty string.', self::class)); + } + } + + public function getSerializedName(): string + { + return $this->serializedName; + } +} + +if (!class_exists(\Symfony\Component\Serializer\Annotation\SerializedName::class, false)) { + class_alias(SerializedName::class, \Symfony\Component\Serializer\Annotation\SerializedName::class); +} diff --git a/src/Symfony/Component/Serializer/Attribute/SerializedPath.php b/src/Symfony/Component/Serializer/Attribute/SerializedPath.php new file mode 100644 index 0000000000000..0e5f040876555 --- /dev/null +++ b/src/Symfony/Component/Serializer/Attribute/SerializedPath.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Attribute; + +use Symfony\Component\PropertyAccess\Exception\InvalidPropertyPathException; +use Symfony\Component\PropertyAccess\PropertyPath; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; + +/** + * Annotation class for @SerializedPath(). + * + * @Annotation + * @NamedArgumentConstructor + * @Target({"PROPERTY", "METHOD"}) + * + * @author Tobias Bönner + */ +#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] +final class SerializedPath +{ + private PropertyPath $serializedPath; + + public function __construct(string $serializedPath) + { + try { + $this->serializedPath = new PropertyPath($serializedPath); + } catch (InvalidPropertyPathException $pathException) { + throw new InvalidArgumentException(sprintf('Parameter given to "%s" must be a valid property path.', self::class)); + } + } + + public function getSerializedPath(): PropertyPath + { + return $this->serializedPath; + } +} + +if (!class_exists(\Symfony\Component\Serializer\Annotation\SerializedPath::class, false)) { + class_alias(SerializedPath::class, \Symfony\Component\Serializer\Annotation\SerializedPath::class); +} diff --git a/src/Symfony/Component/Serializer/CHANGELOG.md b/src/Symfony/Component/Serializer/CHANGELOG.md index 56ed3863c4c79..69829709f062a 100644 --- a/src/Symfony/Component/Serializer/CHANGELOG.md +++ b/src/Symfony/Component/Serializer/CHANGELOG.md @@ -12,6 +12,7 @@ CHANGELOG * Make `ProblemNormalizer` give details about Messenger's `ValidationFailedException` * Add `XmlEncoder::CDATA_WRAPPING` context option * Deprecate `AnnotationLoader`, use `AttributeLoader` instead + * Add aliases for all classes in the `Annotation` namespace to `Attribute` 6.3 --- diff --git a/src/Symfony/Component/Serializer/Mapping/Loader/AttributeLoader.php b/src/Symfony/Component/Serializer/Mapping/Loader/AttributeLoader.php index 9b379bdee45bb..1bfe5d4737058 100644 --- a/src/Symfony/Component/Serializer/Mapping/Loader/AttributeLoader.php +++ b/src/Symfony/Component/Serializer/Mapping/Loader/AttributeLoader.php @@ -12,13 +12,13 @@ namespace Symfony\Component\Serializer\Mapping\Loader; use Doctrine\Common\Annotations\Reader; -use Symfony\Component\Serializer\Annotation\Context; -use Symfony\Component\Serializer\Annotation\DiscriminatorMap; -use Symfony\Component\Serializer\Annotation\Groups; -use Symfony\Component\Serializer\Annotation\Ignore; -use Symfony\Component\Serializer\Annotation\MaxDepth; -use Symfony\Component\Serializer\Annotation\SerializedName; -use Symfony\Component\Serializer\Annotation\SerializedPath; +use Symfony\Component\Serializer\Attribute\Context; +use Symfony\Component\Serializer\Attribute\DiscriminatorMap; +use Symfony\Component\Serializer\Attribute\Groups; +use Symfony\Component\Serializer\Attribute\Ignore; +use Symfony\Component\Serializer\Attribute\MaxDepth; +use Symfony\Component\Serializer\Attribute\SerializedName; +use Symfony\Component\Serializer\Attribute\SerializedPath; use Symfony\Component\Serializer\Exception\MappingException; use Symfony\Component\Serializer\Mapping\AttributeMetadata; use Symfony\Component\Serializer\Mapping\AttributeMetadataInterface; diff --git a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php index d26103e9634af..703b896d08999 100644 --- a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Normalizer; -use Symfony\Component\Serializer\Annotation\Ignore; +use Symfony\Component\Serializer\Attribute\Ignore; /** * Converts between objects with getter and setter methods and arrays. diff --git a/src/Symfony/Component/Serializer/Tests/Annotation/ContextTest.php b/src/Symfony/Component/Serializer/Tests/Annotation/ContextTest.php index 8f5614fc59531..7efe8dda598d2 100644 --- a/src/Symfony/Component/Serializer/Tests/Annotation/ContextTest.php +++ b/src/Symfony/Component/Serializer/Tests/Annotation/ContextTest.php @@ -12,7 +12,7 @@ namespace Symfony\Component\Serializer\Tests\Annotation; use PHPUnit\Framework\TestCase; -use Symfony\Component\Serializer\Annotation\Context; +use Symfony\Component\Serializer\Attribute\Context; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\VarDumper\Dumper\CliDumper; use Symfony\Component\VarDumper\Test\VarDumperTestTrait; @@ -32,7 +32,7 @@ protected function setUp(): void public function testThrowsOnEmptyContext() { $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('At least one of the "context", "normalizationContext", or "denormalizationContext" options must be provided as a non-empty array to "Symfony\Component\Serializer\Annotation\Context".'); + $this->expectExceptionMessage('At least one of the "context", "normalizationContext", or "denormalizationContext" options must be provided as a non-empty array to "Symfony\Component\Serializer\Attribute\Context".'); new Context(); } @@ -78,7 +78,7 @@ public static function provideValidInputs(): iterable yield 'named arguments: with context option' => [ fn () => new Context(context: ['foo' => 'bar']), << "bar", @@ -92,7 +92,7 @@ public static function provideValidInputs(): iterable yield 'named arguments: with normalization context option' => [ fn () => new Context(normalizationContext: ['foo' => 'bar']), << [ fn () => new Context(denormalizationContext: ['foo' => 'bar']), << [ fn () => new Context(context: ['foo' => 'bar'], groups: 'a'), << [ fn () => new Context(context: ['foo' => 'bar'], groups: ['a', 'b']), <<expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Parameter given to "Symfony\Component\Serializer\Annotation\MaxDepth" must be a positive integer.'); + $this->expectExceptionMessage('Parameter given to "Symfony\Component\Serializer\Attribute\MaxDepth" must be a positive integer.'); new MaxDepth($value); } diff --git a/src/Symfony/Component/Serializer/Tests/Annotation/SerializedNameTest.php b/src/Symfony/Component/Serializer/Tests/Annotation/SerializedNameTest.php index b19f91e559fe2..c2b5e5f2ab6b3 100644 --- a/src/Symfony/Component/Serializer/Tests/Annotation/SerializedNameTest.php +++ b/src/Symfony/Component/Serializer/Tests/Annotation/SerializedNameTest.php @@ -12,7 +12,7 @@ namespace Symfony\Component\Serializer\Tests\Annotation; use PHPUnit\Framework\TestCase; -use Symfony\Component\Serializer\Annotation\SerializedName; +use Symfony\Component\Serializer\Attribute\SerializedName; use Symfony\Component\Serializer\Exception\InvalidArgumentException; /** @@ -23,7 +23,7 @@ class SerializedNameTest extends TestCase public function testNotAStringSerializedNameParameter() { $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Parameter given to "Symfony\Component\Serializer\Annotation\SerializedName" must be a non-empty string.'); + $this->expectExceptionMessage('Parameter given to "Symfony\Component\Serializer\Attribute\SerializedName" must be a non-empty string.'); new SerializedName(''); } diff --git a/src/Symfony/Component/Serializer/Tests/Annotation/SerializedPathTest.php b/src/Symfony/Component/Serializer/Tests/Annotation/SerializedPathTest.php index 10c27f4b95b11..f5bbfa62b600e 100644 --- a/src/Symfony/Component/Serializer/Tests/Annotation/SerializedPathTest.php +++ b/src/Symfony/Component/Serializer/Tests/Annotation/SerializedPathTest.php @@ -13,7 +13,7 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\PropertyAccess\PropertyPath; -use Symfony\Component\Serializer\Annotation\SerializedPath; +use Symfony\Component\Serializer\Attribute\SerializedPath; use Symfony\Component\Serializer\Exception\InvalidArgumentException; /** @@ -24,7 +24,7 @@ class SerializedPathTest extends TestCase public function testEmptyStringSerializedPathParameter() { $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Parameter given to "Symfony\Component\Serializer\Annotation\SerializedPath" must be a valid property path.'); + $this->expectExceptionMessage('Parameter given to "Symfony\Component\Serializer\Attribute\SerializedPath" must be a valid property path.'); new SerializedPath(''); } diff --git a/src/Symfony/Component/Serializer/Tests/Dummy/DummyClassOne.php b/src/Symfony/Component/Serializer/Tests/Dummy/DummyClassOne.php index 67e80d2c6e409..2b3c94cb8beae 100644 --- a/src/Symfony/Component/Serializer/Tests/Dummy/DummyClassOne.php +++ b/src/Symfony/Component/Serializer/Tests/Dummy/DummyClassOne.php @@ -11,11 +11,11 @@ namespace Symfony\Component\Serializer\Tests\Dummy; -use Symfony\Component\Serializer\Annotation\Context; -use Symfony\Component\Serializer\Annotation\Groups; -use Symfony\Component\Serializer\Annotation\Ignore; -use Symfony\Component\Serializer\Annotation\MaxDepth; -use Symfony\Component\Serializer\Annotation\SerializedName; +use Symfony\Component\Serializer\Attribute\Context; +use Symfony\Component\Serializer\Attribute\Groups; +use Symfony\Component\Serializer\Attribute\Ignore; +use Symfony\Component\Serializer\Attribute\MaxDepth; +use Symfony\Component\Serializer\Attribute\SerializedName; class DummyClassOne { diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/AbstractDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/AbstractDummy.php index fad842b0d4693..96069b0dbcdff 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/AbstractDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/AbstractDummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Annotations; -use Symfony\Component\Serializer\Annotation\DiscriminatorMap; +use Symfony\Component\Serializer\Attribute\DiscriminatorMap; /** * @DiscriminatorMap(typeProperty="type", mapping={ diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/BadMethodContextDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/BadMethodContextDummy.php index 77b3884de5cb1..758897b5371a9 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/BadMethodContextDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/BadMethodContextDummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Annotations; -use Symfony\Component\Serializer\Annotation\Context; +use Symfony\Component\Serializer\Attribute\Context; /** * @author Maxime Steinhausser diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/ContextDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/ContextDummy.php index 804df290f0295..07fce9ebb7462 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/ContextDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/ContextDummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Annotations; -use Symfony\Component\Serializer\Annotation\Context; +use Symfony\Component\Serializer\Attribute\Context; /** * @author Maxime Steinhausser diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/ContextDummyParent.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/ContextDummyParent.php index b7b286c372fa3..cdb81a7789aa9 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/ContextDummyParent.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/ContextDummyParent.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Annotations; -use Symfony\Component\Serializer\Annotation\Context; +use Symfony\Component\Serializer\Attribute\Context; /** * @author Maxime Steinhausser diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/ContextDummyPromotedProperties.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/ContextDummyPromotedProperties.php index 5aa108d1ec8b4..e4298528089b1 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/ContextDummyPromotedProperties.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/ContextDummyPromotedProperties.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Annotations; -use Symfony\Component\Serializer\Annotation\Context; +use Symfony\Component\Serializer\Attribute\Context; /** * @author Maxime Steinhausser diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/Entity45016.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/Entity45016.php index a896d9b766c59..686331e582639 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/Entity45016.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/Entity45016.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Annotations; -use Symfony\Component\Serializer\Annotation\Ignore; +use Symfony\Component\Serializer\Attribute\Ignore; class Entity45016 { diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/GroupClassDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/GroupClassDummy.php index e977326132259..bbdcfc8a7b850 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/GroupClassDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/GroupClassDummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Annotations; -use Symfony\Component\Serializer\Annotation\Groups; +use Symfony\Component\Serializer\Attribute\Groups; /** * @Groups({"a"}) diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/GroupDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/GroupDummy.php index 92935f49095ae..6081511fa1bf0 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/GroupDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/GroupDummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Annotations; -use Symfony\Component\Serializer\Annotation\Groups; +use Symfony\Component\Serializer\Attribute\Groups; use Symfony\Component\Serializer\Tests\Fixtures\ChildOfGroupsAnnotationDummy; use Symfony\Component\Serializer\Tests\Fixtures\Annotations\GroupDummyInterface; diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/GroupDummyInterface.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/GroupDummyInterface.php index c9a736bfa0b2e..4341b1385c081 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/GroupDummyInterface.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/GroupDummyInterface.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Annotations; -use Symfony\Component\Serializer\Annotation\Groups; +use Symfony\Component\Serializer\Attribute\Groups; /** * @author Kévin Dunglas diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/GroupDummyParent.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/GroupDummyParent.php index 77d539b9400c8..ad94c87f39960 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/GroupDummyParent.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/GroupDummyParent.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Annotations; -use Symfony\Component\Serializer\Annotation\Groups; +use Symfony\Component\Serializer\Attribute\Groups; /** * @author Kévin Dunglas diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/IgnoreDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/IgnoreDummy.php index 900447c581499..fe81d0f76e824 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/IgnoreDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/IgnoreDummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Annotations; -use Symfony\Component\Serializer\Annotation\Ignore; +use Symfony\Component\Serializer\Attribute\Ignore; /** * @author Kévin Dunglas diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/IgnoreDummyAdditionalGetter.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/IgnoreDummyAdditionalGetter.php index 326a9cd07589e..257803dfcbb71 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/IgnoreDummyAdditionalGetter.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/IgnoreDummyAdditionalGetter.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Annotations; -use Symfony\Component\Serializer\Annotation\Ignore; +use Symfony\Component\Serializer\Attribute\Ignore; class IgnoreDummyAdditionalGetter { diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/MaxDepthDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/MaxDepthDummy.php index 12be2db03b97f..4f3044036501b 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/MaxDepthDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/MaxDepthDummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Annotations; -use Symfony\Component\Serializer\Annotation\MaxDepth; +use Symfony\Component\Serializer\Attribute\MaxDepth; /** * @author Kévin Dunglas diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/SerializedNameDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/SerializedNameDummy.php index 1eaa579b466fa..b7c6055bc102d 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/SerializedNameDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/SerializedNameDummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Annotations; -use Symfony\Component\Serializer\Annotation\SerializedName; +use Symfony\Component\Serializer\Attribute\SerializedName; /** * @author Fabien Bourigault diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/SerializedPathDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/SerializedPathDummy.php index cd50b81c3372e..76ee6bfda7e23 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/SerializedPathDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/SerializedPathDummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Annotations; -use Symfony\Component\Serializer\Annotation\SerializedPath; +use Symfony\Component\Serializer\Attribute\SerializedPath; /** * @author Tobias Bönner diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/SerializedPathInConstructorDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/SerializedPathInConstructorDummy.php index a6d5109086899..ebbe2b46e547d 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/SerializedPathInConstructorDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Annotations/SerializedPathInConstructorDummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Annotations; -use Symfony\Component\Serializer\Annotation\SerializedPath; +use Symfony\Component\Serializer\Attribute\SerializedPath; class SerializedPathInConstructorDummy { diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/AbstractDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/AbstractDummy.php index 2e66f465b3cba..a8c15fccb74a6 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/AbstractDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/AbstractDummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Attributes; -use Symfony\Component\Serializer\Annotation\DiscriminatorMap; +use Symfony\Component\Serializer\Attribute\DiscriminatorMap; #[DiscriminatorMap(typeProperty: 'type', mapping: [ 'first' => AbstractDummyFirstChild::class, diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/BadAttributeDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/BadAttributeDummy.php index a6bd829152484..36c3b945bbd3d 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/BadAttributeDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/BadAttributeDummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Attributes; -use Symfony\Component\Serializer\Annotation\Groups; +use Symfony\Component\Serializer\Attribute\Groups; class BadAttributeDummy extends ContextDummyParent { diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/BadMethodContextDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/BadMethodContextDummy.php index 090911af2162c..7ae9441d86823 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/BadMethodContextDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/BadMethodContextDummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Attributes; -use Symfony\Component\Serializer\Annotation\Context; +use Symfony\Component\Serializer\Attribute\Context; /** * @author Maxime Steinhausser diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/ClassWithIgnoreAttribute.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/ClassWithIgnoreAttribute.php index 14d5e947264bf..fed0614b0d6f3 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/ClassWithIgnoreAttribute.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/ClassWithIgnoreAttribute.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Attributes; -use Symfony\Component\Serializer\Annotation\Ignore; +use Symfony\Component\Serializer\Attribute\Ignore; class ClassWithIgnoreAttribute { diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/ContextDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/ContextDummy.php index 464b9cab69e50..3d518950b2b1e 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/ContextDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/ContextDummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Attributes; -use Symfony\Component\Serializer\Annotation\Context; +use Symfony\Component\Serializer\Attribute\Context; /** * @author Maxime Steinhausser diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/ContextDummyParent.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/ContextDummyParent.php index 9480c953e78c7..1ac1928fb36c0 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/ContextDummyParent.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/ContextDummyParent.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Attributes; -use Symfony\Component\Serializer\Annotation\Context; +use Symfony\Component\Serializer\Attribute\Context; /** * @author Maxime Steinhausser diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/ContextDummyPromotedProperties.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/ContextDummyPromotedProperties.php index 5dbc7d58ec904..5d9fb5eff659c 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/ContextDummyPromotedProperties.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/ContextDummyPromotedProperties.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Attributes; -use Symfony\Component\Serializer\Annotation\Context; +use Symfony\Component\Serializer\Attribute\Context; /** * @author Maxime Steinhausser diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/Entity45016.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/Entity45016.php index 5a7ace0fd5563..e9d219a5f603a 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/Entity45016.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/Entity45016.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Attributes; -use Symfony\Component\Serializer\Annotation\Ignore; +use Symfony\Component\Serializer\Attribute\Ignore; class Entity45016 { diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/GroupClassDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/GroupClassDummy.php index 68289a9a854be..abd7d0b034b56 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/GroupClassDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/GroupClassDummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Attributes; -use Symfony\Component\Serializer\Annotation\Groups; +use Symfony\Component\Serializer\Attribute\Groups; #[Groups('a')] class GroupClassDummy diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/GroupDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/GroupDummy.php index c0a6c6d8eabe6..749e841a5c05d 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/GroupDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/GroupDummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Attributes; -use Symfony\Component\Serializer\Annotation\Groups; +use Symfony\Component\Serializer\Attribute\Groups; use Symfony\Component\Serializer\Tests\Fixtures\ChildOfGroupsAnnotationDummy; /** diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/GroupDummyInterface.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/GroupDummyInterface.php index 7920173ae2b65..3f9ed159ac831 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/GroupDummyInterface.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/GroupDummyInterface.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Attributes; -use Symfony\Component\Serializer\Annotation\Groups; +use Symfony\Component\Serializer\Attribute\Groups; /** * @author Kévin Dunglas diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/GroupDummyParent.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/GroupDummyParent.php index 39c73160ff45f..de758be64a430 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/GroupDummyParent.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/GroupDummyParent.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Attributes; -use Symfony\Component\Serializer\Annotation\Groups; +use Symfony\Component\Serializer\Attribute\Groups; /** * @author Kévin Dunglas diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/IgnoreDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/IgnoreDummy.php index 85d7a9ca412b6..6e12f7c00cb45 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/IgnoreDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/IgnoreDummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Attributes; -use Symfony\Component\Serializer\Annotation\Ignore; +use Symfony\Component\Serializer\Attribute\Ignore; /** * @author Kévin Dunglas diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/IgnoreDummyAdditionalGetter.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/IgnoreDummyAdditionalGetter.php index 274479e63b5b3..aa6439b48b377 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/IgnoreDummyAdditionalGetter.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/IgnoreDummyAdditionalGetter.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Attributes; -use Symfony\Component\Serializer\Annotation\Ignore; +use Symfony\Component\Serializer\Attribute\Ignore; class IgnoreDummyAdditionalGetter { diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/MaxDepthDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/MaxDepthDummy.php index 7a1dc42c2faec..8f45cbd78d12a 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/MaxDepthDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/MaxDepthDummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Attributes; -use Symfony\Component\Serializer\Annotation\MaxDepth; +use Symfony\Component\Serializer\Attribute\MaxDepth; /** * @author Kévin Dunglas diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/SerializedNameDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/SerializedNameDummy.php index fe0a67e83cf67..27679b00922cf 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/SerializedNameDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/SerializedNameDummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Attributes; -use Symfony\Component\Serializer\Annotation\SerializedName; +use Symfony\Component\Serializer\Attribute\SerializedName; /** * @author Fabien Bourigault diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/SerializedPathDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/SerializedPathDummy.php index fc5d9f64ab2d0..8b627b7926faa 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/SerializedPathDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/SerializedPathDummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Attributes; -use Symfony\Component\Serializer\Annotation\SerializedPath; +use Symfony\Component\Serializer\Attribute\SerializedPath; /** * @author Tobias Bönner diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/SerializedPathInConstructorDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/SerializedPathInConstructorDummy.php index 90aee115417d4..e463429c0759a 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/SerializedPathInConstructorDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/Attributes/SerializedPathInConstructorDummy.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures\Attributes; -use Symfony\Component\Serializer\Annotation\SerializedPath; +use Symfony\Component\Serializer\Attribute\SerializedPath; class SerializedPathInConstructorDummy { diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/ChildOfGroupsAnnotationDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/ChildOfGroupsAnnotationDummy.php index 653758dcad7ae..210256eedf215 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/ChildOfGroupsAnnotationDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/ChildOfGroupsAnnotationDummy.php @@ -2,7 +2,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures; -use Symfony\Component\Serializer\Annotation\Groups; +use Symfony\Component\Serializer\Attribute\Groups; /** * @Annotation diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/DummyMessageInterface.php b/src/Symfony/Component/Serializer/Tests/Fixtures/DummyMessageInterface.php index 3ffb85829de1f..31206ea67d289 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/DummyMessageInterface.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/DummyMessageInterface.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures; -use Symfony\Component\Serializer\Annotation\DiscriminatorMap; +use Symfony\Component\Serializer\Attribute\DiscriminatorMap; /** * @author Samuel Roze diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/DummyMessageNumberOne.php b/src/Symfony/Component/Serializer/Tests/Fixtures/DummyMessageNumberOne.php index 663961b3fd145..45e682fbc932b 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/DummyMessageNumberOne.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/DummyMessageNumberOne.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures; -use Symfony\Component\Serializer\Annotation\Groups; +use Symfony\Component\Serializer\Attribute\Groups; /** * @author Samuel Roze diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/DummyMessageNumberTwo.php b/src/Symfony/Component/Serializer/Tests/Fixtures/DummyMessageNumberTwo.php index 5a24e7c9ff08e..ec2be9a8124a4 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/DummyMessageNumberTwo.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/DummyMessageNumberTwo.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Fixtures; -use Symfony\Component\Serializer\Annotation\Groups; +use Symfony\Component\Serializer\Attribute\Groups; /** * @author Samuel Roze diff --git a/src/Symfony/Component/Serializer/Tests/Fixtures/OtherSerializedNameDummy.php b/src/Symfony/Component/Serializer/Tests/Fixtures/OtherSerializedNameDummy.php index 58c5628e69d6c..86fc6ead1fdb1 100644 --- a/src/Symfony/Component/Serializer/Tests/Fixtures/OtherSerializedNameDummy.php +++ b/src/Symfony/Component/Serializer/Tests/Fixtures/OtherSerializedNameDummy.php @@ -11,8 +11,8 @@ namespace Symfony\Component\Serializer\Tests\Fixtures; -use Symfony\Component\Serializer\Annotation\Groups; -use Symfony\Component\Serializer\Annotation\SerializedName; +use Symfony\Component\Serializer\Attribute\Groups; +use Symfony\Component\Serializer\Attribute\SerializedName; /** * @author Anthony GRASSIOT diff --git a/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AttributeLoaderWithAttributesTest.php b/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AttributeLoaderWithAttributesTest.php index c696b8c24ee80..6f14d2fc06ef1 100644 --- a/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AttributeLoaderWithAttributesTest.php +++ b/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AttributeLoaderWithAttributesTest.php @@ -30,7 +30,7 @@ protected function getNamespace(): string public function testLoadWithInvalidAttribute() { $this->expectException(MappingException::class); - $this->expectExceptionMessage('Could not instantiate attribute "Symfony\Component\Serializer\Annotation\Groups" on "Symfony\Component\Serializer\Tests\Fixtures\Attributes\BadAttributeDummy::myMethod()".'); + $this->expectExceptionMessage('Could not instantiate attribute "Symfony\Component\Serializer\Attribute\Groups" on "Symfony\Component\Serializer\Tests\Fixtures\Attributes\BadAttributeDummy::myMethod()".'); $classMetadata = new ClassMetadata($this->getNamespace().'\BadAttributeDummy'); diff --git a/src/Symfony/Component/Serializer/Tests/NameConverter/MetadataAwareNameConverterTest.php b/src/Symfony/Component/Serializer/Tests/NameConverter/MetadataAwareNameConverterTest.php index 7d6e71b0793e2..c6ccd2601c98e 100644 --- a/src/Symfony/Component/Serializer/Tests/NameConverter/MetadataAwareNameConverterTest.php +++ b/src/Symfony/Component/Serializer/Tests/NameConverter/MetadataAwareNameConverterTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Serializer\Tests\NameConverter; use PHPUnit\Framework\TestCase; -use Symfony\Component\Serializer\Annotation\SerializedName; -use Symfony\Component\Serializer\Annotation\SerializedPath; +use Symfony\Component\Serializer\Attribute\SerializedName; +use Symfony\Component\Serializer\Attribute\SerializedPath; use Symfony\Component\Serializer\Exception\LogicException; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php index 0c8af279b1ede..6da3e7392cfed 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php @@ -16,10 +16,10 @@ use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; use Symfony\Component\PropertyInfo\PropertyInfoExtractor; use Symfony\Component\PropertyInfo\Type; -use Symfony\Component\Serializer\Annotation\Context; -use Symfony\Component\Serializer\Annotation\DiscriminatorMap; -use Symfony\Component\Serializer\Annotation\SerializedName; -use Symfony\Component\Serializer\Annotation\SerializedPath; +use Symfony\Component\Serializer\Attribute\Context; +use Symfony\Component\Serializer\Attribute\DiscriminatorMap; +use Symfony\Component\Serializer\Attribute\SerializedName; +use Symfony\Component\Serializer\Attribute\SerializedPath; use Symfony\Component\Serializer\Exception\ExtraAttributesException; use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Exception\LogicException; diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/Features/ContextMetadataTestTrait.php b/src/Symfony/Component/Serializer/Tests/Normalizer/Features/ContextMetadataTestTrait.php index 3c9b18e95ae5c..10f5a003017b0 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/Features/ContextMetadataTestTrait.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/Features/ContextMetadataTestTrait.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Serializer\Tests\Normalizer\Features; use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor; -use Symfony\Component\Serializer\Annotation\Context; -use Symfony\Component\Serializer\Annotation\Groups; +use Symfony\Component\Serializer\Attribute\Context; +use Symfony\Component\Serializer\Attribute\Groups; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory; use Symfony\Component\Serializer\Mapping\Loader\AttributeLoader; use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter; diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/Features/DummyContextChild.php b/src/Symfony/Component/Serializer/Tests/Normalizer/Features/DummyContextChild.php index 25f85d61fec1d..8b5fe9ec3ff56 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/Features/DummyContextChild.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/Features/DummyContextChild.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Normalizer\Features; -use Symfony\Component\Serializer\Annotation\Context; +use Symfony\Component\Serializer\Attribute\Context; #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY | \Attribute::IS_REPEATABLE)] class DummyContextChild extends Context diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/Features/ObjectDummyWithContextAttribute.php b/src/Symfony/Component/Serializer/Tests/Normalizer/Features/ObjectDummyWithContextAttribute.php index b846f042fe620..0421a5c7bc243 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/Features/ObjectDummyWithContextAttribute.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/Features/ObjectDummyWithContextAttribute.php @@ -11,8 +11,8 @@ namespace Symfony\Component\Serializer\Tests\Normalizer\Features; -use Symfony\Component\Serializer\Annotation\Context; -use Symfony\Component\Serializer\Annotation\SerializedName; +use Symfony\Component\Serializer\Attribute\Context; +use Symfony\Component\Serializer\Attribute\SerializedName; use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer; final class ObjectDummyWithContextAttribute diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/Features/TypedPropertiesObject.php b/src/Symfony/Component/Serializer/Tests/Normalizer/Features/TypedPropertiesObject.php index e3acafdecd7ff..e830271cc0aa3 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/Features/TypedPropertiesObject.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/Features/TypedPropertiesObject.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Serializer\Tests\Normalizer\Features; -use Symfony\Component\Serializer\Annotation\Groups; +use Symfony\Component\Serializer\Attribute\Groups; class TypedPropertiesObject { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy