From: =?utf-8?q?David_Pr=C3=A9vot?= <david@tilapin.org>
Date: Fri, 19 Sep 2025 08:12:29 +0200
Subject: PHPunit 12 compatibility

../rector-poc/rector src/Symfony/
---
 .../ArgumentResolver/EntityValueResolverTest.php   |  60 ++--
 .../Tests/ContainerAwareEventManagerTest.php       |  20 +-
 .../DataCollector/DoctrineDataCollectorTest.php    |  12 +-
 .../DoctrineDataCollectorWithDebugStackTest.php    |  16 +-
 .../DataFixtures/ContainerAwareLoaderTest.php      |   4 +-
 ...egisterEventListenersAndSubscribersPassTest.php |  12 +-
 .../DependencyInjection/DoctrineExtensionTest.php  |  12 +-
 .../Form/ChoiceList/ORMQueryBuilderLoaderTest.php  |  12 +-
 .../Tests/Form/DoctrineOrmTypeGuesserTest.php      |   4 +-
 .../Tests/Form/Type/EntityTypePerformanceTest.php  |  14 +-
 .../Doctrine/Tests/Form/Type/EntityTypeTest.php    |   4 +-
 .../Doctrine/Tests/LegacyManagerRegistryTest.php   |   4 +-
 .../Doctrine/Tests/Logger/DbalLoggerTest.php       |   8 +-
 .../Tests/Middleware/Debug/MiddlewareTest.php      |  29 +-
 .../Tests/PropertyInfo/DoctrineExtractorTest.php   |   4 +-
 .../DoctrineTokenProviderPostgresTest.php          |   7 +-
 .../RememberMe/DoctrineTokenProviderTest.php       |   4 +-
 .../Bridge/Doctrine/Tests/Types/UlidTypeTest.php   |   4 +-
 .../Bridge/Doctrine/Tests/Types/UuidTypeTest.php   |   4 +-
 .../Constraints/UniqueEntityValidatorTest.php      |  43 +--
 .../Tests/Validator/DoctrineLoaderTest.php         |   4 +-
 .../Tests/Formatter/ConsoleFormatterTest.php       |   4 +-
 .../Monolog/Tests/Handler/ConsoleHandlerTest.php   |   4 +-
 .../HttpCodeActivationStrategyTest.php             |   4 +-
 .../NotFoundActivationStrategyTest.php             |   4 +-
 src/Symfony/Bridge/Monolog/Tests/LoggerTest.php    |   4 +-
 src/Symfony/Bridge/PhpUnit/Tests/ClockMockTest.php |   3 +-
 .../Bridge/PhpUnit/Tests/CoverageListenerTest.php  |   4 +-
 .../DeprecationErrorHandler/ConfigurationTest.php  |  12 +-
 .../DeprecationErrorHandler/DeprecationTest.php    |  14 +-
 .../Bridge/PhpUnit/Tests/EnumExistsMockTest.php    |   4 +-
 .../PhpUnit/Tests/ExpectDeprecationTraitTest.php   |  19 +-
 .../Tests/ExpectedDeprecationAnnotationTest.php    |   6 +-
 .../FailTests/ExpectDeprecationTraitTestFail.php   |   9 +-
 .../Tests/FailTests/NoAssertionsTestRisky.php      |   3 +-
 .../Tests/OnlyExpectingDeprecationSkippedTest.php  |   6 +-
 .../Bridge/PhpUnit/Tests/ProcessIsolationTest.php  |   9 +-
 .../Tests/LazyProxy/ContainerBuilderTest.php       |   3 +-
 .../Tests/LazyProxy/Dumper/PhpDumperTest.php       |   3 +-
 .../Instantiator/RuntimeInstantiatorTest.php       |   3 +-
 .../Tests/LazyProxy/PhpDumper/ProxyDumperTest.php  |  11 +-
 .../Tests/Factory/PsrHttpFactoryTest.php           |   8 +-
 .../PsrHttpMessage/Tests/Functional/CovertTest.php |   8 +-
 src/Symfony/Bridge/Twig/Tests/AppVariableTest.php  |  16 +-
 .../Bridge/Twig/Tests/Command/DebugCommandTest.php |   8 +-
 .../Bridge/Twig/Tests/Command/LintCommandTest.php  |  11 +-
 .../Extension/AbstractBootstrap3LayoutTestCase.php |   1 +
 .../Extension/AbstractBootstrap5LayoutTestCase.php |   4 +
 .../Tests/Extension/AbstractDivLayoutTestCase.php  |   8 +-
 .../Tests/Extension/AbstractLayoutTestCase.php     |   4 +-
 .../Twig/Tests/Extension/CodeExtensionTest.php     |   4 +-
 .../Twig/Tests/Extension/DumpExtensionTest.php     |   8 +-
 .../FormExtensionBootstrap5LayoutTest.php          |   2 +-
 .../Tests/Extension/FormExtensionDivLayoutTest.php |   8 +-
 .../Extension/HttpFoundationExtensionTest.php      |  16 +-
 .../Twig/Tests/Extension/RoutingExtensionTest.php  |   4 +-
 .../Tests/Extension/SerializerExtensionTest.php    |   4 +-
 .../Tests/Extension/StopwatchExtensionTest.php     |   4 +-
 .../Tests/Extension/TranslationExtensionTest.php   |   4 +-
 .../Bridge/Twig/Tests/Mime/BodyRendererTest.php    |   4 +-
 .../TranslationDefaultDomainNodeVisitorTest.php    |   4 +-
 .../NodeVisitor/TranslationNodeVisitorTest.php     |   2 +-
 .../Tests/TokenParser/FormThemeTokenParserTest.php |   4 +-
 .../Twig/Tests/Translation/TwigExtractorTest.php   |  12 +-
 .../DependencyInjection/DebugExtensionTest.php     |   4 +-
 .../CacheWarmer/AnnotationsCacheWarmerTest.php     |   4 +-
 .../CacheWarmer/SerializerCacheWarmerTest.php      |   4 +-
 .../Tests/Command/CachePoolClearCommandTest.php    |   4 +-
 .../Tests/Command/CachePoolDeleteCommandTest.php   |   4 +-
 .../Tests/Command/CachePruneCommandTest.php        |   2 +
 .../Command/EventDispatcherDebugCommandTest.php    |   4 +-
 .../Command/SecretsDecryptToLocalCommandTest.php   |   4 +-
 .../Command/SecretsEncryptFromLocalCommandTest.php |   4 +-
 .../Command/SecretsGenerateKeysCommandTest.php     |   4 +-
 .../Tests/Command/SecretsListCommandTest.php       |   4 +-
 .../Tests/Command/SecretsRemoveCommandTest.php     |   4 +-
 .../Tests/Command/SecretsSetCommandTest.php        |   4 +-
 .../Tests/Command/TranslationDebugCommandTest.php  |   4 +-
 .../TranslationUpdateCommandCompletionTest.php     |   4 +-
 .../Tests/Command/WorkflowDumpCommandTest.php      |   4 +-
 .../Descriptor/AbstractDescriptorTestCase.php      |  43 ++-
 .../Console/Descriptor/TextDescriptorTest.php      |   3 +-
 .../Tests/Controller/AbstractControllerTest.php    |  32 +-
 .../Tests/Controller/ControllerResolverTest.php    |  12 +-
 .../Tests/Controller/RedirectControllerTest.php    |  12 +-
 .../AddExpressionLanguageProvidersPassTest.php     |   4 +-
 .../Compiler/DataCollectorTranslatorPassTest.php   |  20 +-
 .../Compiler/LoggingTranslatorPassTest.php         |   4 +-
 .../Compiler/ProfilerPassTest.php                  |   4 +-
 .../Compiler/UnusedTagsPassTest.php                |   4 +-
 .../Compiler/WorkflowGuardListenerPassTest.php     |   4 +-
 .../DependencyInjection/ConfigurationTest.php      |  24 +-
 .../FrameworkExtensionTestCase.php                 |  28 +-
 .../PhpFrameworkExtensionTest.php                  |   4 +-
 .../XmlFrameworkExtensionTest.php                  |   2 +
 .../AbstractAttributeRoutingTestCase.php           |   4 +-
 .../Tests/Functional/ApiAttributesTest.php         |  14 +-
 .../Tests/Functional/AutowiringTypesTest.php       |   8 +-
 .../Tests/Functional/CachePoolClearCommandTest.php |   4 +-
 .../Tests/Functional/CachePoolListCommandTest.php  |   4 +-
 .../Tests/Functional/CachePoolsTest.php            |  16 +-
 .../Tests/Functional/ConfigDebugCommandTest.php    |  98 ++----
 .../Functional/ConfigDumpReferenceCommandTest.php  |  44 +--
 .../Tests/Functional/ContainerDebugCommandTest.php |  12 +-
 .../Tests/Functional/ContainerLintCommandTest.php  |   8 +-
 .../Functional/DebugAutowiringCommandTest.php      |   8 +-
 .../Tests/Functional/FragmentTest.php              |   4 +-
 .../Tests/Functional/NotificationTest.php          |   4 +-
 .../Tests/Functional/ProfilerTest.php              |   8 +-
 .../Tests/Functional/Psr4RoutingTest.php           |   4 +-
 .../Tests/Functional/RouterDebugCommandTest.php    |  18 +-
 .../Functional/RoutingConditionServiceTest.php     |   4 +-
 .../Tests/Functional/SecurityTest.php              |   4 +-
 .../Tests/Functional/SessionTest.php               |  13 +-
 .../Tests/Functional/SluggerLocaleAwareTest.php    |   8 +-
 .../Tests/Functional/TestServiceContainerTest.php  |   8 +-
 .../Functional/TranslationDebugCommandTest.php     |   4 +-
 .../FrameworkBundle/Tests/Routing/RouterTest.php   |  12 +-
 .../Tests/Secrets/SodiumVaultTest.php              |   4 +-
 .../Tests/Translation/TranslatorTest.php           |   2 +-
 .../DataCollector/SecurityDataCollectorTest.php    |  26 +-
 .../Tests/Debug/TraceableFirewallListenerTest.php  |   4 +-
 ...egisterGlobalSecurityEventListenersPassTest.php |   4 +-
 .../CompleteConfigurationTestCase.php              |   2 +
 .../Security/Factory/AbstractFactoryTest.php       |  13 +-
 .../Security/Factory/AccessTokenFactoryTest.php    |   4 +-
 .../DependencyInjection/SecurityExtensionTest.php  |  29 +-
 .../XmlCompleteConfigurationTest.php               |   1 +
 .../XmlCustomAuthenticatorTest.php                 |   5 +-
 .../DependencyInjection/XmlCustomProviderTest.php  |   5 +-
 .../Tests/Functional/AccessTokenTest.php           |  38 +--
 .../Tests/Functional/AuthenticatorTest.php         |  19 +-
 .../Tests/Functional/CsrfFormLoginTest.php         |  16 +-
 .../Tests/Functional/FormLoginTest.php             |  20 +-
 .../Tests/Functional/LocalizedRoutesAsPathTest.php |  19 +-
 .../Tests/Functional/RememberMeCookieTest.php      |   2 +-
 .../Tests/Functional/RememberMeTest.php            |   4 +-
 .../Functional/SecurityRoutingIntegrationTest.php  |  24 +-
 .../Tests/Functional/SecurityTest.php              |  10 +-
 .../Tests/Functional/SwitchUserTest.php            |   4 +-
 .../Tests/Security/FirewallContextTest.php         |  10 +-
 .../Tests/Security/FirewallMapTest.php             |   2 +-
 .../Bundle/SecurityBundle/Tests/SecurityTest.php   |   8 +-
 .../DependencyInjection/TwigExtensionTest.php      |  28 +-
 .../Tests/Controller/ProfilerControllerTest.php    |  20 +-
 .../Tests/Csp/ContentSecurityPolicyHandlerTest.php |   8 +-
 .../DependencyInjection/ConfigurationTest.php      |   8 +-
 .../WebProfilerExtensionTest.php                   |  12 +-
 .../EventListener/WebDebugToolbarListenerTest.php  |  43 +--
 .../WebProfilerBundle/Tests/Resources/IconTest.php |   4 +-
 .../Tests/Twig/WebProfilerExtensionTest.php        |   4 +-
 src/Symfony/Component/Asset/Tests/PackageTest.php  |   4 +-
 .../Component/Asset/Tests/PathPackageTest.php      |   8 +-
 .../Component/Asset/Tests/UrlPackageTest.php       |  12 +-
 .../JsonManifestVersionStrategyTest.php            |  24 +-
 .../VersionStrategy/StaticVersionStrategyTest.php  |   4 +-
 .../Tests/Compiler/CssAssetUrlCompilerTest.php     |   8 +-
 .../Compiler/JavaScriptImportPathCompilerTest.php  |  12 +-
 .../Compiler/SourceMappingUrlsCompilerTest.php     |   4 +-
 .../Tests/ImportMap/ImportMapAuditorTest.php       |   4 +-
 .../Tests/ImportMap/ImportMapConfigReaderTest.php  |   8 +-
 .../Tests/ImportMap/ImportMapEntryTest.php         |   4 +-
 .../Tests/ImportMap/ImportMapGeneratorTest.php     |   8 +-
 .../Tests/ImportMap/ImportMapManagerTest.php       |   8 +-
 .../Tests/ImportMap/ImportMapUpdateCheckerTest.php |   2 +-
 .../ImportMap/ImportMapVersionCheckerTest.php      |   8 +-
 .../Tests/ImportMap/PackageUpdateInfoTest.php      |   8 +-
 .../Tests/ImportMap/RemotePackageStorageTest.php   |   8 +-
 .../ImportMap/Resolver/JsDelivrEsmResolverTest.php |  12 +-
 .../AssetMapper/Tests/MappedAssetTest.php          |   4 +-
 .../Tests/MapperAwareAssetPackageTest.php          |   4 +-
 .../BrowserKit/Tests/AbstractBrowserTest.php       |   8 +-
 .../Component/BrowserKit/Tests/CookieJarTest.php   |   4 +-
 .../Component/BrowserKit/Tests/CookieTest.php      |   8 +-
 .../Component/BrowserKit/Tests/HttpBrowserTest.php |   8 +-
 .../Component/BrowserKit/Tests/ResponseTest.php    |   4 +-
 .../Test/Constraint/BrowserCookieValueSameTest.php |   4 +-
 .../Tests/Test/Constraint/BrowserHasCookieTest.php |  12 +-
 .../Tests/Adapter/AbstractRedisAdapterTestCase.php |   4 +-
 .../Cache/Tests/Adapter/NullAdapterTest.php        |   4 +-
 .../TagAwareAndProxyAdapterIntegrationTest.php     |   4 +-
 .../Component/Cache/Tests/CacheItemTest.php        |   8 +-
 .../Tests/Marshaller/DefaultMarshallerTest.php     |  12 +-
 .../Tests/Marshaller/DeflateMarshallerTest.php     |   4 +-
 .../Tests/Marshaller/SodiumMarshallerTest.php      |   4 +-
 .../Tests/Messenger/EarlyExpirationHandlerTest.php |   4 +-
 .../Cache/Tests/Traits/RedisProxiesTest.php        |  15 +-
 .../Cache/Tests/Traits/RedisTraitTest.php          |  21 +-
 .../Component/Clock/Test/ClockSensitiveTrait.php   |   7 +-
 .../Component/Clock/Tests/DatePointTest.php        |  10 +-
 .../Component/Clock/Tests/MockClockTest.php        |   8 +-
 .../Component/Clock/Tests/MonotonicClockTest.php   |   4 +-
 .../Config/Tests/Builder/GeneratedConfigTest.php   |  13 +-
 .../Component/Config/Tests/ConfigCacheTest.php     |   8 +-
 .../Config/Tests/Definition/ArrayNodeTest.php      |  28 +-
 .../Config/Tests/Definition/BaseNodeTest.php       |   4 +-
 .../Config/Tests/Definition/BooleanNodeTest.php    |  12 +-
 .../Definition/Builder/ArrayNodeDefinitionTest.php |  13 +-
 .../Tests/Definition/Builder/ExprBuilderTest.php   |   4 +-
 .../Definition/Dumper/YamlReferenceDumperTest.php  |   4 +-
 .../Config/Tests/Definition/FloatNodeTest.php      |  12 +-
 .../Config/Tests/Definition/IntegerNodeTest.php    |  12 +-
 .../Config/Tests/Definition/NormalizationTest.php  |  12 +-
 .../Tests/Definition/PrototypedArrayNodeTest.php   |   7 +-
 .../Config/Tests/Definition/ScalarNodeTest.php     |  14 +-
 .../Component/Config/Tests/FileLocatorTest.php     |   4 +-
 .../Config/Tests/Loader/FileLoaderTest.php         |   4 +-
 .../Config/Tests/Resource/ComposerResourceTest.php |   4 +-
 .../Tests/Resource/ReflectionClassResourceTest.php |   8 +-
 .../Component/Config/Tests/Util/XmlUtilsTest.php   |   8 +-
 .../Component/Console/Tests/ApplicationTest.php    |  71 ++--
 .../Console/Tests/CI/GithubActionReporterTest.php  |   4 +-
 .../Console/Tests/Command/CommandTest.php          |  20 +-
 .../Console/Tests/Command/CompleteCommandTest.php  |  12 +-
 .../Tests/Command/DumpCompletionCommandTest.php    |   4 +-
 .../Console/Tests/Command/HelpCommandTest.php      |   4 +-
 .../Console/Tests/Command/ListCommandTest.php      |   4 +-
 .../Tests/Completion/CompletionInputTest.php       |  12 +-
 .../AddConsoleCommandPassTest.php                  |   4 +-
 .../Descriptor/AbstractDescriptorTestCase.php      |  10 +-
 .../Descriptor/ApplicationDescriptionTest.php      |   4 +-
 .../Tests/Formatter/OutputFormatterTest.php        |  12 +-
 .../Tests/Helper/DumperNativeFallbackTest.php      |   4 +-
 .../Component/Console/Tests/Helper/DumperTest.php  |   4 +-
 .../Component/Console/Tests/Helper/HelperTest.php  |   8 +-
 .../Console/Tests/Helper/OutputWrapperTest.php     |   4 +-
 .../Console/Tests/Helper/ProcessHelperTest.php     |   4 +-
 .../Console/Tests/Helper/ProgressBarTest.php       |   8 +-
 .../Console/Tests/Helper/ProgressIndicatorTest.php |   8 +-
 .../Console/Tests/Helper/QuestionHelperTest.php    |  24 +-
 .../Tests/Helper/SymfonyQuestionHelperTest.php     |   4 +-
 .../Component/Console/Tests/Helper/TableTest.php   |  24 +-
 .../Console/Tests/Input/ArgvInputTest.php          |  20 +-
 .../Console/Tests/Input/ArrayInputTest.php         |   8 +-
 .../Console/Tests/Input/InputDefinitionTest.php    |   4 +-
 .../Console/Tests/Input/StringInputTest.php        |   4 +-
 .../Console/Tests/Logger/ConsoleLoggerTest.php     |   8 +-
 .../Console/Tests/Output/AnsiColorModeTest.php     |   8 +-
 .../Component/Console/Tests/Output/OutputTest.php  |   8 +-
 .../Console/Tests/Question/ChoiceQuestionTest.php  |   8 +-
 .../Tests/Question/ConfirmationQuestionTest.php    |   4 +-
 .../Console/Tests/Question/QuestionTest.php        |  32 +-
 .../Console/Tests/SignalRegistry/SignalMapTest.php |   4 +-
 .../Tests/SignalRegistry/SignalRegistryTest.php    |   4 +-
 .../Console/Tests/Style/SymfonyStyleTest.php       |   8 +-
 .../Component/Console/Tests/TerminalTest.php       |   4 +-
 .../Tester/Constraint/CommandIsSuccessfulTest.php  |   4 +-
 .../CssSelector/Tests/CssSelectorConverterTest.php |   2 +-
 .../Tests/Node/AbstractNodeTestCase.php            |   4 +-
 .../CssSelector/Tests/Node/SpecificityTest.php     |   6 +-
 .../Parser/Handler/AbstractHandlerTestCase.php     |   4 +-
 .../Tests/Parser/Handler/CommentHandlerTest.php    |   2 +-
 .../CssSelector/Tests/Parser/ParserTest.php        |  12 +-
 .../Tests/Parser/Shortcut/ClassParserTest.php      |   2 +-
 .../Tests/Parser/Shortcut/ElementParserTest.php    |   2 +-
 .../Tests/Parser/Shortcut/HashParserTest.php       |   2 +-
 .../CssSelector/Tests/XPath/TranslatorTest.php     |  10 +-
 .../DependencyInjection/Tests/AliasTest.php        |   4 +-
 .../Tests/Argument/TaggedIteratorArgumentTest.php  |   8 +-
 .../Tests/Attribute/AutowireTest.php               |   4 +-
 .../Tests/ChildDefinitionTest.php                  |   4 +-
 .../AliasDeprecatedPublicServicesPassTest.php      |   4 +-
 .../Tests/Compiler/AutowirePassTest.php            |  28 +-
 .../Compiler/AutowireRequiredMethodsPassTest.php   |  16 +-
 .../AutowireRequiredPropertiesPassTest.php         |   4 +-
 .../Compiler/CheckArgumentsValidityPassTest.php    |   4 +-
 .../Compiler/CheckCircularReferencesPassTest.php   |   3 +
 .../Compiler/CheckDefinitionValidityPassTest.php   |   8 +-
 ...ExceptionOnInvalidReferenceBehaviorPassTest.php |  14 +-
 .../Compiler/CheckReferenceValidityPassTest.php    |   1 +
 .../Compiler/CheckTypeDeclarationsPassTest.php     |  34 +-
 .../Tests/Compiler/IntegrationTest.php             |   4 +-
 .../MergeExtensionConfigurationPassTest.php        |   1 +
 .../Compiler/PriorityTaggedServiceTraitTest.php    |   4 +-
 .../RegisterAutoconfigureAttributesPassTest.php    |   1 +
 .../Tests/Compiler/ResolveBindingsPassTest.php     |   4 +-
 .../Tests/Compiler/ResolveClassPassTest.php        |   8 +-
 .../Tests/Compiler/ResolveFactoryClassPassTest.php |   4 +-
 .../ResolveReferencesToAliasesPassTest.php         |  12 +-
 .../Compiler/ValidateEnvPlaceholdersPassTest.php   |   1 +
 .../ContainerParametersResourceCheckerTest.php     |   4 +-
 .../Tests/ContainerAwareTraitTest.php              |   4 +-
 .../Tests/ContainerBuilderTest.php                 |  31 +-
 .../DependencyInjection/Tests/ContainerTest.php    |   8 +-
 .../DependencyInjection/Tests/CrossCheckTest.php   |   4 +-
 .../DependencyInjection/Tests/DefinitionTest.php   |   4 +-
 .../Tests/Dumper/PhpDumperTest.php                 |  34 +-
 .../Tests/Dumper/XmlDumperTest.php                 |  13 +-
 .../Tests/Dumper/YamlDumperTest.php                |   4 +-
 .../Tests/EnvVarProcessorTest.php                  | 102 ++----
 .../InvalidParameterTypeExceptionTest.php          |   4 +-
 .../Tests/Extension/ExtensionTest.php              |   4 +-
 .../LazyProxy/PhpDumper/LazyServiceDumperTest.php  |   4 +-
 .../Loader/Configurator/EnvConfiguratorTest.php    |   4 +-
 .../Tests/Loader/FileLoaderTest.php                |  28 +-
 .../Tests/Loader/IniFileLoaderTest.php             |  16 +-
 .../Tests/Loader/LoaderResolverTest.php            |   4 +-
 .../Tests/Loader/PhpFileLoaderTest.php             |   8 +-
 .../Tests/Loader/XmlFileLoaderTest.php             |  18 +-
 .../Tests/Loader/YamlFileLoaderTest.php            |  12 +-
 .../Tests/ParameterBag/FrozenParameterBagTest.php  |   4 +-
 .../Tests/ParameterBag/ParameterBagTest.php        |  26 +-
 .../DomCrawler/Tests/AbstractCrawlerTestCase.php   |  26 +-
 .../DomCrawler/Tests/Field/FileFormFieldTest.php   |   4 +-
 .../Component/DomCrawler/Tests/FormTest.php        |  14 +-
 .../DomCrawler/Tests/Html5ParserCrawlerTest.php    |  10 +-
 .../Component/DomCrawler/Tests/ImageTest.php       |   4 +-
 .../Component/DomCrawler/Tests/LinkTest.php        |  12 +-
 .../CrawlerAnySelectorTextContainsTest.php         |   4 +-
 .../Constraint/CrawlerAnySelectorTextSameTest.php  |   4 +-
 .../CrawlerSelectorAttributeValueSameTest.php      |   4 +-
 .../Test/Constraint/CrawlerSelectorExistsTest.php  |   4 +-
 .../Constraint/CrawlerSelectorTextContainsTest.php |   4 +-
 .../Constraint/CrawlerSelectorTextSameTest.php     |   4 +-
 .../Component/DomCrawler/Tests/UriResolverTest.php |   4 +-
 .../Dotenv/Tests/Command/DebugCommandTest.php      |  12 +-
 src/Symfony/Component/Dotenv/Tests/DotenvTest.php  |   8 +-
 .../ErrorHandler/Tests/DebugClassLoaderTest.php    |  32 +-
 .../ClassNotFoundErrorEnhancerTest.php             |   4 +-
 .../UndefinedFunctionErrorEnhancerTest.php         |   4 +-
 .../UndefinedMethodErrorEnhancerTest.php           |   4 +-
 .../ErrorHandler/Tests/ErrorHandlerTest.php        |   8 +-
 .../Tests/ErrorRenderer/FileLinkFormatterTest.php  |   4 +-
 .../Tests/ErrorRenderer/HtmlErrorRendererTest.php  |   8 +-
 .../Tests/Exception/FlattenExceptionTest.php       |  24 +-
 .../Tests/Debug/WrappedListenerTest.php            |   4 +-
 .../Tests/ExpressionLanguageTest.php               |  44 +--
 .../ExpressionLanguage/Tests/LexerTest.php         |   4 +-
 .../Tests/Node/AbstractNodeTestCase.php            |  12 +-
 .../Tests/Node/BinaryNodeTest.php                  |   4 +-
 .../ExpressionLanguage/Tests/ParserTest.php        |  12 +-
 .../Component/Filesystem/Tests/FilesystemTest.php  |  16 +-
 .../Component/Filesystem/Tests/PathTest.php        |  66 +---
 .../Finder/Tests/Comparator/ComparatorTest.php     |   8 +-
 .../Finder/Tests/Comparator/DateComparatorTest.php |   4 +-
 .../Tests/Comparator/NumberComparatorTest.php      |   8 +-
 .../Finder/Tests/FinderOpenBasedirTest.php         |   4 +-
 src/Symfony/Component/Finder/Tests/FinderTest.php  |  12 +-
 .../Component/Finder/Tests/GitignoreTest.php       |  10 +-
 .../Tests/Iterator/CustomFilterIteratorTest.php    |   4 +-
 .../Tests/Iterator/DateRangeFilterIteratorTest.php |   4 +-
 .../Iterator/DepthRangeFilterIteratorTest.php      |   4 +-
 .../ExcludeDirectoryFilterIteratorTest.php         |   4 +-
 .../Tests/Iterator/FileTypeFilterIteratorTest.php  |   4 +-
 .../Iterator/FilecontentFilterIteratorTest.php     |   4 +-
 .../Tests/Iterator/FilenameFilterIteratorTest.php  |   4 +-
 .../Iterator/MultiplePcreFilterIteratorTest.php    |   4 +-
 .../Tests/Iterator/PathFilterIteratorTest.php      |   4 +-
 .../Iterator/RecursiveDirectoryIteratorTest.php    |  12 +-
 .../Tests/Iterator/SizeRangeFilterIteratorTest.php |   4 +-
 .../Finder/Tests/Iterator/SortableIteratorTest.php |   4 +-
 .../Iterator/VcsIgnoredFilterIteratorTest.php      |   3 +-
 .../Form/Tests/AbstractRequestHandlerTestCase.php  |  56 +---
 .../Component/Form/Tests/ButtonBuilderTest.php     |   8 +-
 src/Symfony/Component/Form/Tests/ButtonTest.php    |   4 +-
 .../Factory/CachingFactoryDecoratorTest.php        |   8 +-
 .../Form/Tests/Command/DebugCommandTest.php        |   4 +-
 .../Form/Tests/CompoundFormPerformanceTest.php     |   4 +-
 .../Component/Form/Tests/CompoundFormTest.php      |  16 +-
 .../Descriptor/AbstractDescriptorTestCase.php      |   6 +-
 .../Tests/DependencyInjection/FormPassTest.php     |   9 +-
 .../Extension/Core/DataMapper/DataMapperTest.php   |   4 +-
 .../ChoiceToValueTransformerTest.php               |  12 +-
 .../DateIntervalToStringTransformerTest.php        |  12 +-
 .../DateTimeImmutableToDateTimeTransformerTest.php |   8 +-
 ...DateTimeToHtml5LocalDateTimeTransformerTest.php |  12 +-
 .../DateTimeToLocalizedStringTransformerTest.php   |  25 +-
 .../DateTimeToRfc3339TransformerTest.php           |  16 +-
 .../DateTimeToStringTransformerTest.php            |   8 +-
 .../IntegerToLocalizedStringTransformerTest.php    |  12 +-
 .../IntlTimeZoneToStringTransformerTest.php        |   4 +-
 .../NumberToLocalizedStringTransformerTest.php     |  47 +--
 .../PercentToLocalizedStringTransformerTest.php    |  28 +-
 .../StringToFloatTransformerTest.php               |   8 +-
 .../UlidToStringTransformerTest.php                |   8 +-
 .../DataTransformer/WeekToArrayTransformerTest.php |   8 +-
 .../EventListener/FixUrlProtocolListenerTest.php   |   8 +-
 .../MergeCollectionListenerTestCase.php            |  32 +-
 .../Tests/Extension/Core/Type/CheckboxTypeTest.php |   9 +-
 .../Core/Type/ChoiceTypePerformanceTest.php        |   4 +-
 .../Tests/Extension/Core/Type/ChoiceTypeTest.php   |  24 +-
 .../Extension/Core/Type/CollectionTypeTest.php     |   2 +
 .../Tests/Extension/Core/Type/ColorTypeTest.php    |   9 +-
 .../Tests/Extension/Core/Type/CountryTypeTest.php  |  10 +-
 .../Tests/Extension/Core/Type/CurrencyTypeTest.php |   6 +-
 .../Extension/Core/Type/DateIntervalTypeTest.php   |   5 +-
 .../Tests/Extension/Core/Type/DateTimeTypeTest.php |  15 +-
 .../Tests/Extension/Core/Type/DateTypeTest.php     |  31 +-
 .../Tests/Extension/Core/Type/EnumTypeTest.php     |  16 +-
 .../Extension/Core/Type/ExtendedChoiceTypeTest.php |   8 +-
 .../Tests/Extension/Core/Type/FileTypeTest.php     |  45 +--
 .../Tests/Extension/Core/Type/FormTypeTest.php     |   2 +
 .../Tests/Extension/Core/Type/IntegerTypeTest.php  |   9 +-
 .../Tests/Extension/Core/Type/LanguageTypeTest.php |  18 +-
 .../Tests/Extension/Core/Type/LocaleTypeTest.php   |   6 +-
 .../Tests/Extension/Core/Type/MoneyTypeTest.php    |   1 +
 .../Tests/Extension/Core/Type/NumberTypeTest.php   |   1 +
 .../Tests/Extension/Core/Type/PasswordTypeTest.php |   1 +
 .../Tests/Extension/Core/Type/RepeatedTypeTest.php |   9 +-
 .../Tests/Extension/Core/Type/TextTypeTest.php     |   4 +-
 .../Tests/Extension/Core/Type/TimeTypeTest.php     |  27 +-
 .../Tests/Extension/Core/Type/TimezoneTypeTest.php |  17 +-
 .../Tests/Extension/Core/Type/WeekTypeTest.php     |   4 +-
 .../Csrf/Type/FormTypeCsrfExtensionTest.php        |  12 +-
 .../PasswordTypePasswordHasherExtensionTest.php    |   4 +-
 .../Constraints/FormValidatorPerformanceTest.php   |   4 +-
 .../Validator/ValidatorTypeGuesserTest.php         |  12 +-
 .../ViolationMapper/ViolationMapperTest.php        |  16 +-
 .../ViolationMapper/ViolationPathTest.php          |   8 +-
 .../Component/Form/Tests/FormConfigTest.php        |   4 +-
 .../Component/Form/Tests/FormErrorIteratorTest.php |   4 +-
 .../Component/Form/Tests/ResolvedFormTypeTest.php  |   4 +-
 .../Form/Tests/Resources/TranslationFilesTest.php  |   8 +-
 .../Component/Form/Tests/SimpleFormTest.php        |   8 +-
 .../Component/Form/Tests/Util/ServerParamsTest.php |   2 +-
 .../Component/Form/Tests/Util/StringUtilTest.php   |  12 +-
 .../HtmlSanitizer/Tests/HtmlSanitizerAllTest.php   |   8 +-
 .../Tests/Reference/W3CReferenceTest.php           |   8 +-
 .../Tests/TextSanitizer/StringSanitizerTest.php    |   8 +-
 .../Tests/TextSanitizer/UrlSanitizerTest.php       |   8 +-
 .../HttpClient/Tests/AmpHttpClientTest.php         |  10 +-
 .../HttpClient/Tests/AsyncDecoratorTraitTest.php   |   1 +
 .../HttpClient/Tests/CurlHttpClientTest.php        |  12 +-
 .../DataCollector/HttpClientDataCollectorTest.php  |   4 +-
 .../HttpClient/Tests/EventSourceHttpClientTest.php |  14 +-
 .../Tests/Exception/HttpExceptionTraitTest.php     |   4 +-
 .../HttpClient/Tests/HttpClientTestCase.php        |  14 +-
 .../HttpClient/Tests/HttpClientTraitTest.php       |  24 +-
 .../Component/HttpClient/Tests/HttpOptionsTest.php |   4 +-
 .../HttpClient/Tests/HttplugClientTest.php         |   8 +-
 .../HttpClient/Tests/MockHttpClientTest.php        |  19 +-
 .../HttpClient/Tests/NativeHttpClientTest.php      |   9 +-
 .../Tests/NoPrivateNetworkHttpClientTest.php       |  18 +-
 .../Component/HttpClient/Tests/Psr18ClientTest.php |   4 +-
 .../Tests/Response/JsonMockResponseTest.php        |   4 +-
 .../HttpClient/Tests/Response/MockResponseTest.php |   4 +-
 .../Tests/Retry/GenericRetryStrategyTest.php       |  16 +-
 .../HttpClient/Tests/ScopingHttpClientTest.php     |   4 +-
 .../HttpFoundation/Tests/AcceptHeaderItemTest.php  |   8 +-
 .../HttpFoundation/Tests/AcceptHeaderTest.php      |  20 +-
 .../Tests/BinaryFileResponseTest.php               |  24 +-
 .../Component/HttpFoundation/Tests/CookieTest.php  |  15 +-
 .../Tests/ExpressionRequestMatcherTest.php         |  12 +-
 .../HttpFoundation/Tests/File/FileTest.php         |   8 +-
 .../HttpFoundation/Tests/File/UploadedFileTest.php |   8 +-
 .../HttpFoundation/Tests/HeaderUtilsTest.php       |  16 +-
 .../HttpFoundation/Tests/InputBagTest.php          |   8 +-
 .../Component/HttpFoundation/Tests/IpUtilsTest.php |  28 +-
 .../HttpFoundation/Tests/ParameterBagTest.php      |  12 +-
 .../RateLimiter/AbstractRequestRateLimiterTest.php |   4 +-
 .../AttributesRequestMatcherTest.php               |   4 +-
 .../ExpressionRequestMatcherTest.php               |   4 +-
 .../RequestMatcher/HostRequestMatcherTest.php      |   4 +-
 .../Tests/RequestMatcher/IpsRequestMatcherTest.php |   4 +-
 .../RequestMatcher/IsJsonRequestMatcherTest.php    |   4 +-
 .../RequestMatcher/MethodRequestMatcherTest.php    |   4 +-
 .../RequestMatcher/PathRequestMatcherTest.php      |   4 +-
 .../RequestMatcher/PortRequestMatcherTest.php      |   4 +-
 .../RequestMatcher/SchemeRequestMatcherTest.php    |   4 +-
 .../HttpFoundation/Tests/RequestMatcherTest.php    |  12 +-
 .../Component/HttpFoundation/Tests/RequestTest.php | 139 +++-----
 .../Tests/ResponseFunctionalTest.php               |   8 +-
 .../HttpFoundation/Tests/ResponseHeaderBagTest.php |   4 +-
 .../HttpFoundation/Tests/ResponseTest.php          |  17 +-
 .../Tests/Session/Attribute/AttributeBagTest.php   |  12 +-
 .../HttpFoundation/Tests/Session/SessionTest.php   |  20 +-
 .../AbstractRedisSessionHandlerTestCase.php        |  15 +-
 .../Storage/Handler/AbstractSessionHandlerTest.php |   4 +-
 .../Storage/Handler/IdentityMarshallerTest.php     |   4 +-
 .../Handler/MemcachedSessionHandlerTest.php        |  11 +-
 .../Storage/Handler/MongoDbSessionHandlerTest.php  |   8 +-
 .../Handler/NativeFileSessionHandlerTest.php       |   8 +-
 .../Storage/Handler/NullSessionHandlerTest.php     |   4 +-
 .../Storage/Handler/PdoSessionHandlerTest.php      |  15 +-
 .../Handler/PredisClusterSessionHandlerTest.php    |   4 +-
 .../Storage/Handler/PredisSessionHandlerTest.php   |   4 +-
 .../Handler/RedisArraySessionHandlerTest.php       |   4 +-
 .../Handler/RedisClusterSessionHandlerTest.php     |   4 +-
 .../Storage/Handler/RedisSessionHandlerTest.php    |   4 +-
 .../Storage/Handler/RelaySessionHandlerTest.php    |   7 +-
 .../Storage/Handler/SessionHandlerFactoryTest.php  |  16 +-
 .../Tests/Session/Storage/MetadataBagTest.php      |   4 +-
 .../Session/Storage/NativeSessionStorageTest.php   |   7 +-
 .../Storage/PhpBridgeSessionStorageTest.php        |   4 +-
 .../Session/Storage/Proxy/AbstractProxyTest.php    |  35 +-
 .../Storage/Proxy/SessionHandlerProxyTest.php      |   8 +-
 .../Constraint/RequestAttributeValueSameTest.php   |   4 +-
 .../Constraint/ResponseCookieValueSameTest.php     |   4 +-
 .../Test/Constraint/ResponseFormatSameTest.php     |   8 +-
 .../Test/Constraint/ResponseHasCookieTest.php      |   4 +-
 .../Test/Constraint/ResponseHasHeaderTest.php      |   4 +-
 .../Constraint/ResponseHeaderLocationSameTest.php  |   8 +-
 .../Test/Constraint/ResponseHeaderSameTest.php     |   4 +-
 .../Test/Constraint/ResponseIsRedirectedTest.php   |   4 +-
 .../Test/Constraint/ResponseIsSuccessfulTest.php   |   4 +-
 .../Test/Constraint/ResponseStatusCodeSameTest.php |   4 +-
 .../HttpFoundation/Tests/UrlHelperTest.php         |  20 +-
 .../BackedEnumValueResolverTest.php                |   8 +-
 .../ArgumentResolver/DateTimeValueResolverTest.php |  33 +-
 .../NotTaggedControllerValueResolverTest.php       |  13 +-
 .../QueryParameterValueResolverTest.php            |   4 +-
 .../RequestPayloadValueResolverTest.php            |  22 +-
 .../ArgumentResolver/ServiceValueResolverTest.php  |   3 +-
 .../TraceableValueResolverTest.php                 |   4 +-
 .../ArgumentResolver/UidValueResolverTest.php      |  12 +-
 .../Tests/Controller/ArgumentResolverTest.php      |   4 +-
 .../Controller/ContainerControllerResolverTest.php |   4 +-
 .../Tests/Controller/ControllerResolverTest.php    |   8 +-
 .../Tests/Controller/ErrorControllerTest.php       |   4 +-
 .../DataCollector/LoggerDataCollectorTest.php      |   4 +-
 .../DataCollector/MemoryDataCollectorTest.php      |   2 +-
 .../DataCollector/RequestDataCollectorTest.php     |  12 +-
 .../Tests/DataCollector/TimeDataCollectorTest.php  |   4 +-
 .../Tests/Debug/ErrorHandlerConfiguratorTest.php   |   4 +-
 .../RegisterControllerArgumentLocatorsPassTest.php |   8 +-
 .../HttpKernel/Tests/Event/ControllerEventTest.php |  12 +-
 .../EventListener/CacheAttributeListenerTest.php   |  26 +-
 .../DisallowRobotsIndexingListenerTest.php         |   4 +-
 .../Tests/EventListener/ErrorListenerTest.php      |  19 +-
 .../Tests/EventListener/ProfilerListenerTest.php   |   4 +-
 .../Tests/EventListener/RouterListenerTest.php     |   8 +-
 .../Tests/EventListener/SessionListenerTest.php    |  47 +--
 .../Tests/Exception/HttpExceptionTest.php          |   8 +-
 .../MethodNotAllowedHttpExceptionTest.php          |   4 +-
 .../ServiceUnavailableHttpExceptionTest.php        |   4 +-
 .../Exception/TooManyRequestsHttpExceptionTest.php |   4 +-
 .../Exception/UnauthorizedHttpExceptionTest.php    |   4 +-
 .../Tests/Fragment/InlineFragmentRendererTest.php  |  10 +-
 .../Fragment/RoutableFragmentRendererTest.php      |  12 +-
 .../HttpKernel/Tests/HttpCache/HttpCacheTest.php   |  28 +-
 .../Tests/HttpCache/ResponseCacheStrategyTest.php  |   7 +-
 .../HttpKernel/Tests/HttpKernelBrowserTest.php     |   8 +-
 .../Component/HttpKernel/Tests/HttpKernelTest.php  |   4 +-
 .../Component/HttpKernel/Tests/KernelTest.php      |  28 +-
 .../Component/HttpKernel/Tests/Log/LoggerTest.php  |   4 +-
 .../Tests/Profiler/FileProfilerStorageTest.php     |   4 +-
 .../Component/HttpKernel/Tests/UriSignerTest.php   |   4 +-
 src/Symfony/Component/Intl/Tests/CountriesTest.php |  28 +-
 .../Component/Intl/Tests/CurrenciesTest.php        |  45 +--
 .../Data/Bundle/Reader/BundleEntryReaderTest.php   |  28 +-
 .../Data/Bundle/Reader/IntlBundleReaderTest.php    |   3 +-
 .../Data/Bundle/Writer/JsonBundleWriterTest.php    |   4 +-
 .../Data/Bundle/Writer/PhpBundleWriterTest.php     |   4 +-
 src/Symfony/Component/Intl/Tests/IntlTest.php      |   4 +-
 src/Symfony/Component/Intl/Tests/LanguagesTest.php |  40 +--
 src/Symfony/Component/Intl/Tests/LocaleTest.php    |   8 +-
 src/Symfony/Component/Intl/Tests/LocalesTest.php   |  16 +-
 src/Symfony/Component/Intl/Tests/ScriptsTest.php   |  16 +-
 src/Symfony/Component/Intl/Tests/TimezonesTest.php |  31 +-
 .../Transliterator/EmojiTransliteratorTest.php     |  12 +-
 .../Intl/Tests/Util/GitRepositoryTest.php          |  11 +-
 .../Component/Intl/Tests/Util/IcuVersionTest.php   |   8 +-
 .../Component/Intl/Tests/Util/VersionTest.php      |   8 +-
 .../Ldap/Tests/Adapter/ExtLdap/AdapterTest.php     |  27 +-
 .../Tests/Adapter/ExtLdap/EntryManagerTest.php     |   3 +-
 .../Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php |  47 +--
 src/Symfony/Component/Ldap/Tests/LdapTest.php      |   4 +-
 .../Security/CheckLdapCredentialsListenerTest.php  |  15 +-
 .../Ldap/Tests/Security/LdapUserProviderTest.php   |   4 +-
 src/Symfony/Component/Lock/Tests/LockTest.php      |  16 +-
 .../Lock/Tests/Store/AbstractStoreTestCase.php     |   1 +
 .../Lock/Tests/Store/CombinedStoreTest.php         |   3 +-
 .../Store/DoctrineDbalPostgreSqlStoreTest.php      |  11 +-
 .../Lock/Tests/Store/DoctrineDbalStoreTest.php     |  19 +-
 .../Lock/Tests/Store/MemcachedStoreTest.php        |   5 +-
 .../Lock/Tests/Store/MongoDbStoreFactoryTest.php   |   3 +-
 .../Lock/Tests/Store/MongoDbStoreTest.php          |  16 +-
 .../Component/Lock/Tests/Store/PdoStoreTest.php    |  15 +-
 .../Lock/Tests/Store/PostgreSqlStoreTest.php       |   8 +-
 .../Component/Lock/Tests/Store/PredisStoreTest.php |   3 +-
 .../Lock/Tests/Store/RedisArrayStoreTest.php       |   4 +-
 .../Lock/Tests/Store/RedisClusterStoreTest.php     |   4 +-
 .../Tests/Store/RedisProxyStoreFactoryTest.php     |   4 +-
 .../Component/Lock/Tests/Store/RedisStoreTest.php  |   4 +-
 .../Component/Lock/Tests/Store/RelayStoreTest.php  |   7 +-
 .../Lock/Tests/Store/SemaphoreStoreTest.php        |   3 +-
 .../Lock/Tests/Store/StoreFactoryTest.php          |   4 +-
 .../Lock/Tests/Store/ZookeeperStoreFactoryTest.php |   3 +-
 .../Lock/Tests/Store/ZookeeperStoreTest.php        |   8 +-
 .../Lock/Tests/Strategy/ConsensusStrategyTest.php  |   8 +-
 .../Lock/Tests/Strategy/UnanimousStrategyTest.php  |   8 +-
 .../Transport/SesApiAsyncAwsTransportTest.php      |   4 +-
 .../Transport/SesHttpAsyncAwsTransportTest.php     |   4 +-
 .../Tests/Transport/BrevoApiTransportTest.php      |   4 +-
 .../Tests/Transport/MailPaceApiTransportTest.php   |   4 +-
 .../Tests/Transport/MandrillApiTransportTest.php   |   4 +-
 .../Tests/Transport/MandrillHttpTransportTest.php  |   4 +-
 .../Tests/Transport/MailerSendApiTransportTest.php |   4 +-
 .../Tests/Transport/MailgunApiTransportTest.php    |   4 +-
 .../Tests/Transport/MailgunHttpTransportTest.php   |   4 +-
 .../Tests/Transport/MailjetApiTransportTest.php    |   8 +-
 .../Tests/Transport/OhMySmtpApiTransportTest.php   |   8 +-
 .../Tests/Transport/OhMySmtpSmtpTransportTest.php  |   4 +-
 .../Transport/OhMySmtpTransportFactoryTest.php     |   4 +-
 .../Tests/Transport/PostmarkApiTransportTest.php   |   4 +-
 .../Tests/Transport/ScalewayApiTransportTest.php   |   4 +-
 .../RemoteEvent/SendgridPayloadConverterTest.php   |   8 +-
 .../Tests/Transport/SendgridApiTransportTest.php   |   4 +-
 .../Webhook/SendgridSignedRequestParserTest.php    |   3 +-
 .../SendgridWrongSecretRequestParserTest.php       |   3 +-
 .../SendgridWrongSignatureRequestParserTest.php    |   3 +-
 .../Tests/Transport/SendinblueApiTransportTest.php |   8 +-
 .../Transport/SendinblueTransportFactoryTest.php   |   4 +-
 .../Mailer/Test/TransportFactoryTestCase.php       |  16 +-
 .../Tests/EventListener/MessageListenerTest.php    |   4 +-
 .../Exception/UnsupportedSchemeExceptionTest.php   |  12 +-
 .../Tests/Transport/AbstractTransportTest.php      |   4 +-
 .../Component/Mailer/Tests/Transport/DsnTest.php   |   8 +-
 .../Tests/Transport/FailoverTransportTest.php      |  26 +-
 .../Tests/Transport/NativeTransportFactoryTest.php |   8 +-
 .../Tests/Transport/RoundRobinTransportTest.php    |  10 +-
 .../Tests/Transport/Smtp/SmtpTransportTest.php     |   4 +-
 .../Transport/Smtp/Stream/AbstractStreamTest.php   |   4 +-
 .../Transport/Smtp/Stream/SocketStreamTest.php     |   4 +-
 .../Component/Mailer/Tests/TransportTest.php       |  12 +-
 .../Tests/Transport/AmazonSqsIntegrationTest.php   |   4 +-
 .../AmazonSqs/Tests/Transport/ConnectionTest.php   |   8 +-
 .../Tests/Transport/AmqpExtIntegrationTest.php     |   9 +-
 .../Amqp/Tests/Transport/AmqpReceivedStampTest.php |   4 +-
 .../Amqp/Tests/Transport/AmqpReceiverTest.php      |   4 +-
 .../Bridge/Amqp/Tests/Transport/AmqpSenderTest.php |   4 +-
 .../Bridge/Amqp/Tests/Transport/AmqpStampTest.php  |   4 +-
 .../Tests/Transport/AmqpTransportFactoryTest.php   |   4 +-
 .../Amqp/Tests/Transport/AmqpTransportTest.php     |   4 +-
 .../Bridge/Amqp/Tests/Transport/ConnectionTest.php |  11 +-
 .../Doctrine/Tests/Transport/ConnectionTest.php    |  12 +-
 .../Tests/Transport/DoctrineIntegrationTest.php    |   4 +-
 .../DoctrinePostgreSqlFilterIntegrationTest.php    |   4 +-
 .../DoctrinePostgreSqlIntegrationTest.php          |   7 +-
 .../DoctrinePostgreSqlPgbouncerIntegrationTest.php |   4 +-
 .../DoctrinePostgreSqlRegularIntegrationTest.php   |   4 +-
 .../Redis/Tests/Transport/ConnectionTest.php       |  12 +-
 .../Tests/Transport/RedisExtIntegrationTest.php    |  21 +-
 .../Redis/Tests/Transport/RedisReceiverTest.php    |   8 +-
 .../Tests/Transport/RedisTransportFactoryTest.php  |  11 +-
 .../Tests/Transport/RelayExtIntegrationTest.php    |  16 +-
 .../Tests/Command/ConsumeMessagesCommandTest.php   |  12 +-
 .../Messenger/Tests/Command/DebugCommandTest.php   |   4 +-
 .../Command/FailedMessagesShowCommandTest.php      |   4 +-
 .../Tests/Command/SetupTransportsCommandTest.php   |   4 +-
 .../DependencyInjection/MessengerPassTest.php      |  36 +--
 .../EventListener/ResetServicesListenerTest.php    |   4 +-
 ...StopWorkerOnCustomStopExceptionListenerTest.php |   2 +-
 .../StopWorkerOnFailureLimitListenerTest.php       |   4 +-
 .../StopWorkerOnMemoryLimitListenerTest.php        |   4 +-
 .../StopWorkerOnMessageLimitListenerTest.php       |   4 +-
 .../StopWorkerOnRestartSignalListenerTest.php      |   8 +-
 .../StopWorkerOnTimeLimitListenerTest.php          |   4 +-
 .../Tests/Handler/HandleDescriptorTest.php         |   4 +-
 .../Component/Messenger/Tests/MessageBusTest.php   |   2 +-
 .../DispatchAfterCurrentBusMiddlewareTest.php      |  12 +-
 .../Middleware/HandleMessageMiddlewareTest.php     |   4 +-
 .../Tests/Middleware/SendMessageMiddlewareTest.php |   4 +-
 .../Tests/Retry/MultiplierRetryStrategyTest.php    |   4 +-
 .../InMemory/InMemoryTransportFactoryTest.php      |   4 +-
 .../Normalizer/FlattenExceptionNormalizerTest.php  |   4 +-
 .../Transport/Serialization/SerializerTest.php     |   4 +-
 .../Component/Messenger/Tests/WorkerTest.php       |   8 +-
 src/Symfony/Component/Mime/Tests/AddressTest.php   |   8 +-
 .../Component/Mime/Tests/Crypto/DkimSignerTest.php |  17 +-
 .../Mime/Tests/Crypto/SMimeEncrypterTest.php       |   4 +-
 .../Mime/Tests/Crypto/SMimeSignerTest.php          |   4 +-
 .../Mime/Tests/FileBinaryMimeTypeGuesserTest.php   |   1 +
 .../Mime/Tests/FileinfoMimeTypeGuesserTest.php     |   4 +-
 src/Symfony/Component/Mime/Tests/MessageTest.php   |   4 +-
 src/Symfony/Component/Mime/Tests/MimeTypesTest.php |   4 +-
 .../Component/Mime/Tests/Part/TextPartTest.php     |   4 +-
 .../Component/Mime/Tests/RawMessageTest.php        |  19 +-
 .../Bandwidth/Tests/BandwidthTransportTest.php     |   8 +-
 .../ClickSend/Tests/ClickSendTransportTest.php     |   8 +-
 .../Firebase/Tests/FirebaseTransportTest.php       |   4 +-
 .../Tests/FortySixElksTransportTest.php            |   4 +-
 .../Bridge/GoIp/Tests/GoIpTransportTest.php        |   3 +-
 .../GoogleChat/Tests/GoogleChatOptionsTest.php     |   4 +-
 .../Tests/IsendproTransportFactoryTest.php         |   5 +-
 .../KazInfoTeh/Tests/KazInfoTehTransportTest.php   |   4 +-
 .../Bridge/Mercure/Tests/MercureTransportTest.php  |   3 +
 .../Tests/MessageMediaTransportTest.php            |   3 +-
 .../MicrosoftTeams/Tests/Action/ActionCardTest.php |   8 +-
 .../Tests/Action/Input/MultiChoiceInputTest.php    |   8 +-
 .../Tests/Action/OpenUriActionTest.php             |   4 +-
 .../Tests/MicrosoftTeamsOptionsTest.php            |  16 +-
 .../MicrosoftTeams/Tests/Section/SectionTest.php   |   4 +-
 .../Bridge/Mobyt/Tests/MobytOptionsTest.php        |   8 +-
 .../Notifier/Bridge/Novu/Tests/NovuOptionsTest.php |   4 +-
 .../OvhCloud/Tests/OvhCloudTransportTest.php       |   7 +-
 .../Bridge/Plivo/Tests/PlivoTransportTest.php      |   8 +-
 .../RingCentral/Tests/RingCentralTransportTest.php |   8 +-
 .../Tests/SendinblueTransportFactoryTest.php       |   4 +-
 .../Sendinblue/Tests/SendinblueTransportTest.php   |   4 +-
 .../Tests/SimpleTextinTransportTest.php            |   8 +-
 .../Bridge/Slack/Tests/SlackOptionsTest.php        |  17 +-
 .../Bridge/Slack/Tests/SlackTransportTest.php      |   6 +-
 .../SmsBiuras/Tests/SmsBiurasTransportTest.php     |   4 +-
 .../Bridge/Smsapi/Tests/SmsapiTransportTest.php    |   4 +-
 .../Bridge/Smsmode/Tests/SmsmodeTransportTest.php  |   8 +-
 .../Bridge/SpotHit/Tests/SpotHitTransportTest.php  |   5 +-
 .../Bridge/Telegram/Tests/TelegramOptionsTest.php  |   8 +-
 .../Telegram/Tests/TelegramTransportTest.php       |  19 +-
 .../Bridge/Termii/Tests/TermiiTransportTest.php    |   8 +-
 .../Bridge/Twilio/Tests/TwilioTransportTest.php    |  12 +-
 .../Notifier/Test/TransportFactoryTestCase.php     |  20 +-
 .../Component/Notifier/Test/TransportTestCase.php  |  16 +-
 .../Notifier/Tests/Channel/BrowserChannelTest.php  |   4 +-
 .../Notifier/Tests/Channel/ChannelPolicyTest.php   |   4 +-
 .../Tests/Event/FailedMessageEventTest.php         |  12 +-
 .../Notifier/Tests/Event/SentMessageEventTest.php  |   8 +-
 .../Exception/UnsupportedSchemeExceptionTest.php   |  12 +-
 .../Notifier/Tests/Message/NullMessageTest.php     |   4 +-
 .../Notifier/Tests/Recipient/RecipientTest.php     |   4 +-
 .../Component/Notifier/Tests/Transport/DsnTest.php |  20 +-
 .../Tests/Transport/FailoverTransportTest.php      |  18 +-
 .../OptionsResolver/Tests/OptionsResolverTest.php  |  12 +-
 .../Tests/Command/UserPasswordHashCommandTest.php  |   6 +-
 .../Tests/Hasher/NativePasswordHasherTest.php      |   8 +-
 .../Tests/Hasher/SodiumPasswordHasherTest.php      |   4 +-
 .../Process/Tests/ExecutableFinderTest.php         |  12 +-
 .../Component/Process/Tests/PhpSubprocessTest.php  |   4 +-
 .../Component/Process/Tests/ProcessTest.php        |  92 ++----
 .../Tests/PropertyAccessorArrayAccessTestCase.php  |  20 +-
 .../Tests/PropertyAccessorCollectionTestCase.php   |   4 +-
 .../PropertyAccess/Tests/PropertyAccessorTest.php  |  95 ++----
 .../Tests/PropertyPathBuilderTest.php              |   4 +-
 .../PropertyAccess/Tests/PropertyPathTest.php      |   4 +-
 .../DependencyInjection/PropertyInfoPassTest.php   |   4 +-
 .../Tests/Extractor/PhpDocExtractorTest.php        |  56 +---
 .../Tests/Extractor/PhpStanExtractorTest.php       |  62 +---
 .../Tests/Extractor/ReflectionExtractorTest.php    |  93 ++----
 .../Tests/PropertyInfoCacheExtractorTest.php       |   7 +
 .../RateLimiter/Tests/CompoundLimiterTest.php      |   4 +-
 .../Tests/Policy/FixedWindowLimiterTest.php        |   8 +-
 .../RateLimiter/Tests/Policy/RateTest.php          |   4 +-
 .../Tests/Policy/SlidingWindowLimiterTest.php      |   4 +-
 .../RateLimiter/Tests/Policy/SlidingWindowTest.php |   4 +-
 .../Tests/Policy/TokenBucketLimiterTest.php        |   4 +-
 .../Component/RateLimiter/Tests/RateLimitTest.php  |   4 +-
 .../RateLimiter/Tests/RateLimiterFactoryTest.php   |  12 +-
 .../Routing/Tests/Attribute/RouteTest.php          |   8 +-
 .../Dumper/CompiledUrlGeneratorDumperTest.php      |  15 +-
 .../Routing/Tests/Generator/UrlGeneratorTest.php   |  39 +--
 .../Tests/Loader/AttributeClassLoaderTestCase.php  |   8 +-
 .../AttributeClassLoaderWithAnnotationsTest.php    |   4 +-
 .../Tests/Loader/AttributeDirectoryLoaderTest.php  |   4 +-
 .../Tests/Loader/AttributeFileLoaderTest.php       |   8 +-
 .../Routing/Tests/Loader/ContainerLoaderTest.php   |   4 +-
 .../Routing/Tests/Loader/DirectoryLoaderTest.php   |   2 +
 .../Routing/Tests/Loader/ObjectLoaderTest.php      |   4 +-
 .../Routing/Tests/Loader/PhpFileLoaderTest.php     |   4 +-
 .../Tests/Loader/Psr4DirectoryLoaderTest.php       |   4 +-
 .../Routing/Tests/Loader/XmlFileLoaderTest.php     |  16 +-
 .../Routing/Tests/Loader/YamlFileLoaderTest.php    |  12 +-
 .../Dumper/CompiledUrlMatcherDumperTest.php        |   4 +-
 .../Matcher/Dumper/StaticPrefixCollectionTest.php  |   4 +-
 .../Matcher/ExpressionLanguageProviderTest.php     |   8 +-
 .../Tests/Requirement/EnumRequirementTest.php      |   4 +-
 .../Routing/Tests/Requirement/RequirementTest.php  | 356 +++++++++------------
 .../Component/Routing/Tests/RouteCompilerTest.php  |  20 +-
 src/Symfony/Component/Routing/Tests/RouteTest.php  |  20 +-
 .../Tests/Generator/MessageGeneratorTest.php       |   8 +-
 .../Tests/Trigger/CronExpressionTriggerTest.php    |   4 +-
 .../Tests/Trigger/PeriodicalTriggerTest.php        |  20 +-
 .../Core/Test/AccessDecisionStrategyTestCase.php   |   3 +-
 .../Authentication/Token/AbstractTokenTest.php     |   8 +-
 .../Token/Storage/TokenStorageTest.php             |   4 +-
 .../Authorization/AuthorizationCheckerTest.php     |   4 +-
 .../Tests/Authorization/ExpressionLanguageTest.php |   4 +-
 .../TraceableAccessDecisionManagerTest.php         |   4 +-
 .../Authorization/Voter/AuthenticatedVoterTest.php |  10 +-
 .../Authorization/Voter/ExpressionVoterTest.php    |   4 +-
 .../Authorization/Voter/RoleHierarchyVoterTest.php |   8 +-
 .../Tests/Authorization/Voter/RoleVoterTest.php    |   8 +-
 .../Core/Tests/Authorization/Voter/VoterTest.php   |   4 +-
 .../Core/Tests/Resources/TranslationFilesTest.php  |   8 +-
 .../Component/Security/Core/Tests/SecurityTest.php |   8 +-
 .../Security/Core/Tests/User/InMemoryUserTest.php  |   2 +-
 .../Validator/Constraints/UserPasswordTest.php     |   4 +-
 .../Constraints/UserPasswordValidatorTestCase.php  |  12 +-
 .../TokenGenerator/UriSafeTokenGeneratorTest.php   |   4 +-
 .../TokenStorage/NativeSessionTokenStorageTest.php |  20 +-
 .../AccessToken/Oidc/OidcTokenHandlerTest.php      |  18 +-
 .../Oidc/OidcUserInfoTokenHandlerTest.php          |   4 +-
 .../Authentication/AuthenticatorManagerTest.php    |  16 +-
 .../DefaultAuthenticationSuccessHandlerTest.php    |   4 +-
 .../AbstractLoginFormAuthenticatorTest.php         |   4 +-
 .../ChainedAccessTokenExtractorsTest.php           |   8 +-
 ...FormEncodedBodyAccessTokenAuthenticatorTest.php |   4 +-
 .../HeaderAccessTokenAuthenticatorTest.php         |  16 +-
 .../QueryAccessTokenAuthenticatorTest.php          |   4 +-
 .../Authenticator/AccessTokenAuthenticatorTest.php |   4 +-
 .../Authenticator/FormLoginAuthenticatorTest.php   |  44 +--
 .../Authenticator/HttpBasicAuthenticatorTest.php   |   4 +-
 .../Authenticator/JsonLoginAuthenticatorTest.php   |  20 +-
 .../Authenticator/LoginLinkAuthenticatorTest.php   |   4 +-
 .../Authenticator/RememberMeAuthenticatorTest.php  |   4 +-
 .../Authenticator/RemoteUserAuthenticatorTest.php  |   8 +-
 .../Tests/Authenticator/X509AuthenticatorTest.php  |  12 +-
 .../Tests/Controller/UserValueResolverTest.php     |  10 +-
 .../EventListener/CheckCredentialsListenerTest.php |   8 +-
 .../CheckRememberMeConditionsListenerTest.php      |   8 +-
 .../ClearSiteDataLogoutListenerTest.php            |   4 +-
 .../CsrfTokenClearingLogoutListenerTest.php        |   1 +
 .../IsGrantedAttributeListenerTest.php             |   4 +-
 .../PasswordMigratingListenerTest.php              |   4 +-
 .../EventListener/UserProviderListenerTest.php     |   4 +-
 .../Http/Tests/Firewall/ContextListenerTest.php    |   4 +-
 .../Http/Tests/Firewall/ExceptionListenerTest.php  |  27 +-
 .../Http/Tests/Firewall/LogoutListenerTest.php     |   4 +-
 .../Security/Http/Tests/HttpUtilsTest.php          |  12 +-
 .../Http/Tests/LoginLink/LoginLinkHandlerTest.php  |   7 +-
 .../RememberMe/SignatureRememberMeHandlerTest.php  |   4 +-
 .../Component/Semaphore/Tests/SemaphoreTest.php    |   4 +-
 .../Tests/Store/AbstractStoreTestCase.php          |   2 +
 .../Semaphore/Tests/Store/RedisArrayStoreTest.php  |   3 +-
 .../Tests/Store/RedisClusterStoreTest.php          |   3 +-
 .../Semaphore/Tests/Store/RedisStoreTest.php       |   3 +-
 .../Semaphore/Tests/Store/RelayStoreTest.php       |   4 +-
 .../Semaphore/Tests/Store/StoreFactoryTest.php     |   4 +-
 .../Serializer/Tests/Annotation/ContextTest.php    |   4 +-
 .../Serializer/Tests/Annotation/MaxDepthTest.php   |   6 +-
 .../Encoder/CsvEncoderContextBuilderTest.php       |   3 +-
 .../Encoder/JsonEncoderContextBuilderTest.php      |   3 +-
 .../Encoder/XmlEncoderContextBuilderTest.php       |   4 +-
 .../Encoder/YamlEncoderContextBuilderTest.php      |   3 +-
 .../AbstractNormalizerContextBuilderTest.php       |   3 +-
 .../AbstractObjectNormalizerContextBuilderTest.php |   7 +-
 ...ntViolationListNormalizerContextBuilderTest.php |   3 +-
 .../DateIntervalNormalizerContextBuilderTest.php   |   3 +-
 .../DateTimeNormalizerContextBuilderTest.php       |   3 +-
 .../FormErrorNormalizerContextBuilderTest.php      |   3 +-
 .../ProblemNormalizerContextBuilderTest.php        |   3 +-
 .../Normalizer/UidNormalizerContextBuilderTest.php |   3 +-
 .../UnwrappingDenormalizerContextBuilderTest.php   |   3 +-
 .../Tests/Context/SerializerContextBuilderTest.php |   3 +-
 .../Tests/DeserializeNestedArrayOfObjectsTest.php  |   4 +-
 .../Serializer/Tests/Encoder/CsvEncoderTest.php    |   2 +-
 .../Serializer/Tests/Encoder/JsonDecodeTest.php    |   8 +-
 .../Serializer/Tests/Encoder/JsonEncodeTest.php    |   4 +-
 .../Factory/CompiledClassMetadataFactoryTest.php   |   8 +-
 ...AnnotationLoaderWithDoctrineAnnotationsTest.php |  18 +-
 .../Mapping/Loader/AttributeLoaderTestCase.php     |   5 +-
 .../CamelCaseToSnakeCaseNameConverterTest.php      |   8 +-
 .../MetadataAwareNameConverterTest.php             |  24 +-
 .../Tests/Normalizer/AbstractNormalizerTest.php    |  14 +-
 .../Normalizer/AbstractObjectNormalizerTest.php    |   4 +-
 .../ConstraintViolationListNormalizerTest.php      |   4 +-
 .../Tests/Normalizer/DataUriNormalizerTest.php     |  20 +-
 .../Normalizer/DateIntervalNormalizerTest.php      |  16 +-
 .../Tests/Normalizer/DateTimeNormalizerTest.php    |  12 +-
 .../Normalizer/GetSetMethodNormalizerTest.php      |  10 +-
 .../Tests/Normalizer/ObjectNormalizerTest.php      |   4 +-
 .../Tests/Normalizer/PropertyNormalizerTest.php    |   9 +-
 .../Tests/Normalizer/UidNormalizerTest.php         |  24 +-
 .../Component/Serializer/Tests/SerializerTest.php  |  28 +-
 .../Stopwatch/Tests/StopwatchEventTest.php         |   3 +-
 .../Stopwatch/Tests/StopwatchPeriodTest.php        |  12 +-
 .../Component/Stopwatch/Tests/StopwatchTest.php    |   3 +-
 .../String/Tests/AbstractAsciiTestCase.php         | 216 ++++---------
 .../String/Tests/AbstractUnicodeTestCase.php       |   4 +-
 .../Component/String/Tests/FunctionsTest.php       |  12 +-
 .../Tests/Inflector/EnglishInflectorTest.php       |   8 +-
 .../String/Tests/Inflector/FrenchInflectorTest.php |   8 +-
 .../Component/String/Tests/LazyStringTest.php      |   4 +-
 .../String/Tests/Slugger/AsciiSluggerTest.php      |  15 +-
 src/Symfony/Component/String/Tests/SluggerTest.php |   7 +-
 .../Templating/Tests/DelegatingEngineTest.php      |   4 +-
 .../Templating/Tests/Helper/HelperTest.php         |   4 +-
 .../Templating/Tests/Helper/SlotsHelperTest.php    |   4 +-
 .../Templating/Tests/Loader/CacheLoaderTest.php    |   4 +-
 .../Templating/Tests/Loader/ChainLoaderTest.php    |   4 +-
 .../Tests/Loader/FilesystemLoaderTest.php          |   4 +-
 .../Templating/Tests/Loader/LoaderTest.php         |   4 +-
 .../Component/Templating/Tests/PhpEngineTest.php   |   8 +-
 .../Templating/Tests/Storage/FileStorageTest.php   |   4 +-
 .../Templating/Tests/Storage/StorageTest.php       |   4 +-
 .../Templating/Tests/Storage/StringStorageTest.php |   4 +-
 .../Templating/Tests/TemplateNameParserTest.php    |   8 +-
 .../Bridge/Crowdin/Tests/CrowdinProviderTest.php   |  12 +-
 .../Bridge/Loco/Tests/LocoProviderTest.php         |  12 +-
 .../Tests/LocoProviderWithoutTranslatorBagTest.php |   3 +-
 .../Bridge/Lokalise/Tests/LokaliseProviderTest.php |   8 +-
 .../Phrase/Tests/PhraseProviderFactoryTest.php     |  16 +-
 .../Bridge/Phrase/Tests/PhraseProviderTest.php     |  92 ++----
 .../Translation/Test/ProviderFactoryTestCase.php   |  16 +-
 .../Translation/Test/ProviderTestCase.php          |   4 +-
 .../Tests/Command/TranslationPullCommandTest.php   |   8 +-
 .../Tests/Command/TranslationPushCommandTest.php   |   4 +-
 .../Tests/Command/XliffLintCommandTest.php         |   8 +-
 .../DataCollector/TranslationDataCollectorTest.php |   5 +-
 .../DataCollectorTranslatorPassTest.php            |  16 +-
 .../Exception/UnsupportedSchemeExceptionTest.php   |  12 +-
 .../Tests/Extractor/PhpAstExtractorTest.php        |   4 +-
 .../Tests/Extractor/PhpExtractorTest.php           |   7 +-
 .../Tests/Formatter/IntlFormatterTest.php          |   8 +-
 .../Tests/Formatter/MessageFormatterTest.php       |   4 +-
 .../Tests/Loader/IcuDatFileLoaderTest.php          |   4 +-
 .../Tests/Loader/IcuResFileLoaderTest.php          |   4 +-
 .../Translation/Tests/LocaleSwitcherTest.php       |   4 +-
 .../Translation/Tests/Provider/DsnTest.php         |  20 +-
 .../Tests/PseudoLocalizationTranslatorTest.php     |   8 +-
 .../Translation/Tests/TranslatableTest.php         |   8 +-
 .../Translation/Tests/TranslatorCacheTest.php      |   8 +-
 .../Component/Translation/Tests/TranslatorTest.php |  68 +---
 .../Translation/Tests/Util/ArrayConverterTest.php  |   4 +-
 .../Uid/Tests/Command/GenerateUlidCommandTest.php  |  10 +-
 .../Uid/Tests/Command/GenerateUuidCommandTest.php  |  16 +-
 src/Symfony/Component/Uid/Tests/UlidTest.php       |  44 +--
 src/Symfony/Component/Uid/Tests/UuidTest.php       |  42 +--
 .../Validator/Tests/ConstraintValidatorTest.php    |   4 +-
 .../Tests/ConstraintViolationListTest.php          |   4 +-
 .../AbstractComparisonValidatorTestCase.php        |  28 +-
 .../Tests/Constraints/AllValidatorTest.php         |   8 +-
 .../Constraints/AtLeastOneOfValidatorTest.php      |  12 +-
 .../Tests/Constraints/BicValidatorTest.php         |  19 +-
 .../Tests/Constraints/BlankValidatorTest.php       |   4 +-
 .../Tests/Constraints/CardSchemeValidatorTest.php  |  12 +-
 .../Tests/Constraints/ChoiceValidatorTest.php      |  28 +-
 .../Validator/Tests/Constraints/CidrTest.php       |   8 +-
 .../Tests/Constraints/CidrValidatorTest.php        |  24 +-
 .../Validator/Tests/Constraints/CollectionTest.php |  12 +-
 .../Tests/Constraints/CountValidatorTestCase.php   |  52 +--
 .../Tests/Constraints/CountryValidatorTest.php     |  16 +-
 .../Tests/Constraints/CssColorValidatorTest.php    |  88 ++---
 .../Tests/Constraints/CurrencyValidatorTest.php    |  16 +-
 .../Tests/Constraints/DateTimeValidatorTest.php    |   8 +-
 .../Tests/Constraints/DateValidatorTest.php        |  12 +-
 .../Tests/Constraints/DivisibleByValidatorTest.php |   4 +-
 .../Tests/Constraints/EmailValidatorTest.php       |  58 +---
 .../Constraints/ExpressionLanguageSyntaxTest.php   |   8 +-
 .../ExpressionLanguageSyntaxValidatorTest.php      |   4 +-
 .../Tests/Constraints/ExpressionSyntaxTest.php     |   4 +-
 .../Tests/Constraints/ExpressionValidatorTest.php  |   4 +-
 .../Validator/Tests/Constraints/FileTest.php       |  24 +-
 .../Tests/Constraints/FileValidatorTestCase.php    |  36 +--
 ...alValidatorWithPositiveOrZeroConstraintTest.php |  17 +-
 ...aterThanValidatorWithPositiveConstraintTest.php |  17 +-
 .../Tests/Constraints/HostnameValidatorTest.php    |  32 +-
 .../Tests/Constraints/IbanValidatorTest.php        |  24 +-
 .../Tests/Constraints/ImageValidatorTest.php       |  66 +---
 .../Tests/Constraints/IpValidatorTest.php          |  64 +---
 .../Tests/Constraints/IsFalseValidatorTest.php     |   4 +-
 .../Tests/Constraints/IsNullValidatorTest.php      |   8 +-
 .../Tests/Constraints/IsTrueValidatorTest.php      |   4 +-
 .../Tests/Constraints/IsbnValidatorTest.php        |  28 +-
 .../Tests/Constraints/IsinValidatorTest.php        |  16 +-
 .../Tests/Constraints/IssnValidatorTest.php        |  16 +-
 .../Tests/Constraints/JsonValidatorTest.php        |   8 +-
 .../Tests/Constraints/LanguageValidatorTest.php    |  16 +-
 .../Tests/Constraints/LengthValidatorTest.php      |  48 +--
 ...alValidatorWithNegativeOrZeroConstraintTest.php |  22 +-
 ...LessThanValidatorWithNegativeConstraintTest.php |  22 +-
 .../Tests/Constraints/LocaleValidatorTest.php      |  20 +-
 .../Tests/Constraints/LuhnValidatorTest.php        |  12 +-
 .../NoSuspiciousCharactersValidatorTest.php        |  11 +-
 .../Tests/Constraints/NotBlankValidatorTest.php    |   8 +-
 .../NotCompromisedPasswordValidatorTest.php        |   8 +-
 .../Tests/Constraints/NotNullValidatorTest.php     |   8 +-
 .../Constraints/PasswordStrengthValidatorTest.php  |   8 +-
 .../Tests/Constraints/RangeValidatorTest.php       | 172 +++-------
 .../Validator/Tests/Constraints/RegexTest.php      |   4 +-
 .../Tests/Constraints/RegexValidatorTest.php       |  20 +-
 .../Tests/Constraints/TimeValidatorTest.php        |  24 +-
 .../Validator/Tests/Constraints/TimezoneTest.php   |   5 +-
 .../Tests/Constraints/TimezoneValidatorTest.php    |  36 +--
 .../Tests/Constraints/TypeValidatorTest.php        |  16 +-
 .../Tests/Constraints/UlidValidatorTest.php        |   4 +-
 .../Tests/Constraints/UniqueValidatorTest.php      |  24 +-
 .../Tests/Constraints/UrlValidatorTest.php         |  38 +--
 .../Tests/Constraints/UuidValidatorTest.php        |  24 +-
 .../Validator/Tests/Constraints/WhenTest.php       |   4 +-
 .../Tests/Constraints/WhenValidatorTest.php        |   1 +
 .../AddAutoMappingConfigurationPassTest.php        |   4 +-
 .../AnnotationLoaderWithHybridAnnotationsTest.php  |   7 +-
 .../AnnotationLoaderWithLegacyAnnotationsTest.php  |   9 +-
 .../Mapping/Loader/PropertyInfoLoaderTest.php      |   8 +-
 .../Tests/Mapping/Loader/YamlFileLoaderTest.php    |   4 +-
 .../Tests/Resources/TranslationFilesTest.php       |   8 +-
 .../Validator/Tests/Util/PropertyPathTest.php      |   4 +-
 .../Tests/Validator/RecursiveValidatorTest.php     |  28 +-
 .../Validator/Tests/ValidatorBuilderTest.php       |  16 +-
 .../VarDumper/Test/VarDumperTestTrait.php          |   4 +-
 .../VarDumper/Tests/Caster/CasterTest.php          |   4 +-
 .../VarDumper/Tests/Caster/DateCasterTest.php      |  48 +--
 .../VarDumper/Tests/Caster/DoctrineCasterTest.php  |   8 +-
 .../VarDumper/Tests/Caster/ExceptionCasterTest.php |   8 +-
 .../VarDumper/Tests/Caster/FFICasterTest.php       |   7 +-
 .../VarDumper/Tests/Caster/GmpCasterTest.php       |   4 +-
 .../VarDumper/Tests/Caster/IntlCasterTest.php      |   4 +-
 .../VarDumper/Tests/Caster/MysqliCasterTest.php    |   7 +-
 .../VarDumper/Tests/Caster/PdoCasterTest.php       |   4 +-
 .../VarDumper/Tests/Caster/RdKafkaCasterTest.php   |   7 +-
 .../VarDumper/Tests/Caster/RedisCasterTest.php     |  13 +-
 .../Tests/Caster/ReflectionCasterTest.php          |  16 +-
 .../VarDumper/Tests/Caster/SplCasterTest.php       |   6 +-
 .../VarDumper/Tests/Caster/XmlReaderCasterTest.php |   4 +-
 .../Tests/Command/Descriptor/CliDescriptorTest.php |   4 +-
 .../Command/Descriptor/HtmlDescriptorTest.php      |   4 +-
 .../Tests/Command/ServerDumpCommandTest.php        |   4 +-
 .../VarDumper/Tests/Dumper/CliDumperTest.php       |   8 +-
 .../ContextProvider/RequestContextProviderTest.php |   4 +-
 .../Tests/Dumper/ContextualizedDumperTest.php      |   3 +-
 .../VarDumper/Tests/Dumper/HtmlDumperTest.php      |   4 +-
 .../VarExporter/Tests/InstantiatorTest.php         |   4 +-
 .../VarExporter/Tests/LazyGhostTraitTest.php       |  44 +--
 .../VarExporter/Tests/LazyProxyTraitTest.php       |  16 +-
 .../VarExporter/Tests/ProxyHelperTest.php          |  16 +-
 .../VarExporter/Tests/VarExporterTest.php          |   8 +-
 src/Symfony/Component/WebLink/Tests/LinkTest.php   |   8 +-
 .../Webhook/Test/AbstractRequestParserTestCase.php |   4 +-
 .../Workflow/Tests/Attribute/AsListenerTest.php    |  12 +-
 .../Workflow/Tests/Debug/TraceableWorkflowTest.php |   4 +-
 .../Workflow/Tests/Dumper/GraphvizDumperTest.php   |   8 +-
 .../Workflow/Tests/Dumper/MermaidDumperTest.php    |  16 +-
 .../Workflow/Tests/Dumper/PlantUmlDumperTest.php   |   8 +-
 .../InstanceOfSupportStrategyTest.php              |   4 +-
 .../Tests/Validator/StateMachineValidatorTest.php  |   1 +
 .../Tests/Validator/WorkflowValidatorTest.php      |   1 +
 .../Component/Workflow/Tests/WorkflowTest.php      |   4 +-
 .../Yaml/Tests/Command/LintCommandTest.php         |   4 +-
 src/Symfony/Component/Yaml/Tests/DumperTest.php    |  16 +-
 src/Symfony/Component/Yaml/Tests/InlineTest.php    | 100 ++----
 src/Symfony/Component/Yaml/Tests/ParserTest.php    |  84 ++---
 .../HttpClient/Test/HttpClientTestCase.php         |  18 +-
 .../Contracts/Translation/Test/TranslatorTest.php  |  43 +--
 1023 files changed, 3339 insertions(+), 8237 deletions(-)

diff --git a/src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php b/src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php
index 5a1ce1a..a6efacb 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php
@@ -30,7 +30,7 @@ class EntityValueResolverTest extends TestCase
 {
     public function testResolveWithoutClass()
     {
-        $manager = $this->getMockBuilder(ObjectManager::class)->getMock();
+        $manager = $this->createMock(ObjectManager::class);
         $registry = $this->createRegistry($manager);
         $resolver = new EntityValueResolver($registry);
 
@@ -42,7 +42,7 @@ class EntityValueResolverTest extends TestCase
 
     public function testResolveWithoutAttribute()
     {
-        $manager = $this->getMockBuilder(ObjectManager::class)->getMock();
+        $manager = $this->createMock(ObjectManager::class);
         $registry = $this->createRegistry($manager);
         $resolver = new EntityValueResolver($registry, null, new MapEntity(disabled: true));
 
@@ -65,7 +65,7 @@ class EntityValueResolverTest extends TestCase
 
     public function testResolveWithNoIdAndDataOptional()
     {
-        $manager = $this->getMockBuilder(ObjectManager::class)->getMock();
+        $manager = $this->createMock(ObjectManager::class);
         $registry = $this->createRegistry($manager);
         $resolver = new EntityValueResolver($registry);
 
@@ -77,7 +77,7 @@ class EntityValueResolverTest extends TestCase
 
     public function testResolveWithStripNulls()
     {
-        $manager = $this->getMockBuilder(ObjectManager::class)->getMock();
+        $manager = $this->createMock(ObjectManager::class);
         $registry = $this->createRegistry($manager);
         $resolver = new EntityValueResolver($registry);
 
@@ -85,7 +85,7 @@ class EntityValueResolverTest extends TestCase
         $request->attributes->set('arg', null);
         $argument = $this->createArgument('stdClass', new MapEntity(stripNull: true), 'arg', true);
 
-        $metadata = $this->getMockBuilder(ClassMetadata::class)->getMock();
+        $metadata = $this->createMock(ClassMetadata::class);
         $metadata->expects($this->once())
             ->method('hasField')
             ->with('arg')
@@ -102,12 +102,10 @@ class EntityValueResolverTest extends TestCase
         $this->assertSame([], $resolver->resolve($request, $argument));
     }
 
-    /**
-     * @dataProvider idsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('idsProvider')]
     public function testResolveWithId(string|int $id)
     {
-        $manager = $this->getMockBuilder(ObjectManager::class)->getMock();
+        $manager = $this->createMock(ObjectManager::class);
         $registry = $this->createRegistry($manager);
         $resolver = new EntityValueResolver($registry);
 
@@ -116,7 +114,7 @@ class EntityValueResolverTest extends TestCase
 
         $argument = $this->createArgument('stdClass', new MapEntity(id: 'id'));
 
-        $repository = $this->getMockBuilder(ObjectRepository::class)->getMock();
+        $repository = $this->createMock(ObjectRepository::class);
         $repository->expects($this->once())
             ->method('find')
             ->with($id)
@@ -132,7 +130,7 @@ class EntityValueResolverTest extends TestCase
 
     public function testResolveWithNullId()
     {
-        $manager = $this->getMockBuilder(ObjectManager::class)->getMock();
+        $manager = $this->createMock(ObjectManager::class);
         $registry = $this->createRegistry($manager);
         $resolver = new EntityValueResolver($registry);
 
@@ -160,7 +158,7 @@ class EntityValueResolverTest extends TestCase
 
     public function testResolveWithConversionFailedException()
     {
-        $manager = $this->getMockBuilder(ObjectManager::class)->getMock();
+        $manager = $this->createMock(ObjectManager::class);
         $registry = $this->createRegistry($manager);
         $resolver = new EntityValueResolver($registry);
 
@@ -169,7 +167,7 @@ class EntityValueResolverTest extends TestCase
 
         $argument = $this->createArgument('stdClass', new MapEntity(id: 'id'));
 
-        $repository = $this->getMockBuilder(ObjectRepository::class)->getMock();
+        $repository = $this->createMock(ObjectRepository::class);
         $repository->expects($this->once())
             ->method('find')
             ->with('test')
@@ -187,7 +185,7 @@ class EntityValueResolverTest extends TestCase
 
     public function testUsedProperIdentifier()
     {
-        $manager = $this->getMockBuilder(ObjectManager::class)->getMock();
+        $manager = $this->createMock(ObjectManager::class);
         $registry = $this->createRegistry($manager);
         $resolver = new EntityValueResolver($registry);
 
@@ -210,7 +208,7 @@ class EntityValueResolverTest extends TestCase
 
     public function testResolveGuessOptional()
     {
-        $manager = $this->getMockBuilder(ObjectManager::class)->getMock();
+        $manager = $this->createMock(ObjectManager::class);
         $registry = $this->createRegistry($manager);
         $resolver = new EntityValueResolver($registry);
 
@@ -219,7 +217,7 @@ class EntityValueResolverTest extends TestCase
 
         $argument = $this->createArgument('stdClass', new MapEntity(), 'arg', true);
 
-        $metadata = $this->getMockBuilder(ClassMetadata::class)->getMock();
+        $metadata = $this->createMock(ClassMetadata::class);
         $manager->expects($this->once())
             ->method('getClassMetadata')
             ->with('stdClass')
@@ -232,7 +230,7 @@ class EntityValueResolverTest extends TestCase
 
     public function testResolveWithMappingAndExclude()
     {
-        $manager = $this->getMockBuilder(ObjectManager::class)->getMock();
+        $manager = $this->createMock(ObjectManager::class);
         $registry = $this->createRegistry($manager);
         $resolver = new EntityValueResolver($registry);
 
@@ -245,7 +243,7 @@ class EntityValueResolverTest extends TestCase
             new MapEntity(mapping: ['foo' => 'Foo'], exclude: ['bar'])
         );
 
-        $metadata = $this->getMockBuilder(ClassMetadata::class)->getMock();
+        $metadata = $this->createMock(ClassMetadata::class);
         $metadata->expects($this->once())
             ->method('hasField')
             ->with('Foo')
@@ -256,7 +254,7 @@ class EntityValueResolverTest extends TestCase
             ->with('stdClass')
             ->willReturn($metadata);
 
-        $repository = $this->getMockBuilder(ObjectRepository::class)->getMock();
+        $repository = $this->createMock(ObjectRepository::class);
         $repository->expects($this->once())
             ->method('findOneBy')
             ->with(['Foo' => 1])
@@ -272,7 +270,7 @@ class EntityValueResolverTest extends TestCase
 
     public function testExceptionWithExpressionIfNoLanguageAvailable()
     {
-        $manager = $this->getMockBuilder(ObjectManager::class)->getMock();
+        $manager = $this->createMock(ObjectManager::class);
         $registry = $this->createRegistry($manager);
         $resolver = new EntityValueResolver($registry);
 
@@ -290,9 +288,9 @@ class EntityValueResolverTest extends TestCase
 
     public function testExpressionFailureReturns404()
     {
-        $manager = $this->getMockBuilder(ObjectManager::class)->getMock();
+        $manager = $this->createMock(ObjectManager::class);
         $registry = $this->createRegistry($manager);
-        $language = $this->getMockBuilder(ExpressionLanguage::class)->getMock();
+        $language = $this->createMock(ExpressionLanguage::class);
         $resolver = new EntityValueResolver($registry, $language);
 
         $this->expectException(NotFoundHttpException::class);
@@ -304,7 +302,7 @@ class EntityValueResolverTest extends TestCase
             'arg1'
         );
 
-        $repository = $this->getMockBuilder(ObjectRepository::class)->getMock();
+        $repository = $this->createMock(ObjectRepository::class);
         // find should not be attempted on this repository as a fallback
         $repository->expects($this->never())
             ->method('find');
@@ -322,9 +320,9 @@ class EntityValueResolverTest extends TestCase
 
     public function testExpressionMapsToArgument()
     {
-        $manager = $this->getMockBuilder(ObjectManager::class)->getMock();
+        $manager = $this->createMock(ObjectManager::class);
         $registry = $this->createRegistry($manager);
-        $language = $this->getMockBuilder(ExpressionLanguage::class)->getMock();
+        $language = $this->createMock(ExpressionLanguage::class);
         $resolver = new EntityValueResolver($registry, $language);
 
         $request = new Request();
@@ -335,7 +333,7 @@ class EntityValueResolverTest extends TestCase
             'arg1'
         );
 
-        $repository = $this->getMockBuilder(ObjectRepository::class)->getMock();
+        $repository = $this->createMock(ObjectRepository::class);
         // find should not be attempted on this repository as a fallback
         $repository->expects($this->never())
             ->method('find');
@@ -358,9 +356,9 @@ class EntityValueResolverTest extends TestCase
 
     public function testExpressionSyntaxErrorThrowsException()
     {
-        $manager = $this->getMockBuilder(ObjectManager::class)->getMock();
+        $manager = $this->createMock(ObjectManager::class);
         $registry = $this->createRegistry($manager);
-        $language = $this->getMockBuilder(ExpressionLanguage::class)->getMock();
+        $language = $this->createMock(ExpressionLanguage::class);
         $resolver = new EntityValueResolver($registry, $language);
 
         $request = new Request();
@@ -370,7 +368,7 @@ class EntityValueResolverTest extends TestCase
             'arg1'
         );
 
-        $repository = $this->getMockBuilder(ObjectRepository::class)->getMock();
+        $repository = $this->createMock(ObjectRepository::class);
         // find should not be attempted on this repository as a fallback
         $repository->expects($this->never())
             ->method('find');
@@ -390,7 +388,7 @@ class EntityValueResolverTest extends TestCase
 
     public function testAlreadyResolved()
     {
-        $manager = $this->getMockBuilder(ObjectManager::class)->getMock();
+        $manager = $this->createMock(ObjectManager::class);
         $registry = $this->createRegistry($manager);
         $resolver = new EntityValueResolver($registry);
 
@@ -409,7 +407,7 @@ class EntityValueResolverTest extends TestCase
 
     private function createRegistry(?ObjectManager $manager = null): ManagerRegistry&MockObject
     {
-        $registry = $this->getMockBuilder(ManagerRegistry::class)->getMock();
+        $registry = $this->createMock(ManagerRegistry::class);
 
         $registry->expects($this->any())
             ->method('getManagerForClass')
diff --git a/src/Symfony/Bridge/Doctrine/Tests/ContainerAwareEventManagerTest.php b/src/Symfony/Bridge/Doctrine/Tests/ContainerAwareEventManagerTest.php
index d71421e..a26767a 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/ContainerAwareEventManagerTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/ContainerAwareEventManagerTest.php
@@ -40,9 +40,7 @@ class ContainerAwareEventManagerTest extends TestCase
         $this->assertSame([$listener1, $listener2], array_values($this->evm->getListeners('foo')));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testDispatchEventRespectOrderWithSubscribers()
     {
         $this->evm = new ContainerAwareEventManager($this->container, ['sub1', 'sub2']);
@@ -81,9 +79,7 @@ class ContainerAwareEventManagerTest extends TestCase
         $this->assertSame(1, $listener5->calledByEventNameCount);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testDispatchEventWithSubscribers()
     {
         $this->evm = new ContainerAwareEventManager($this->container, ['lazy4']);
@@ -166,9 +162,7 @@ class ContainerAwareEventManagerTest extends TestCase
         $this->assertSame(1, $listener10->calledByEventNameCount);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testAddEventListenerAndSubscriberAfterDispatchEvent()
     {
         $this->evm = new ContainerAwareEventManager($this->container, ['lazy7']);
@@ -229,9 +223,7 @@ class ContainerAwareEventManagerTest extends TestCase
         $this->assertSame([$listener1, $listener2], array_values($this->evm->getListeners('foo')));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGetListenersForEventWhenSubscribersArePresent()
     {
         $this->evm = new ContainerAwareEventManager($this->container, ['lazy2']);
@@ -245,9 +237,7 @@ class ContainerAwareEventManagerTest extends TestCase
         $this->assertSame([$subscriber1, $listener1, $listener2], array_values($this->evm->getListeners('foo')));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGetListeners()
     {
         $this->container->set('lazy', $listener1 = new MyListener());
diff --git a/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php b/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php
index 043e802..ee091e2 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php
@@ -53,9 +53,7 @@ class DoctrineDataCollectorTest extends TestCase
         $this->assertEquals([], $c->getQueries());
     }
 
-    /**
-     * @dataProvider paramProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('paramProvider')]
     public function testCollectQueries($param, $types, $expected)
     {
         $queries = [
@@ -104,9 +102,7 @@ class DoctrineDataCollectorTest extends TestCase
         $this->assertTrue($collectedQueries['default'][1]['runnable']);
     }
 
-    /**
-     * @dataProvider paramProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('paramProvider')]
     public function testSerialization($param, array $types, $expected)
     {
         $queries = [
@@ -146,9 +142,7 @@ class DoctrineDataCollectorTest extends TestCase
 
     private function createCollector(array $queries): DoctrineDataCollector
     {
-        $connection = $this->getMockBuilder(Connection::class)
-            ->disableOriginalConstructor()
-            ->getMock();
+        $connection = $this->createMock(Connection::class);
         $connection->expects($this->any())
             ->method('getDatabasePlatform')
             ->willReturn(new MySqlPlatform());
diff --git a/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorWithDebugStackTest.php b/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorWithDebugStackTest.php
index 8e85433..800b9d5 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorWithDebugStackTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorWithDebugStackTest.php
@@ -26,9 +26,7 @@ use Symfony\Component\VarDumper\Dumper\CliDumper;
 // Doctrine DBAL 2 compatibility
 class_exists(\Doctrine\DBAL\Platforms\MySqlPlatform::class);
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class DoctrineDataCollectorWithDebugStackTest extends TestCase
 {
     use DoctrineDataCollectorTestTrait;
@@ -56,9 +54,7 @@ class DoctrineDataCollectorWithDebugStackTest extends TestCase
         $this->assertEquals(['default' => []], $c->getQueries());
     }
 
-    /**
-     * @dataProvider paramProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('paramProvider')]
     public function testCollectQueries($param, $types, $expected, $explainable, bool $runnable = true)
     {
         $queries = [
@@ -86,9 +82,7 @@ class DoctrineDataCollectorWithDebugStackTest extends TestCase
         $this->assertSame($runnable, $collectedQueries['default'][0]['runnable']);
     }
 
-    /**
-     * @dataProvider paramProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('paramProvider')]
     public function testSerialization($param, array $types, $expected, $explainable, bool $runnable = true)
     {
         $queries = [
@@ -167,9 +161,7 @@ EOTXT
 
     private function createCollector(array $queries): DoctrineDataCollector
     {
-        $connection = $this->getMockBuilder(Connection::class)
-            ->disableOriginalConstructor()
-            ->getMock();
+        $connection = $this->createMock(Connection::class);
         $connection->expects($this->any())
             ->method('getDatabasePlatform')
             ->willReturn(new MySqlPlatform());
diff --git a/src/Symfony/Bridge/Doctrine/Tests/DataFixtures/ContainerAwareLoaderTest.php b/src/Symfony/Bridge/Doctrine/Tests/DataFixtures/ContainerAwareLoaderTest.php
index 31bdf5e..ffd0b81 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/DataFixtures/ContainerAwareLoaderTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/DataFixtures/ContainerAwareLoaderTest.php
@@ -16,9 +16,7 @@ use Symfony\Bridge\Doctrine\DataFixtures\ContainerAwareLoader;
 use Symfony\Bridge\Doctrine\Tests\Fixtures\ContainerAwareFixture;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class ContainerAwareLoaderTest extends TestCase
 {
     public function testShouldSetContainerOnContainerAwareFixture()
diff --git a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPassTest.php b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPassTest.php
index 3a8c4bf..b5972e1 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPassTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPassTest.php
@@ -199,9 +199,7 @@ class RegisterEventListenersAndSubscribersPassTest extends TestCase
         );
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testProcessEventSubscribersWithMultipleConnections()
     {
         $container = $this->createBuilder(true);
@@ -287,9 +285,7 @@ class RegisterEventListenersAndSubscribersPassTest extends TestCase
         );
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testProcessEventSubscribersWithPriorities()
     {
         $container = $this->createBuilder();
@@ -353,9 +349,7 @@ class RegisterEventListenersAndSubscribersPassTest extends TestCase
         );
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testProcessEventSubscribersAndListenersWithPriorities()
     {
         $container = $this->createBuilder();
diff --git a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php
index 9a61fea..d902439 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php
@@ -147,9 +147,7 @@ class DoctrineExtensionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getAutomappingData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAutomappingData')]
     public function testFixManagersAutoMappings(array $originalEm1, array $originalEm2, array $expectedEm1, array $expectedEm2)
     {
         $emConfigs = [
@@ -205,9 +203,7 @@ class DoctrineExtensionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider providerBasicDrivers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerBasicDrivers')]
     public function testLoadBasicCacheDriver(string $class, array $config, array $expectedCalls = [])
     {
         $container = $this->createContainer();
@@ -288,9 +284,7 @@ class DoctrineExtensionTest extends TestCase
         yield ['NewXmlBundle', 'xml', '/config/doctrine'];
     }
 
-    /**
-     * @dataProvider providerBundles
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerBundles')]
     public function testBundleAutoMapping(string $bundle, string $expectedType, string $dirSuffix)
     {
         $bundleDir = __DIR__.'/../Fixtures/Bundles/'.$bundle;
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php
index a70f280..154be1b 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php
@@ -112,9 +112,7 @@ class ORMQueryBuilderLoaderTest extends TestCase
         $loader->getEntitiesByIds('id', [1, '', 2, 3, 'foo', '9223372036854775808']);
     }
 
-    /**
-     * @dataProvider provideGuidEntityClasses
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideGuidEntityClasses')]
     public function testFilterEmptyUuids(string $entityClass)
     {
         $em = DoctrineTestHelper::createTestEntityManager();
@@ -146,9 +144,7 @@ class ORMQueryBuilderLoaderTest extends TestCase
         $loader->getEntitiesByIds('id', ['71c5fd46-3f16-4abb-bad7-90ac1e654a2d', '', 'b98e8e11-2897-44df-ad24-d2627eb7f499']);
     }
 
-    /**
-     * @dataProvider provideUidEntityClasses
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUidEntityClasses')]
     public function testFilterUid(string $entityClass)
     {
         if (Type::hasType('uuid')) {
@@ -189,9 +185,7 @@ class ORMQueryBuilderLoaderTest extends TestCase
         $loader->getEntitiesByIds('id', ['71c5fd46-3f16-4abb-bad7-90ac1e654a2d', '', 'b98e8e11-2897-44df-ad24-d2627eb7f499']);
     }
 
-    /**
-     * @dataProvider provideUidEntityClasses
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUidEntityClasses')]
     public function testUidThrowProperException(string $entityClass)
     {
         if (Type::hasType('uuid')) {
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/DoctrineOrmTypeGuesserTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/DoctrineOrmTypeGuesserTest.php
index 930ee99..236ffcb 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Form/DoctrineOrmTypeGuesserTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Form/DoctrineOrmTypeGuesserTest.php
@@ -25,9 +25,7 @@ use Symfony\Component\Form\Guess\ValueGuess;
 
 class DoctrineOrmTypeGuesserTest extends TestCase
 {
-    /**
-     * @dataProvider requiredType
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('requiredType')]
     public function testTypeGuesser(string $type, $expected)
     {
         $classMetadata = $this->createMock(ClassMetadata::class);
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php
index 3ae6ecd..e2b7f59 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php
@@ -81,9 +81,9 @@ class EntityTypePerformanceTest extends FormPerformanceTestCase
     /**
      * This test case is realistic in collection forms where each
      * row contains the same entity field.
-     *
-     * @group benchmark
      */
+    #[\PHPUnit\Framework\Attributes\Group('benchmark')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCollapsedEntityField()
     {
         $this->setMaxRunningTime(1);
@@ -98,9 +98,8 @@ class EntityTypePerformanceTest extends FormPerformanceTestCase
         }
     }
 
-    /**
-     * @group benchmark
-     */
+    #[\PHPUnit\Framework\Attributes\Group('benchmark')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCollapsedEntityFieldWithChoices()
     {
         $choices = $this->em->createQuery('SELECT c FROM '.self::ENTITY_CLASS.' c')->getResult();
@@ -117,9 +116,8 @@ class EntityTypePerformanceTest extends FormPerformanceTestCase
         }
     }
 
-    /**
-     * @group benchmark
-     */
+    #[\PHPUnit\Framework\Attributes\Group('benchmark')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCollapsedEntityFieldWithPreferredChoices()
     {
         $choices = $this->em->createQuery('SELECT c FROM '.self::ENTITY_CLASS.' c')->getResult();
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php
index dc159ee..24bb29f 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php
@@ -118,9 +118,7 @@ class EntityTypeTest extends BaseTypeTestCase
         ]);
     }
 
-    /**
-     * @dataProvider choiceTranslationDomainProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('choiceTranslationDomainProvider')]
     public function testChoiceTranslationDomainIsDisabledByDefault($expanded)
     {
         $entity1 = new SingleIntIdEntity(1, 'Foo');
diff --git a/src/Symfony/Bridge/Doctrine/Tests/LegacyManagerRegistryTest.php b/src/Symfony/Bridge/Doctrine/Tests/LegacyManagerRegistryTest.php
index 65944b4..d655d50 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/LegacyManagerRegistryTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/LegacyManagerRegistryTest.php
@@ -22,9 +22,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\DependencyInjection\Dumper\PhpDumper;
 use Symfony\Component\Filesystem\Filesystem;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class LegacyManagerRegistryTest extends TestCase
 {
     public static function setUpBeforeClass(): void
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php b/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php
index b878cd4..715b33a 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Logger/DbalLoggerTest.php
@@ -16,9 +16,7 @@ use PHPUnit\Framework\TestCase;
 use Psr\Log\LoggerInterface;
 use Symfony\Bridge\Doctrine\Logger\DbalLogger;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class DbalLoggerTest extends TestCase
 {
     public static function setUpBeforeClass(): void
@@ -28,9 +26,7 @@ class DbalLoggerTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider getLogFixtures
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLogFixtures')]
     public function testLog($sql, $params, $logParams)
     {
         $logger = $this->createMock(LoggerInterface::class);
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Middleware/Debug/MiddlewareTest.php b/src/Symfony/Bridge/Doctrine/Tests/Middleware/Debug/MiddlewareTest.php
index 7c7f356..206da1a 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Middleware/Debug/MiddlewareTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Middleware/Debug/MiddlewareTest.php
@@ -27,9 +27,7 @@ use Symfony\Bridge\Doctrine\Middleware\Debug\Middleware;
 use Symfony\Bridge\PhpUnit\ClockMock;
 use Symfony\Component\Stopwatch\Stopwatch;
 
-/**
- * @requires extension pdo_sqlite
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pdo_sqlite')]
 class MiddlewareTest extends TestCase
 {
     private DebugDataHolder $debugDataHolder;
@@ -99,9 +97,7 @@ EOT);
         ];
     }
 
-    /**
-     * @dataProvider provideExecuteMethod
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideExecuteMethod')]
     public function testWithoutBinding(callable $executeMethod)
     {
         $this->init();
@@ -116,9 +112,7 @@ EOT);
         $this->assertGreaterThan(0, $debug[1]['executionMS']);
     }
 
-    /**
-     * @dataProvider provideExecuteMethod
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideExecuteMethod')]
     public function testWithValueBound(callable $executeMethod)
     {
         $this->init();
@@ -146,9 +140,7 @@ EOT;
         $this->assertGreaterThan(0, $debug[1]['executionMS']);
     }
 
-    /**
-     * @dataProvider provideExecuteMethod
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideExecuteMethod')]
     public function testWithParamBound(callable $executeMethod)
     {
         $this->init();
@@ -185,9 +177,7 @@ EOT;
         ];
     }
 
-    /**
-     * @dataProvider provideEndTransactionMethod
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEndTransactionMethod')]
     public function testTransaction(callable $endTransactionMethod, string $expectedEndTransactionDebug)
     {
         $this->init();
@@ -243,9 +233,7 @@ EOT;
         ];
     }
 
-    /**
-     * @dataProvider provideExecuteAndEndTransactionMethods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideExecuteAndEndTransactionMethods')]
     public function testGlobalDoctrineDuration(callable $sqlMethod, callable $endTransactionMethod)
     {
         $this->init();
@@ -269,9 +257,8 @@ EOT;
         $this->assertCount(4, $this->stopwatch->getEvent('doctrine')->getPeriods());
     }
 
-    /**
-     * @dataProvider provideExecuteAndEndTransactionMethods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideExecuteAndEndTransactionMethods')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testWithoutStopwatch(callable $sqlMethod, callable $endTransactionMethod)
     {
         $this->init(false);
diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php
index a6ae988..dd8a147 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php
@@ -114,9 +114,7 @@ class DoctrineExtractorTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider typesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('typesProvider')]
     public function testExtract(string $property, ?array $type = null)
     {
         $this->assertEquals($type, $this->createExtractor()->getTypes(DoctrineDummy::class, $property, []));
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderPostgresTest.php b/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderPostgresTest.php
index 230ec78..1c84e6a 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderPostgresTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderPostgresTest.php
@@ -17,11 +17,8 @@ use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory;
 use Doctrine\ORM\ORMSetup;
 use Symfony\Bridge\Doctrine\Security\RememberMe\DoctrineTokenProvider;
 
-/**
- * @requires extension pdo_pgsql
- *
- * @group integration
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pdo_pgsql')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class DoctrineTokenProviderPostgresTest extends DoctrineTokenProviderTest
 {
     public static function setUpBeforeClass(): void
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php b/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php
index 2820419..d074dab 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php
@@ -19,9 +19,7 @@ use Symfony\Bridge\Doctrine\Security\RememberMe\DoctrineTokenProvider;
 use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken;
 use Symfony\Component\Security\Core\Exception\TokenNotFoundException;
 
-/**
- * @requires extension pdo_sqlite
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pdo_sqlite')]
 class DoctrineTokenProviderTest extends TestCase
 {
     public function testCreateNewToken()
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Types/UlidTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Types/UlidTypeTest.php
index e7b8b44..c6adf00 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Types/UlidTypeTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Types/UlidTypeTest.php
@@ -137,9 +137,7 @@ final class UlidTypeTest extends TestCase
         $this->assertEquals('ulid', $this->type->getName());
     }
 
-    /**
-     * @dataProvider provideSqlDeclarations
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSqlDeclarations')]
     public function testGetGuidTypeDeclarationSQL(AbstractPlatform $platform, string $expectedDeclaration)
     {
         $this->assertEquals($expectedDeclaration, $this->type->getSqlDeclaration(['length' => 36], $platform));
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Types/UuidTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Types/UuidTypeTest.php
index 92d267b..22d9081 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Types/UuidTypeTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Types/UuidTypeTest.php
@@ -144,9 +144,7 @@ final class UuidTypeTest extends TestCase
         $this->assertEquals('uuid', $this->type->getName());
     }
 
-    /**
-     * @dataProvider provideSqlDeclarations
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSqlDeclarations')]
     public function testGetGuidTypeDeclarationSQL(AbstractPlatform $platform, string $expectedDeclaration)
     {
         $this->assertEquals($expectedDeclaration, $this->type->getSqlDeclaration(['length' => 36], $platform));
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php
index e6db9e3..df760b5 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php
@@ -112,9 +112,8 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
 
     /**
      * This is a functional test as there is a large integration necessary to get the validator working.
-     *
-     * @dataProvider provideUniquenessConstraints
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUniquenessConstraints')]
     public function testValidateUniqueness(UniqueEntity $constraint)
     {
         $entity1 = new SingleIntIdEntity(1, 'Foo');
@@ -153,9 +152,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
         yield 'Named arguments' => [new UniqueEntity(message: 'myMessage', fields: ['name'], em: 'foo')];
     }
 
-    /**
-     * @dataProvider provideConstraintsWithCustomErrorPath
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstraintsWithCustomErrorPath')]
     public function testValidateCustomErrorPath(UniqueEntity $constraint)
     {
         $entity1 = new SingleIntIdEntity(1, 'Foo');
@@ -187,9 +184,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
         yield 'Named arguments' => [new UniqueEntity(message: 'myMessage', fields: ['name'], em: 'foo', errorPath: 'bar')];
     }
 
-    /**
-     * @dataProvider provideUniquenessConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUniquenessConstraints')]
     public function testValidateUniquenessWithNull(UniqueEntity $constraint)
     {
         $entity1 = new SingleIntIdEntity(1, null);
@@ -204,10 +199,8 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider provideConstraintsWithIgnoreNullDisabled
-     * @dataProvider provideConstraintsWithIgnoreNullEnabledOnFirstField
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstraintsWithIgnoreNullDisabled')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstraintsWithIgnoreNullEnabledOnFirstField')]
     public function testValidateUniquenessWithIgnoreNullDisableOnSecondField(UniqueEntity $constraint)
     {
         $entity1 = new DoubleNameEntity(1, 'Foo', null);
@@ -247,9 +240,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
         yield 'Named arguments' => [new UniqueEntity(message: 'myMessage', fields: ['name', 'name2'], em: 'foo', ignoreNull: false)];
     }
 
-    /**
-     * @dataProvider provideConstraintsWithIgnoreNullEnabled
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstraintsWithIgnoreNullEnabled')]
     public function testAllConfiguredFieldsAreCheckedOfBeingMappedByDoctrineWithIgnoreNullEnabled(UniqueEntity $constraint)
     {
         $entity1 = new SingleIntIdEntity(1, null);
@@ -258,10 +249,8 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate($entity1, $constraint);
     }
 
-    /**
-     * @dataProvider provideConstraintsWithIgnoreNullEnabled
-     * @dataProvider provideConstraintsWithIgnoreNullEnabledOnFirstField
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstraintsWithIgnoreNullEnabled')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstraintsWithIgnoreNullEnabledOnFirstField')]
     public function testNoValidationIfFirstFieldIsNullAndNullValuesAreIgnored(UniqueEntity $constraint)
     {
         $entity1 = new DoubleNullableNameEntity(1, null, 'Foo');
@@ -341,9 +330,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider provideConstraintsWithCustomRepositoryMethod
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstraintsWithCustomRepositoryMethod')]
     public function testValidateUniquenessUsingCustomRepositoryMethod(UniqueEntity $constraint)
     {
         $this->em->getRepository(SingleIntIdEntity::class)->result = [];
@@ -357,9 +344,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider provideConstraintsWithCustomRepositoryMethod
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstraintsWithCustomRepositoryMethod')]
     public function testValidateUniquenessWithUnrewoundArray(UniqueEntity $constraint)
     {
         $entity = new SingleIntIdEntity(1, 'foo');
@@ -390,9 +375,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
         yield 'Named arguments' => [new UniqueEntity(message: 'myMessage', fields: ['name'], em: 'foo', repositoryMethod: 'findByCustom')];
     }
 
-    /**
-     * @dataProvider resultTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('resultTypesProvider')]
     public function testValidateResultTypes($entity1, $result)
     {
         $constraint = new UniqueEntity([
@@ -759,9 +742,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider resultWithEmptyIterator
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('resultWithEmptyIterator')]
     public function testValidateUniquenessWithEmptyIterator($entity, $result)
     {
         $constraint = new UniqueEntity([
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php b/src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php
index a5ca516..ab2ec30 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php
@@ -175,9 +175,7 @@ class DoctrineLoaderTest extends TestCase
         $this->assertCount(0, $constraints);
     }
 
-    /**
-     * @dataProvider regexpProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('regexpProvider')]
     public function testClassValidator(bool $expected, ?string $classValidatorRegexp = null)
     {
         $doctrineLoader = new DoctrineLoader(DoctrineTestHelper::createTestEntityManager(), $classValidatorRegexp, false);
diff --git a/src/Symfony/Bridge/Monolog/Tests/Formatter/ConsoleFormatterTest.php b/src/Symfony/Bridge/Monolog/Tests/Formatter/ConsoleFormatterTest.php
index 3517966..75fe76a 100644
--- a/src/Symfony/Bridge/Monolog/Tests/Formatter/ConsoleFormatterTest.php
+++ b/src/Symfony/Bridge/Monolog/Tests/Formatter/ConsoleFormatterTest.php
@@ -19,9 +19,7 @@ use Symfony\Bridge\Monolog\Tests\RecordFactory;
 
 class ConsoleFormatterTest extends TestCase
 {
-    /**
-     * @dataProvider providerFormatTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerFormatTests')]
     public function testFormat(array|LogRecord $record, $expectedMessage)
     {
         $formatter = new ConsoleFormatter();
diff --git a/src/Symfony/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php b/src/Symfony/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php
index d0c928f..a55247d 100644
--- a/src/Symfony/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php
+++ b/src/Symfony/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php
@@ -45,9 +45,7 @@ class ConsoleHandlerTest extends TestCase
         $this->assertFalse($handler->isHandling(RecordFactory::create()), '->isHandling returns false when no output is set');
     }
 
-    /**
-     * @dataProvider provideVerbosityMappingTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideVerbosityMappingTests')]
     public function testVerbosityMapping($verbosity, $level, $isHandling, array $map = [])
     {
         $output = $this->createMock(OutputInterface::class);
diff --git a/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/HttpCodeActivationStrategyTest.php b/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/HttpCodeActivationStrategyTest.php
index 37286d3..2b42aea 100644
--- a/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/HttpCodeActivationStrategyTest.php
+++ b/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/HttpCodeActivationStrategyTest.php
@@ -34,9 +34,7 @@ class HttpCodeActivationStrategyTest extends TestCase
         new HttpCodeActivationStrategy(new RequestStack(), [['code' => 404]], new ErrorLevelActivationStrategy(Logger::WARNING));
     }
 
-    /**
-     * @dataProvider isActivatedProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('isActivatedProvider')]
     public function testIsActivated($url, $record, $expected)
     {
         $requestStack = new RequestStack();
diff --git a/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/NotFoundActivationStrategyTest.php b/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/NotFoundActivationStrategyTest.php
index 36c448c..fe838a0 100644
--- a/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/NotFoundActivationStrategyTest.php
+++ b/src/Symfony/Bridge/Monolog/Tests/Handler/FingersCrossed/NotFoundActivationStrategyTest.php
@@ -23,9 +23,7 @@ use Symfony\Component\HttpKernel\Exception\HttpException;
 
 class NotFoundActivationStrategyTest extends TestCase
 {
-    /**
-     * @dataProvider isActivatedProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('isActivatedProvider')]
     public function testIsActivated(string $url, array|LogRecord $record, bool $expected)
     {
         $requestStack = new RequestStack();
diff --git a/src/Symfony/Bridge/Monolog/Tests/LoggerTest.php b/src/Symfony/Bridge/Monolog/Tests/LoggerTest.php
index 0cadb9c..6e13d37 100644
--- a/src/Symfony/Bridge/Monolog/Tests/LoggerTest.php
+++ b/src/Symfony/Bridge/Monolog/Tests/LoggerTest.php
@@ -18,9 +18,7 @@ use Symfony\Bridge\Monolog\Logger;
 use Symfony\Bridge\Monolog\Processor\DebugProcessor;
 use Symfony\Component\HttpFoundation\Request;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class LoggerTest extends TestCase
 {
     public function testGetLogsWithoutDebugProcessor()
diff --git a/src/Symfony/Bridge/PhpUnit/Tests/ClockMockTest.php b/src/Symfony/Bridge/PhpUnit/Tests/ClockMockTest.php
index 7df7865..daf86dd 100644
--- a/src/Symfony/Bridge/PhpUnit/Tests/ClockMockTest.php
+++ b/src/Symfony/Bridge/PhpUnit/Tests/ClockMockTest.php
@@ -16,9 +16,8 @@ use Symfony\Bridge\PhpUnit\ClockMock;
 
 /**
  * @author Dominic Tubach <dominic.tubach@to.com>
- *
- * @covers \Symfony\Bridge\PhpUnit\ClockMock
  */
+#[\PHPUnit\Framework\Attributes\CoversClass(\Symfony\Bridge\PhpUnit\ClockMock::class)]
 class ClockMockTest extends TestCase
 {
     public static function setUpBeforeClass(): void
diff --git a/src/Symfony/Bridge/PhpUnit/Tests/CoverageListenerTest.php b/src/Symfony/Bridge/PhpUnit/Tests/CoverageListenerTest.php
index 3211341..5865167 100644
--- a/src/Symfony/Bridge/PhpUnit/Tests/CoverageListenerTest.php
+++ b/src/Symfony/Bridge/PhpUnit/Tests/CoverageListenerTest.php
@@ -15,9 +15,7 @@ use PHPUnit\Framework\TestCase;
 
 class CoverageListenerTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function test()
     {
         if ('\\' === \DIRECTORY_SEPARATOR) {
diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/ConfigurationTest.php b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/ConfigurationTest.php
index af96557..5cfe785 100644
--- a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/ConfigurationTest.php
+++ b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/ConfigurationTest.php
@@ -189,9 +189,7 @@ class ConfigurationTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideItCanBeDisabled
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideItCanBeDisabled')]
     public function testItCanBeDisabled(string $encodedString, bool $expectedEnabled)
     {
         $configuration = Configuration::fromUrlEncodedString($encodedString);
@@ -235,9 +233,7 @@ class ConfigurationTest extends TestCase
         $this->assertFalse($configuration->verboseOutput('other'));
     }
 
-    /**
-     * @dataProvider provideDataForToleratesForGroup
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDataForToleratesForGroup')]
     public function testToleratesForIndividualGroups(string $deprecationsHelper, array $deprecationsPerType, array $expected)
     {
         $configuration = Configuration::fromUrlEncodedString($deprecationsHelper);
@@ -471,9 +467,7 @@ class ConfigurationTest extends TestCase
         $this->assertEquals(json_encode($expected, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES), file_get_contents($filename));
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testBaselineGenerationWithDeprecationTriggeredByDebugClassLoader()
     {
         $filename = $this->createFile();
diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php
index 34bb193..4873e73 100644
--- a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php
+++ b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php
@@ -87,9 +87,7 @@ class DeprecationTest extends TestCase
         $this->assertNotSame(Deprecation::TYPE_INDIRECT, $deprecation->getType());
     }
 
-    /**
-     * @dataProvider mutedProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('mutedProvider')]
     public function testItMutesOnlySpecificErrorMessagesWhenTheCallingCodeIsInPhpunit($muted, $callingClass, $message)
     {
         $trace = $this->debugBacktrace();
@@ -169,9 +167,7 @@ class DeprecationTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider providerGetTypeDetectsSelf
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerGetTypeDetectsSelf')]
     public function testGetTypeDetectsSelf(string $expectedType, string $message, string $traceClass, string $file)
     {
         $this->markTestSkipped('type_undetermined instead of type_self in Debian as of 2020/01/06');
@@ -233,10 +229,8 @@ class DeprecationTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider providerGetTypeUsesRightTrace
-     * @group composer
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerGetTypeUsesRightTrace')]
+    #[\PHPUnit\Framework\Attributes\Group('composer')]
     public function testGetTypeUsesRightTrace(string $expectedType, string $message, array $trace)
     {
         $deprecation = new Deprecation(
diff --git a/src/Symfony/Bridge/PhpUnit/Tests/EnumExistsMockTest.php b/src/Symfony/Bridge/PhpUnit/Tests/EnumExistsMockTest.php
index 21cdd29..d6cac6b 100644
--- a/src/Symfony/Bridge/PhpUnit/Tests/EnumExistsMockTest.php
+++ b/src/Symfony/Bridge/PhpUnit/Tests/EnumExistsMockTest.php
@@ -16,9 +16,7 @@ use Symfony\Bridge\PhpUnit\ClassExistsMock;
 use Symfony\Bridge\PhpUnit\Tests\Fixtures\ExistingEnum;
 use Symfony\Bridge\PhpUnit\Tests\Fixtures\ExistingEnumReal;
 
-/**
- * @requires PHP 8.1
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhp('8.1')]
 class EnumExistsMockTest extends TestCase
 {
     public static function setUpBeforeClass(): void
diff --git a/src/Symfony/Bridge/PhpUnit/Tests/ExpectDeprecationTraitTest.php b/src/Symfony/Bridge/PhpUnit/Tests/ExpectDeprecationTraitTest.php
index 224e994..d30d828 100644
--- a/src/Symfony/Bridge/PhpUnit/Tests/ExpectDeprecationTraitTest.php
+++ b/src/Symfony/Bridge/PhpUnit/Tests/ExpectDeprecationTraitTest.php
@@ -20,9 +20,9 @@ final class ExpectDeprecationTraitTest extends TestCase
 
     /**
      * Do not remove this test in the next major version.
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testOne()
     {
         $this->expectDeprecation('foo');
@@ -32,10 +32,11 @@ final class ExpectDeprecationTraitTest extends TestCase
     /**
      * Do not remove this test in the next major version.
      *
-     * @group legacy
      *
-     * @runInSeparateProcess
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testOneInIsolation()
     {
         $this->expectDeprecation('foo');
@@ -44,9 +45,9 @@ final class ExpectDeprecationTraitTest extends TestCase
 
     /**
      * Do not remove this test in the next major version.
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testMany()
     {
         $this->expectDeprecation('foo');
@@ -58,10 +59,11 @@ final class ExpectDeprecationTraitTest extends TestCase
     /**
      * Do not remove this test in the next major version.
      *
-     * @group legacy
      *
      * @expectedDeprecation foo
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testOneWithAnnotation()
     {
         $this->expectDeprecation('bar');
@@ -72,11 +74,12 @@ final class ExpectDeprecationTraitTest extends TestCase
     /**
      * Do not remove this test in the next major version.
      *
-     * @group legacy
      *
      * @expectedDeprecation foo
      * @expectedDeprecation bar
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testManyWithAnnotation()
     {
         $this->expectDeprecation('ccc');
diff --git a/src/Symfony/Bridge/PhpUnit/Tests/ExpectedDeprecationAnnotationTest.php b/src/Symfony/Bridge/PhpUnit/Tests/ExpectedDeprecationAnnotationTest.php
index 329bf69..5e02cc7 100644
--- a/src/Symfony/Bridge/PhpUnit/Tests/ExpectedDeprecationAnnotationTest.php
+++ b/src/Symfony/Bridge/PhpUnit/Tests/ExpectedDeprecationAnnotationTest.php
@@ -18,10 +18,11 @@ final class ExpectedDeprecationAnnotationTest extends TestCase
     /**
      * Do not remove this test in the next major versions.
      *
-     * @group legacy
      *
      * @expectedDeprecation foo
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testOne()
     {
         @trigger_error('foo', \E_USER_DEPRECATED);
@@ -30,11 +31,12 @@ final class ExpectedDeprecationAnnotationTest extends TestCase
     /**
      * Do not remove this test in the next major versions.
      *
-     * @group legacy
      *
      * @expectedDeprecation foo
      * @expectedDeprecation bar
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testMany()
     {
         @trigger_error('foo', \E_USER_DEPRECATED);
diff --git a/src/Symfony/Bridge/PhpUnit/Tests/FailTests/ExpectDeprecationTraitTestFail.php b/src/Symfony/Bridge/PhpUnit/Tests/FailTests/ExpectDeprecationTraitTestFail.php
index f2eb1b1..aaca378 100644
--- a/src/Symfony/Bridge/PhpUnit/Tests/FailTests/ExpectDeprecationTraitTestFail.php
+++ b/src/Symfony/Bridge/PhpUnit/Tests/FailTests/ExpectDeprecationTraitTestFail.php
@@ -26,9 +26,9 @@ final class ExpectDeprecationTraitTestFail extends TestCase
 
     /**
      * Do not remove this test in the next major version.
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testOne()
     {
         $this->expectDeprecation('foo');
@@ -38,10 +38,11 @@ final class ExpectDeprecationTraitTestFail extends TestCase
     /**
      * Do not remove this test in the next major version.
      *
-     * @group legacy
      *
-     * @runInSeparateProcess
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testOneInIsolation()
     {
         $this->expectDeprecation('foo');
diff --git a/src/Symfony/Bridge/PhpUnit/Tests/FailTests/NoAssertionsTestRisky.php b/src/Symfony/Bridge/PhpUnit/Tests/FailTests/NoAssertionsTestRisky.php
index 4a22baf..97567fd 100644
--- a/src/Symfony/Bridge/PhpUnit/Tests/FailTests/NoAssertionsTestRisky.php
+++ b/src/Symfony/Bridge/PhpUnit/Tests/FailTests/NoAssertionsTestRisky.php
@@ -24,9 +24,8 @@ final class NoAssertionsTestRisky extends TestCase
 
     /**
      * Do not remove this test in the next major version.
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testOne()
     {
         $this->expectNotToPerformAssertions();
diff --git a/src/Symfony/Bridge/PhpUnit/Tests/OnlyExpectingDeprecationSkippedTest.php b/src/Symfony/Bridge/PhpUnit/Tests/OnlyExpectingDeprecationSkippedTest.php
index 593e0b4..4668a06 100644
--- a/src/Symfony/Bridge/PhpUnit/Tests/OnlyExpectingDeprecationSkippedTest.php
+++ b/src/Symfony/Bridge/PhpUnit/Tests/OnlyExpectingDeprecationSkippedTest.php
@@ -15,18 +15,18 @@ use PHPUnit\Framework\TestCase;
 
 /**
  * This test is meant to be skipped.
- *
- * @requires extension ext-dummy
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('ext-dummy')]
 final class OnlyExpectingDeprecationSkippedTest extends TestCase
 {
     /**
      * Do not remove this test in the next major versions.
      *
-     * @group legacy
      *
      * @expectedDeprecation unreachable
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testExpectingOnlyDeprecations()
     {
         $this->fail('should never be ran.');
diff --git a/src/Symfony/Bridge/PhpUnit/Tests/ProcessIsolationTest.php b/src/Symfony/Bridge/PhpUnit/Tests/ProcessIsolationTest.php
index 9027ffb..318bfe5 100644
--- a/src/Symfony/Bridge/PhpUnit/Tests/ProcessIsolationTest.php
+++ b/src/Symfony/Bridge/PhpUnit/Tests/ProcessIsolationTest.php
@@ -16,24 +16,23 @@ use PHPUnit\Framework\TestCase;
 /**
  * Don't remove this test case, it tests the legacy group.
  *
- * @group legacy
  *
- * @runTestsInSeparateProcesses
  */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
+#[\PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses]
 class ProcessIsolationTest extends TestCase
 {
     /**
      * @expectedDeprecation Test abc
      */
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testIsolation()
     {
         @trigger_error('Test abc', \E_USER_DEPRECATED);
         $this->addToAssertionCount(1);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testCallingOtherErrorHandler()
     {
         $this->expectException(\PHPUnit\Framework\Exception::class);
diff --git a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/ContainerBuilderTest.php b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/ContainerBuilderTest.php
index 63a4f97..089eb3f 100644
--- a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/ContainerBuilderTest.php
+++ b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/ContainerBuilderTest.php
@@ -23,9 +23,8 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
  * with the ProxyManager bridge.
  *
  * @author Marco Pivetta <ocramius@gmail.com>
- *
- * @group legacy
  */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class ContainerBuilderTest extends TestCase
 {
     public function testCreateProxyServiceWithRuntimeInstantiator()
diff --git a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Dumper/PhpDumperTest.php b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Dumper/PhpDumperTest.php
index 2b0a432..39eb0cd 100644
--- a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Dumper/PhpDumperTest.php
+++ b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Dumper/PhpDumperTest.php
@@ -22,9 +22,8 @@ use Symfony\Component\DependencyInjection\Dumper\PhpDumper;
  * with the ProxyManager bridge.
  *
  * @author Marco Pivetta <ocramius@gmail.com>
- *
- * @group legacy
  */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class PhpDumperTest extends TestCase
 {
     public function testDumpContainerWithProxyService()
diff --git a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.php b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.php
index da9c47c..276c4f3 100644
--- a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.php
+++ b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.php
@@ -22,9 +22,8 @@ use Symfony\Component\DependencyInjection\Definition;
  * Tests for {@see RuntimeInstantiator}.
  *
  * @author Marco Pivetta <ocramius@gmail.com>
- *
- * @group legacy
  */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class RuntimeInstantiatorTest extends TestCase
 {
     protected RuntimeInstantiator $instantiator;
diff --git a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php
index 1fe2fa4..3af75b2 100644
--- a/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php
+++ b/src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php
@@ -20,9 +20,8 @@ use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface;
  * Tests for {@see ProxyDumper}.
  *
  * @author Marco Pivetta <ocramius@gmail.com>
- *
- * @group legacy
  */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class ProxyDumperTest extends TestCase
 {
     protected ProxyDumper $dumper;
@@ -32,9 +31,7 @@ class ProxyDumperTest extends TestCase
         $this->dumper = new ProxyDumper();
     }
 
-    /**
-     * @dataProvider getProxyCandidates
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getProxyCandidates')]
     public function testIsProxyCandidate(Definition $definition, bool $expected)
     {
         $this->assertSame($expected, $this->dumper->isProxyCandidate($definition));
@@ -77,9 +74,7 @@ class ProxyDumperTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider getPrivatePublicDefinitions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPrivatePublicDefinitions')]
     public function testCorrectAssigning(Definition $definition, $access)
     {
         $definition->setLazy(true);
diff --git a/src/Symfony/Bridge/PsrHttpMessage/Tests/Factory/PsrHttpFactoryTest.php b/src/Symfony/Bridge/PsrHttpMessage/Tests/Factory/PsrHttpFactoryTest.php
index 850e84d..2f30dd9 100644
--- a/src/Symfony/Bridge/PsrHttpMessage/Tests/Factory/PsrHttpFactoryTest.php
+++ b/src/Symfony/Bridge/PsrHttpMessage/Tests/Factory/PsrHttpFactoryTest.php
@@ -35,9 +35,7 @@ class PsrHttpFactoryTest extends TestCase
         $this->tmpDir = sys_get_temp_dir();
     }
 
-    /**
-     * @dataProvider provideFactories
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFactories')]
     public function testCreateRequest(PsrHttpFactory $factory)
     {
         $stdClass = new \stdClass();
@@ -137,9 +135,7 @@ class PsrHttpFactoryTest extends TestCase
         return new UploadedFile($path, $originalName, $mimeType, $error, true);
     }
 
-    /**
-     * @dataProvider provideFactories
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFactories')]
     public function testCreateResponse(PsrHttpFactory $factory)
     {
         $response = new Response(
diff --git a/src/Symfony/Bridge/PsrHttpMessage/Tests/Functional/CovertTest.php b/src/Symfony/Bridge/PsrHttpMessage/Tests/Functional/CovertTest.php
index c350f29..b924e53 100644
--- a/src/Symfony/Bridge/PsrHttpMessage/Tests/Functional/CovertTest.php
+++ b/src/Symfony/Bridge/PsrHttpMessage/Tests/Functional/CovertTest.php
@@ -41,9 +41,7 @@ class CovertTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider requestProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('requestProvider')]
     public function testConvertRequestMultipleTimes(ServerRequestInterface|Request $request, HttpMessageFactoryInterface|HttpFoundationFactoryInterface $firstFactory, HttpMessageFactoryInterface|HttpFoundationFactoryInterface $secondFactory)
     {
         $temporaryRequest = $firstFactory->createRequest($request);
@@ -151,9 +149,7 @@ class CovertTest extends TestCase
         }, $psr7Requests));
     }
 
-    /**
-     * @dataProvider responseProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('responseProvider')]
     public function testConvertResponseMultipleTimes(ResponseInterface|Response $response, HttpMessageFactoryInterface|HttpFoundationFactoryInterface $firstFactory, HttpMessageFactoryInterface|HttpFoundationFactoryInterface $secondFactory)
     {
         $temporaryResponse = $firstFactory->createResponse($response);
diff --git a/src/Symfony/Bridge/Twig/Tests/AppVariableTest.php b/src/Symfony/Bridge/Twig/Tests/AppVariableTest.php
index beed252..ca9ebda 100644
--- a/src/Symfony/Bridge/Twig/Tests/AppVariableTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/AppVariableTest.php
@@ -31,9 +31,7 @@ class AppVariableTest extends TestCase
         $this->appVariable = new AppVariable();
     }
 
-    /**
-     * @dataProvider debugDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('debugDataProvider')]
     public function testDebug($debugFlag)
     {
         $this->appVariable->setDebug($debugFlag);
@@ -56,9 +54,7 @@ class AppVariableTest extends TestCase
         $this->assertEquals('dev', $this->appVariable->getEnvironment());
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testGetSession()
     {
         $request = $this->createMock(Request::class);
@@ -192,18 +188,14 @@ class AppVariableTest extends TestCase
         $this->assertEquals([], $this->appVariable->getFlashes());
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testGetFlashesWithNoSessionStarted()
     {
         $flashMessages = $this->setFlashMessages(false);
         $this->assertEquals($flashMessages, $this->appVariable->getFlashes());
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testGetFlashes()
     {
         $flashMessages = $this->setFlashMessages();
diff --git a/src/Symfony/Bridge/Twig/Tests/Command/DebugCommandTest.php b/src/Symfony/Bridge/Twig/Tests/Command/DebugCommandTest.php
index 8a67932..c0587fa 100644
--- a/src/Symfony/Bridge/Twig/Tests/Command/DebugCommandTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/Command/DebugCommandTest.php
@@ -72,9 +72,7 @@ class DebugCommandTest extends TestCase
         $this->createCommandTester()->execute(['name' => '@foo']);
     }
 
-    /**
-     * @dataProvider getDebugTemplateNameTestData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDebugTemplateNameTestData')]
     public function testDebugTemplateName(array $input, string $output, array $paths)
     {
         $tester = $this->createCommandTester($paths);
@@ -294,9 +292,7 @@ TXT
         $this->assertNotSame($display1, $display2);
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $projectDir = \dirname(__DIR__).\DIRECTORY_SEPARATOR.'Fixtures';
diff --git a/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php b/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php
index 3b0b453..9a3a23b 100644
--- a/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php
@@ -72,9 +72,8 @@ class LintCommandTest extends TestCase
 
     /**
      * When deprecations are not reported by the command, the testsuite reporter will catch them so we need to mark the test as legacy.
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLintFileWithNotReportedDeprecation()
     {
         $tester = $this->createCommandTester();
@@ -98,9 +97,7 @@ class LintCommandTest extends TestCase
         $this->assertStringContainsString('Filter "deprecated_filter" is deprecated', trim($tester->getDisplay()));
     }
 
-    /**
-     * @group tty
-     */
+    #[\PHPUnit\Framework\Attributes\Group('tty')]
     public function testLintDefaultPaths()
     {
         $tester = $this->createCommandTester();
@@ -137,9 +134,7 @@ class LintCommandTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $tester = new CommandCompletionTester($this->createCommand());
diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTestCase.php b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTestCase.php
index a25bd54..ebd0559 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTestCase.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTestCase.php
@@ -1786,6 +1786,7 @@ abstract class AbstractBootstrap3LayoutTestCase extends AbstractLayoutTestCase
         );
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDateTimeWithWidgetSingleTextIgnoreDateAndTimeWidgets()
     {
         $this->markTestSkipped('Make tests pass with symfony/form 4.4');
diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap5LayoutTestCase.php b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap5LayoutTestCase.php
index 4b3aa7f..26c35f4 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap5LayoutTestCase.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap5LayoutTestCase.php
@@ -307,6 +307,7 @@ abstract class AbstractBootstrap5LayoutTestCase extends AbstractBootstrap4Layout
         );
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testErrors()
     {
         self::markTestSkipped('This method has been split into testRootErrors() and testRowErrors().');
@@ -348,6 +349,7 @@ abstract class AbstractBootstrap5LayoutTestCase extends AbstractBootstrap4Layout
         );
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testErrorWithNoLabel()
     {
         self::markTestSkipped('Errors are no longer rendered inside label with Bootstrap 5.');
@@ -955,6 +957,7 @@ abstract class AbstractBootstrap5LayoutTestCase extends AbstractBootstrap4Layout
         );
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testFileLabelIdNotDuplicated()
     {
         $this->markTestSkipped('The Bootstrap 5 form theme does not use the file widget shipped with the Bootstrap 4 theme.');
@@ -989,6 +992,7 @@ abstract class AbstractBootstrap5LayoutTestCase extends AbstractBootstrap4Layout
         );
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testFileWithPlaceholder()
     {
         self::markTestSkipped('Placeholder does not apply on input file.');
diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractDivLayoutTestCase.php b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractDivLayoutTestCase.php
index d4ecfce..7257239 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractDivLayoutTestCase.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractDivLayoutTestCase.php
@@ -601,9 +601,7 @@ abstract class AbstractDivLayoutTestCase extends AbstractLayoutTestCase
         );
     }
 
-    /**
-     * @dataProvider themeBlockInheritanceProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('themeBlockInheritanceProvider')]
     public function testThemeBlockInheritance($theme)
     {
         $view = $this->factory
@@ -619,9 +617,7 @@ abstract class AbstractDivLayoutTestCase extends AbstractLayoutTestCase
         );
     }
 
-    /**
-     * @dataProvider themeInheritanceProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('themeInheritanceProvider')]
     public function testThemeInheritance($parentTheme, $childTheme)
     {
         $child = $this->factory->createNamedBuilder('child', 'Symfony\Component\Form\Extension\Core\Type\FormType')
diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractLayoutTestCase.php b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractLayoutTestCase.php
index 25fea73..b6d6c95 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractLayoutTestCase.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractLayoutTestCase.php
@@ -2709,9 +2709,7 @@ abstract class AbstractLayoutTestCase extends FormLayoutTestCase
         );
     }
 
-    /**
-     * @dataProvider submitFormNoValidateProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('submitFormNoValidateProvider')]
     public function testSubmitFormNoValidate(bool $validate)
     {
         $form = $this->factory->create(SubmitType::class, null, [
diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php
index 0516584..4754c77 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php
@@ -129,9 +129,7 @@ HTML;
         $this->assertEquals($expected, $this->render($template));
     }
 
-    /**
-     * @dataProvider fileExcerptIntegrationProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('fileExcerptIntegrationProvider')]
     public function testFileExcerptIntegration(string $expected, array $data)
     {
         $template = <<<'TWIG'
diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/DumpExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/DumpExtensionTest.php
index 8fe455e..235ca22 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/DumpExtensionTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/DumpExtensionTest.php
@@ -22,9 +22,7 @@ use Twig\Loader\LoaderInterface;
 
 class DumpExtensionTest extends TestCase
 {
-    /**
-     * @dataProvider getDumpTags
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDumpTags')]
     public function testDumpTag($template, $debug, $expectedOutput, $expectedDumped)
     {
         $extension = new DumpExtension(new VarCloner());
@@ -62,9 +60,7 @@ class DumpExtensionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getDumpArgs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDumpArgs')]
     public function testDump($context, $args, $expectedOutput, $debug = true)
     {
         $extension = new DumpExtension(new VarCloner());
diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap5LayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap5LayoutTest.php
index ced0fe6..9d4aa3e 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap5LayoutTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionBootstrap5LayoutTest.php
@@ -67,7 +67,7 @@ class FormExtensionBootstrap5LayoutTest extends AbstractBootstrap5LayoutTestCase
             'bootstrap_5_layout.html.twig',
             'custom_widgets.html.twig',
         ], $environment);
-        $this->renderer = new FormRenderer($rendererEngine, $this->getMockBuilder(CsrfTokenManagerInterface::class)->getMock());
+        $this->renderer = new FormRenderer($rendererEngine, $this->createMock(CsrfTokenManagerInterface::class));
         $this->registerTwigRuntimeLoader($environment, $this->renderer);
 
         $view = $this->factory
diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php
index ad2627a..f650356 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php
@@ -84,9 +84,7 @@ class FormExtensionDivLayoutTest extends AbstractDivLayoutTestCase
         ];
     }
 
-    /**
-     * @dataProvider isSelectedChoiceProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('isSelectedChoiceProvider')]
     public function testIsChoiceSelected($expected, $choice, $value)
     {
         $choice = new ChoiceView($choice, $choice, $choice.' label');
@@ -126,9 +124,7 @@ class FormExtensionDivLayoutTest extends AbstractDivLayoutTestCase
         ];
     }
 
-    /**
-     * @dataProvider isRootFormProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('isRootFormProvider')]
     public function testIsRootForm($expected, FormView $formView)
     {
         $this->assertSame($expected, \Symfony\Bridge\Twig\Extension\twig_is_root_form($formView));
diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/HttpFoundationExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/HttpFoundationExtensionTest.php
index b92c3f8..bab3096 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/HttpFoundationExtensionTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/HttpFoundationExtensionTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\Routing\RequestContext;
 
 class HttpFoundationExtensionTest extends TestCase
 {
-    /**
-     * @dataProvider getGenerateAbsoluteUrlData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getGenerateAbsoluteUrlData')]
     public function testGenerateAbsoluteUrl($expected, $path, $pathinfo)
     {
         $stack = new RequestStack();
@@ -55,9 +53,7 @@ class HttpFoundationExtensionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getGenerateAbsoluteUrlRequestContextData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getGenerateAbsoluteUrlRequestContextData')]
     public function testGenerateAbsoluteUrlWithRequestContext($path, $baseUrl, $host, $scheme, $httpPort, $httpsPort, $expected)
     {
         $requestContext = new RequestContext($baseUrl, 'GET', $host, $scheme, $httpPort, $httpsPort, $path);
@@ -66,9 +62,7 @@ class HttpFoundationExtensionTest extends TestCase
         $this->assertEquals($expected, $extension->generateAbsoluteUrl($path));
     }
 
-    /**
-     * @dataProvider getGenerateAbsoluteUrlRequestContextData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getGenerateAbsoluteUrlRequestContextData')]
     public function testGenerateAbsoluteUrlWithoutRequestAndRequestContext($path)
     {
         $extension = new HttpFoundationExtension(new UrlHelper(new RequestStack()));
@@ -105,9 +99,7 @@ class HttpFoundationExtensionTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider getGenerateRelativePathData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getGenerateRelativePathData')]
     public function testGenerateRelativePath($expected, $path, $pathinfo)
     {
         $stack = new RequestStack();
diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/RoutingExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/RoutingExtensionTest.php
index 742a74f..cc73e12 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/RoutingExtensionTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/RoutingExtensionTest.php
@@ -21,9 +21,7 @@ use Twig\Source;
 
 class RoutingExtensionTest extends TestCase
 {
-    /**
-     * @dataProvider getEscapingTemplates
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getEscapingTemplates')]
     public function testEscaping($template, $mustBeEscaped)
     {
         $twig = new Environment($this->createMock(LoaderInterface::class), ['debug' => true, 'cache' => false, 'autoescape' => 'html', 'optimizations' => 0]);
diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/SerializerExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/SerializerExtensionTest.php
index 610030c..617a407 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/SerializerExtensionTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/SerializerExtensionTest.php
@@ -30,9 +30,7 @@ use Twig\RuntimeLoader\RuntimeLoaderInterface;
  */
 class SerializerExtensionTest extends TestCase
 {
-    /**
-     * @dataProvider serializerDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('serializerDataProvider')]
     public function testSerializeFilter(string $template, string $expectedResult)
     {
         $twig = $this->getTwig($template);
diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/StopwatchExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/StopwatchExtensionTest.php
index d7ff03d..a580bdd 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/StopwatchExtensionTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/StopwatchExtensionTest.php
@@ -27,9 +27,7 @@ class StopwatchExtensionTest extends TestCase
         $this->testTiming('{% stopwatch "foo" %}{% endstopwatch "bar" %}', []);
     }
 
-    /**
-     * @dataProvider getTimingTemplates
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTimingTemplates')]
     public function testTiming($template, $events)
     {
         $twig = new Environment(new ArrayLoader(['template' => $template]), ['debug' => true, 'cache' => false, 'autoescape' => 'html', 'optimizations' => 0]);
diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php
index f6dd5f6..9624e8d 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php
@@ -29,9 +29,7 @@ class TranslationExtensionTest extends TestCase
         $this->assertEquals('Percent: 12% (approx.)', $output);
     }
 
-    /**
-     * @dataProvider getTransTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransTests')]
     public function testTrans($template, $expected, array $variables = [])
     {
         if ($expected != $this->getTemplate($template)->render($variables)) {
diff --git a/src/Symfony/Bridge/Twig/Tests/Mime/BodyRendererTest.php b/src/Symfony/Bridge/Twig/Tests/Mime/BodyRendererTest.php
index cce8ee9..d39572c 100644
--- a/src/Symfony/Bridge/Twig/Tests/Mime/BodyRendererTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/Mime/BodyRendererTest.php
@@ -137,9 +137,7 @@ HTML;
         $this->assertEquals('Text', $email->getTextBody());
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testRenderWithLocale()
     {
         $localeSwitcher = new LocaleSwitcher('en', []);
diff --git a/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationDefaultDomainNodeVisitorTest.php b/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationDefaultDomainNodeVisitorTest.php
index 40063c6..18c7ebc 100644
--- a/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationDefaultDomainNodeVisitorTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationDefaultDomainNodeVisitorTest.php
@@ -24,7 +24,7 @@ class TranslationDefaultDomainNodeVisitorTest extends TestCase
     private static string $message = 'message';
     private static string $domain = 'domain';
 
-    /** @dataProvider getDefaultDomainAssignmentTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDefaultDomainAssignmentTestData')]
     public function testDefaultDomainAssignment(Node $node)
     {
         $env = new Environment($this->createMock(LoaderInterface::class), ['cache' => false, 'autoescape' => false, 'optimizations' => 0]);
@@ -50,7 +50,7 @@ class TranslationDefaultDomainNodeVisitorTest extends TestCase
         $this->assertEquals([[self::$message, self::$domain]], $visitor->getMessages());
     }
 
-    /** @dataProvider getDefaultDomainAssignmentTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDefaultDomainAssignmentTestData')]
     public function testNewModuleWithoutDefaultDomainTag(Node $node)
     {
         $env = new Environment($this->createMock(LoaderInterface::class), ['cache' => false, 'autoescape' => false, 'optimizations' => 0]);
diff --git a/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationNodeVisitorTest.php b/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationNodeVisitorTest.php
index 6dbd0d2..ee7d1d1 100644
--- a/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationNodeVisitorTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationNodeVisitorTest.php
@@ -27,7 +27,7 @@ use Twig\TwigFilter;
 
 class TranslationNodeVisitorTest extends TestCase
 {
-    /** @dataProvider getMessagesExtractionTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getMessagesExtractionTestData')]
     public function testMessagesExtraction(Node $node, array $expectedMessages)
     {
         $env = new Environment($this->createMock(LoaderInterface::class), ['cache' => false, 'autoescape' => false, 'optimizations' => 0]);
diff --git a/src/Symfony/Bridge/Twig/Tests/TokenParser/FormThemeTokenParserTest.php b/src/Symfony/Bridge/Twig/Tests/TokenParser/FormThemeTokenParserTest.php
index 02b6597..3a60078 100644
--- a/src/Symfony/Bridge/Twig/Tests/TokenParser/FormThemeTokenParserTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/TokenParser/FormThemeTokenParserTest.php
@@ -26,9 +26,7 @@ use Twig\Source;
 
 class FormThemeTokenParserTest extends TestCase
 {
-    /**
-     * @dataProvider getTestsForFormTheme
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTestsForFormTheme')]
     public function testCompile($source, $expected)
     {
         $env = new Environment($this->createMock(LoaderInterface::class), ['cache' => false, 'autoescape' => false, 'optimizations' => 0]);
diff --git a/src/Symfony/Bridge/Twig/Tests/Translation/TwigExtractorTest.php b/src/Symfony/Bridge/Twig/Tests/Translation/TwigExtractorTest.php
index f9ae8c3..10195da 100644
--- a/src/Symfony/Bridge/Twig/Tests/Translation/TwigExtractorTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/Translation/TwigExtractorTest.php
@@ -24,9 +24,7 @@ class TwigExtractorTest extends TestCase
 {
     public const CUSTOM_DOMAIN = 'domain';
 
-    /**
-     * @dataProvider getExtractData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getExtractData')]
     public function testExtract($template, $messages)
     {
         $loader = $this->createMock(LoaderInterface::class);
@@ -94,9 +92,7 @@ class TwigExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider resourcesWithSyntaxErrorsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('resourcesWithSyntaxErrorsProvider')]
     public function testExtractSyntaxError($resources, array $messages)
     {
         $twig = new Environment($this->createMock(LoaderInterface::class));
@@ -117,9 +113,7 @@ class TwigExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider resourceProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('resourceProvider')]
     public function testExtractWithFiles($resource)
     {
         $loader = new ArrayLoader([]);
diff --git a/src/Symfony/Bundle/DebugBundle/Tests/DependencyInjection/DebugExtensionTest.php b/src/Symfony/Bundle/DebugBundle/Tests/DependencyInjection/DebugExtensionTest.php
index 5109081..85311da 100644
--- a/src/Symfony/Bundle/DebugBundle/Tests/DependencyInjection/DebugExtensionTest.php
+++ b/src/Symfony/Bundle/DebugBundle/Tests/DependencyInjection/DebugExtensionTest.php
@@ -80,9 +80,7 @@ class DebugExtensionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideServicesUsingDumpDestinationCreation
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideServicesUsingDumpDestinationCreation')]
     public function testServicesUsingDumpDestinationCreation(?string $dumpDestination, string $expectedHost, ?string $expectedOutput)
     {
         $container = $this->createContainer();
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/AnnotationsCacheWarmerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/AnnotationsCacheWarmerTest.php
index bd3a60d..bf6d61e 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/AnnotationsCacheWarmerTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/AnnotationsCacheWarmerTest.php
@@ -23,9 +23,7 @@ use Symfony\Component\Cache\Adapter\NullAdapter;
 use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
 use Symfony\Component\Filesystem\Filesystem;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class AnnotationsCacheWarmerTest extends TestCase
 {
     use ExpectDeprecationTrait;
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/SerializerCacheWarmerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/SerializerCacheWarmerTest.php
index 5feb0c8..39c4c88 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/SerializerCacheWarmerTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/SerializerCacheWarmerTest.php
@@ -21,9 +21,7 @@ use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader;
 
 class SerializerCacheWarmerTest extends TestCase
 {
-    /**
-     * @dataProvider loaderProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('loaderProvider')]
     public function testWarmUp(array $loaders)
     {
         $file = sys_get_temp_dir().'/cache-serializer.php';
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePoolClearCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePoolClearCommandTest.php
index fb73588..609e51e 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePoolClearCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePoolClearCommandTest.php
@@ -30,9 +30,7 @@ class CachePoolClearCommandTest extends TestCase
         $this->cachePool = $this->createMock(CacheItemPoolInterface::class);
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $application = new Application($this->getKernel());
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePoolDeleteCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePoolDeleteCommandTest.php
index caa7eb5..ea8f884 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePoolDeleteCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePoolDeleteCommandTest.php
@@ -84,9 +84,7 @@ class CachePoolDeleteCommandTest extends TestCase
         $tester->execute(['pool' => 'foo', 'key' => 'bar']);
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $application = new Application($this->getKernel());
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePruneCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePruneCommandTest.php
index 54467f1..f1563e2 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePruneCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePruneCommandTest.php
@@ -23,12 +23,14 @@ use Symfony\Component\HttpKernel\KernelInterface;
 
 class CachePruneCommandTest extends TestCase
 {
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCommandWithPools()
     {
         $tester = $this->getCommandTester($this->getKernel(), $this->getRewindableGenerator());
         $tester->execute([]);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCommandWithNoPools()
     {
         $tester = $this->getCommandTester($this->getKernel(), $this->getEmptyRewindableGenerator());
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/EventDispatcherDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/EventDispatcherDebugCommandTest.php
index 359196e..5013f7c 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/EventDispatcherDebugCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/EventDispatcherDebugCommandTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\Mailer\Event\MessageEvent;
 
 class EventDispatcherDebugCommandTest extends TestCase
 {
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $tester = $this->createCommandCompletionTester();
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsDecryptToLocalCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsDecryptToLocalCommandTest.php
index a3159a2..08df2a7 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsDecryptToLocalCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsDecryptToLocalCommandTest.php
@@ -17,9 +17,7 @@ use Symfony\Bundle\FrameworkBundle\Secrets\SodiumVault;
 use Symfony\Component\Console\Tester\CommandTester;
 use Symfony\Component\Filesystem\Filesystem;
 
-/**
- * @requires extension sodium
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('sodium')]
 class SecretsDecryptToLocalCommandTest extends TestCase
 {
     private string $mainDir;
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsEncryptFromLocalCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsEncryptFromLocalCommandTest.php
index 68926c1..345b1c0 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsEncryptFromLocalCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsEncryptFromLocalCommandTest.php
@@ -18,9 +18,7 @@ use Symfony\Bundle\FrameworkBundle\Secrets\SodiumVault;
 use Symfony\Component\Console\Tester\CommandTester;
 use Symfony\Component\Filesystem\Filesystem;
 
-/**
- * @requires extension sodium
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('sodium')]
 class SecretsEncryptFromLocalCommandTest extends TestCase
 {
     private string $vaultDir;
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsGenerateKeysCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsGenerateKeysCommandTest.php
index 9574782..c9ad2aa 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsGenerateKeysCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsGenerateKeysCommandTest.php
@@ -18,9 +18,7 @@ use Symfony\Bundle\FrameworkBundle\Secrets\SodiumVault;
 use Symfony\Component\Console\Tester\CommandTester;
 use Symfony\Component\Filesystem\Filesystem;
 
-/**
- * @requires extension sodium
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('sodium')]
 class SecretsGenerateKeysCommandTest extends TestCase
 {
     private string $secretsDir;
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsListCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsListCommandTest.php
index 12d3ab2..89a104b 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsListCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsListCommandTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\Console\Tester\CommandTester;
 
 class SecretsListCommandTest extends TestCase
 {
-    /**
-     * @backupGlobals enabled
-     */
+    #[\PHPUnit\Framework\Attributes\BackupGlobals(true)]
     public function testExecute()
     {
         $vault = $this->createMock(AbstractVault::class);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsRemoveCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsRemoveCommandTest.php
index 2c12b61..6fded5c 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsRemoveCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsRemoveCommandTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\Console\Tester\CommandCompletionTester;
 
 class SecretsRemoveCommandTest extends TestCase
 {
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(bool $withLocalVault, array $input, array $expectedSuggestions)
     {
         $vault = $this->createMock(AbstractVault::class);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsSetCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsSetCommandTest.php
index 678fb41..4ceeeb8 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsSetCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsSetCommandTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\Console\Tester\CommandCompletionTester;
 
 class SecretsSetCommandTest extends TestCase
 {
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $vault = $this->createMock(AbstractVault::class);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php
index dcff845..9367e19 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php
@@ -238,9 +238,7 @@ class TranslationDebugCommandTest extends TestCase
         return $bundle;
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $extractedMessagesWithDomains = [
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandCompletionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandCompletionTest.php
index 1b11a61..71dbe6f 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandCompletionTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandCompletionTest.php
@@ -30,9 +30,7 @@ class TranslationUpdateCommandCompletionTest extends TestCase
     private Filesystem $fs;
     private string $translationDir;
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $tester = $this->createCommandCompletionTester(['messages' => ['foo' => 'foo']]);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/WorkflowDumpCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/WorkflowDumpCommandTest.php
index 284e976..328eb5b 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/WorkflowDumpCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/WorkflowDumpCommandTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\DependencyInjection\ServiceLocator;
 
 class WorkflowDumpCommandTest extends TestCase
 {
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $application = new Application();
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTestCase.php
index dde1f00..ae8f253 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTestCase.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTestCase.php
@@ -39,7 +39,7 @@ abstract class AbstractDescriptorTestCase extends TestCase
         putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
     }
 
-    /** @dataProvider getDescribeRouteCollectionTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeRouteCollectionTestData')]
     public function testDescribeRouteCollection(RouteCollection $routes, $expectedDescription)
     {
         $this->assertDescription($expectedDescription, $routes);
@@ -50,7 +50,7 @@ abstract class AbstractDescriptorTestCase extends TestCase
         return static::getDescriptionTestData(ObjectsProvider::getRouteCollections());
     }
 
-    /** @dataProvider getDescribeRouteTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeRouteTestData')]
     public function testDescribeRoute(Route $route, $expectedDescription)
     {
         $this->assertDescription($expectedDescription, $route);
@@ -61,7 +61,7 @@ abstract class AbstractDescriptorTestCase extends TestCase
         return static::getDescriptionTestData(ObjectsProvider::getRoutes());
     }
 
-    /** @dataProvider getDescribeContainerParametersTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeContainerParametersTestData')]
     public function testDescribeContainerParameters(ParameterBag $parameters, $expectedDescription)
     {
         $this->assertDescription($expectedDescription, $parameters);
@@ -72,7 +72,7 @@ abstract class AbstractDescriptorTestCase extends TestCase
         return static::getDescriptionTestData(ObjectsProvider::getContainerParameters());
     }
 
-    /** @dataProvider getDescribeContainerBuilderTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeContainerBuilderTestData')]
     public function testDescribeContainerBuilder(ContainerBuilder $builder, $expectedDescription, array $options)
     {
         $this->assertDescription($expectedDescription, $builder, $options);
@@ -83,9 +83,7 @@ abstract class AbstractDescriptorTestCase extends TestCase
         return static::getContainerBuilderDescriptionTestData(ObjectsProvider::getContainerBuilders());
     }
 
-    /**
-     * @dataProvider getDescribeContainerExistingClassDefinitionTestData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeContainerExistingClassDefinitionTestData')]
     public function testDescribeContainerExistingClassDefinition(Definition $definition, $expectedDescription)
     {
         $this->assertDescription($expectedDescription, $definition);
@@ -96,7 +94,7 @@ abstract class AbstractDescriptorTestCase extends TestCase
         return static::getDescriptionTestData(ObjectsProvider::getContainerDefinitionsWithExistingClasses());
     }
 
-    /** @dataProvider getDescribeContainerDefinitionTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeContainerDefinitionTestData')]
     public function testDescribeContainerDefinition(Definition $definition, $expectedDescription)
     {
         $this->assertDescription($expectedDescription, $definition);
@@ -107,7 +105,7 @@ abstract class AbstractDescriptorTestCase extends TestCase
         return static::getDescriptionTestData(ObjectsProvider::getContainerDefinitions());
     }
 
-    /** @dataProvider getDescribeContainerDefinitionWithArgumentsShownTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeContainerDefinitionWithArgumentsShownTestData')]
     public function testDescribeContainerDefinitionWithArgumentsShown(Definition $definition, $expectedDescription)
     {
         $this->assertDescription($expectedDescription, $definition, ['show_arguments' => true]);
@@ -127,7 +125,7 @@ abstract class AbstractDescriptorTestCase extends TestCase
         return static::getDescriptionTestData($definitionsWithArgs);
     }
 
-    /** @dataProvider getDescribeContainerAliasTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeContainerAliasTestData')]
     public function testDescribeContainerAlias(Alias $alias, $expectedDescription)
     {
         $this->assertDescription($expectedDescription, $alias);
@@ -138,7 +136,7 @@ abstract class AbstractDescriptorTestCase extends TestCase
         return static::getDescriptionTestData(ObjectsProvider::getContainerAliases());
     }
 
-    /** @dataProvider getDescribeContainerDefinitionWhichIsAnAliasTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeContainerDefinitionWhichIsAnAliasTestData')]
     public function testDescribeContainerDefinitionWhichIsAnAlias(Alias $alias, $expectedDescription, ContainerBuilder $builder, $options = [])
     {
         $this->assertDescription($expectedDescription, $builder, $options);
@@ -172,10 +170,10 @@ abstract class AbstractDescriptorTestCase extends TestCase
     /**
      * The legacy group must be kept as deprecations will always be raised.
      *
-     * @group legacy
      *
-     * @dataProvider getDescribeContainerParameterTestData
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeContainerParameterTestData')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testDescribeContainerParameter($parameter, $expectedDescription, array $options)
     {
         $this->assertDescription($expectedDescription, $parameter, $options);
@@ -198,7 +196,7 @@ abstract class AbstractDescriptorTestCase extends TestCase
         return $data;
     }
 
-    /** @dataProvider getDescribeEventDispatcherTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeEventDispatcherTestData')]
     public function testDescribeEventDispatcher(EventDispatcher $eventDispatcher, $expectedDescription, array $options)
     {
         $this->assertDescription($expectedDescription, $eventDispatcher, $options);
@@ -209,7 +207,7 @@ abstract class AbstractDescriptorTestCase extends TestCase
         return static::getEventDispatcherDescriptionTestData(ObjectsProvider::getEventDispatchers());
     }
 
-    /** @dataProvider getDescribeCallableTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeCallableTestData')]
     public function testDescribeCallable($callable, $expectedDescription)
     {
         $this->assertDescription($expectedDescription, $callable);
@@ -220,11 +218,8 @@ abstract class AbstractDescriptorTestCase extends TestCase
         return static::getDescriptionTestData(ObjectsProvider::getCallables());
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getDescribeDeprecatedCallableTestData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeDeprecatedCallableTestData')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testDescribeDeprecatedCallable($callable, $expectedDescription)
     {
         $this->assertDescription($expectedDescription, $callable);
@@ -235,7 +230,7 @@ abstract class AbstractDescriptorTestCase extends TestCase
         return static::getDescriptionTestData(ObjectsProvider::getDeprecatedCallables());
     }
 
-    /** @dataProvider getClassDescriptionTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getClassDescriptionTestData')]
     public function testGetClassDescription($object, $expectedDescription)
     {
         $this->assertEquals($expectedDescription, $this->getDescriptor()->getClassDescription($object));
@@ -251,9 +246,7 @@ abstract class AbstractDescriptorTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getDeprecationsTestData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDeprecationsTestData')]
     public function testGetDeprecations(ContainerBuilder $builder, $expectedDescription)
     {
         $this->assertDescription($expectedDescription, $builder, ['deprecations' => true]);
@@ -341,7 +334,7 @@ abstract class AbstractDescriptorTestCase extends TestCase
         return $data;
     }
 
-    /** @dataProvider getDescribeContainerBuilderWithPriorityTagsTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeContainerBuilderWithPriorityTagsTestData')]
     public function testDescribeContainerBuilderWithPriorityTags(ContainerBuilder $builder, $expectedDescription, array $options)
     {
         $this->assertDescription($expectedDescription, $builder, $options);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/TextDescriptorTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/TextDescriptorTest.php
index 34e16f5..716b5e6 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/TextDescriptorTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/TextDescriptorTest.php
@@ -45,7 +45,8 @@ class TextDescriptorTest extends AbstractDescriptorTestCase
         return $getDescribeData;
     }
 
-    /** @dataProvider getDescribeRouteWithControllerLinkTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeRouteWithControllerLinkTestData')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDescribeRouteWithControllerLink(Route $route, $expectedDescription)
     {
         static::$fileLinkFormatter = new FileLinkFormatter('myeditor://open?file=%f&line=%l');
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/AbstractControllerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/AbstractControllerTest.php
index a5d0e4b..4f31f7f 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/AbstractControllerTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/AbstractControllerTest.php
@@ -365,9 +365,7 @@ class AbstractControllerTest extends TestCase
         $controller->denyAccessUnlessGranted('foo');
     }
 
-    /**
-     * @dataProvider provideDenyAccessUnlessGrantedSetsAttributesAsArray
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDenyAccessUnlessGrantedSetsAttributesAsArray')]
     public function testdenyAccessUnlessGrantedSetsAttributesAsArray($attribute, $exceptionAttributes)
     {
         $authorizationChecker = $this->createMock(AuthorizationCheckerInterface::class);
@@ -431,10 +429,10 @@ class AbstractControllerTest extends TestCase
     {
         $formView = new FormView();
 
-        $form = $this->getMockBuilder(FormInterface::class)->getMock();
+        $form = $this->createMock(FormInterface::class);
         $form->expects($this->once())->method('createView')->willReturn($formView);
 
-        $twig = $this->getMockBuilder(Environment::class)->disableOriginalConstructor()->getMock();
+        $twig = $this->createMock(Environment::class);
         $twig->expects($this->once())->method('render')->with('foo', ['bar' => $formView])->willReturn('bar');
 
         $container = new Container();
@@ -452,12 +450,12 @@ class AbstractControllerTest extends TestCase
     {
         $formView = new FormView();
 
-        $form = $this->getMockBuilder(FormInterface::class)->getMock();
+        $form = $this->createMock(FormInterface::class);
         $form->expects($this->once())->method('createView')->willReturn($formView);
         $form->expects($this->once())->method('isSubmitted')->willReturn(true);
         $form->expects($this->once())->method('isValid')->willReturn(false);
 
-        $twig = $this->getMockBuilder(Environment::class)->disableOriginalConstructor()->getMock();
+        $twig = $this->createMock(Environment::class);
         $twig->expects($this->once())->method('render')->with('foo', ['bar' => $formView])->willReturn('bar');
 
         $container = new Container();
@@ -472,17 +470,15 @@ class AbstractControllerTest extends TestCase
         $this->assertSame('bar', $response->getContent());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testRenderForm()
     {
         $formView = new FormView();
 
-        $form = $this->getMockBuilder(FormInterface::class)->getMock();
+        $form = $this->createMock(FormInterface::class);
         $form->expects($this->once())->method('createView')->willReturn($formView);
 
-        $twig = $this->getMockBuilder(Environment::class)->disableOriginalConstructor()->getMock();
+        $twig = $this->createMock(Environment::class);
         $twig->expects($this->once())->method('render')->with('foo', ['bar' => $formView])->willReturn('bar');
 
         $container = new Container();
@@ -497,19 +493,17 @@ class AbstractControllerTest extends TestCase
         $this->assertSame('bar', $response->getContent());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testRenderFormSubmittedAndInvalid()
     {
         $formView = new FormView();
 
-        $form = $this->getMockBuilder(FormInterface::class)->getMock();
+        $form = $this->createMock(FormInterface::class);
         $form->expects($this->once())->method('createView')->willReturn($formView);
         $form->expects($this->once())->method('isSubmitted')->willReturn(true);
         $form->expects($this->once())->method('isValid')->willReturn(false);
 
-        $twig = $this->getMockBuilder(Environment::class)->disableOriginalConstructor()->getMock();
+        $twig = $this->createMock(Environment::class);
         $twig->expects($this->once())->method('render')->with('foo', ['bar' => $formView])->willReturn('bar');
 
         $container = new Container();
@@ -554,9 +548,7 @@ class AbstractControllerTest extends TestCase
         $this->assertSame(302, $response->getStatusCode());
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testAddFlash()
     {
         $flashBag = new FlashBag();
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php
index 8385135..58a172f 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php
@@ -26,9 +26,7 @@ class ControllerResolverTest extends ContainerControllerResolverTest
 {
     use ExpectDeprecationTrait;
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGetControllerOnContainerAware()
     {
         $resolver = $this->createControllerResolver();
@@ -43,9 +41,7 @@ class ControllerResolverTest extends ContainerControllerResolverTest
         $this->assertSame('testAction', $controller[1]);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGetControllerOnContainerAwareInvokable()
     {
         $resolver = $this->createControllerResolver();
@@ -59,9 +55,7 @@ class ControllerResolverTest extends ContainerControllerResolverTest
         $this->assertInstanceOf(ContainerInterface::class, $controller->getContainer());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testContainerAwareControllerGetsContainerWhenNotSet()
     {
         class_exists(AbstractControllerTest::class);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php
index 161424e..3f71fbe 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php
@@ -60,9 +60,7 @@ class RedirectControllerTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provider')]
     public function testRoute($permanent, $keepRequestMethod, $keepQueryParams, $ignoreAttributes, $expectedCode, $expectedAttributes)
     {
         $request = new Request();
@@ -255,9 +253,7 @@ class RedirectControllerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider urlRedirectProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('urlRedirectProvider')]
     public function testUrlRedirect($scheme, $httpPort, $httpsPort, $requestScheme, $requestPort, $expectedPort)
     {
         $host = 'www.example.com';
@@ -287,9 +283,7 @@ class RedirectControllerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider pathQueryParamsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('pathQueryParamsProvider')]
     public function testPathQueryParams($expectedUrl, $path, $queryString)
     {
         $scheme = 'http';
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddExpressionLanguageProvidersPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddExpressionLanguageProvidersPassTest.php
index d159057..1c0a613 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddExpressionLanguageProvidersPassTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddExpressionLanguageProvidersPassTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
 use Symfony\Component\DependencyInjection\Definition;
 use Symfony\Component\DependencyInjection\Reference;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class AddExpressionLanguageProvidersPassTest extends TestCase
 {
     public function testProcessForRouter()
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/DataCollectorTranslatorPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/DataCollectorTranslatorPassTest.php
index 9344eda..44429cb 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/DataCollectorTranslatorPassTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/DataCollectorTranslatorPassTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\Translation\DataCollectorTranslator;
 use Symfony\Component\Translation\Translator;
 use Symfony\Contracts\Translation\TranslatorInterface;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class DataCollectorTranslatorPassTest extends TestCase
 {
     private ContainerBuilder $container;
@@ -46,9 +44,7 @@ class DataCollectorTranslatorPassTest extends TestCase
         ;
     }
 
-    /**
-     * @dataProvider getImplementingTranslatorBagInterfaceTranslatorClassNames
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getImplementingTranslatorBagInterfaceTranslatorClassNames')]
     public function testProcessKeepsDataCollectorTranslatorIfItImplementsTranslatorBagInterface($class)
     {
         $this->container->register('translator', $class);
@@ -58,9 +54,7 @@ class DataCollectorTranslatorPassTest extends TestCase
         $this->assertTrue($this->container->hasDefinition('translator.data_collector'));
     }
 
-    /**
-     * @dataProvider getImplementingTranslatorBagInterfaceTranslatorClassNames
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getImplementingTranslatorBagInterfaceTranslatorClassNames')]
     public function testProcessKeepsDataCollectorIfTranslatorImplementsTranslatorBagInterface($class)
     {
         $this->container->register('translator', $class);
@@ -78,9 +72,7 @@ class DataCollectorTranslatorPassTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getNotImplementingTranslatorBagInterfaceTranslatorClassNames
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNotImplementingTranslatorBagInterfaceTranslatorClassNames')]
     public function testProcessRemovesDataCollectorTranslatorIfItDoesNotImplementTranslatorBagInterface($class)
     {
         $this->container->register('translator', $class);
@@ -90,9 +82,7 @@ class DataCollectorTranslatorPassTest extends TestCase
         $this->assertFalse($this->container->hasDefinition('translator.data_collector'));
     }
 
-    /**
-     * @dataProvider getNotImplementingTranslatorBagInterfaceTranslatorClassNames
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNotImplementingTranslatorBagInterfaceTranslatorClassNames')]
     public function testProcessRemovesDataCollectorIfTranslatorDoesNotImplementTranslatorBagInterface($class)
     {
         $this->container->register('translator', $class);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/LoggingTranslatorPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/LoggingTranslatorPassTest.php
index e15c622..ddbc49e 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/LoggingTranslatorPassTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/LoggingTranslatorPassTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
 use Symfony\Component\DependencyInjection\Reference;
 use Symfony\Component\Translation\Translator;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class LoggingTranslatorPassTest extends TestCase
 {
     public function testProcess()
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ProfilerPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ProfilerPassTest.php
index 5a22150..f148f92 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ProfilerPassTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ProfilerPassTest.php
@@ -98,9 +98,7 @@ class ProfilerPassTest extends TestCase
         }];
     }
 
-    /**
-     * @dataProvider provideValidCollectorWithTemplateUsingAutoconfigure
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidCollectorWithTemplateUsingAutoconfigure')]
     public function testValidCollectorWithTemplateUsingAutoconfigure(TemplateAwareDataCollectorInterface $dataCollector)
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/UnusedTagsPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/UnusedTagsPassTest.php
index 3e19e74..a73e514 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/UnusedTagsPassTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/UnusedTagsPassTest.php
@@ -32,9 +32,7 @@ class UnusedTagsPassTest extends TestCase
         $this->assertSame([\sprintf('%s: Tag "kenrel.event_subscriber" was defined on service(s) "foo", "bar", but was never used. Did you mean "kernel.event_subscriber"?', UnusedTagsPass::class)], $container->getCompiler()->getLog());
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testMissingKnownTags()
     {
         if (\dirname((new \ReflectionClass(ContainerBuilder::class))->getFileName(), 3) !== \dirname(__DIR__, 5)) {
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/WorkflowGuardListenerPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/WorkflowGuardListenerPassTest.php
index 15016df..635cd7e 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/WorkflowGuardListenerPassTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/WorkflowGuardListenerPassTest.php
@@ -21,9 +21,7 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
 use Symfony\Component\Security\Core\Role\RoleHierarchy;
 use Symfony\Component\Validator\Validator\ValidatorInterface;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class WorkflowGuardListenerPassTest extends TestCase
 {
     private ContainerBuilder $container;
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
index 8c938af..b895750 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
@@ -56,9 +56,7 @@ class ConfigurationTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getTestInvalidSessionName
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTestInvalidSessionName')]
     public function testInvalidSessionName($sessionName)
     {
         $processor = new Processor();
@@ -143,9 +141,7 @@ class ConfigurationTest extends TestCase
         $this->assertEquals($defaultConfig, $config['asset_mapper']);
     }
 
-    /**
-     * @dataProvider provideImportmapPolyfillTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideImportmapPolyfillTests')]
     public function testAssetMapperPolyfillValue(mixed $polyfillValue, bool $isValid, mixed $expected)
     {
         $processor = new Processor();
@@ -179,9 +175,7 @@ class ConfigurationTest extends TestCase
         yield [false, true, false];
     }
 
-    /**
-     * @dataProvider provideValidAssetsPackageNameConfigurationTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidAssetsPackageNameConfigurationTests')]
     public function testValidAssetsPackageNameConfiguration($packageName)
     {
         $processor = new Processor();
@@ -211,9 +205,7 @@ class ConfigurationTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideInvalidAssetConfigurationTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidAssetConfigurationTests')]
     public function testInvalidAssetsConfiguration(array $assetConfig, $expectedMessage)
     {
         $processor = new Processor();
@@ -265,9 +257,7 @@ class ConfigurationTest extends TestCase
         yield [$createPackageConfig($config), 'You cannot use both "version" and "json_manifest_path" at the same time under "assets" packages.'];
     }
 
-    /**
-     * @dataProvider provideValidLockConfigurationTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidLockConfigurationTests')]
     public function testValidLockConfiguration($lockConfig, $processedConfig)
     {
         $processor = new Processor();
@@ -365,9 +355,7 @@ class ConfigurationTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideValidSemaphoreConfigurationTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidSemaphoreConfigurationTests')]
     public function testValidSemaphoreConfiguration($semaphoreConfig, $processedConfig)
     {
         $processor = new Processor();
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php
index 4144869..f27b8cd 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php
@@ -797,9 +797,7 @@ abstract class FrameworkExtensionTestCase extends TestCase
         $this->assertFalse($container->hasDefinition('cache.messenger.restart_workers_signal'));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testMessengerWithExplictResetOnMessageLegacy()
     {
         $this->expectDeprecation('Since symfony/framework-bundle 6.1: Option "reset_on_message" at "framework.messenger" is deprecated. It does nothing and will be removed in version 7.0.');
@@ -1145,9 +1143,7 @@ abstract class FrameworkExtensionTestCase extends TestCase
         $this->createContainerFromFile('messenger_routing_invalid_transport');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testMessengerWithDisabledResetOnMessage()
     {
         $this->expectException(InvalidConfigurationException::class);
@@ -1285,9 +1281,7 @@ abstract class FrameworkExtensionTestCase extends TestCase
         $this->assertInstanceOf(ValidatorInterface::class, $container->get('validator.alias'));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testAnnotations()
     {
         $this->expectDeprecation('Since symfony/framework-bundle 6.4: Enabling the integration of Doctrine annotations is deprecated. Set the "framework.annotations.enabled" config option to false.');
@@ -1326,9 +1320,7 @@ abstract class FrameworkExtensionTestCase extends TestCase
         // no cache this time
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValidationLegacyAnnotations()
     {
         $this->expectDeprecation('Since symfony/framework-bundle 6.4: Enabling the integration of Doctrine annotations is deprecated. Set the "framework.annotations.enabled" config option to false.');
@@ -1855,9 +1847,7 @@ abstract class FrameworkExtensionTestCase extends TestCase
         }
     }
 
-    /**
-     * @dataProvider appRedisTagAwareConfigProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('appRedisTagAwareConfigProvider')]
     public function testAppRedisTagAwareAdapter(string $configFile)
     {
         $container = $this->createContainerFromFile($configFile);
@@ -1901,9 +1891,7 @@ abstract class FrameworkExtensionTestCase extends TestCase
         }
     }
 
-    /**
-     * @dataProvider appRedisTagAwareConfigProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('appRedisTagAwareConfigProvider')]
     public function testCacheTaggableTagAppliedToRedisAwareAppPool(string $configFile)
     {
         $container = $this->createContainerFromFile($configFile);
@@ -2115,9 +2103,7 @@ abstract class FrameworkExtensionTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideMailer
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMailer')]
     public function testMailer(string $configFile, array $expectedTransports, array $expectedRecipients)
     {
         $container = $this->createContainerFromFile($configFile);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/PhpFrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/PhpFrameworkExtensionTest.php
index bd455d6..701b72a 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/PhpFrameworkExtensionTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/PhpFrameworkExtensionTest.php
@@ -247,9 +247,7 @@ class PhpFrameworkExtensionTest extends FrameworkExtensionTestCase
         $container->getDefinition('limiter.without_lock')->getArgument(2);
     }
 
-    /**
-     * @dataProvider emailValidationModeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('emailValidationModeProvider')]
     public function testValidatorEmailValidationMode(string $mode)
     {
         $this->expectNotToPerformAssertions();
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/XmlFrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/XmlFrameworkExtensionTest.php
index 822409f..378f789 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/XmlFrameworkExtensionTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/XmlFrameworkExtensionTest.php
@@ -23,11 +23,13 @@ class XmlFrameworkExtensionTest extends FrameworkExtensionTestCase
         $loader->load($file.'.xml');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testAssetsHelperIsRemovedWhenPhpTemplatingEngineIsEnabledAndAssetsAreDisabled()
     {
         $this->markTestSkipped('The assets key cannot be set to false using the XML configuration format.');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testMessengerMiddlewareFactoryErroneousFormat()
     {
         $this->markTestSkipped('XML configuration will not allow erroneous format.');
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AbstractAttributeRoutingTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AbstractAttributeRoutingTestCase.php
index 5166c8d..97d9e44 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AbstractAttributeRoutingTestCase.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AbstractAttributeRoutingTestCase.php
@@ -15,9 +15,7 @@ use Symfony\Component\HttpFoundation\Request;
 
 abstract class AbstractAttributeRoutingTestCase extends AbstractWebTestCase
 {
-    /**
-     * @dataProvider getRoutes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRoutes')]
     public function testAnnotatedController(string $path, string $expectedValue)
     {
         $client = $this->createClient(['test_case' => $this->getTestCaseApp(), 'root_config' => 'config.yml']);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ApiAttributesTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ApiAttributesTest.php
index 3134fa1..7bc796a 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ApiAttributesTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ApiAttributesTest.php
@@ -21,9 +21,7 @@ use Symfony\Component\Validator\Constraints as Assert;
 
 class ApiAttributesTest extends AbstractWebTestCase
 {
-    /**
-     * @dataProvider mapQueryStringProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('mapQueryStringProvider')]
     public function testMapQueryString(array $query, string $expectedResponse, int $expectedStatusCode)
     {
         $client = self::createClient(['test_case' => 'ApiAttributesTest']);
@@ -87,10 +85,8 @@ class ApiAttributesTest extends AbstractWebTestCase
         ];
     }
 
-    /**
-     * @group nophpunit11
-     * @dataProvider mapRequestPayloadProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('mapRequestPayloadProvider')]
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testMapRequestPayload(string $format, array $parameters, ?string $content, callable $responseAssertion, int $expectedStatusCode)
     {
         $client = self::createClient(['test_case' => 'ApiAttributesTest']);
@@ -291,7 +287,7 @@ class ApiAttributesTest extends AbstractWebTestCase
 
         yield 'valid input' => [
             'format' => 'json',
-            'input' => ['comment' => 'Hello everyone!', 'approved' => '0'],
+            'parameters' => ['comment' => 'Hello everyone!', 'approved' => '0'],
             'content' => null,
             'responseAssertion' => static function (string $response) {
                 self::assertJsonStringEqualsJsonString(<<<'JSON'
@@ -308,7 +304,7 @@ class ApiAttributesTest extends AbstractWebTestCase
 
         yield 'validation error input' => [
             'format' => 'json',
-            'input' => ['comment' => '', 'approved' => '1'],
+            'parameters' => ['comment' => '', 'approved' => '1'],
             'content' => null,
             'responseAssertion' => static function (string $response) {
                 self::assertJson($response);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AutowiringTypesTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AutowiringTypesTest.php
index 95f99ef..6872114 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AutowiringTypesTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AutowiringTypesTest.php
@@ -23,9 +23,7 @@ class AutowiringTypesTest extends AbstractWebTestCase
 {
     use ExpectDeprecationTrait;
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testAnnotationReaderAutowiring()
     {
         $this->expectDeprecation('Since symfony/framework-bundle 6.4: Enabling the integration of Doctrine annotations is deprecated. Set the "framework.annotations.enabled" config option to false.');
@@ -36,9 +34,7 @@ class AutowiringTypesTest extends AbstractWebTestCase
         $this->assertInstanceOf(AnnotationReader::class, $annotationReader);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testCachedAnnotationReaderAutowiring()
     {
         $this->expectDeprecation('Since symfony/framework-bundle 6.4: Enabling the integration of Doctrine annotations is deprecated. Set the "framework.annotations.enabled" config option to false.');
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolClearCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolClearCommandTest.php
index dbd7864..26d5221 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolClearCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolClearCommandTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\Console\Tester\CommandTester;
 use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
 use Symfony\Component\Finder\SplFileInfo;
 
-/**
- * @group functional
- */
+#[\PHPUnit\Framework\Attributes\Group('functional')]
 class CachePoolClearCommandTest extends AbstractWebTestCase
 {
     protected function setUp(): void
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolListCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolListCommandTest.php
index 8e90618..4527f88 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolListCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolListCommandTest.php
@@ -15,9 +15,7 @@ use Symfony\Bundle\FrameworkBundle\Command\CachePoolListCommand;
 use Symfony\Bundle\FrameworkBundle\Console\Application;
 use Symfony\Component\Console\Tester\CommandTester;
 
-/**
- * @group functional
- */
+#[\PHPUnit\Framework\Attributes\Group('functional')]
 class CachePoolListCommandTest extends AbstractWebTestCase
 {
     protected function setUp(): void
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolsTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolsTest.php
index 23f4a11..76cc001 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolsTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolsTest.php
@@ -24,11 +24,9 @@ class CachePoolsTest extends AbstractWebTestCase
         $this->doTestCachePools([], AdapterInterface::class);
     }
 
-    /**
-     * @requires extension redis
-     *
-     * @group integration
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('redis')]
+    #[\PHPUnit\Framework\Attributes\Group('integration')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testRedisCachePools()
     {
         $this->skipIfRedisUnavailable();
@@ -48,11 +46,9 @@ class CachePoolsTest extends AbstractWebTestCase
         }
     }
 
-    /**
-     * @requires extension redis
-     *
-     * @group integration
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('redis')]
+    #[\PHPUnit\Framework\Attributes\Group('integration')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testRedisCustomCachePools()
     {
         $this->skipIfRedisUnavailable();
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php
index 2c47121..5e1aa99 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDebugCommandTest.php
@@ -19,15 +19,11 @@ use Symfony\Component\Console\Output\NullOutput;
 use Symfony\Component\Console\Tester\CommandCompletionTester;
 use Symfony\Component\Console\Tester\CommandTester;
 
-/**
- * @group functional
- */
+#[\PHPUnit\Framework\Attributes\Group('functional')]
 class ConfigDebugCommandTest extends AbstractWebTestCase
 {
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testShowList(bool $debug)
     {
         $tester = $this->createCommandTester($debug);
@@ -44,10 +40,8 @@ class ConfigDebugCommandTest extends AbstractWebTestCase
         $this->assertStringContainsString('  test_dump', $tester->getDisplay());
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testDumpKernelExtension(bool $debug)
     {
         $tester = $this->createCommandTester($debug);
@@ -58,10 +52,8 @@ class ConfigDebugCommandTest extends AbstractWebTestCase
         $this->assertStringContainsString('    foo: bar', $tester->getDisplay());
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testDumpBundleName(bool $debug)
     {
         $tester = $this->createCommandTester($debug);
@@ -71,10 +63,8 @@ class ConfigDebugCommandTest extends AbstractWebTestCase
         $this->assertStringContainsString('custom: foo', $tester->getDisplay());
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testDumpBundleOption(bool $debug)
     {
         $tester = $this->createCommandTester($debug);
@@ -84,10 +74,8 @@ class ConfigDebugCommandTest extends AbstractWebTestCase
         $this->assertStringContainsString('foo', $tester->getDisplay());
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testDumpWithoutTitleIsValidJson(bool $debug)
     {
         $tester = $this->createCommandTester($debug);
@@ -97,10 +85,8 @@ class ConfigDebugCommandTest extends AbstractWebTestCase
         $this->assertJson($tester->getDisplay());
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testDumpWithUnsupportedFormat(bool $debug)
     {
         $tester = $this->createCommandTester($debug);
@@ -114,10 +100,8 @@ class ConfigDebugCommandTest extends AbstractWebTestCase
         ]);
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testParametersValuesAreResolved(bool $debug)
     {
         $tester = $this->createCommandTester($debug);
@@ -128,10 +112,8 @@ class ConfigDebugCommandTest extends AbstractWebTestCase
         $this->assertStringContainsString('secret: test', $tester->getDisplay());
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testParametersValuesAreFullyResolved(bool $debug)
     {
         $tester = $this->createCommandTester($debug);
@@ -144,10 +126,8 @@ class ConfigDebugCommandTest extends AbstractWebTestCase
         $this->assertStringContainsString('ide: '.($debug ? ($_ENV['SYMFONY_IDE'] ?? $_SERVER['SYMFONY_IDE'] ?? 'null') : 'null'), $tester->getDisplay());
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testDefaultParameterValueIsResolvedIfConfigIsExisting(bool $debug)
     {
         $tester = $this->createCommandTester($debug);
@@ -158,10 +138,8 @@ class ConfigDebugCommandTest extends AbstractWebTestCase
         $this->assertStringContainsString(\sprintf("dsn: 'file:%s/profiler'", $kernelCacheDir), $tester->getDisplay());
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testDumpExtensionConfigWithoutBundle(bool $debug)
     {
         $tester = $this->createCommandTester($debug);
@@ -171,10 +149,8 @@ class ConfigDebugCommandTest extends AbstractWebTestCase
         $this->assertStringContainsString('enabled: true', $tester->getDisplay());
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testDumpUndefinedBundleOption(bool $debug)
     {
         $tester = $this->createCommandTester($debug);
@@ -183,10 +159,8 @@ class ConfigDebugCommandTest extends AbstractWebTestCase
         $this->assertStringContainsString('Unable to find configuration for "test.foo"', $tester->getDisplay());
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testDumpWithPrefixedEnv(bool $debug)
     {
         $tester = $this->createCommandTester($debug);
@@ -195,10 +169,8 @@ class ConfigDebugCommandTest extends AbstractWebTestCase
         $this->assertStringContainsString("cookie_httponly: '%env(bool:COOKIE_HTTPONLY)%'", $tester->getDisplay());
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testDumpFallsBackToDefaultConfigAndResolvesParameterValue(bool $debug)
     {
         $tester = $this->createCommandTester($debug);
@@ -208,10 +180,8 @@ class ConfigDebugCommandTest extends AbstractWebTestCase
         $this->assertStringContainsString('foo: bar', $tester->getDisplay());
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testDumpFallsBackToDefaultConfigAndResolvesEnvPlaceholder(bool $debug)
     {
         $tester = $this->createCommandTester($debug);
@@ -221,10 +191,8 @@ class ConfigDebugCommandTest extends AbstractWebTestCase
         $this->assertStringContainsString("baz: '%env(BAZ)%'", $tester->getDisplay());
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testDumpThrowsExceptionWhenDefaultConfigFallbackIsImpossible(bool $debug)
     {
         $this->expectException(\LogicException::class);
@@ -234,9 +202,7 @@ class ConfigDebugCommandTest extends AbstractWebTestCase
         $tester->execute(['name' => 'ExtensionWithoutConfigTestBundle']);
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(bool $debug, array $input, array $expectedSuggestions)
     {
         $application = $this->createApplication($debug);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php
index 8f5930f..e242c01 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ConfigDumpReferenceCommandTest.php
@@ -18,15 +18,11 @@ use Symfony\Component\Console\Output\NullOutput;
 use Symfony\Component\Console\Tester\CommandCompletionTester;
 use Symfony\Component\Console\Tester\CommandTester;
 
-/**
- * @group functional
- */
+#[\PHPUnit\Framework\Attributes\Group('functional')]
 class ConfigDumpReferenceCommandTest extends AbstractWebTestCase
 {
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testShowList(bool $debug)
     {
         $tester = $this->createCommandTester($debug);
@@ -43,10 +39,8 @@ class ConfigDumpReferenceCommandTest extends AbstractWebTestCase
         $this->assertStringContainsString('  test_dump', $tester->getDisplay());
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testDumpKernelExtension(bool $debug)
     {
         $tester = $this->createCommandTester($debug);
@@ -57,10 +51,8 @@ class ConfigDumpReferenceCommandTest extends AbstractWebTestCase
         $this->assertStringContainsString('    bar', $tester->getDisplay());
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testDumpBundleName(bool $debug)
     {
         $tester = $this->createCommandTester($debug);
@@ -71,10 +63,8 @@ class ConfigDumpReferenceCommandTest extends AbstractWebTestCase
         $this->assertStringContainsString('    custom:', $tester->getDisplay());
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testDumpExtensionConfigWithoutBundle(bool $debug)
     {
         $tester = $this->createCommandTester($debug);
@@ -84,10 +74,8 @@ class ConfigDumpReferenceCommandTest extends AbstractWebTestCase
         $this->assertStringContainsString('enabled:              true', $tester->getDisplay());
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testDumpAtPath(bool $debug)
     {
         $tester = $this->createCommandTester($debug);
@@ -108,10 +96,8 @@ EOL
             , $tester->getDisplay(true));
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testDumpAtPathXml(bool $debug)
     {
         $tester = $this->createCommandTester($debug);
@@ -125,9 +111,7 @@ EOL
         $this->assertStringContainsString('[ERROR] The "path" option is only available for the "yaml" format.', $tester->getDisplay());
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(bool $debug, array $input, array $expectedSuggestions)
     {
         $application = $this->createApplication($debug);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php
index 95dcc36..59fd9ee 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\Console\Tester\ApplicationTester;
 use Symfony\Component\Console\Tester\CommandCompletionTester;
 use Symfony\Component\HttpKernel\HttpKernelInterface;
 
-/**
- * @group functional
- */
+#[\PHPUnit\Framework\Attributes\Group('functional')]
 class ContainerDebugCommandTest extends AbstractWebTestCase
 {
     public function testDumpContainerIfNotExists()
@@ -113,9 +111,7 @@ class ContainerDebugCommandTest extends AbstractWebTestCase
         $this->assertStringNotContainsString(ContainerExcluded::class, $tester->getDisplay());
     }
 
-    /**
-     * @dataProvider provideIgnoreBackslashWhenFindingService
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIgnoreBackslashWhenFindingService')]
     public function testIgnoreBackslashWhenFindingService(string $validServiceId)
     {
         static::bootKernel(['test_case' => 'ContainerDebug', 'root_config' => 'config.yml']);
@@ -282,9 +278,7 @@ TXT
         ];
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions, array $notExpectedSuggestions = [])
     {
         static::bootKernel(['test_case' => 'ContainerDebug', 'root_config' => 'config.yml', 'debug' => true]);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerLintCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerLintCommandTest.php
index 27eb03b..a4e7601 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerLintCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerLintCommandTest.php
@@ -14,16 +14,12 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
 use Symfony\Bundle\FrameworkBundle\Console\Application;
 use Symfony\Component\Console\Tester\CommandTester;
 
-/**
- * @group functional
- */
+#[\PHPUnit\Framework\Attributes\Group('functional')]
 class ContainerLintCommandTest extends AbstractWebTestCase
 {
     private Application $application;
 
-    /**
-     * @dataProvider containerLintProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('containerLintProvider')]
     public function testLintContainer(string $configFile, string $expectedOutput)
     {
         $kernel = static::createKernel([
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/DebugAutowiringCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/DebugAutowiringCommandTest.php
index ca11e3f..2d89f04 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/DebugAutowiringCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/DebugAutowiringCommandTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\Console\Tester\CommandCompletionTester;
 use Symfony\Component\HttpKernel\HttpKernelInterface;
 use Symfony\Component\Routing\RouterInterface;
 
-/**
- * @group functional
- */
+#[\PHPUnit\Framework\Attributes\Group('functional')]
 class DebugAutowiringCommandTest extends AbstractWebTestCase
 {
     public function testBasicFunctionality()
@@ -116,9 +114,7 @@ class DebugAutowiringCommandTest extends AbstractWebTestCase
         $this->assertStringContainsString(ClassAliasExampleClass::class, $tester->getDisplay());
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $kernel = static::bootKernel(['test_case' => 'ContainerDebug', 'root_config' => 'config.yml']);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/FragmentTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/FragmentTest.php
index 148ab05..c6b3087 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/FragmentTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/FragmentTest.php
@@ -13,9 +13,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
 
 class FragmentTest extends AbstractWebTestCase
 {
-    /**
-     * @dataProvider getConfigs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConfigs')]
     public function testFragment($insulate)
     {
         $client = $this->createClient(['test_case' => 'Fragment', 'root_config' => 'config.yml', 'debug' => true]);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/NotificationTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/NotificationTest.php
index 03b947a..dae0f20 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/NotificationTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/NotificationTest.php
@@ -13,9 +13,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
 
 final class NotificationTest extends AbstractWebTestCase
 {
-    /**
-     * @requires function \Symfony\Bundle\MercureBundle\MercureBundle::build
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresMethod(\Symfony\Bundle\MercureBundle\MercureBundle::class, 'build')]
     public function testNotifierAssertion()
     {
         $client = $this->createClient(['test_case' => 'Notifier', 'root_config' => 'config.yml', 'debug' => true]);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php
index 43b0eda..96ff7bc 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ProfilerTest.php
@@ -13,9 +13,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
 
 class ProfilerTest extends AbstractWebTestCase
 {
-    /**
-     * @dataProvider getConfigs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConfigs')]
     public function testProfilerIsDisabled($insulate)
     {
         $client = $this->createClient(['test_case' => 'Profiler', 'root_config' => 'config.yml']);
@@ -36,9 +34,7 @@ class ProfilerTest extends AbstractWebTestCase
         $this->assertNull($client->getProfile());
     }
 
-    /**
-     * @dataProvider getConfigs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConfigs')]
     public function testProfilerCollectParameter($insulate)
     {
         $client = $this->createClient(['test_case' => 'ProfilerCollectParameter', 'root_config' => 'config.yml']);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Psr4RoutingTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Psr4RoutingTest.php
index 811a99a..c2834c3 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Psr4RoutingTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Psr4RoutingTest.php
@@ -11,9 +11,7 @@
 
 namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
 
-/**
- * @requires function Symfony\Component\Routing\Loader\Psr4DirectoryLoader::__construct
- */
+#[\PHPUnit\Framework\Attributes\RequiresMethod(Symfony\Component\Routing\Loader\Psr4DirectoryLoader::class, '__construct')]
 final class Psr4RoutingTest extends AbstractAttributeRoutingTestCase
 {
     protected function getTestCaseApp(): string
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RouterDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RouterDebugCommandTest.php
index 6140788..a826d65 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RouterDebugCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RouterDebugCommandTest.php
@@ -15,9 +15,7 @@ use Symfony\Bundle\FrameworkBundle\Console\Application;
 use Symfony\Component\Console\Tester\CommandCompletionTester;
 use Symfony\Component\Console\Tester\CommandTester;
 
-/**
- * @group functional
- */
+#[\PHPUnit\Framework\Attributes\Group('functional')]
 class RouterDebugCommandTest extends AbstractWebTestCase
 {
     private Application $application;
@@ -89,21 +87,17 @@ class RouterDebugCommandTest extends AbstractWebTestCase
         $tester->execute(['name' => 'gerard'], ['interactive' => true]);
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $tester = new CommandCompletionTester($this->application->get('debug:router'));
         $this->assertSame($expectedSuggestions, $tester->complete($input));
     }
 
-    /**
-     * @testWith    ["txt"]
-     *              ["xml"]
-     *              ["json"]
-     *              ["md"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['txt'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['xml'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['json'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['md'])]
     public function testShowAliases(string $format)
     {
         $tester = $this->createCommandTester();
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RoutingConditionServiceTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RoutingConditionServiceTest.php
index 4f4caa6..42ee6cf 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RoutingConditionServiceTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/RoutingConditionServiceTest.php
@@ -13,9 +13,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
 
 class RoutingConditionServiceTest extends AbstractWebTestCase
 {
-    /**
-     * @dataProvider provideRoutes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRoutes')]
     public function testCondition(int $code, string $path)
     {
         $client = static::createClient(['test_case' => 'RoutingConditionService']);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SecurityTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SecurityTest.php
index c26fa71..a7cf48c 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SecurityTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SecurityTest.php
@@ -15,9 +15,7 @@ use Symfony\Component\Security\Core\User\InMemoryUser;
 
 class SecurityTest extends AbstractWebTestCase
 {
-    /**
-     * @dataProvider getUsers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getUsers')]
     public function testLoginUser(string $username, array $roles, ?string $firewallContext)
     {
         $user = new InMemoryUser($username, 'the-password', $roles);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php
index 5049b15..e06ba37 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php
@@ -15,9 +15,8 @@ class SessionTest extends AbstractWebTestCase
 {
     /**
      * Tests session attributes persist.
-     *
-     * @dataProvider getConfigs
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConfigs')]
     public function testWelcome($config, $insulate)
     {
         $client = $this->createClient(['test_case' => 'Session', 'root_config' => $config]);
@@ -48,9 +47,8 @@ class SessionTest extends AbstractWebTestCase
 
     /**
      * Tests flash messages work in practice.
-     *
-     * @dataProvider getConfigs
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConfigs')]
     public function testFlash($config, $insulate)
     {
         $client = $this->createClient(['test_case' => 'Session', 'root_config' => $config]);
@@ -72,9 +70,8 @@ class SessionTest extends AbstractWebTestCase
     /**
      * See if two separate insulated clients can run without
      * polluting each other's session data.
-     *
-     * @dataProvider getConfigs
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConfigs')]
     public function testTwoClients($config, $insulate)
     {
         // start first client
@@ -128,9 +125,7 @@ class SessionTest extends AbstractWebTestCase
         $this->assertStringContainsString('Welcome back client2, nice to meet you.', $crawler2->text());
     }
 
-    /**
-     * @dataProvider getConfigs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConfigs')]
     public function testCorrectCacheControlHeadersForCacheableAction($config, $insulate)
     {
         $client = $this->createClient(['test_case' => 'Session', 'root_config' => $config]);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SluggerLocaleAwareTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SluggerLocaleAwareTest.php
index 7690124..1507f50 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SluggerLocaleAwareTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SluggerLocaleAwareTest.php
@@ -13,14 +13,10 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
 
 use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Slugger\SlugConstructArgService;
 
-/**
- * @group functional
- */
+#[\PHPUnit\Framework\Attributes\Group('functional')]
 class SluggerLocaleAwareTest extends AbstractWebTestCase
 {
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testLocalizedSlugger()
     {
         $kernel = static::createKernel(['test_case' => 'Slugger', 'root_config' => 'config.yml']);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/TestServiceContainerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/TestServiceContainerTest.php
index fe70930..f04cd1a 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/TestServiceContainerTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/TestServiceContainerTest.php
@@ -68,17 +68,13 @@ class TestServiceContainerTest extends AbstractWebTestCase
         $this->assertSame($service, $container->get('decorated')->inner);
     }
 
-    /**
-     * @doesNotPerformAssertions
-     */
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testBootKernel()
     {
         static::bootKernel(['test_case' => 'TestServiceContainer']);
     }
 
-    /**
-     * @depends testBootKernel
-     */
+    #[\PHPUnit\Framework\Attributes\Depends('testBootKernel')]
     public function testKernelIsNotInitialized()
     {
         self::assertNull(self::$class);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/TranslationDebugCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/TranslationDebugCommandTest.php
index 5e39644..aba3eaa 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/TranslationDebugCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/TranslationDebugCommandTest.php
@@ -15,9 +15,7 @@ use Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand;
 use Symfony\Bundle\FrameworkBundle\Console\Application;
 use Symfony\Component\Console\Tester\CommandTester;
 
-/**
- * @group functional
- */
+#[\PHPUnit\Framework\Attributes\Group('functional')]
 class TranslationDebugCommandTest extends AbstractWebTestCase
 {
     private Application $application;
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php
index 3e185b5..35c5653 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php
@@ -439,9 +439,7 @@ class RouterTest extends TestCase
         $router->getRouteCollection()->get('foo');
     }
 
-    /**
-     * @dataProvider getNonStringValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNonStringValues')]
     public function testDefaultValuesAsNonStrings($value)
     {
         $routes = new RouteCollection();
@@ -456,9 +454,7 @@ class RouterTest extends TestCase
         $this->assertSame($value, $route->getDefault('foo'));
     }
 
-    /**
-     * @dataProvider getNonStringValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNonStringValues')]
     public function testDefaultValuesAsNonStringsWithSfContainer($value)
     {
         $routes = new RouteCollection();
@@ -524,9 +520,7 @@ class RouterTest extends TestCase
         return [[null], [false], [true], [new \stdClass()], [['foo', 'bar']], [[[]]]];
     }
 
-    /**
-     * @dataProvider getContainerParameterForRoute
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getContainerParameterForRoute')]
     public function testCacheValidityWithContainerParameters($parameter)
     {
         $cacheDir = sys_get_temp_dir().\DIRECTORY_SEPARATOR.uniqid('router_', true);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Secrets/SodiumVaultTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Secrets/SodiumVaultTest.php
index 603d135..496bc1b 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Secrets/SodiumVaultTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Secrets/SodiumVaultTest.php
@@ -15,9 +15,7 @@ use PHPUnit\Framework\TestCase;
 use Symfony\Bundle\FrameworkBundle\Secrets\SodiumVault;
 use Symfony\Component\Filesystem\Filesystem;
 
-/**
- * @requires extension sodium
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('sodium')]
 class SodiumVaultTest extends TestCase
 {
     private string $secretsDir;
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php
index c31119a..ce83662 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php
@@ -142,7 +142,7 @@ class TranslatorTest extends TestCase
         new Translator($container, new MessageFormatter(), 'en', [], ['foo' => 'bar']);
     }
 
-    /** @dataProvider getDebugModeAndCacheDirCombinations */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDebugModeAndCacheDirCombinations')]
     public function testResourceFilesOptionLoadsBeforeOtherAddedResources($debug, $enableCache)
     {
         $someCatalogue = $this->getCatalogue('some_locale', []);
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php
index c74200e..0d94d06 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php
@@ -76,7 +76,7 @@ class SecurityDataCollectorTest extends TestCase
         $this->assertNull($collector->getFirewall());
     }
 
-    /** @dataProvider provideRoles */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRoles')]
     public function testCollectAuthenticationTokenAndRoles(array $roles, array $normalizedRoles, array $inheritedRoles)
     {
         $tokenStorage = new TokenStorage();
@@ -125,10 +125,7 @@ class SecurityDataCollectorTest extends TestCase
         $firewallConfig = new FirewallConfig('dummy', 'security.request_matcher.dummy', 'security.user_checker.dummy');
         $request = new Request();
 
-        $firewallMap = $this
-            ->getMockBuilder(FirewallMap::class)
-            ->disableOriginalConstructor()
-            ->getMock();
+        $firewallMap = $this->createMock(FirewallMap::class);
         $firewallMap
             ->expects($this->once())
             ->method('getFirewallConfig')
@@ -164,29 +161,21 @@ class SecurityDataCollectorTest extends TestCase
         $this->assertNull($collector->getFirewall());
 
         // Inject an instance that is not context aware
-        $firewallMap = $this
-            ->getMockBuilder(FirewallMapInterface::class)
-            ->disableOriginalConstructor()
-            ->getMock();
+        $firewallMap = $this->createMock(FirewallMapInterface::class);
 
         $collector = new SecurityDataCollector(null, null, null, null, $firewallMap, new TraceableFirewallListener($firewallMap, new EventDispatcher(), new LogoutUrlGenerator()), true);
         $collector->collect($request, $response);
         $this->assertNull($collector->getFirewall());
 
         // Null config
-        $firewallMap = $this
-            ->getMockBuilder(FirewallMap::class)
-            ->disableOriginalConstructor()
-            ->getMock();
+        $firewallMap = $this->createMock(FirewallMap::class);
 
         $collector = new SecurityDataCollector(null, null, null, null, $firewallMap, new TraceableFirewallListener($firewallMap, new EventDispatcher(), new LogoutUrlGenerator()), true);
         $collector->collect($request, $response);
         $this->assertNull($collector->getFirewall());
     }
 
-    /**
-     * @group time-sensitive
-     */
+    #[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
     public function testGetListeners()
     {
         $request = new Request();
@@ -195,10 +184,7 @@ class SecurityDataCollectorTest extends TestCase
         $listener = function ($e) use ($event, &$listenerCalled) {
             $listenerCalled += $e === $event;
         };
-        $firewallMap = $this
-            ->getMockBuilder(FirewallMap::class)
-            ->disableOriginalConstructor()
-            ->getMock();
+        $firewallMap = $this->createMock(FirewallMap::class);
         $firewallMap
             ->expects($this->any())
             ->method('getFirewallConfig')
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Debug/TraceableFirewallListenerTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Debug/TraceableFirewallListenerTest.php
index 6dad1f3..1659174 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Debug/TraceableFirewallListenerTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Debug/TraceableFirewallListenerTest.php
@@ -30,9 +30,7 @@ use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPasspor
 use Symfony\Component\Security\Http\Firewall\AuthenticatorManagerListener;
 use Symfony\Component\Security\Http\Logout\LogoutUrlGenerator;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class TraceableFirewallListenerTest extends TestCase
 {
     public function testOnKernelRequestRecordsListeners()
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPassTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPassTest.php
index e6567e6..3bca250 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPassTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/RegisterGlobalSecurityEventListenersPassTest.php
@@ -50,9 +50,7 @@ class RegisterGlobalSecurityEventListenersPassTest extends TestCase
         $securityBundle->build($this->container);
     }
 
-    /**
-     * @dataProvider providePropagatedEvents
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePropagatedEvents')]
     public function testEventIsPropagated(string $configuredEvent, string $registeredEvent)
     {
         $this->container->loadFromExtension('security', [
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTestCase.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTestCase.php
index d9b7bed..5133895 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTestCase.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTestCase.php
@@ -698,12 +698,14 @@ abstract class CompleteConfigurationTestCase extends TestCase
         $this->getContainer('listener_undefined_provider');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testFirewallWithUserProvider()
     {
         $this->getContainer('firewall_provider');
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testFirewallListenerWithProvider()
     {
         $this->getContainer('listener_provider');
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php
index 5d93ff6..17934f9 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php
@@ -29,9 +29,7 @@ class AbstractFactoryTest extends TestCase
         $this->container = new ContainerBuilder();
     }
 
-    /**
-     * @dataProvider getFailureHandlers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFailureHandlers')]
     public function testDefaultFailureHandler($serviceId, $defaultHandlerInjection)
     {
         $options = [
@@ -72,9 +70,7 @@ class AbstractFactoryTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getSuccessHandlers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getSuccessHandlers')]
     public function testDefaultSuccessHandler($serviceId, $defaultHandlerInjection)
     {
         $options = [
@@ -111,9 +107,8 @@ class AbstractFactoryTest extends TestCase
         }
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testRequirePreviousSessionOptionLegacy()
     {
         $this->expectDeprecation('Since symfony/security-bundle 6.4: Option "require_previous_session" at "root" is deprecated, it will be removed in version 7.0. Setting it has no effect anymore.');
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AccessTokenFactoryTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AccessTokenFactoryTest.php
index e1f5581..81b15f1 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AccessTokenFactoryTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AccessTokenFactoryTest.php
@@ -105,9 +105,7 @@ class AccessTokenFactoryTest extends TestCase
         $this->assertEquals($expected, $container->getDefinition('security.access_token_handler.firewall1')->getArguments());
     }
 
-    /**
-     * @dataProvider getOidcUserInfoConfiguration
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getOidcUserInfoConfiguration')]
     public function testOidcUserInfoTokenHandlerConfigurationWithBaseUri(array|string $configuration)
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php
index 8252cfe..e18bd12 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php
@@ -141,6 +141,7 @@ class SecurityExtensionTest extends TestCase
         $this->assertTrue($container->getDefinition('security.authentication.switchuser_listener.some_firewall')->getArgument(9));
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testPerListenerProvider()
     {
         $container = $this->getRawContainer();
@@ -184,6 +185,7 @@ class SecurityExtensionTest extends TestCase
         $container->compile();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testPerListenerProviderWithRememberMeAndAnonymous()
     {
         $container = $this->getRawContainer();
@@ -279,7 +281,7 @@ class SecurityExtensionTest extends TestCase
         $this->assertSame($requestMatcherId, (string) $args[0]);
     }
 
-    /** @dataProvider provideAdditionalRequestMatcherConstraints */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAdditionalRequestMatcherConstraints')]
     public function testRegisterAccessControlWithRequestMatcherAndAdditionalOptionsThrowsInvalidException(array $additionalConstraints)
     {
         $container = $this->getRawContainer();
@@ -478,9 +480,8 @@ class SecurityExtensionTest extends TestCase
         $this->assertFalse($container->has(UserProviderInterface::class));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testFirewallWithNoUserProviderTriggerDeprecation()
     {
         $container = $this->getRawContainer();
@@ -503,9 +504,7 @@ class SecurityExtensionTest extends TestCase
         $container->compile();
     }
 
-    /**
-     * @dataProvider acceptableIpsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('acceptableIpsProvider')]
     public function testAcceptableAccessControlIps($ips)
     {
         $container = $this->getRawContainer();
@@ -690,9 +689,7 @@ class SecurityExtensionTest extends TestCase
         ], 'security.authenticator.guard.main.0'];
     }
 
-    /**
-     * @dataProvider provideEntryPointRequiredData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEntryPointRequiredData')]
     public function testEntryPointRequired(array $firewall, string $messageRegex)
     {
         $container = $this->getRawContainer();
@@ -721,9 +718,7 @@ class SecurityExtensionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideConfigureCustomAuthenticatorData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConfigureCustomAuthenticatorData')]
     public function testConfigureCustomAuthenticator(array $firewall, array $expectedAuthenticators)
     {
         $container = $this->getRawContainer();
@@ -796,9 +791,7 @@ class SecurityExtensionTest extends TestCase
         $this->assertTrue($container->has('security.listener.session.'.$firewallId));
     }
 
-    /**
-     * @dataProvider provideUserCheckerConfig
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUserCheckerConfig')]
     public function testUserCheckerWithAuthenticatorManager(array $config, string $expectedUserCheckerClass)
     {
         $container = $this->getRawContainer();
@@ -891,9 +884,7 @@ class SecurityExtensionTest extends TestCase
         $this->assertFalse($container->has('security.logout.listener.clear_site_data.'.$firewallId));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testNothingDoneWithEmptyConfiguration()
     {
         $container = $this->getRawContainer();
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/XmlCompleteConfigurationTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/XmlCompleteConfigurationTest.php
index 2624adc..5c4c549 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/XmlCompleteConfigurationTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/XmlCompleteConfigurationTest.php
@@ -17,6 +17,7 @@ use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
 
 class XmlCompleteConfigurationTest extends CompleteConfigurationTestCase
 {
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testFirewallPatterns()
     {
         $this->markTestSkipped('This features is not supported in XML.');
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/XmlCustomAuthenticatorTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/XmlCustomAuthenticatorTest.php
index e57cda1..4ad5c42 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/XmlCustomAuthenticatorTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/XmlCustomAuthenticatorTest.php
@@ -20,9 +20,8 @@ use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
 
 class XmlCustomAuthenticatorTest extends TestCase
 {
-    /**
-     * @dataProvider provideXmlConfigurationFile
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideXmlConfigurationFile')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCustomProviderElement(string $configurationFile)
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/XmlCustomProviderTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/XmlCustomProviderTest.php
index a3f59fc..4ee60fd 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/XmlCustomProviderTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/XmlCustomProviderTest.php
@@ -20,9 +20,8 @@ use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
 
 class XmlCustomProviderTest extends TestCase
 {
-    /**
-     * @dataProvider provideXmlConfigurationFile
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideXmlConfigurationFile')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCustomProviderElement(string $configurationFile)
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AccessTokenTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AccessTokenTest.php
index f9362a2..46d1a09 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AccessTokenTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AccessTokenTest.php
@@ -57,9 +57,7 @@ class AccessTokenTest extends AbstractWebTestCase
         $this->assertSame(['message' => 'Welcome @dunglas!'], json_decode($response->getContent(), true));
     }
 
-    /**
-     * @dataProvider defaultFormEncodedBodyFailureData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('defaultFormEncodedBodyFailureData')]
     public function testDefaultFormEncodedBodyFailure(array $parameters, array $headers)
     {
         $client = $this->createClient(['test_case' => 'AccessToken', 'root_config' => 'config_body_default.yml']);
@@ -93,9 +91,7 @@ class AccessTokenTest extends AbstractWebTestCase
         $this->assertSame(['message' => 'Good game @dunglas!'], json_decode($response->getContent(), true));
     }
 
-    /**
-     * @dataProvider customFormEncodedBodyFailure
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('customFormEncodedBodyFailure')]
     public function testCustomFormEncodedBodyFailure(array $parameters, array $headers)
     {
         $client = $this->createClient(['test_case' => 'AccessToken', 'root_config' => 'config_body_custom.yml']);
@@ -150,9 +146,7 @@ class AccessTokenTest extends AbstractWebTestCase
         $this->assertSame(['message' => 'Welcome @dunglas!'], json_decode($response->getContent(), true));
     }
 
-    /**
-     * @dataProvider defaultHeaderAccessTokenFailureData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('defaultHeaderAccessTokenFailureData')]
     public function testDefaultHeaderAccessTokenFailure(array $headers)
     {
         $client = $this->createClient(['test_case' => 'AccessToken', 'root_config' => 'config_header_default.yml']);
@@ -165,9 +159,7 @@ class AccessTokenTest extends AbstractWebTestCase
         $this->assertSame('Bearer realm="My API",error="invalid_token",error_description="Invalid credentials."', $response->headers->get('WWW-Authenticate'));
     }
 
-    /**
-     * @dataProvider defaultMissingHeaderAccessTokenFailData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('defaultMissingHeaderAccessTokenFailData')]
     public function testDefaultMissingHeaderAccessTokenFail(array $headers)
     {
         $client = $this->createClient(['test_case' => 'AccessToken', 'root_config' => 'config_header_default.yml']);
@@ -189,9 +181,7 @@ class AccessTokenTest extends AbstractWebTestCase
         $this->assertSame(['message' => 'Good game @dunglas!'], json_decode($response->getContent(), true));
     }
 
-    /**
-     * @dataProvider customHeaderAccessTokenFailure
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('customHeaderAccessTokenFailure')]
     public function testCustomHeaderAccessTokenFailure(array $headers, int $errorCode)
     {
         $client = $this->createClient(['test_case' => 'AccessToken', 'root_config' => 'config_header_custom.yml']);
@@ -203,9 +193,7 @@ class AccessTokenTest extends AbstractWebTestCase
         $this->assertFalse($response->headers->has('WWW-Authenticate'));
     }
 
-    /**
-     * @dataProvider customMissingHeaderAccessTokenShouldFail
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('customMissingHeaderAccessTokenShouldFail')]
     public function testCustomMissingHeaderAccessTokenShouldFail(array $headers)
     {
         $client = $this->createClient(['test_case' => 'AccessToken', 'root_config' => 'config_header_custom.yml']);
@@ -250,9 +238,7 @@ class AccessTokenTest extends AbstractWebTestCase
         $this->assertSame(['message' => 'Welcome @dunglas!'], json_decode($response->getContent(), true));
     }
 
-    /**
-     * @dataProvider defaultQueryAccessTokenFailureData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('defaultQueryAccessTokenFailureData')]
     public function testDefaultQueryAccessTokenFailure(string $query)
     {
         $client = $this->createClient(['test_case' => 'AccessToken', 'root_config' => 'config_query_default.yml']);
@@ -286,9 +272,7 @@ class AccessTokenTest extends AbstractWebTestCase
         $this->assertSame(['message' => 'Good game @dunglas!'], json_decode($response->getContent(), true));
     }
 
-    /**
-     * @dataProvider customQueryAccessTokenFailure
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('customQueryAccessTokenFailure')]
     public function testCustomQueryAccessTokenFailure(string $query)
     {
         $client = $this->createClient(['test_case' => 'AccessToken', 'root_config' => 'config_query_custom.yml']);
@@ -345,10 +329,8 @@ class AccessTokenTest extends AbstractWebTestCase
         $this->assertSame(['message' => 'Welcome @dunglas!'], json_decode($response->getContent(), true));
     }
 
-    /**
-     * @requires extension openssl
-     * @group jwt
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('openssl')]
+    #[\PHPUnit\Framework\Attributes\Group('jwt')]
     public function testOidcSuccess()
     {
         $time = time();
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticatorTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticatorTest.php
index a0c8fc3..74609da 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticatorTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticatorTest.php
@@ -13,11 +13,8 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
 
 class AuthenticatorTest extends AbstractWebTestCase
 {
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideEmails
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEmails')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyGlobalUserProvider($email)
     {
         $client = $this->createClient(['test_case' => 'Authenticator', 'root_config' => 'implicit_user_provider.yml']);
@@ -28,9 +25,7 @@ class AuthenticatorTest extends AbstractWebTestCase
         $this->assertJsonStringEqualsJsonString('{"email":"'.$email.'"}', $client->getResponse()->getContent());
     }
 
-    /**
-     * @dataProvider provideEmails
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEmails')]
     public function testFirewallUserProvider($email, $withinFirewall)
     {
         $client = $this->createClient(['test_case' => 'Authenticator', 'root_config' => 'firewall_user_provider.yml']);
@@ -46,9 +41,7 @@ class AuthenticatorTest extends AbstractWebTestCase
         }
     }
 
-    /**
-     * @dataProvider provideEmails
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEmails')]
     public function testWithoutUserProvider($email)
     {
         $client = $this->createClient(['test_case' => 'Authenticator', 'root_config' => 'no_user_provider.yml']);
@@ -66,9 +59,7 @@ class AuthenticatorTest extends AbstractWebTestCase
         yield ['john@example.org', false];
     }
 
-    /**
-     * @dataProvider provideEmailsWithFirewalls
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEmailsWithFirewalls')]
     public function testLoginUsersWithMultipleFirewalls(string $username, string $firewallContext)
     {
         $client = $this->createClient(['test_case' => 'Authenticator', 'root_config' => 'multiple_firewall_user_provider.yml']);
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php
index 6df9aa5..cea6867 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\HttpKernel\KernelEvents;
 
 class CsrfFormLoginTest extends AbstractWebTestCase
 {
-    /**
-     * @dataProvider provideClientOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideClientOptions')]
     public function testFormLoginAndLogoutWithCsrfTokens($options)
     {
         $client = $this->createClient($options);
@@ -56,9 +54,7 @@ class CsrfFormLoginTest extends AbstractWebTestCase
         });
     }
 
-    /**
-     * @dataProvider provideClientOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideClientOptions')]
     public function testFormLoginWithInvalidCsrfToken($options)
     {
         $client = $this->createClient($options);
@@ -83,9 +79,7 @@ class CsrfFormLoginTest extends AbstractWebTestCase
         });
     }
 
-    /**
-     * @dataProvider provideClientOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideClientOptions')]
     public function testFormLoginWithCustomTargetPath($options)
     {
         $client = $this->createClient($options);
@@ -103,9 +97,7 @@ class CsrfFormLoginTest extends AbstractWebTestCase
         $this->assertStringContainsString('You\'re browsing to path "/foo".', $text);
     }
 
-    /**
-     * @dataProvider provideClientOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideClientOptions')]
     public function testFormLoginRedirectsToProtectedResourceAfterLogin($options)
     {
         $client = $this->createClient($options);
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php
index f6957f4..d61dfaf 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/FormLoginTest.php
@@ -13,9 +13,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
 
 class FormLoginTest extends AbstractWebTestCase
 {
-    /**
-     * @dataProvider provideClientOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideClientOptions')]
     public function testFormLogin(array $options)
     {
         $client = $this->createClient($options);
@@ -32,9 +30,7 @@ class FormLoginTest extends AbstractWebTestCase
         $this->assertStringContainsString('You\'re browsing to path "/profile".', $text);
     }
 
-    /**
-     * @dataProvider provideClientOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideClientOptions')]
     public function testFormLogout(array $options)
     {
         $client = $this->createClient($options);
@@ -65,9 +61,7 @@ class FormLoginTest extends AbstractWebTestCase
         $this->assertSame($logoutLinks[1]->getUri(), $logoutLinks[5]->getUri());
     }
 
-    /**
-     * @dataProvider provideClientOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideClientOptions')]
     public function testFormLoginWithCustomTargetPath(array $options)
     {
         $client = $this->createClient($options);
@@ -85,9 +79,7 @@ class FormLoginTest extends AbstractWebTestCase
         $this->assertStringContainsString('You\'re browsing to path "/foo".', $text);
     }
 
-    /**
-     * @dataProvider provideClientOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideClientOptions')]
     public function testFormLoginRedirectsToProtectedResourceAfterLogin(array $options)
     {
         $client = $this->createClient($options);
@@ -106,9 +98,7 @@ class FormLoginTest extends AbstractWebTestCase
         $this->assertStringContainsString('You\'re browsing to path "/protected_resource".', $text);
     }
 
-    /**
-     * @group time-sensitive
-     */
+    #[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
     public function testLoginThrottling()
     {
         $client = $this->createClient(['test_case' => 'StandardFormLogin', 'root_config' => 'login_throttling.yml']);
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php
index 99ba311..7479f98 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/LocalizedRoutesAsPathTest.php
@@ -13,9 +13,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
 
 class LocalizedRoutesAsPathTest extends AbstractWebTestCase
 {
-    /**
-     * @dataProvider getLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLocales')]
     public function testLoginLogoutProcedure(string $locale)
     {
         $client = $this->createClient(['test_case' => 'StandardFormLogin', 'root_config' => 'localized_routes.yml']);
@@ -34,11 +32,8 @@ class LocalizedRoutesAsPathTest extends AbstractWebTestCase
         $this->assertEquals('Homepage', $client->followRedirect()->text());
     }
 
-    /**
-     * @group issue-32995
-     *
-     * @dataProvider getLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLocales')]
+    #[\PHPUnit\Framework\Attributes\Group('issue-32995')]
     public function testLoginFailureWithLocalizedFailurePath(string $locale)
     {
         $client = $this->createClient(['test_case' => 'StandardFormLogin', 'root_config' => 'localized_form_failure_handler.yml']);
@@ -52,9 +47,7 @@ class LocalizedRoutesAsPathTest extends AbstractWebTestCase
         $this->assertRedirect($client->getResponse(), '/'.$locale.'/login');
     }
 
-    /**
-     * @dataProvider getLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLocales')]
     public function testAccessRestrictedResource(string $locale)
     {
         $client = $this->createClient(['test_case' => 'StandardFormLogin', 'root_config' => 'localized_routes.yml']);
@@ -63,9 +56,7 @@ class LocalizedRoutesAsPathTest extends AbstractWebTestCase
         $this->assertRedirect($client->getResponse(), '/'.$locale.'/login');
     }
 
-    /**
-     * @dataProvider getLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLocales')]
     public function testAccessRestrictedResourceWithForward(string $locale)
     {
         $client = $this->createClient(['test_case' => 'StandardFormLogin', 'root_config' => 'localized_routes_with_forward.yml']);
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeCookieTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeCookieTest.php
index 34fbca1..228ebd8 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeCookieTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeCookieTest.php
@@ -15,7 +15,7 @@ use Symfony\Component\HttpFoundation\ResponseHeaderBag;
 
 class RememberMeCookieTest extends AbstractWebTestCase
 {
-    /** @dataProvider getSessionRememberMeSecureCookieFlagAutoHttpsMap */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getSessionRememberMeSecureCookieFlagAutoHttpsMap')]
     public function testSessionRememberMeSecureCookieFlagAuto($https, $expectedSecureFlag)
     {
         $client = $this->createClient(['test_case' => 'RememberMeCookie', 'root_config' => 'config.yml']);
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeTest.php
index 036069f..50702e6 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeTest.php
@@ -20,9 +20,7 @@ class RememberMeTest extends AbstractWebTestCase
         UserChangingUserProvider::$changePassword = false;
     }
 
-    /**
-     * @dataProvider provideConfigs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConfigs')]
     public function testRememberMe(array $options)
     {
         $client = $this->createClient(array_merge_recursive(['root_config' => 'config.yml', 'test_case' => 'RememberMe'], $options));
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php
index 517253f..c23d051 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php
@@ -13,9 +13,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
 
 class SecurityRoutingIntegrationTest extends AbstractWebTestCase
 {
-    /**
-     * @dataProvider provideConfigs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConfigs')]
     public function testRoutingErrorIsNotExposedForProtectedResourceWhenAnonymous(array $options)
     {
         $client = $this->createClient($options);
@@ -24,9 +22,7 @@ class SecurityRoutingIntegrationTest extends AbstractWebTestCase
         $this->assertRedirect($client->getResponse(), '/login');
     }
 
-    /**
-     * @dataProvider provideConfigs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConfigs')]
     public function testRoutingErrorIsExposedWhenNotProtected(array $options)
     {
         $client = $this->createClient($options);
@@ -35,9 +31,7 @@ class SecurityRoutingIntegrationTest extends AbstractWebTestCase
         $this->assertEquals(404, $client->getResponse()->getStatusCode(), (string) $client->getResponse());
     }
 
-    /**
-     * @dataProvider provideConfigs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConfigs')]
     public function testRoutingErrorIsNotExposedForProtectedResourceWhenLoggedInWithInsufficientRights(array $options)
     {
         $client = $this->createClient($options);
@@ -52,9 +46,7 @@ class SecurityRoutingIntegrationTest extends AbstractWebTestCase
         $this->assertNotEquals(404, $client->getResponse()->getStatusCode());
     }
 
-    /**
-     * @dataProvider provideConfigs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConfigs')]
     public function testSecurityConfigurationForSingleIPAddress(array $options)
     {
         $allowedClient = $this->createClient($options, ['REMOTE_ADDR' => '10.10.10.10']);
@@ -67,9 +59,7 @@ class SecurityRoutingIntegrationTest extends AbstractWebTestCase
         $this->assertRestricted($barredClient, '/secured-by-one-ip');
     }
 
-    /**
-     * @dataProvider provideConfigs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConfigs')]
     public function testSecurityConfigurationForMultipleIPAddresses(array $options)
     {
         $allowedClientA = $this->createClient($options, ['REMOTE_ADDR' => '1.1.1.1']);
@@ -96,9 +86,7 @@ class SecurityRoutingIntegrationTest extends AbstractWebTestCase
         $this->assertRestricted($barredClient, '/secured-by-two-ips');
     }
 
-    /**
-     * @dataProvider provideConfigs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConfigs')]
     public function testSecurityConfigurationForExpression(array $options)
     {
         $allowedClient = $this->createClient($options, ['HTTP_USER_AGENT' => 'Firefox 1.0']);
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php
index e206af5..fa817ad 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php
@@ -47,9 +47,7 @@ class SecurityTest extends AbstractWebTestCase
         $this->assertSame('main', $firewallConfig->getName());
     }
 
-    /**
-     * @dataProvider userWillBeMarkedAsChangedIfRolesHasChangedProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('userWillBeMarkedAsChangedIfRolesHasChangedProvider')]
     public function testUserWillBeMarkedAsChangedIfRolesHasChanged(UserInterface $userWithAdminRole, UserInterface $userWithoutAdminRole)
     {
         $client = $this->createClient(['test_case' => 'AbstractTokenCompareRoles', 'root_config' => 'config.yml']);
@@ -90,10 +88,8 @@ class SecurityTest extends AbstractWebTestCase
         ];
     }
 
-    /**
-     * @testWith    ["form_login"]
-     *              ["Symfony\\Bundle\\SecurityBundle\\Tests\\Functional\\Bundle\\AuthenticatorBundle\\ApiAuthenticator"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['form_login'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AuthenticatorBundle\ApiAuthenticator'])]
     public function testLogin(string $authenticator)
     {
         $client = $this->createClient(['test_case' => 'SecurityHelper', 'root_config' => 'config.yml', 'debug' > true]);
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php
index f376847..da83bc3 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SwitchUserTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Security\Http\Firewall\SwitchUserListener;
 
 class SwitchUserTest extends AbstractWebTestCase
 {
-    /**
-     * @dataProvider getTestParameters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTestParameters')]
     public function testSwitchUser($originalUser, $targetUser, $expectedUser, $expectedStatus)
     {
         $client = $this->createAuthenticatedClient($originalUser, ['root_config' => 'switchuser.yml']);
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Security/FirewallContextTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Security/FirewallContextTest.php
index c76783b..a1017b7 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Security/FirewallContextTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Security/FirewallContextTest.php
@@ -36,17 +36,11 @@ class FirewallContextTest extends TestCase
 
     private function getExceptionListenerMock()
     {
-        return $this
-            ->getMockBuilder(ExceptionListener::class)
-            ->disableOriginalConstructor()
-            ->getMock();
+        return $this->createMock(ExceptionListener::class);
     }
 
     private function getLogoutListenerMock()
     {
-        return $this
-            ->getMockBuilder(LogoutListener::class)
-            ->disableOriginalConstructor()
-            ->getMock();
+        return $this->createMock(LogoutListener::class);
     }
 }
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Security/FirewallMapTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Security/FirewallMapTest.php
index 81c85ad..3d5ba0f 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Security/FirewallMapTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Security/FirewallMapTest.php
@@ -57,7 +57,7 @@ class FirewallMapTest extends TestCase
         $this->assertFalse($request->attributes->has('_stateless'));
     }
 
-    /** @dataProvider providesStatefulStatelessRequests */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providesStatefulStatelessRequests')]
     public function testGetListeners(Request $request, bool $expectedState)
     {
         $firewallContext = $this->createMock(FirewallContext::class);
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/SecurityTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/SecurityTest.php
index 45094bf..41f0e30 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/SecurityTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/SecurityTest.php
@@ -53,9 +53,7 @@ class SecurityTest extends TestCase
         $this->assertSame($token, $security->getToken());
     }
 
-    /**
-     * @dataProvider getUserTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getUserTests')]
     public function testGetUser($userInToken, $expectedUser)
     {
         $token = $this->createMock(TokenInterface::class);
@@ -97,9 +95,7 @@ class SecurityTest extends TestCase
         $this->assertTrue($security->isGranted('SOME_ATTRIBUTE', 'SOME_SUBJECT'));
     }
 
-    /**
-     * @dataProvider getFirewallConfigTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFirewallConfigTests')]
     public function testGetFirewallConfig(Request $request, ?FirewallConfig $expectedFirewallConfig)
     {
         $firewallMap = $this->createMock(FirewallMap::class);
diff --git a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php
index 7a874e7..008e544 100644
--- a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php
+++ b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php
@@ -53,9 +53,7 @@ class TwigExtensionTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider getFormats
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFormats')]
     public function testLoadFullConfiguration($format)
     {
         $container = $this->createContainer();
@@ -98,9 +96,7 @@ class TwigExtensionTest extends TestCase
         $this->assertTrue($options['strict_variables'], '->load() sets the strict_variables option');
     }
 
-    /**
-     * @dataProvider getFormats
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFormats')]
     public function testLoadCustomTemplateEscapingGuesserConfiguration($format)
     {
         $container = $this->createContainer();
@@ -112,9 +108,7 @@ class TwigExtensionTest extends TestCase
         $this->assertEquals([new Reference('my_project.some_bundle.template_escaping_guesser'), 'guess'], $options['autoescape']);
     }
 
-    /**
-     * @dataProvider getFormats
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFormats')]
     public function testLoadDefaultTemplateEscapingGuesserConfiguration($format)
     {
         $container = $this->createContainer();
@@ -126,9 +120,7 @@ class TwigExtensionTest extends TestCase
         $this->assertEquals('name', $options['autoescape']);
     }
 
-    /**
-     * @dataProvider getFormats
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFormats')]
     public function testLoadCustomDateFormats($fileFormat)
     {
         $container = $this->createContainer();
@@ -175,9 +167,7 @@ class TwigExtensionTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider getFormats
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFormats')]
     public function testTwigLoaderPaths($format)
     {
         $container = $this->createContainer();
@@ -216,9 +206,7 @@ class TwigExtensionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider stopwatchExtensionAvailabilityProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('stopwatchExtensionAvailabilityProvider')]
     public function testStopwatchExtensionAvailability($debug, $stopwatchEnabled, $expected)
     {
         $container = $this->createContainer();
@@ -271,9 +259,7 @@ class TwigExtensionTest extends TestCase
         $this->assertEquals('foo', $args['FooClass']->getValues()[0]);
     }
 
-    /**
-     * @dataProvider getFormats
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFormats')]
     public function testCustomHtmlToTextConverterService(string $format)
     {
         if (!class_exists(Mailer::class)) {
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php
index 0e4e9e0..d52decc 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php
+++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php
@@ -122,9 +122,7 @@ class ProfilerControllerTest extends WebTestCase
         $controller->toolbarAction(Request::create('/_wdt/foo-token'), null);
     }
 
-    /**
-     * @dataProvider getEmptyTokenCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getEmptyTokenCases')]
     public function testToolbarActionWithEmptyToken($token)
     {
         $urlGenerator = $this->createMock(UrlGeneratorInterface::class);
@@ -146,9 +144,7 @@ class ProfilerControllerTest extends WebTestCase
         ];
     }
 
-    /**
-     * @dataProvider getOpenFileCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getOpenFileCases')]
     public function testOpeningDisallowedPaths($path, $isAllowed)
     {
         $urlGenerator = $this->createMock(UrlGeneratorInterface::class);
@@ -179,9 +175,7 @@ class ProfilerControllerTest extends WebTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideCspVariants
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCspVariants')]
     public function testReturns404onTokenNotFound($withCsp)
     {
         $twig = $this->createMock(Environment::class);
@@ -229,9 +223,7 @@ class ProfilerControllerTest extends WebTestCase
         }
     }
 
-    /**
-     * @dataProvider provideCspVariants
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCspVariants')]
     public function testSearchResultsAction($withCsp)
     {
         $twig = $this->createMock(Environment::class);
@@ -406,9 +398,7 @@ class ProfilerControllerTest extends WebTestCase
         ];
     }
 
-    /**
-     * @dataProvider defaultPanelProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('defaultPanelProvider')]
     public function testDefaultPanel(string $expectedPanel, Profile $profile)
     {
         $this->assertDefaultPanel($expectedPanel, $profile);
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php
index bce6282..e254407 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php
+++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\HttpFoundation\Response;
 
 class ContentSecurityPolicyHandlerTest extends TestCase
 {
-    /**
-     * @dataProvider provideRequestAndResponses
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRequestAndResponses')]
     public function testGetNonces($nonce, $expectedNonce, Request $request, Response $response)
     {
         $cspHandler = new ContentSecurityPolicyHandler($this->mockNonceGenerator($nonce));
@@ -29,9 +27,7 @@ class ContentSecurityPolicyHandlerTest extends TestCase
         $this->assertSame($expectedNonce, $cspHandler->getNonces($request, $response));
     }
 
-    /**
-     * @dataProvider provideRequestAndResponsesForOnKernelResponse
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRequestAndResponsesForOnKernelResponse')]
     public function testOnKernelResponse($nonce, $expectedNonce, Request $request, Response $response, array $expectedCsp)
     {
         $cspHandler = new ContentSecurityPolicyHandler($this->mockNonceGenerator($nonce));
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/ConfigurationTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/ConfigurationTest.php
index d957caf..70bbe67 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/ConfigurationTest.php
+++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/ConfigurationTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Config\Definition\Processor;
 
 class ConfigurationTest extends TestCase
 {
-    /**
-     * @dataProvider getDebugModes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDebugModes')]
     public function testConfigTree(array $options, array $expectedResult)
     {
         $processor = new Processor();
@@ -59,9 +57,7 @@ class ConfigurationTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getInterceptRedirectsConfiguration
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInterceptRedirectsConfiguration')]
     public function testConfigTreeUsingInterceptRedirects(bool $interceptRedirects, array $expectedResult)
     {
         $processor = new Processor();
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php
index dd367b4..32540a5 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php
+++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php
@@ -92,9 +92,7 @@ class WebProfilerExtensionTest extends TestCase
         $this->container = null;
     }
 
-    /**
-     * @dataProvider getDebugModes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDebugModes')]
     public function testDefaultConfig($debug)
     {
         $this->container->setParameter('kernel.debug', $debug);
@@ -116,9 +114,7 @@ class WebProfilerExtensionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getToolbarConfig
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getToolbarConfig')]
     public function testToolbarConfig(bool $toolbarEnabled, bool $listenerInjected, bool $listenerEnabled)
     {
         $extension = new WebProfilerExtension();
@@ -150,9 +146,7 @@ class WebProfilerExtensionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getInterceptRedirectsToolbarConfig
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInterceptRedirectsToolbarConfig')]
     public function testToolbarConfigUsingInterceptRedirects(
         bool $toolbarEnabled,
         bool $interceptRedirects,
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php
index cf3c189..38a3fd0 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php
+++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php
@@ -25,9 +25,7 @@ use Twig\Environment;
 
 class WebDebugToolbarListenerTest extends TestCase
 {
-    /**
-     * @dataProvider getInjectToolbarTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInjectToolbarTests')]
     public function testInjectToolbar($content, $expected)
     {
         $listener = new WebDebugToolbarListener($this->getTwigMock());
@@ -57,9 +55,7 @@ class WebDebugToolbarListenerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideRedirects
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRedirects')]
     public function testHtmlRedirectionIsIntercepted($statusCode)
     {
         $response = new Response('Some content', $statusCode);
@@ -101,9 +97,7 @@ class WebDebugToolbarListenerTest extends TestCase
         $this->assertEquals("<html><head></head><body>\nWDT\n</body></html>", $response->getContent());
     }
 
-    /**
-     * @depends testToolbarIsInjected
-     */
+    #[\PHPUnit\Framework\Attributes\Depends('testToolbarIsInjected')]
     public function testToolbarIsNotInjectedOnNonHtmlContentType()
     {
         $response = new Response('<html><head></head><body></body></html>');
@@ -117,9 +111,7 @@ class WebDebugToolbarListenerTest extends TestCase
         $this->assertEquals('<html><head></head><body></body></html>', $response->getContent());
     }
 
-    /**
-     * @depends testToolbarIsInjected
-     */
+    #[\PHPUnit\Framework\Attributes\Depends('testToolbarIsInjected')]
     public function testToolbarIsNotInjectedOnContentDispositionAttachment()
     {
         $response = new Response('<html><head></head><body></body></html>');
@@ -133,11 +125,8 @@ class WebDebugToolbarListenerTest extends TestCase
         $this->assertEquals('<html><head></head><body></body></html>', $response->getContent());
     }
 
-    /**
-     * @depends testToolbarIsInjected
-     *
-     * @dataProvider provideRedirects
-     */
+    #[\PHPUnit\Framework\Attributes\Depends('testToolbarIsInjected')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRedirects')]
     public function testToolbarIsNotInjectedOnRedirection($statusCode)
     {
         $response = new Response('<html><head></head><body></body></html>', $statusCode);
@@ -159,9 +148,7 @@ class WebDebugToolbarListenerTest extends TestCase
         ];
     }
 
-    /**
-     * @depends testToolbarIsInjected
-     */
+    #[\PHPUnit\Framework\Attributes\Depends('testToolbarIsInjected')]
     public function testToolbarIsNotInjectedWhenThereIsNoNoXDebugTokenResponseHeader()
     {
         $response = new Response('<html><head></head><body></body></html>');
@@ -174,9 +161,7 @@ class WebDebugToolbarListenerTest extends TestCase
         $this->assertEquals('<html><head></head><body></body></html>', $response->getContent());
     }
 
-    /**
-     * @depends testToolbarIsInjected
-     */
+    #[\PHPUnit\Framework\Attributes\Depends('testToolbarIsInjected')]
     public function testToolbarIsNotInjectedWhenOnSubRequest()
     {
         $response = new Response('<html><head></head><body></body></html>');
@@ -190,9 +175,7 @@ class WebDebugToolbarListenerTest extends TestCase
         $this->assertEquals('<html><head></head><body></body></html>', $response->getContent());
     }
 
-    /**
-     * @depends testToolbarIsInjected
-     */
+    #[\PHPUnit\Framework\Attributes\Depends('testToolbarIsInjected')]
     public function testToolbarIsNotInjectedOnIncompleteHtmlResponses()
     {
         $response = new Response('<div>Some content</div>');
@@ -206,9 +189,7 @@ class WebDebugToolbarListenerTest extends TestCase
         $this->assertEquals('<div>Some content</div>', $response->getContent());
     }
 
-    /**
-     * @depends testToolbarIsInjected
-     */
+    #[\PHPUnit\Framework\Attributes\Depends('testToolbarIsInjected')]
     public function testToolbarIsNotInjectedOnXmlHttpRequests()
     {
         $response = new Response('<html><head></head><body></body></html>');
@@ -225,9 +206,7 @@ class WebDebugToolbarListenerTest extends TestCase
         $this->assertEquals('<html><head></head><body></body></html>', $response->getContent());
     }
 
-    /**
-     * @depends testToolbarIsInjected
-     */
+    #[\PHPUnit\Framework\Attributes\Depends('testToolbarIsInjected')]
     public function testToolbarIsNotInjectedOnNonHtmlRequests()
     {
         $response = new Response('<html><head></head><body></body></html>');
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/Resources/IconTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Resources/IconTest.php
index 4cddbe0..1bc895f 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Tests/Resources/IconTest.php
+++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/Resources/IconTest.php
@@ -15,9 +15,7 @@ use PHPUnit\Framework\TestCase;
 
 class IconTest extends TestCase
 {
-    /**
-     * @dataProvider provideIconFilePaths
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIconFilePaths')]
     public function testIconFileContents($iconFilePath)
     {
         $iconFilePath = realpath($iconFilePath);
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/Twig/WebProfilerExtensionTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Twig/WebProfilerExtensionTest.php
index f0cf4f3..54967dd 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Tests/Twig/WebProfilerExtensionTest.php
+++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/Twig/WebProfilerExtensionTest.php
@@ -19,9 +19,7 @@ use Twig\Loader\ArrayLoader;
 
 class WebProfilerExtensionTest extends TestCase
 {
-    /**
-     * @dataProvider provideMessages
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMessages')]
     public function testDumpHeaderIsDisplayed(string $message, array $context, bool $dump1HasHeader, bool $dump2HasHeader)
     {
         $twigEnvironment = new Environment(new ArrayLoader());
diff --git a/src/Symfony/Component/Asset/Tests/PackageTest.php b/src/Symfony/Component/Asset/Tests/PackageTest.php
index 45b0982..702c0e0 100644
--- a/src/Symfony/Component/Asset/Tests/PackageTest.php
+++ b/src/Symfony/Component/Asset/Tests/PackageTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy;
 
 class PackageTest extends TestCase
 {
-    /**
-     * @dataProvider getConfigs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConfigs')]
     public function testGetUrl($version, $format, $path, $expected)
     {
         $package = new Package($version ? new StaticVersionStrategy($version, $format) : new EmptyVersionStrategy());
diff --git a/src/Symfony/Component/Asset/Tests/PathPackageTest.php b/src/Symfony/Component/Asset/Tests/PathPackageTest.php
index 0784ac6..7be7be0 100644
--- a/src/Symfony/Component/Asset/Tests/PathPackageTest.php
+++ b/src/Symfony/Component/Asset/Tests/PathPackageTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\Asset\VersionStrategy\VersionStrategyInterface;
 
 class PathPackageTest extends TestCase
 {
-    /**
-     * @dataProvider getConfigs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConfigs')]
     public function testGetUrl($basePath, $format, $path, $expected)
     {
         $package = new PathPackage($basePath, new StaticVersionStrategy('v1', $format));
@@ -50,9 +48,7 @@ class PathPackageTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getContextConfigs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getContextConfigs')]
     public function testGetUrlWithContext($basePathRequest, $basePath, $format, $path, $expected)
     {
         $package = new PathPackage($basePath, new StaticVersionStrategy('v1', $format), $this->getContext($basePathRequest));
diff --git a/src/Symfony/Component/Asset/Tests/UrlPackageTest.php b/src/Symfony/Component/Asset/Tests/UrlPackageTest.php
index db17fc6..0bec521 100644
--- a/src/Symfony/Component/Asset/Tests/UrlPackageTest.php
+++ b/src/Symfony/Component/Asset/Tests/UrlPackageTest.php
@@ -22,9 +22,7 @@ use Symfony\Component\Asset\VersionStrategy\VersionStrategyInterface;
 
 class UrlPackageTest extends TestCase
 {
-    /**
-     * @dataProvider getConfigs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConfigs')]
     public function testGetUrl($baseUrls, string $format, string $path, string $expected)
     {
         $package = new UrlPackage($baseUrls, new StaticVersionStrategy('v1', $format));
@@ -62,9 +60,7 @@ class UrlPackageTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getContextConfigs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getContextConfigs')]
     public function testGetUrlWithContext(bool $secure, $baseUrls, string $format, string $path, string $expected)
     {
         $package = new UrlPackage($baseUrls, new StaticVersionStrategy('v1', $format), $this->getContext($secure));
@@ -107,9 +103,7 @@ class UrlPackageTest extends TestCase
         new UrlPackage([], new EmptyVersionStrategy());
     }
 
-    /**
-     * @dataProvider getWrongBaseUrlConfig
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getWrongBaseUrlConfig')]
     public function testWrongBaseUrl(string $baseUrls)
     {
         $this->expectException(InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Asset/Tests/VersionStrategy/JsonManifestVersionStrategyTest.php b/src/Symfony/Component/Asset/Tests/VersionStrategy/JsonManifestVersionStrategyTest.php
index ce4f285..e3ddb6c 100644
--- a/src/Symfony/Component/Asset/Tests/VersionStrategy/JsonManifestVersionStrategyTest.php
+++ b/src/Symfony/Component/Asset/Tests/VersionStrategy/JsonManifestVersionStrategyTest.php
@@ -20,33 +20,25 @@ use Symfony\Component\HttpClient\Response\MockResponse;
 
 class JsonManifestVersionStrategyTest extends TestCase
 {
-    /**
-     * @dataProvider provideValidStrategies
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidStrategies')]
     public function testGetVersion(JsonManifestVersionStrategy $strategy)
     {
         $this->assertSame('main.123abc.js', $strategy->getVersion('main.js'));
     }
 
-    /**
-     * @dataProvider provideValidStrategies
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidStrategies')]
     public function testApplyVersion(JsonManifestVersionStrategy $strategy)
     {
         $this->assertSame('css/styles.555def.css', $strategy->applyVersion('css/styles.css'));
     }
 
-    /**
-     * @dataProvider provideValidStrategies
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidStrategies')]
     public function testApplyVersionWhenKeyDoesNotExistInManifest(JsonManifestVersionStrategy $strategy)
     {
         $this->assertSame('css/other.css', $strategy->applyVersion('css/other.css'));
     }
 
-    /**
-     * @dataProvider provideStrictStrategies
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideStrictStrategies')]
     public function testStrictExceptionWhenKeyDoesNotExistInManifest(JsonManifestVersionStrategy $strategy, $path, $message)
     {
         $this->expectException(AssetNotFoundException::class);
@@ -55,18 +47,14 @@ class JsonManifestVersionStrategyTest extends TestCase
         $strategy->getVersion($path);
     }
 
-    /**
-     * @dataProvider provideMissingStrategies
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMissingStrategies')]
     public function testMissingManifestFileThrowsException(JsonManifestVersionStrategy $strategy)
     {
         $this->expectException(RuntimeException::class);
         $strategy->getVersion('main.js');
     }
 
-    /**
-     * @dataProvider provideInvalidStrategies
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidStrategies')]
     public function testManifestFileWithBadJSONThrowsException(JsonManifestVersionStrategy $strategy)
     {
         $this->expectException(RuntimeException::class);
diff --git a/src/Symfony/Component/Asset/Tests/VersionStrategy/StaticVersionStrategyTest.php b/src/Symfony/Component/Asset/Tests/VersionStrategy/StaticVersionStrategyTest.php
index c287887..f6274db 100644
--- a/src/Symfony/Component/Asset/Tests/VersionStrategy/StaticVersionStrategyTest.php
+++ b/src/Symfony/Component/Asset/Tests/VersionStrategy/StaticVersionStrategyTest.php
@@ -24,9 +24,7 @@ class StaticVersionStrategyTest extends TestCase
         $this->assertSame($version, $staticVersionStrategy->getVersion($path));
     }
 
-    /**
-     * @dataProvider getConfigs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConfigs')]
     public function testApplyVersion($path, $version, $format)
     {
         $staticVersionStrategy = new StaticVersionStrategy($version, $format);
diff --git a/src/Symfony/Component/AssetMapper/Tests/Compiler/CssAssetUrlCompilerTest.php b/src/Symfony/Component/AssetMapper/Tests/Compiler/CssAssetUrlCompilerTest.php
index 067168b..81200cd 100644
--- a/src/Symfony/Component/AssetMapper/Tests/Compiler/CssAssetUrlCompilerTest.php
+++ b/src/Symfony/Component/AssetMapper/Tests/Compiler/CssAssetUrlCompilerTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\AssetMapper\MappedAsset;
 
 class CssAssetUrlCompilerTest extends TestCase
 {
-    /**
-     * @dataProvider provideCompileTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompileTests')]
     public function testCompile(string $input, string $expectedOutput, array $expectedDependencies)
     {
         $assetMapper = $this->createMock(AssetMapperInterface::class);
@@ -182,9 +180,7 @@ class CssAssetUrlCompilerTest extends TestCase
         $this->assertSame($expectedOutput, $compiler->compile($input, $asset, $assetMapper));
     }
 
-    /**
-     * @dataProvider provideStrictModeTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideStrictModeTests')]
     public function testStrictMode(string $sourceLogicalName, string $input, ?string $expectedExceptionMessage)
     {
         if (null !== $expectedExceptionMessage) {
diff --git a/src/Symfony/Component/AssetMapper/Tests/Compiler/JavaScriptImportPathCompilerTest.php b/src/Symfony/Component/AssetMapper/Tests/Compiler/JavaScriptImportPathCompilerTest.php
index 9b1b237..faa5638 100644
--- a/src/Symfony/Component/AssetMapper/Tests/Compiler/JavaScriptImportPathCompilerTest.php
+++ b/src/Symfony/Component/AssetMapper/Tests/Compiler/JavaScriptImportPathCompilerTest.php
@@ -25,9 +25,7 @@ use Symfony\Component\AssetMapper\MappedAsset;
 
 class JavaScriptImportPathCompilerTest extends TestCase
 {
-    /**
-     * @dataProvider provideCompileTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompileTests')]
     public function testCompileFindsCorrectImports(string $input, array $expectedJavaScriptImports)
     {
         $asset = new MappedAsset('app.js', '/project/assets/app.js', publicPathWithoutDigest: '/assets/app.js');
@@ -465,9 +463,7 @@ class JavaScriptImportPathCompilerTest extends TestCase
         $this->assertSame('root_asset.js', $inputAsset->getJavaScriptImports()[2]->assetLogicalPath);
     }
 
-    /**
-     * @dataProvider providePathsCanUpdateTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePathsCanUpdateTests')]
     public function testImportPathsCanUpdateForDifferentPublicPath(string $input, string $inputAssetPublicPath, string $importedPublicPath, string $expectedOutput)
     {
         $asset = new MappedAsset('app.js', '/path/to/assets/app.js', publicPathWithoutDigest: $inputAssetPublicPath);
@@ -602,9 +598,7 @@ class JavaScriptImportPathCompilerTest extends TestCase
         $this->assertCount(0, $bootstrapAsset->getJavaScriptImports());
     }
 
-    /**
-     * @dataProvider provideMissingImportModeTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMissingImportModeTests')]
     public function testMissingImportMode(string $sourceLogicalName, string $input, ?string $expectedExceptionMessage)
     {
         if (null !== $expectedExceptionMessage) {
diff --git a/src/Symfony/Component/AssetMapper/Tests/Compiler/SourceMappingUrlsCompilerTest.php b/src/Symfony/Component/AssetMapper/Tests/Compiler/SourceMappingUrlsCompilerTest.php
index 975f930..9d28dc4 100644
--- a/src/Symfony/Component/AssetMapper/Tests/Compiler/SourceMappingUrlsCompilerTest.php
+++ b/src/Symfony/Component/AssetMapper/Tests/Compiler/SourceMappingUrlsCompilerTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\AssetMapper\MappedAsset;
 
 class SourceMappingUrlsCompilerTest extends TestCase
 {
-    /**
-     * @dataProvider provideCompileTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompileTests')]
     public function testCompile(string $sourceLogicalName, string $input, string $expectedOutput, $expectedDependencies)
     {
         $assetMapper = $this->createMock(AssetMapperInterface::class);
diff --git a/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapAuditorTest.php b/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapAuditorTest.php
index d98900a..a3287b7 100644
--- a/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapAuditorTest.php
+++ b/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapAuditorTest.php
@@ -89,9 +89,7 @@ class ImportMapAuditorTest extends TestCase
         ], $audit);
     }
 
-    /**
-     * @dataProvider provideAuditWithVersionRange
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAuditWithVersionRange')]
     public function testAuditWithVersionRange(bool $expectMatch, string $version, ?string $versionRange)
     {
         $this->httpClient->setResponseFactory(new JsonMockResponse([
diff --git a/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapConfigReaderTest.php b/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapConfigReaderTest.php
index a9737be..b02cdd2 100644
--- a/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapConfigReaderTest.php
+++ b/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapConfigReaderTest.php
@@ -106,9 +106,7 @@ EOF;
         $this->assertSame($originalImportMapData, $newImportMapData);
     }
 
-    /**
-     * @dataProvider getPathToFilesystemPathTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathToFilesystemPathTests')]
     public function testConvertPathToFilesystemPath(string $path, string $expectedPath)
     {
         $configReader = new ImportMapConfigReader(realpath(__DIR__.'/../Fixtures/importmap.php'), $this->createMock(RemotePackageStorage::class));
@@ -130,9 +128,7 @@ EOF;
         ];
     }
 
-    /**
-     * @dataProvider getFilesystemPathToPathTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFilesystemPathToPathTests')]
     public function testConvertFilesystemPathToPath(string $path, ?string $expectedPath)
     {
         $configReader = new ImportMapConfigReader(__DIR__.'/../Fixtures/importmap.php', $this->createMock(RemotePackageStorage::class));
diff --git a/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapEntryTest.php b/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapEntryTest.php
index 808fd1a..6bdd6d6 100644
--- a/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapEntryTest.php
+++ b/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapEntryTest.php
@@ -39,9 +39,7 @@ class ImportMapEntryTest extends TestCase
         $this->assertSame('foo/bar', $entry->packageModuleSpecifier);
     }
 
-    /**
-     * @dataProvider getSplitPackageNameTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getSplitPackageNameTests')]
     public function testSplitPackageNameAndFilePath(string $packageModuleSpecifier, string $expectedPackage, string $expectedPath)
     {
         [$actualPackage, $actualPath] = ImportMapEntry::splitPackageNameAndFilePath($packageModuleSpecifier);
diff --git a/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapGeneratorTest.php b/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapGeneratorTest.php
index bdc8bc3..fd8bc88 100644
--- a/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapGeneratorTest.php
+++ b/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapGeneratorTest.php
@@ -254,9 +254,7 @@ class ImportMapGeneratorTest extends TestCase
         ], array_keys($actualImportMapData));
     }
 
-    /**
-     * @dataProvider getRawImportMapDataTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRawImportMapDataTests')]
     public function testGetRawImportMapData(array $importMapEntries, array $mappedAssets, array $expectedData)
     {
         $manager = $this->createImportMapGenerator();
@@ -595,9 +593,7 @@ class ImportMapGeneratorTest extends TestCase
         $this->assertEquals($importmapData, $manager->getRawImportMapData());
     }
 
-    /**
-     * @dataProvider getEagerEntrypointImportsTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getEagerEntrypointImportsTests')]
     public function testFindEagerEntrypointImports(MappedAsset $entryAsset, array $expected, array $mappedAssets = [])
     {
         $manager = $this->createImportMapGenerator();
diff --git a/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapManagerTest.php b/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapManagerTest.php
index 7762c22..7c0524b 100644
--- a/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapManagerTest.php
+++ b/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapManagerTest.php
@@ -49,9 +49,7 @@ class ImportMapManagerTest extends TestCase
         $this->filesystem->remove(self::$writableRoot);
     }
 
-    /**
-     * @dataProvider getRequirePackageTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRequirePackageTests')]
     public function testRequire(array $packages, int $expectedProviderPackageArgumentCount, array $resolvedPackages, array $expectedImportMap)
     {
         $manager = $this->createImportMapManager();
@@ -314,9 +312,7 @@ class ImportMapManagerTest extends TestCase
         $manager->update(['cowsay']);
     }
 
-    /**
-     * @dataProvider getPackageNameTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPackageNameTests')]
     public function testParsePackageName(string $packageName, array $expectedReturn)
     {
         $parsed = ImportMapManager::parsePackageName($packageName);
diff --git a/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapUpdateCheckerTest.php b/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapUpdateCheckerTest.php
index 689820d..9cc5a7a 100644
--- a/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapUpdateCheckerTest.php
+++ b/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapUpdateCheckerTest.php
@@ -110,11 +110,11 @@ class ImportMapUpdateCheckerTest extends TestCase
     }
 
     /**
-     * @dataProvider provideImportMapEntry
      *
      * @param ImportMapEntry[]    $entries
      * @param PackageUpdateInfo[] $expectedUpdateInfo
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideImportMapEntry')]
     public function testGetAvailableUpdatesForSinglePackage(array $entries, array $expectedUpdateInfo, ?\Exception $expectedException)
     {
         $this->importMapConfigReader->method('getEntries')->willReturn(new ImportMapEntries($entries));
diff --git a/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapVersionCheckerTest.php b/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapVersionCheckerTest.php
index 3b54bd3..8decb7c 100644
--- a/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapVersionCheckerTest.php
+++ b/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapVersionCheckerTest.php
@@ -24,9 +24,7 @@ use Symfony\Component\HttpClient\Response\MockResponse;
 
 class ImportMapVersionCheckerTest extends TestCase
 {
-    /**
-     * @dataProvider getCheckVersionsTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getCheckVersionsTests')]
     public function testCheckVersions(array $importMapEntries, array $dependencies, array $expectedRequests, array $expectedProblems)
     {
         $configReader = $this->createMock(ImportMapConfigReader::class);
@@ -283,9 +281,7 @@ class ImportMapVersionCheckerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getNpmSpecificVersionConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNpmSpecificVersionConstraints')]
     public function testNpmSpecificConstraints(string $npmConstraint, ?string $expectedComposerConstraint)
     {
         $this->assertSame($expectedComposerConstraint, ImportMapVersionChecker::convertNpmConstraint($npmConstraint));
diff --git a/src/Symfony/Component/AssetMapper/Tests/ImportMap/PackageUpdateInfoTest.php b/src/Symfony/Component/AssetMapper/Tests/ImportMap/PackageUpdateInfoTest.php
index f86674c..749e789 100644
--- a/src/Symfony/Component/AssetMapper/Tests/ImportMap/PackageUpdateInfoTest.php
+++ b/src/Symfony/Component/AssetMapper/Tests/ImportMap/PackageUpdateInfoTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\AssetMapper\ImportMap\PackageUpdateInfo;
 
 class PackageUpdateInfoTest extends TestCase
 {
-    /**
-     * @dataProvider provideValidConstructorArguments
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidConstructorArguments')]
     public function testConstructor($importName, $currentVersion, $latestVersion, $updateType)
     {
         $packageUpdateInfo = new PackageUpdateInfo(
@@ -44,9 +42,7 @@ class PackageUpdateInfoTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideHasUpdateArguments
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideHasUpdateArguments')]
     public function testHasUpdate($updateType, $expectUpdate)
     {
         $packageUpdateInfo = new PackageUpdateInfo(
diff --git a/src/Symfony/Component/AssetMapper/Tests/ImportMap/RemotePackageStorageTest.php b/src/Symfony/Component/AssetMapper/Tests/ImportMap/RemotePackageStorageTest.php
index 0d7720e..b9b2f72 100644
--- a/src/Symfony/Component/AssetMapper/Tests/ImportMap/RemotePackageStorageTest.php
+++ b/src/Symfony/Component/AssetMapper/Tests/ImportMap/RemotePackageStorageTest.php
@@ -41,9 +41,7 @@ class RemotePackageStorageTest extends TestCase
         $this->assertSame(realpath(self::$writableRoot.'/assets/vendor'), realpath($storage->getStorageDir()));
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testSaveThrowsWhenFailing()
     {
         $vendorDir = self::$writableRoot.'/assets/acme/vendor';
@@ -108,9 +106,7 @@ class RemotePackageStorageTest extends TestCase
         $this->assertEquals('any content', file_get_contents($targetPath));
     }
 
-    /**
-     * @dataProvider getDownloadPathTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDownloadPathTests')]
     public function testGetDownloadedPath(string $packageModuleSpecifier, ImportMapType $importMapType, string $expectedPath)
     {
         $storage = new RemotePackageStorage(self::$writableRoot.'/assets/vendor');
diff --git a/src/Symfony/Component/AssetMapper/Tests/ImportMap/Resolver/JsDelivrEsmResolverTest.php b/src/Symfony/Component/AssetMapper/Tests/ImportMap/Resolver/JsDelivrEsmResolverTest.php
index ffb153f..d6d71cd 100644
--- a/src/Symfony/Component/AssetMapper/Tests/ImportMap/Resolver/JsDelivrEsmResolverTest.php
+++ b/src/Symfony/Component/AssetMapper/Tests/ImportMap/Resolver/JsDelivrEsmResolverTest.php
@@ -21,9 +21,7 @@ use Symfony\Component\HttpClient\Response\MockResponse;
 
 class JsDelivrEsmResolverTest extends TestCase
 {
-    /**
-     * @dataProvider provideResolvePackagesTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideResolvePackagesTests')]
     public function testResolvePackages(array $packages, array $expectedRequests, array $expectedResolvedPackages)
     {
         $responses = [];
@@ -265,9 +263,7 @@ class JsDelivrEsmResolverTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideDownloadPackagesTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDownloadPackagesTests')]
     public function testDownloadPackages(array $importMapEntries, array $expectedRequests, array $expectedReturn)
     {
         $responses = [];
@@ -584,9 +580,7 @@ EOF,
         ]);
     }
 
-    /**
-     * @dataProvider provideImportRegex
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideImportRegex')]
     public function testImportRegex(string $subject, array $expectedPackages)
     {
         preg_match_all(JsDelivrEsmResolver::IMPORT_REGEX, $subject, $matches);
diff --git a/src/Symfony/Component/AssetMapper/Tests/MappedAssetTest.php b/src/Symfony/Component/AssetMapper/Tests/MappedAssetTest.php
index e2bf6c1..26b4f45 100644
--- a/src/Symfony/Component/AssetMapper/Tests/MappedAssetTest.php
+++ b/src/Symfony/Component/AssetMapper/Tests/MappedAssetTest.php
@@ -24,9 +24,7 @@ class MappedAssetTest extends TestCase
         $this->assertSame('foo.css', $asset->logicalPath);
     }
 
-    /**
-     * @dataProvider getExtensionTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getExtensionTests')]
     public function testGetExtension(string $filename, string $expectedExtension)
     {
         $asset = new MappedAsset('anything', publicPathWithoutDigest: $filename);
diff --git a/src/Symfony/Component/AssetMapper/Tests/MapperAwareAssetPackageTest.php b/src/Symfony/Component/AssetMapper/Tests/MapperAwareAssetPackageTest.php
index adb656a..47caba9 100644
--- a/src/Symfony/Component/AssetMapper/Tests/MapperAwareAssetPackageTest.php
+++ b/src/Symfony/Component/AssetMapper/Tests/MapperAwareAssetPackageTest.php
@@ -31,9 +31,7 @@ class MapperAwareAssetPackageTest extends TestCase
         $this->assertSame('2.0', $assetMapperPackage->getVersion('foo'));
     }
 
-    /**
-     * @dataProvider getUrlTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getUrlTests')]
     public function testGetUrl(string $path, string $expectedPathSentToInner)
     {
         $inner = $this->createMock(PackageInterface::class);
diff --git a/src/Symfony/Component/BrowserKit/Tests/AbstractBrowserTest.php b/src/Symfony/Component/BrowserKit/Tests/AbstractBrowserTest.php
index 504cc95..454ee3b 100644
--- a/src/Symfony/Component/BrowserKit/Tests/AbstractBrowserTest.php
+++ b/src/Symfony/Component/BrowserKit/Tests/AbstractBrowserTest.php
@@ -649,9 +649,7 @@ class AbstractBrowserTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider getTestsForMetaRefresh
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTestsForMetaRefresh')]
     public function testFollowMetaRefresh(string $content, string $expectedEndingUrl, bool $followMetaRefresh = true)
     {
         $client = $this->getBrowser();
@@ -771,9 +769,7 @@ class AbstractBrowserTest extends TestCase
         $this->assertSame([], $client->getCookieJar()->all(), '->restart() clears the cookies');
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testInsulatedRequests()
     {
         $client = $this->getBrowser();
diff --git a/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php b/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php
index 2f0ebaf..8768ac8 100644
--- a/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php
+++ b/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php
@@ -114,9 +114,7 @@ class CookieJarTest extends TestCase
         $this->assertEquals($timestamp, $phpCookie->getExpiresTime());
     }
 
-    /**
-     * @dataProvider provideAllValuesValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAllValuesValues')]
     public function testAllValues($uri, $values)
     {
         $cookieJar = new CookieJar();
diff --git a/src/Symfony/Component/BrowserKit/Tests/CookieTest.php b/src/Symfony/Component/BrowserKit/Tests/CookieTest.php
index 5d42ceb..ee9a46d 100644
--- a/src/Symfony/Component/BrowserKit/Tests/CookieTest.php
+++ b/src/Symfony/Component/BrowserKit/Tests/CookieTest.php
@@ -36,9 +36,7 @@ class CookieTest extends TestCase
         $this->assertEquals('foo=bar; expires=Thu, 01 Jan 1970 00:00:02 GMT; path=/; secure; httponly; samesite=lax', (string) $cookie);
     }
 
-    /**
-     * @dataProvider getTestsForToFromString
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTestsForToFromString')]
     public function testToFromString($cookie, $url = null)
     {
         $this->assertEquals($cookie, (string) Cookie::fromString($cookie, $url));
@@ -65,9 +63,7 @@ class CookieTest extends TestCase
         $this->assertFalse(Cookie::fromString('foo=bar; secure', 'http://example.com/')->isSecure());
     }
 
-    /**
-     * @dataProvider getExpireCookieStrings
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getExpireCookieStrings')]
     public function testFromStringAcceptsSeveralExpiresDateFormats($cookie)
     {
         $this->assertEquals(1596185377, Cookie::fromString($cookie)->getExpiresTime());
diff --git a/src/Symfony/Component/BrowserKit/Tests/HttpBrowserTest.php b/src/Symfony/Component/BrowserKit/Tests/HttpBrowserTest.php
index 3a2547d..943d2bc 100644
--- a/src/Symfony/Component/BrowserKit/Tests/HttpBrowserTest.php
+++ b/src/Symfony/Component/BrowserKit/Tests/HttpBrowserTest.php
@@ -26,9 +26,7 @@ class HttpBrowserTest extends AbstractBrowserTest
         return new TestHttpClient($server, $history, $cookieJar);
     }
 
-    /**
-     * @dataProvider validContentTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validContentTypes')]
     public function testRequestHeaders(array $requestArguments, array $expectedArguments)
     {
         $client = $this->createMock(HttpClientInterface::class);
@@ -186,9 +184,7 @@ class HttpBrowserTest extends AbstractBrowserTest
         ]);
     }
 
-    /**
-     * @dataProvider forwardSlashesRequestPathProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('forwardSlashesRequestPathProvider')]
     public function testMultipleForwardSlashesRequestPath(string $requestPath)
     {
         $client = $this->createMock(HttpClientInterface::class);
diff --git a/src/Symfony/Component/BrowserKit/Tests/ResponseTest.php b/src/Symfony/Component/BrowserKit/Tests/ResponseTest.php
index f68d0b5..80f0185 100644
--- a/src/Symfony/Component/BrowserKit/Tests/ResponseTest.php
+++ b/src/Symfony/Component/BrowserKit/Tests/ResponseTest.php
@@ -90,9 +90,7 @@ class ResponseTest extends TestCase
         ], $response->toArray(), '->toArray returns an array representation of json content');
     }
 
-    /**
-     * @dataProvider provideInvalidJson
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidJson')]
     public function testToArrayThrowsErrorOnInvalidJson(string $data)
     {
         $response = new Response($data);
diff --git a/src/Symfony/Component/BrowserKit/Tests/Test/Constraint/BrowserCookieValueSameTest.php b/src/Symfony/Component/BrowserKit/Tests/Test/Constraint/BrowserCookieValueSameTest.php
index d1aa7d7..2bc5f92 100644
--- a/src/Symfony/Component/BrowserKit/Tests/Test/Constraint/BrowserCookieValueSameTest.php
+++ b/src/Symfony/Component/BrowserKit/Tests/Test/Constraint/BrowserCookieValueSameTest.php
@@ -21,9 +21,7 @@ use Symfony\Component\BrowserKit\Test\Constraint\BrowserCookieValueSame;
 
 class BrowserCookieValueSameTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testConstraint()
     {
         $browser = $this->getBrowser();
diff --git a/src/Symfony/Component/BrowserKit/Tests/Test/Constraint/BrowserHasCookieTest.php b/src/Symfony/Component/BrowserKit/Tests/Test/Constraint/BrowserHasCookieTest.php
index 0bcba9a..eeb5c4d 100644
--- a/src/Symfony/Component/BrowserKit/Tests/Test/Constraint/BrowserHasCookieTest.php
+++ b/src/Symfony/Component/BrowserKit/Tests/Test/Constraint/BrowserHasCookieTest.php
@@ -21,9 +21,7 @@ use Symfony\Component\BrowserKit\Test\Constraint\BrowserHasCookie;
 
 class BrowserHasCookieTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testConstraint()
     {
         $browser = $this->getBrowser();
@@ -45,9 +43,7 @@ class BrowserHasCookieTest extends TestCase
         $this->fail();
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testConstraintWithWrongPath()
     {
         $browser = $this->getBrowser();
@@ -63,9 +59,7 @@ class BrowserHasCookieTest extends TestCase
         $this->fail();
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testConstraintWithWrongDomain()
     {
         $browser = $this->getBrowser();
diff --git a/src/Symfony/Component/Cache/Tests/Adapter/AbstractRedisAdapterTestCase.php b/src/Symfony/Component/Cache/Tests/Adapter/AbstractRedisAdapterTestCase.php
index c83365c..8c8a42a 100644
--- a/src/Symfony/Component/Cache/Tests/Adapter/AbstractRedisAdapterTestCase.php
+++ b/src/Symfony/Component/Cache/Tests/Adapter/AbstractRedisAdapterTestCase.php
@@ -42,9 +42,7 @@ abstract class AbstractRedisAdapterTestCase extends AdapterTestCase
         }
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testClearWithPrefix()
     {
         $cache = $this->createCachePool(0, __FUNCTION__);
diff --git a/src/Symfony/Component/Cache/Tests/Adapter/NullAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/NullAdapterTest.php
index 8a79257..50caf95 100644
--- a/src/Symfony/Component/Cache/Tests/Adapter/NullAdapterTest.php
+++ b/src/Symfony/Component/Cache/Tests/Adapter/NullAdapterTest.php
@@ -15,9 +15,7 @@ use PHPUnit\Framework\TestCase;
 use Psr\Cache\CacheItemInterface;
 use Symfony\Component\Cache\Adapter\NullAdapter;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class NullAdapterTest extends TestCase
 {
     public function createCachePool()
diff --git a/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAndProxyAdapterIntegrationTest.php b/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAndProxyAdapterIntegrationTest.php
index 68168f6..949668c 100644
--- a/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAndProxyAdapterIntegrationTest.php
+++ b/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAndProxyAdapterIntegrationTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\Cache\Tests\Fixtures\ExternalAdapter;
 
 class TagAwareAndProxyAdapterIntegrationTest extends TestCase
 {
-    /**
-     * @dataProvider dataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dataProvider')]
     public function testIntegrationUsingProxiedAdapter(CacheItemPoolInterface $proxiedAdapter)
     {
         $this->markTestSkipped('Test failing on current Debian (Error: Class "�" not found).');
diff --git a/src/Symfony/Component/Cache/Tests/CacheItemTest.php b/src/Symfony/Component/Cache/Tests/CacheItemTest.php
index 49ee1af..73bb14c 100644
--- a/src/Symfony/Component/Cache/Tests/CacheItemTest.php
+++ b/src/Symfony/Component/Cache/Tests/CacheItemTest.php
@@ -24,9 +24,7 @@ class CacheItemTest extends TestCase
         $this->assertSame('foo', CacheItem::validateKey('foo'));
     }
 
-    /**
-     * @dataProvider provideInvalidKey
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidKey')]
     public function testInvalidKey($key)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -71,9 +69,7 @@ class CacheItemTest extends TestCase
         }, $this, CacheItem::class))();
     }
 
-    /**
-     * @dataProvider provideInvalidKey
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidKey')]
     public function testInvalidTag($tag)
     {
         $item = new CacheItem();
diff --git a/src/Symfony/Component/Cache/Tests/Marshaller/DefaultMarshallerTest.php b/src/Symfony/Component/Cache/Tests/Marshaller/DefaultMarshallerTest.php
index 45b7927..9b0ea49 100644
--- a/src/Symfony/Component/Cache/Tests/Marshaller/DefaultMarshallerTest.php
+++ b/src/Symfony/Component/Cache/Tests/Marshaller/DefaultMarshallerTest.php
@@ -38,9 +38,7 @@ class DefaultMarshallerTest extends TestCase
         $this->assertSame(0, $marshaller->unmarshall(serialize(0)));
     }
 
-    /**
-     * @requires extension igbinary
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('igbinary')]
     public function testIgbinaryUnserialize()
     {
         if (version_compare('3.1.6', phpversion('igbinary'), '>')) {
@@ -61,9 +59,7 @@ class DefaultMarshallerTest extends TestCase
         (new DefaultMarshaller())->unmarshall('O:16:"NotExistingClass":0:{}');
     }
 
-    /**
-     * @requires extension igbinary
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('igbinary')]
     public function testIgbinaryUnserializeNotFoundClass()
     {
         if (version_compare('3.1.6', phpversion('igbinary'), '>')) {
@@ -89,9 +85,7 @@ class DefaultMarshallerTest extends TestCase
         }
     }
 
-    /**
-     * @requires extension igbinary
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('igbinary')]
     public function testIgbinaryUnserializeInvalid()
     {
         if (version_compare('3.1.6', phpversion('igbinary'), '>')) {
diff --git a/src/Symfony/Component/Cache/Tests/Marshaller/DeflateMarshallerTest.php b/src/Symfony/Component/Cache/Tests/Marshaller/DeflateMarshallerTest.php
index 5caf5eb..0e91106 100644
--- a/src/Symfony/Component/Cache/Tests/Marshaller/DeflateMarshallerTest.php
+++ b/src/Symfony/Component/Cache/Tests/Marshaller/DeflateMarshallerTest.php
@@ -15,9 +15,7 @@ use PHPUnit\Framework\TestCase;
 use Symfony\Component\Cache\Marshaller\DefaultMarshaller;
 use Symfony\Component\Cache\Marshaller\DeflateMarshaller;
 
-/**
- * @requires extension zlib
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('zlib')]
 class DeflateMarshallerTest extends TestCase
 {
     public function testMarshall()
diff --git a/src/Symfony/Component/Cache/Tests/Marshaller/SodiumMarshallerTest.php b/src/Symfony/Component/Cache/Tests/Marshaller/SodiumMarshallerTest.php
index e26151c..3dd9ecd 100644
--- a/src/Symfony/Component/Cache/Tests/Marshaller/SodiumMarshallerTest.php
+++ b/src/Symfony/Component/Cache/Tests/Marshaller/SodiumMarshallerTest.php
@@ -15,9 +15,7 @@ use PHPUnit\Framework\TestCase;
 use Symfony\Component\Cache\Marshaller\DefaultMarshaller;
 use Symfony\Component\Cache\Marshaller\SodiumMarshaller;
 
-/**
- * @requires extension sodium
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('sodium')]
 class SodiumMarshallerTest extends TestCase
 {
     private string $decryptionKey;
diff --git a/src/Symfony/Component/Cache/Tests/Messenger/EarlyExpirationHandlerTest.php b/src/Symfony/Component/Cache/Tests/Messenger/EarlyExpirationHandlerTest.php
index d4c3a82..c168eb0 100644
--- a/src/Symfony/Component/Cache/Tests/Messenger/EarlyExpirationHandlerTest.php
+++ b/src/Symfony/Component/Cache/Tests/Messenger/EarlyExpirationHandlerTest.php
@@ -29,9 +29,7 @@ class EarlyExpirationHandlerTest extends TestCase
         (new Filesystem())->remove(sys_get_temp_dir().'/symfony-cache');
     }
 
-    /**
-     * @group time-sensitive
-     */
+    #[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
     public function testHandle()
     {
         $this->markTestSkipped('Test failing on current Debian (Error: Class "�" not found).');
diff --git a/src/Symfony/Component/Cache/Tests/Traits/RedisProxiesTest.php b/src/Symfony/Component/Cache/Tests/Traits/RedisProxiesTest.php
index 8c35ea9..862d08c 100644
--- a/src/Symfony/Component/Cache/Tests/Traits/RedisProxiesTest.php
+++ b/src/Symfony/Component/Cache/Tests/Traits/RedisProxiesTest.php
@@ -19,12 +19,9 @@ use Symfony\Component\VarExporter\ProxyHelper;
 
 class RedisProxiesTest extends TestCase
 {
-    /**
-     * @requires extension redis
-     *
-     * @testWith ["Redis"]
-     *           ["RedisCluster"]
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('redis')]
+    #[\PHPUnit\Framework\Attributes\TestWith(['Redis'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['RedisCluster'])]
     public function testRedisProxy($class)
     {
         $version = version_compare(phpversion('redis'), '6', '>') ? '6' : '5';
@@ -74,10 +71,8 @@ class RedisProxiesTest extends TestCase
         $this->assertSame($expected, $proxy);
     }
 
-    /**
-     * @requires extension relay
-     * @requires PHP 8.2
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('relay')]
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.2')]
     public function testRelayProxy()
     {
         $proxy = file_get_contents(\dirname(__DIR__, 2).'/Traits/RelayProxy.php');
diff --git a/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php b/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php
index 772658a..bf638d7 100644
--- a/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php
+++ b/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php
@@ -15,14 +15,10 @@ use PHPUnit\Framework\TestCase;
 use Symfony\Component\Cache\Exception\InvalidArgumentException;
 use Symfony\Component\Cache\Traits\RedisTrait;
 
-/**
- * @requires extension redis
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('redis')]
 class RedisTraitTest extends TestCase
 {
-    /**
-     * @dataProvider provideCreateConnection
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCreateConnection')]
     public function testCreateConnection(string $dsn, string $expectedClass)
     {
         if (!class_exists($expectedClass)) {
@@ -84,10 +80,9 @@ class RedisTraitTest extends TestCase
      * a persistent connection, the database has to be re-selected, too.
      *
      * @see https://github.com/phpredis/phpredis/issues/1920
-     *
-     * @group integration
-     * @group network
      */
+    #[\PHPUnit\Framework\Attributes\Group('integration')]
+    #[\PHPUnit\Framework\Attributes\Group('network')]
     public function testPconnectSelectsCorrectDatabase()
     {
         if (!class_exists(\Redis::class)) {
@@ -135,9 +130,7 @@ class RedisTraitTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provideDbIndexDsnParameter
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDbIndexDsnParameter')]
     public function testDbIndexDsnParameter(string $dsn, int $expectedDb)
     {
         if (!getenv('REDIS_AUTHENTICATED_HOST')) {
@@ -181,9 +174,7 @@ class RedisTraitTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideInvalidDbIndexDsnParameter
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidDbIndexDsnParameter')]
     public function testInvalidDbIndexDsnParameter(string $dsn)
     {
         if (!getenv('REDIS_AUTHENTICATED_HOST')) {
diff --git a/src/Symfony/Component/Clock/Test/ClockSensitiveTrait.php b/src/Symfony/Component/Clock/Test/ClockSensitiveTrait.php
index fcc2820..8f5c597 100644
--- a/src/Symfony/Component/Clock/Test/ClockSensitiveTrait.php
+++ b/src/Symfony/Component/Clock/Test/ClockSensitiveTrait.php
@@ -45,14 +45,14 @@ trait ClockSensitiveTrait
     }
 
     /**
-     * @beforeClass
      *
-     * @before
      *
      * @internal
      */
     #[Before]
     #[BeforeClass]
+    #[\PHPUnit\Framework\Attributes\BeforeClass]
+    #[\PHPUnit\Framework\Attributes\Before]
     public static function saveClockBeforeTest(bool $save = true): ClockInterface
     {
         static $originalClock;
@@ -65,11 +65,10 @@ trait ClockSensitiveTrait
     }
 
     /**
-     * @after
-     *
      * @internal
      */
     #[After]
+    #[\PHPUnit\Framework\Attributes\After]
     protected static function restoreClockAfterTest(): void
     {
         Clock::set(self::saveClockBeforeTest(false));
diff --git a/src/Symfony/Component/Clock/Tests/DatePointTest.php b/src/Symfony/Component/Clock/Tests/DatePointTest.php
index 191c119..6cac7a1 100644
--- a/src/Symfony/Component/Clock/Tests/DatePointTest.php
+++ b/src/Symfony/Component/Clock/Tests/DatePointTest.php
@@ -58,12 +58,10 @@ class DatePointTest extends TestCase
         $date->modify('Bad Date');
     }
 
-    /**
-     * @testWith ["2024-04-01 00:00:00.000000", "2024-04"]
-     *           ["2024-04-09 00:00:00.000000", "2024-04-09"]
-     *           ["2024-04-09 03:00:00.000000", "2024-04-09 03:00"]
-     *           ["2024-04-09 00:00:00.123456", "2024-04-09 00:00:00.123456"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['2024-04-01 00:00:00.000000', '2024-04'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['2024-04-09 00:00:00.000000', '2024-04-09'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['2024-04-09 03:00:00.000000', '2024-04-09 03:00'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['2024-04-09 00:00:00.123456', '2024-04-09 00:00:00.123456'])]
     public function testTimeDefaultsToMidnight(string $expected, string $datetime)
     {
         $date = new \DateTimeImmutable($datetime);
diff --git a/src/Symfony/Component/Clock/Tests/MockClockTest.php b/src/Symfony/Component/Clock/Tests/MockClockTest.php
index f54c27e..3ccd34d 100644
--- a/src/Symfony/Component/Clock/Tests/MockClockTest.php
+++ b/src/Symfony/Component/Clock/Tests/MockClockTest.php
@@ -76,9 +76,7 @@ class MockClockTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideValidModifyStrings
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidModifyStrings')]
     public function testModifyWithSpecificDateTime(string $modifiedNow, string $expectedNow)
     {
         $clock = new MockClock((new \DateTimeImmutable('2112-09-17 23:53:00.999Z'))->setTimezone(new \DateTimeZone('UTC')));
@@ -96,9 +94,7 @@ class MockClockTest extends TestCase
         yield 'empty string' => [''];
     }
 
-    /**
-     * @dataProvider provideInvalidModifyStrings
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidModifyStrings')]
     public function testModifyThrowsOnInvalidString(string $modifiedNow)
     {
         $clock = new MockClock((new \DateTimeImmutable('2112-09-17 23:53:00.999Z'))->setTimezone(new \DateTimeZone('UTC')));
diff --git a/src/Symfony/Component/Clock/Tests/MonotonicClockTest.php b/src/Symfony/Component/Clock/Tests/MonotonicClockTest.php
index 54cfe78..36a3c25 100644
--- a/src/Symfony/Component/Clock/Tests/MonotonicClockTest.php
+++ b/src/Symfony/Component/Clock/Tests/MonotonicClockTest.php
@@ -14,9 +14,7 @@ namespace Symfony\Component\Clock\Tests;
 use PHPUnit\Framework\TestCase;
 use Symfony\Component\Clock\MonotonicClock;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class MonotonicClockTest extends TestCase
 {
     public function testConstruct()
diff --git a/src/Symfony/Component/Config/Tests/Builder/GeneratedConfigTest.php b/src/Symfony/Component/Config/Tests/Builder/GeneratedConfigTest.php
index 8446279..89384b7 100644
--- a/src/Symfony/Component/Config/Tests/Builder/GeneratedConfigTest.php
+++ b/src/Symfony/Component/Config/Tests/Builder/GeneratedConfigTest.php
@@ -28,12 +28,11 @@ use Symfony\Config\AddToListConfig;
  * Test to use the generated config and test its output.
  *
  * @author Tobias Nyholm <tobias.nyholm@gmail.com>
- *
- * @covers \Symfony\Component\Config\Builder\ClassBuilder
- * @covers \Symfony\Component\Config\Builder\ConfigBuilderGenerator
- * @covers \Symfony\Component\Config\Builder\Method
- * @covers \Symfony\Component\Config\Builder\Property
  */
+#[\PHPUnit\Framework\Attributes\CoversClass(\Symfony\Component\Config\Builder\ClassBuilder::class)]
+#[\PHPUnit\Framework\Attributes\CoversClass(\Symfony\Component\Config\Builder\ConfigBuilderGenerator::class)]
+#[\PHPUnit\Framework\Attributes\CoversClass(\Symfony\Component\Config\Builder\Method::class)]
+#[\PHPUnit\Framework\Attributes\CoversClass(\Symfony\Component\Config\Builder\Property::class)]
 class GeneratedConfigTest extends TestCase
 {
     private array $tempDir = [];
@@ -78,9 +77,7 @@ class GeneratedConfigTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider fixtureNames
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('fixtureNames')]
     public function testConfig(string $name, string $alias)
     {
         $basePath = __DIR__.'/Fixtures/';
diff --git a/src/Symfony/Component/Config/Tests/ConfigCacheTest.php b/src/Symfony/Component/Config/Tests/ConfigCacheTest.php
index f4ead1d..5d27bc3 100644
--- a/src/Symfony/Component/Config/Tests/ConfigCacheTest.php
+++ b/src/Symfony/Component/Config/Tests/ConfigCacheTest.php
@@ -36,9 +36,7 @@ class ConfigCacheTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider debugModes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('debugModes')]
     public function testCacheIsNotValidIfNothingHasBeenCached(bool $debug)
     {
         unlink($this->cacheFile); // remove tempnam() side effect
@@ -58,9 +56,7 @@ class ConfigCacheTest extends TestCase
         $this->assertTrue($cache->isFresh());
     }
 
-    /**
-     * @dataProvider debugModes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('debugModes')]
     public function testIsFreshWhenNoResourceProvided(bool $debug)
     {
         $cache = new ConfigCache($this->cacheFile, $debug);
diff --git a/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php
index 5212ef7..1825a01 100644
--- a/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php
+++ b/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php
@@ -75,9 +75,7 @@ class ArrayNodeTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider ignoreAndRemoveMatrixProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('ignoreAndRemoveMatrixProvider')]
     public function testIgnoreAndRemoveBehaviors(bool $ignore, bool $remove, array|\Exception $expected, string $message = '')
     {
         if ($expected instanceof \Exception) {
@@ -90,9 +88,7 @@ class ArrayNodeTest extends TestCase
         $this->assertSame($expected, $result, $message);
     }
 
-    /**
-     * @dataProvider getPreNormalizationTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPreNormalizationTests')]
     public function testPreNormalize(array $denormalized, array $normalized)
     {
         $node = new ArrayNode('foo');
@@ -124,9 +120,7 @@ class ArrayNodeTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getZeroNamedNodeExamplesData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getZeroNamedNodeExamplesData')]
     public function testNodeNameCanBeZero(array $denormalized, array $normalized)
     {
         $zeroNode = new ArrayNode(0);
@@ -171,9 +165,7 @@ class ArrayNodeTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getPreNormalizedNormalizedOrderedData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPreNormalizedNormalizedOrderedData')]
     public function testChildrenOrderIsMaintainedOnNormalizeValue(array $prenormalized, array $normalized)
     {
         $scalar1 = new ScalarNode('1');
@@ -276,9 +268,7 @@ class ArrayNodeTest extends TestCase
         $this->assertTrue($deprecationTriggered, '->finalize() should trigger if the deprecated node is set');
     }
 
-    /**
-     * @dataProvider getDataWithIncludedExtraKeys
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDataWithIncludedExtraKeys')]
     public function testMergeWithoutIgnoringExtraKeys(array $prenormalizeds)
     {
         $node = new ArrayNode('root');
@@ -294,9 +284,7 @@ class ArrayNodeTest extends TestCase
         $r->invoke($node, ...$prenormalizeds);
     }
 
-    /**
-     * @dataProvider getDataWithIncludedExtraKeys
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDataWithIncludedExtraKeys')]
     public function testMergeWithIgnoringAndRemovingExtraKeys(array $prenormalizeds)
     {
         $node = new ArrayNode('root');
@@ -312,9 +300,7 @@ class ArrayNodeTest extends TestCase
         $r->invoke($node, ...$prenormalizeds);
     }
 
-    /**
-     * @dataProvider getDataWithIncludedExtraKeys
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDataWithIncludedExtraKeys')]
     public function testMergeWithIgnoringExtraKeys(array $prenormalizeds, array $merged)
     {
         $node = new ArrayNode('root');
diff --git a/src/Symfony/Component/Config/Tests/Definition/BaseNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/BaseNodeTest.php
index f8d3f24..ed3b2c9 100644
--- a/src/Symfony/Component/Config/Tests/Definition/BaseNodeTest.php
+++ b/src/Symfony/Component/Config/Tests/Definition/BaseNodeTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Config\Definition\NodeInterface;
 
 class BaseNodeTest extends TestCase
 {
-    /**
-     * @dataProvider providePath
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePath')]
     public function testGetPathForChildNode(string $expected, array $params)
     {
         $constructorArgs = [];
diff --git a/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php
index 4c9bf42..dc24354 100644
--- a/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php
+++ b/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php
@@ -17,18 +17,14 @@ use Symfony\Component\Config\Definition\Exception\InvalidTypeException;
 
 class BooleanNodeTest extends TestCase
 {
-    /**
-     * @dataProvider getValidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValues')]
     public function testNormalize(bool $value)
     {
         $node = new BooleanNode('test');
         $this->assertSame($value, $node->normalize($value));
     }
 
-    /**
-     * @dataProvider getValidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValues')]
     public function testValidNonEmptyValues(bool $value)
     {
         $node = new BooleanNode('test');
@@ -45,9 +41,7 @@ class BooleanNodeTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidValues')]
     public function testNormalizeThrowsExceptionOnInvalidValues($value)
     {
         $node = new BooleanNode('test');
diff --git a/src/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php b/src/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php
index b91faf1..b55bc6d 100644
--- a/src/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php
+++ b/src/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php
@@ -39,9 +39,7 @@ class ArrayNodeDefinitionTest extends TestCase
         $this->assertContains($child, $this->getField($parent, 'children'));
     }
 
-    /**
-     * @dataProvider providePrototypeNodeSpecificCalls
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePrototypeNodeSpecificCalls')]
     public function testPrototypeNodeSpecificOption(string $method, array $args)
     {
         $this->expectException(InvalidDefinitionException::class);
@@ -97,9 +95,7 @@ class ArrayNodeDefinitionTest extends TestCase
         $this->assertEquals([[]], $tree->getDefaultValue());
     }
 
-    /**
-     * @dataProvider providePrototypedArrayNodeDefaults
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePrototypedArrayNodeDefaults')]
     public function testPrototypedArrayNodeDefault(int|array|string|null $args, bool $shouldThrowWhenUsingAttrAsKey, bool $shouldThrowWhenNotUsingAttrAsKey, array $defaults)
     {
         $node = new ArrayNodeDefinition('root');
@@ -170,9 +166,7 @@ class ArrayNodeDefinitionTest extends TestCase
         $this->assertEquals(['enabled' => false, 'foo' => 'bar'], $node->getNode()->getDefaultValue());
     }
 
-    /**
-     * @dataProvider getEnableableNodeFixtures
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getEnableableNodeFixtures')]
     public function testTrueEnableEnabledNode(array $expected, array $config, string $message)
     {
         $processor = new Processor();
@@ -303,6 +297,7 @@ class ArrayNodeDefinitionTest extends TestCase
         ];
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testRequiresAtLeastOneElement()
     {
         $node = new ArrayNodeDefinition('root');
diff --git a/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php b/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php
index 656919e..3869a90 100644
--- a/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php
+++ b/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php
@@ -148,9 +148,7 @@ class ExprBuilderTest extends TestCase
         $this->assertFinalizedValueIs([], $test);
     }
 
-    /**
-     * @dataProvider castToArrayValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('castToArrayValues')]
     public function testCastToArrayExpression($configValue, array $expectedValue)
     {
         $test = $this->getTestBuilder()
diff --git a/src/Symfony/Component/Config/Tests/Definition/Dumper/YamlReferenceDumperTest.php b/src/Symfony/Component/Config/Tests/Definition/Dumper/YamlReferenceDumperTest.php
index cb33603..c78980c 100644
--- a/src/Symfony/Component/Config/Tests/Definition/Dumper/YamlReferenceDumperTest.php
+++ b/src/Symfony/Component/Config/Tests/Definition/Dumper/YamlReferenceDumperTest.php
@@ -69,9 +69,7 @@ EOL
         ];
     }
 
-    /**
-     * @dataProvider provideDumpAtPath
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDumpAtPath')]
     public function testDumpAtPath(string $path, string $expected)
     {
         $configuration = new ExampleConfiguration();
diff --git a/src/Symfony/Component/Config/Tests/Definition/FloatNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/FloatNodeTest.php
index 9d18b58..cc45049 100644
--- a/src/Symfony/Component/Config/Tests/Definition/FloatNodeTest.php
+++ b/src/Symfony/Component/Config/Tests/Definition/FloatNodeTest.php
@@ -17,18 +17,14 @@ use Symfony\Component\Config\Definition\FloatNode;
 
 class FloatNodeTest extends TestCase
 {
-    /**
-     * @dataProvider getValidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValues')]
     public function testNormalize(int|float $value)
     {
         $node = new FloatNode('test');
         $this->assertSame($value, $node->normalize($value));
     }
 
-    /**
-     * @dataProvider getValidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValues')]
     public function testValidNonEmptyValues(int|float $value)
     {
         $node = new FloatNode('test');
@@ -51,9 +47,7 @@ class FloatNodeTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidValues')]
     public function testNormalizeThrowsExceptionOnInvalidValues($value)
     {
         $node = new FloatNode('test');
diff --git a/src/Symfony/Component/Config/Tests/Definition/IntegerNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/IntegerNodeTest.php
index 6ab6003..0e0c6e1 100644
--- a/src/Symfony/Component/Config/Tests/Definition/IntegerNodeTest.php
+++ b/src/Symfony/Component/Config/Tests/Definition/IntegerNodeTest.php
@@ -17,18 +17,14 @@ use Symfony\Component\Config\Definition\IntegerNode;
 
 class IntegerNodeTest extends TestCase
 {
-    /**
-     * @dataProvider getValidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValues')]
     public function testNormalize(int $value)
     {
         $node = new IntegerNode('test');
         $this->assertSame($value, $node->normalize($value));
     }
 
-    /**
-     * @dataProvider getValidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValues')]
     public function testValidNonEmptyValues(int $value)
     {
         $node = new IntegerNode('test');
@@ -46,9 +42,7 @@ class IntegerNodeTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidValues')]
     public function testNormalizeThrowsExceptionOnInvalidValues($value)
     {
         $node = new IntegerNode('test');
diff --git a/src/Symfony/Component/Config/Tests/Definition/NormalizationTest.php b/src/Symfony/Component/Config/Tests/Definition/NormalizationTest.php
index 3bf489e..4e8efbd 100644
--- a/src/Symfony/Component/Config/Tests/Definition/NormalizationTest.php
+++ b/src/Symfony/Component/Config/Tests/Definition/NormalizationTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\Config\Definition\NodeInterface;
 
 class NormalizationTest extends TestCase
 {
-    /**
-     * @dataProvider getEncoderTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getEncoderTests')]
     public function testNormalizeEncoders($denormalized)
     {
         $tb = new TreeBuilder('root_name', 'array');
@@ -91,9 +89,7 @@ class NormalizationTest extends TestCase
         return array_map(fn ($v) => [$v], $configs);
     }
 
-    /**
-     * @dataProvider getAnonymousKeysTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAnonymousKeysTests')]
     public function testAnonymousKeysArray($denormalized)
     {
         $tb = new TreeBuilder('root', 'array');
@@ -137,9 +133,7 @@ class NormalizationTest extends TestCase
         return array_map(fn ($v) => [$v], $configs);
     }
 
-    /**
-     * @dataProvider getNumericKeysTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNumericKeysTests')]
     public function testNumericKeysAsAttributes($denormalized)
     {
         $normalized = [
diff --git a/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php
index f1868a0..c4af44e 100644
--- a/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php
+++ b/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php
@@ -261,9 +261,8 @@ class PrototypedArrayNodeTest extends TestCase
      *         'option2' => 'value2'
      *     ]
      * ]
-     *
-     * @dataProvider getDataForKeyRemovedLeftValueOnly
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDataForKeyRemovedLeftValueOnly')]
     public function testMappedAttributeKeyIsRemovedLeftValueOnly($value, array $children, array $expected)
     {
         $node = new PrototypedArrayNode('root');
@@ -339,9 +338,7 @@ class PrototypedArrayNodeTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getPrototypedArrayNodeDataToMerge
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPrototypedArrayNodeDataToMerge')]
     public function testPrototypedArrayNodeMerge(array $left, array $right, array $expected)
     {
         $node = new PrototypedArrayNode('options');
diff --git a/src/Symfony/Component/Config/Tests/Definition/ScalarNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/ScalarNodeTest.php
index eea3d49..4d57fd6 100644
--- a/src/Symfony/Component/Config/Tests/Definition/ScalarNodeTest.php
+++ b/src/Symfony/Component/Config/Tests/Definition/ScalarNodeTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\Config\Definition\ScalarNode;
 
 class ScalarNodeTest extends TestCase
 {
-    /**
-     * @dataProvider getValidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValues')]
     public function testNormalize($value)
     {
         $node = new ScalarNode('test');
@@ -83,9 +81,7 @@ class ScalarNodeTest extends TestCase
         $this->assertSame(1, $deprecationTriggered, '->finalize() should trigger if the deprecated node is set');
     }
 
-    /**
-     * @dataProvider getInvalidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidValues')]
     public function testNormalizeThrowsExceptionOnInvalidValues($value)
     {
         $node = new ScalarNode('test');
@@ -126,10 +122,9 @@ class ScalarNodeTest extends TestCase
     }
 
     /**
-     * @dataProvider getValidNonEmptyValues
-     *
      * @param mixed $value
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidNonEmptyValues')]
     public function testValidNonEmptyValues($value)
     {
         $node = new ScalarNode('test');
@@ -152,10 +147,9 @@ class ScalarNodeTest extends TestCase
     }
 
     /**
-     * @dataProvider getEmptyValues
-     *
      * @param mixed $value
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getEmptyValues')]
     public function testNotAllowedEmptyValuesThrowException($value)
     {
         $node = new ScalarNode('test');
diff --git a/src/Symfony/Component/Config/Tests/FileLocatorTest.php b/src/Symfony/Component/Config/Tests/FileLocatorTest.php
index beb005a..ab8cfd5 100644
--- a/src/Symfony/Component/Config/Tests/FileLocatorTest.php
+++ b/src/Symfony/Component/Config/Tests/FileLocatorTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Config\FileLocator;
 
 class FileLocatorTest extends TestCase
 {
-    /**
-     * @dataProvider getIsAbsolutePathTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getIsAbsolutePathTests')]
     public function testIsAbsolutePath(string $path)
     {
         $loader = new FileLocator([]);
diff --git a/src/Symfony/Component/Config/Tests/Loader/FileLoaderTest.php b/src/Symfony/Component/Config/Tests/Loader/FileLoaderTest.php
index 4ee8fb0..4153136 100644
--- a/src/Symfony/Component/Config/Tests/Loader/FileLoaderTest.php
+++ b/src/Symfony/Component/Config/Tests/Loader/FileLoaderTest.php
@@ -130,9 +130,7 @@ class FileLoaderTest extends TestCase
         $this->assertNotContains('ExcludeFile.txt', $loadedFiles);
     }
 
-    /**
-     * @dataProvider excludeTrailingSlashConsistencyProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('excludeTrailingSlashConsistencyProvider')]
     public function testExcludeTrailingSlashConsistency(string $exclude)
     {
         $loader = new TestFileLoader(new FileLocator(__DIR__.'/../Fixtures'));
diff --git a/src/Symfony/Component/Config/Tests/Resource/ComposerResourceTest.php b/src/Symfony/Component/Config/Tests/Resource/ComposerResourceTest.php
index 6deee87..93b9bd8 100644
--- a/src/Symfony/Component/Config/Tests/Resource/ComposerResourceTest.php
+++ b/src/Symfony/Component/Config/Tests/Resource/ComposerResourceTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Config\Resource\ComposerResource;
 
 class ComposerResourceTest extends TestCase
 {
-    /**
-     * @group composer
-     */
+    #[\PHPUnit\Framework\Attributes\Group('composer')]
     public function testGetVendor()
     {
         $res = new ComposerResource();
diff --git a/src/Symfony/Component/Config/Tests/Resource/ReflectionClassResourceTest.php b/src/Symfony/Component/Config/Tests/Resource/ReflectionClassResourceTest.php
index a803535..f584a7d 100644
--- a/src/Symfony/Component/Config/Tests/Resource/ReflectionClassResourceTest.php
+++ b/src/Symfony/Component/Config/Tests/Resource/ReflectionClassResourceTest.php
@@ -61,9 +61,7 @@ class ReflectionClassResourceTest extends TestCase
         $this->assertFalse($res->isFresh($now), '->isFresh() returns false if the resource does not exist');
     }
 
-    /**
-     * @dataProvider provideHashedSignature
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideHashedSignature')]
     public function testHashedSignature(bool $changeExpected, int $changedLine, ?string $changedCode, ?\Closure $setContext = null)
     {
         if ($setContext) {
@@ -175,9 +173,7 @@ EOPHP;
         $this->assertTrue($res->isFresh(0));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testMessageSubscriber()
     {
         $res = new ReflectionClassResource(new \ReflectionClass(TestMessageSubscriber::class));
diff --git a/src/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php b/src/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php
index 2bc31e3..27172b7 100644
--- a/src/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php
+++ b/src/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php
@@ -115,9 +115,7 @@ class XmlUtilsTest extends TestCase
         libxml_use_internal_errors($internalErrors);
     }
 
-    /**
-     * @dataProvider getDataForConvertDomToArray
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDataForConvertDomToArray')]
     public function testConvertDomToArray($expected, string $xml, bool $root = false, bool $checkPrefix = true)
     {
         $dom = new \DOMDocument();
@@ -149,9 +147,7 @@ class XmlUtilsTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getDataForPhpize
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDataForPhpize')]
     public function testPhpize($expected, string $value)
     {
         $this->assertSame($expected, XmlUtils::phpize($value));
diff --git a/src/Symfony/Component/Console/Tests/ApplicationTest.php b/src/Symfony/Component/Console/Tests/ApplicationTest.php
index a1884ff..fd6a43c 100644
--- a/src/Symfony/Component/Console/Tests/ApplicationTest.php
+++ b/src/Symfony/Component/Console/Tests/ApplicationTest.php
@@ -427,9 +427,7 @@ class ApplicationTest extends TestCase
         $this->assertInstanceOf(\FooCommand::class, $application->find('a'), '->find() returns a command if the abbreviation exists for an alias');
     }
 
-    /**
-     * @dataProvider provideAmbiguousAbbreviations
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAmbiguousAbbreviations')]
     public function testFindWithAmbiguousAbbreviations($abbreviation, $expectedExceptionMessage)
     {
         putenv('COLUMNS=120');
@@ -502,9 +500,7 @@ class ApplicationTest extends TestCase
         $this->assertInstanceOf(\Foo4Command::class, $application->find('f::t'));
     }
 
-    /**
-     * @dataProvider provideInvalidCommandNamesSingle
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidCommandNamesSingle')]
     public function testFindAlternativeExceptionMessageSingle($name)
     {
         $application = new Application();
@@ -776,10 +772,8 @@ class ApplicationTest extends TestCase
         $this->assertInstanceOf(\FooCommand::class, $application->find('foo:'));
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testSetCatchExceptions(bool $catchErrors)
     {
         $application = new Application();
@@ -808,10 +802,8 @@ class ApplicationTest extends TestCase
         }
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testSetCatchErrors(bool $catchExceptions)
     {
         $application = new Application();
@@ -947,9 +939,7 @@ class ApplicationTest extends TestCase
         $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_linebreaks.txt', $tester->getDisplay(true), '->renderException() keep multiple line breaks');
     }
 
-    /**
-     * @group transient-on-windows
-     */
+    #[\PHPUnit\Framework\Attributes\Group('transient-on-windows')]
     public function testRenderAnonymousException()
     {
         $application = new Application();
@@ -973,9 +963,7 @@ class ApplicationTest extends TestCase
         $this->assertStringContainsString('Dummy type "class@anonymous" is invalid.', $tester->getDisplay(true));
     }
 
-    /**
-     * @group transient-on-windows
-     */
+    #[\PHPUnit\Framework\Attributes\Group('transient-on-windows')]
     public function testRenderExceptionStackTraceContainsRootException()
     {
         $application = new Application();
@@ -1136,6 +1124,7 @@ class ApplicationTest extends TestCase
      * an argument value should not be treated as verbosity value.
      * This test will fail with "Not enough arguments." if broken
      */
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testVerboseValueNotBreakArguments()
     {
         $application = new Application();
@@ -1234,10 +1223,8 @@ class ApplicationTest extends TestCase
         $this->assertTrue($passedRightValue, '-> exit code 1 was passed in the console.terminate event');
     }
 
-    /**
-     * @testWith [-1]
-     *           [-32000]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([-1])]
+    #[\PHPUnit\Framework\Attributes\TestWith([-32000])]
     public function testRunReturnsExitCodeOneForNegativeExceptionCode($exceptionCode)
     {
         $exception = new \Exception('', $exceptionCode);
@@ -1279,9 +1266,7 @@ class ApplicationTest extends TestCase
         $application->run($input, $output);
     }
 
-    /**
-     * @dataProvider getAddingAlreadySetDefinitionElementData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAddingAlreadySetDefinitionElementData')]
     public function testAddingAlreadySetDefinitionElementData($def)
     {
         $application = new Application();
@@ -1953,9 +1938,7 @@ class ApplicationTest extends TestCase
         $app->get('test');
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testSignalListenerNotCalledByDefault()
     {
         $command = new SignableCommand(false);
@@ -1973,9 +1956,7 @@ class ApplicationTest extends TestCase
         $this->assertFalse($dispatcherCalled);
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testSignalListener()
     {
         $command = new SignableCommand();
@@ -1994,9 +1975,7 @@ class ApplicationTest extends TestCase
         $this->assertTrue($command->signaled);
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testSignalSubscriberNotCalledByDefault()
     {
         $command = new BaseSignableCommand(false);
@@ -2011,9 +1990,7 @@ class ApplicationTest extends TestCase
         $this->assertFalse($subscriber->signaled);
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testSignalSubscriber()
     {
         $command = new BaseSignableCommand();
@@ -2032,9 +2009,7 @@ class ApplicationTest extends TestCase
         $this->assertTrue($subscriber2->signaled);
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testSignalDispatchWithoutEventToDispatch()
     {
         $command = new SignableCommand();
@@ -2046,9 +2021,7 @@ class ApplicationTest extends TestCase
         $this->assertTrue($command->signaled);
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testSignalDispatchWithoutEventDispatcher()
     {
         $command = new SignableCommand();
@@ -2060,9 +2033,7 @@ class ApplicationTest extends TestCase
         $this->assertTrue($command->signaled);
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testSetSignalsToDispatchEvent()
     {
         if (!\defined('SIGUSR1')) {
@@ -2194,9 +2165,7 @@ class ApplicationTest extends TestCase
         $this->assertTrue($terminateEventDispatched);
     }
 
-    /**
-     * @group tty
-     */
+    #[\PHPUnit\Framework\Attributes\Group('tty')]
     public function testSignalableRestoresStty()
     {
         if (!Terminal::hasSttyAvailable()) {
diff --git a/src/Symfony/Component/Console/Tests/CI/GithubActionReporterTest.php b/src/Symfony/Component/Console/Tests/CI/GithubActionReporterTest.php
index a359279..6231a04 100644
--- a/src/Symfony/Component/Console/Tests/CI/GithubActionReporterTest.php
+++ b/src/Symfony/Component/Console/Tests/CI/GithubActionReporterTest.php
@@ -31,9 +31,7 @@ class GithubActionReporterTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider annotationsFormatProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('annotationsFormatProvider')]
     public function testAnnotationsFormat(string $type, string $message, ?string $file, ?int $line, ?int $col, string $expected)
     {
         $reporter = new GithubActionReporter($buffer = new BufferedOutput());
diff --git a/src/Symfony/Component/Console/Tests/Command/CommandTest.php b/src/Symfony/Component/Console/Tests/Command/CommandTest.php
index 58fbfcf..89d97ab 100644
--- a/src/Symfony/Component/Console/Tests/Command/CommandTest.php
+++ b/src/Symfony/Component/Console/Tests/Command/CommandTest.php
@@ -136,9 +136,7 @@ class CommandTest extends TestCase
         $this->assertEquals('foobar:bar', $command->getName(), '->setName() sets the command name');
     }
 
-    /**
-     * @dataProvider provideInvalidCommandNames
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidCommandNames')]
     public function testInvalidCommandNames($name)
     {
         $this->expectException(\InvalidArgumentException::class);
@@ -367,9 +365,7 @@ class CommandTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getSetCodeBindToClosureTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getSetCodeBindToClosureTests')]
     public function testSetCodeBindToClosure($previouslyBound, $expected)
     {
         $code = createClosure();
@@ -441,9 +437,7 @@ class CommandTest extends TestCase
         $this->assertSame(['f'], $command->getAliases());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testDefaultNameProperty()
     {
         $this->expectDeprecation('Since symfony/console 6.1: Relying on the static property "$defaultName" for setting a command name is deprecated. Add the "Symfony\Component\Console\Attribute\AsCommand" attribute to the "Symfony\Component\Console\Tests\Command\MyCommand" class instead.');
@@ -451,9 +445,7 @@ class CommandTest extends TestCase
         $this->assertSame('my:command', MyCommand::getDefaultName());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testDefaultDescriptionProperty()
     {
         $this->expectDeprecation('Since symfony/console 6.1: Relying on the static property "$defaultDescription" for setting a command description is deprecated. Add the "Symfony\Component\Console\Attribute\AsCommand" attribute to the "Symfony\Component\Console\Tests\Command\MyCommand" class instead.');
@@ -461,9 +453,7 @@ class CommandTest extends TestCase
         $this->assertSame('This is a command I wrote all by myself', MyCommand::getDefaultDescription());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testStaticDefaultProperties()
     {
         $command = new MyCommand();
diff --git a/src/Symfony/Component/Console/Tests/Command/CompleteCommandTest.php b/src/Symfony/Component/Console/Tests/Command/CompleteCommandTest.php
index 0f64fbc..c14cac9 100644
--- a/src/Symfony/Component/Console/Tests/Command/CompleteCommandTest.php
+++ b/src/Symfony/Component/Console/Tests/Command/CompleteCommandTest.php
@@ -65,9 +65,7 @@ class CompleteCommandTest extends TestCase
         $this->assertTrue(true);
     }
 
-    /**
-     * @dataProvider provideInputAndCurrentOptionValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInputAndCurrentOptionValues')]
     public function testInputAndCurrentOptionValidation(array $input, ?string $exceptionMessage)
     {
         if ($exceptionMessage) {
@@ -91,9 +89,7 @@ class CompleteCommandTest extends TestCase
         yield [['--current' => '2', '--input' => ['bin/console', 'cache:clear']], null];
     }
 
-    /**
-     * @dataProvider provideCompleteCommandNameInputs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompleteCommandNameInputs')]
     public function testCompleteCommandName(array $input, array $suggestions)
     {
         $this->execute(['--current' => '1', '--input' => $input]);
@@ -108,9 +104,7 @@ class CompleteCommandTest extends TestCase
         yield 'complete-aliases' => [['bin/console', 'ah'], ['hello', 'ahoy']];
     }
 
-    /**
-     * @dataProvider provideCompleteCommandInputDefinitionInputs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompleteCommandInputDefinitionInputs')]
     public function testCompleteCommandInputDefinition(array $input, array $suggestions)
     {
         $this->execute(['--current' => '2', '--input' => $input]);
diff --git a/src/Symfony/Component/Console/Tests/Command/DumpCompletionCommandTest.php b/src/Symfony/Component/Console/Tests/Command/DumpCompletionCommandTest.php
index e8348a5..f1dfa06 100644
--- a/src/Symfony/Component/Console/Tests/Command/DumpCompletionCommandTest.php
+++ b/src/Symfony/Component/Console/Tests/Command/DumpCompletionCommandTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Console\Tester\CommandCompletionTester;
 
 class DumpCompletionCommandTest extends TestCase
 {
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $this->markTestSkipped('Test failing on Debian CI');
diff --git a/src/Symfony/Component/Console/Tests/Command/HelpCommandTest.php b/src/Symfony/Component/Console/Tests/Command/HelpCommandTest.php
index c36ab62..4519451 100644
--- a/src/Symfony/Component/Console/Tests/Command/HelpCommandTest.php
+++ b/src/Symfony/Component/Console/Tests/Command/HelpCommandTest.php
@@ -70,9 +70,7 @@ class HelpCommandTest extends TestCase
         $this->assertStringContainsString('<command', $commandTester->getDisplay(), '->execute() returns an XML help text if --format=xml is passed');
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         require_once realpath(__DIR__.'/../Fixtures/FooCommand.php');
diff --git a/src/Symfony/Component/Console/Tests/Command/ListCommandTest.php b/src/Symfony/Component/Console/Tests/Command/ListCommandTest.php
index 20dfa8d..f3076e8 100644
--- a/src/Symfony/Component/Console/Tests/Command/ListCommandTest.php
+++ b/src/Symfony/Component/Console/Tests/Command/ListCommandTest.php
@@ -114,9 +114,7 @@ EOF;
         $this->assertEquals($output, trim($commandTester->getDisplay(true)));
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         require_once realpath(__DIR__.'/../Fixtures/FooCommand.php');
diff --git a/src/Symfony/Component/Console/Tests/Completion/CompletionInputTest.php b/src/Symfony/Component/Console/Tests/Completion/CompletionInputTest.php
index df0d081..0368da4 100644
--- a/src/Symfony/Component/Console/Tests/Completion/CompletionInputTest.php
+++ b/src/Symfony/Component/Console/Tests/Completion/CompletionInputTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\Console\Input\InputOption;
 
 class CompletionInputTest extends TestCase
 {
-    /**
-     * @dataProvider provideBindData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBindData')]
     public function testBind(CompletionInput $input, string $expectedType, ?string $expectedName, string $expectedValue)
     {
         $definition = new InputDefinition([
@@ -74,9 +72,7 @@ class CompletionInputTest extends TestCase
         yield 'end' => [CompletionInput::fromTokens(['bin/console', 'symfony', 'sensiolabs'], 3), CompletionInput::TYPE_NONE, null, ''];
     }
 
-    /**
-     * @dataProvider provideBindWithLastArrayArgumentData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBindWithLastArrayArgumentData')]
     public function testBindWithLastArrayArgument(CompletionInput $input, ?string $expectedValue)
     {
         $definition = new InputDefinition([
@@ -111,9 +107,7 @@ class CompletionInputTest extends TestCase
         $this->assertEquals('', $input->getCompletionValue(), 'Unexpected value');
     }
 
-    /**
-     * @dataProvider provideFromStringData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFromStringData')]
     public function testFromString($inputStr, array $expectedTokens)
     {
         $input = CompletionInput::fromString($inputStr, 1);
diff --git a/src/Symfony/Component/Console/Tests/DependencyInjection/AddConsoleCommandPassTest.php b/src/Symfony/Component/Console/Tests/DependencyInjection/AddConsoleCommandPassTest.php
index 639e509..d278f84 100644
--- a/src/Symfony/Component/Console/Tests/DependencyInjection/AddConsoleCommandPassTest.php
+++ b/src/Symfony/Component/Console/Tests/DependencyInjection/AddConsoleCommandPassTest.php
@@ -27,9 +27,7 @@ use Symfony\Component\DependencyInjection\TypedReference;
 
 class AddConsoleCommandPassTest extends TestCase
 {
-    /**
-     * @dataProvider visibilityProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('visibilityProvider')]
     public function testProcess($public)
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/Console/Tests/Descriptor/AbstractDescriptorTestCase.php b/src/Symfony/Component/Console/Tests/Descriptor/AbstractDescriptorTestCase.php
index 93658f4..6c0f31a 100644
--- a/src/Symfony/Component/Console/Tests/Descriptor/AbstractDescriptorTestCase.php
+++ b/src/Symfony/Component/Console/Tests/Descriptor/AbstractDescriptorTestCase.php
@@ -21,31 +21,31 @@ use Symfony\Component\Console\Output\BufferedOutput;
 
 abstract class AbstractDescriptorTestCase extends TestCase
 {
-    /** @dataProvider getDescribeInputArgumentTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeInputArgumentTestData')]
     public function testDescribeInputArgument(InputArgument $argument, $expectedDescription)
     {
         $this->assertDescription($expectedDescription, $argument);
     }
 
-    /** @dataProvider getDescribeInputOptionTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeInputOptionTestData')]
     public function testDescribeInputOption(InputOption $option, $expectedDescription)
     {
         $this->assertDescription($expectedDescription, $option);
     }
 
-    /** @dataProvider getDescribeInputDefinitionTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeInputDefinitionTestData')]
     public function testDescribeInputDefinition(InputDefinition $definition, $expectedDescription)
     {
         $this->assertDescription($expectedDescription, $definition);
     }
 
-    /** @dataProvider getDescribeCommandTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeCommandTestData')]
     public function testDescribeCommand(Command $command, $expectedDescription)
     {
         $this->assertDescription($expectedDescription, $command);
     }
 
-    /** @dataProvider getDescribeApplicationTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeApplicationTestData')]
     public function testDescribeApplication(Application $application, $expectedDescription)
     {
         // the "completion" command has dynamic help information depending on the shell
diff --git a/src/Symfony/Component/Console/Tests/Descriptor/ApplicationDescriptionTest.php b/src/Symfony/Component/Console/Tests/Descriptor/ApplicationDescriptionTest.php
index 1933c98..2d65b10 100644
--- a/src/Symfony/Component/Console/Tests/Descriptor/ApplicationDescriptionTest.php
+++ b/src/Symfony/Component/Console/Tests/Descriptor/ApplicationDescriptionTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\Console\Descriptor\ApplicationDescription;
 
 final class ApplicationDescriptionTest extends TestCase
 {
-    /**
-     * @dataProvider getNamespacesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNamespacesProvider')]
     public function testGetNamespaces(array $expected, array $names)
     {
         $application = new TestApplication();
diff --git a/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php b/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php
index 489108b..6e9e51c 100644
--- a/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php
+++ b/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php
@@ -159,9 +159,7 @@ class OutputFormatterTest extends TestCase
         $this->assertEquals("\033[34;41msome text\033[39;49m", $formatter->format('<fg=blue;bg=red>some text</fg=blue;bg=red>'));
     }
 
-    /**
-     * @dataProvider provideInlineStyleOptionsCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInlineStyleOptionsCases')]
     public function testInlineStyleOptions(string $tag, ?string $expected = null, ?string $input = null, bool $truecolor = false)
     {
         if ($truecolor && 'truecolor' !== getenv('COLORTERM')) {
@@ -241,9 +239,7 @@ class OutputFormatterTest extends TestCase
         $this->assertTrue($formatter->hasStyle('question'));
     }
 
-    /**
-     * @dataProvider provideDecoratedAndNonDecoratedOutput
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDecoratedAndNonDecoratedOutput')]
     public function testNotDecoratedFormatterOnJediTermEmulator(string $input, string $expectedNonDecoratedOutput, string $expectedDecoratedOutput, bool $shouldBeJediTerm = false)
     {
         $terminalEmulator = $shouldBeJediTerm ? 'JetBrains-JediTerm' : 'Unknown';
@@ -259,9 +255,7 @@ class OutputFormatterTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provideDecoratedAndNonDecoratedOutput
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDecoratedAndNonDecoratedOutput')]
     public function testNotDecoratedFormatterOnIDEALikeEnvironment(string $input, string $expectedNonDecoratedOutput, string $expectedDecoratedOutput, bool $expectsIDEALikeTerminal = false)
     {
         // Backup previous env variable
diff --git a/src/Symfony/Component/Console/Tests/Helper/DumperNativeFallbackTest.php b/src/Symfony/Component/Console/Tests/Helper/DumperNativeFallbackTest.php
index 1b37e4e..f293fc9 100644
--- a/src/Symfony/Component/Console/Tests/Helper/DumperNativeFallbackTest.php
+++ b/src/Symfony/Component/Console/Tests/Helper/DumperNativeFallbackTest.php
@@ -32,9 +32,7 @@ class DumperNativeFallbackTest extends TestCase
         ClassExistsMock::withMockedClasses([]);
     }
 
-    /**
-     * @dataProvider provideVariables
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideVariables')]
     public function testInvoke($variable, $primitiveString)
     {
         $dumper = new Dumper($this->createMock(OutputInterface::class));
diff --git a/src/Symfony/Component/Console/Tests/Helper/DumperTest.php b/src/Symfony/Component/Console/Tests/Helper/DumperTest.php
index 0a30c6e..6b0e6ec 100644
--- a/src/Symfony/Component/Console/Tests/Helper/DumperTest.php
+++ b/src/Symfony/Component/Console/Tests/Helper/DumperTest.php
@@ -32,9 +32,7 @@ class DumperTest extends TestCase
         putenv('DUMP_COMMA_SEPARATOR');
     }
 
-    /**
-     * @dataProvider provideVariables
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideVariables')]
     public function testInvoke($variable)
     {
         $output = $this->createMock(OutputInterface::class);
diff --git a/src/Symfony/Component/Console/Tests/Helper/HelperTest.php b/src/Symfony/Component/Console/Tests/Helper/HelperTest.php
index 0a0c2fa..afdc113 100644
--- a/src/Symfony/Component/Console/Tests/Helper/HelperTest.php
+++ b/src/Symfony/Component/Console/Tests/Helper/HelperTest.php
@@ -58,17 +58,13 @@ class HelperTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider formatTimeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('formatTimeProvider')]
     public function testFormatTime(int|float $secs, string $expectedFormat, int $precision)
     {
         $this->assertEquals($expectedFormat, Helper::formatTime($secs, $precision));
     }
 
-    /**
-     * @dataProvider decoratedTextProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('decoratedTextProvider')]
     public function testRemoveDecoration(string $decoratedText, string $undecoratedText)
     {
         $this->assertEquals($undecoratedText, Helper::removeDecoration(new OutputFormatter(), $decoratedText));
diff --git a/src/Symfony/Component/Console/Tests/Helper/OutputWrapperTest.php b/src/Symfony/Component/Console/Tests/Helper/OutputWrapperTest.php
index 2ce15b6..c173e10 100644
--- a/src/Symfony/Component/Console/Tests/Helper/OutputWrapperTest.php
+++ b/src/Symfony/Component/Console/Tests/Helper/OutputWrapperTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Console\Helper\OutputWrapper;
 
 class OutputWrapperTest extends TestCase
 {
-    /**
-     * @dataProvider textProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('textProvider')]
     public function testBasicWrap(string $text, int $width, bool $allowCutUrls, string $expected)
     {
         $wrapper = new OutputWrapper($allowCutUrls);
diff --git a/src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php b/src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php
index 1fd8898..8ceb6ab 100644
--- a/src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php
+++ b/src/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\Process\Process;
 
 class ProcessHelperTest extends TestCase
 {
-    /**
-     * @dataProvider provideCommandsAndOutput
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCommandsAndOutput')]
     public function testVariousProcessRuns(string $expected, Process|string|array $cmd, int $verbosity, ?string $error)
     {
         if (\is_string($cmd)) {
diff --git a/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php b/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php
index af7cf2e..dc083d9 100644
--- a/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php
+++ b/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\Console\Helper\ProgressBar;
 use Symfony\Component\Console\Output\ConsoleSectionOutput;
 use Symfony\Component\Console\Output\StreamOutput;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class ProgressBarTest extends TestCase
 {
     private string|false $colSize;
@@ -1117,9 +1115,7 @@ And, as in uffish thought he stood, The Jabberwock, with eyes of flame, Came whi
         $bar->finish();
     }
 
-    /**
-     * @dataProvider provideFormat
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFormat')]
     public function testFormatsWithoutMax($format)
     {
         $bar = new ProgressBar($output = $this->getOutputStream(), 0, 0);
diff --git a/src/Symfony/Component/Console/Tests/Helper/ProgressIndicatorTest.php b/src/Symfony/Component/Console/Tests/Helper/ProgressIndicatorTest.php
index 8e2e10e..77639a6 100644
--- a/src/Symfony/Component/Console/Tests/Helper/ProgressIndicatorTest.php
+++ b/src/Symfony/Component/Console/Tests/Helper/ProgressIndicatorTest.php
@@ -15,9 +15,7 @@ use PHPUnit\Framework\TestCase;
 use Symfony\Component\Console\Helper\ProgressIndicator;
 use Symfony\Component\Console\Output\StreamOutput;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class ProgressIndicatorTest extends TestCase
 {
     public function testDefaultIndicator()
@@ -143,9 +141,7 @@ class ProgressIndicatorTest extends TestCase
         $bar->finish('Finished');
     }
 
-    /**
-     * @dataProvider provideFormat
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFormat')]
     public function testFormats($format)
     {
         $bar = new ProgressIndicator($output = $this->getOutputStream(), $format);
diff --git a/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php b/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php
index 651ae5f..a0d5af6 100644
--- a/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php
+++ b/src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php
@@ -27,9 +27,7 @@ use Symfony\Component\Console\Question\Question;
 use Symfony\Component\Console\Terminal;
 use Symfony\Component\Console\Tester\ApplicationTester;
 
-/**
- * @group tty
- */
+#[\PHPUnit\Framework\Attributes\Group('tty')]
 class QuestionHelperTest extends AbstractQuestionHelperTestCase
 {
     public function testAskChoice()
@@ -348,9 +346,7 @@ class QuestionHelperTest extends AbstractQuestionHelperTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInputs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInputs')]
     public function testAskWithAutocompleteWithMultiByteCharacter($character)
     {
         if (!Terminal::hasSttyAvailable()) {
@@ -522,9 +518,7 @@ EOD;
         $this->assertSame(18, ftell($response));
     }
 
-    /**
-     * @dataProvider getAskConfirmationData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAskConfirmationData')]
     public function testAskConfirmation($question, $expected, $default = true)
     {
         $dialog = new QuestionHelper();
@@ -588,9 +582,7 @@ EOD;
         }
     }
 
-    /**
-     * @dataProvider simpleAnswerProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('simpleAnswerProvider')]
     public function testSelectChoiceFromSimpleChoices($providedAnswer, $expectedValue)
     {
         $possibleChoices = [
@@ -622,9 +614,7 @@ EOD;
         ];
     }
 
-    /**
-     * @dataProvider specialCharacterInMultipleChoice
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('specialCharacterInMultipleChoice')]
     public function testSpecialCharacterChoiceFromMultipleChoiceList($providedAnswer, $expectedValue)
     {
         $possibleChoices = [
@@ -653,9 +643,7 @@ EOD;
         ];
     }
 
-    /**
-     * @dataProvider answerProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('answerProvider')]
     public function testSelectChoiceFromChoiceList($providedAnswer, $expectedValue)
     {
         $possibleChoices = [
diff --git a/src/Symfony/Component/Console/Tests/Helper/SymfonyQuestionHelperTest.php b/src/Symfony/Component/Console/Tests/Helper/SymfonyQuestionHelperTest.php
index 6cf7996..d004bcd 100644
--- a/src/Symfony/Component/Console/Tests/Helper/SymfonyQuestionHelperTest.php
+++ b/src/Symfony/Component/Console/Tests/Helper/SymfonyQuestionHelperTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\Console\Output\StreamOutput;
 use Symfony\Component\Console\Question\ChoiceQuestion;
 use Symfony\Component\Console\Question\Question;
 
-/**
- * @group tty
- */
+#[\PHPUnit\Framework\Attributes\Group('tty')]
 class SymfonyQuestionHelperTest extends AbstractQuestionHelperTestCase
 {
     public function testAskChoice()
diff --git a/src/Symfony/Component/Console/Tests/Helper/TableTest.php b/src/Symfony/Component/Console/Tests/Helper/TableTest.php
index ebdfa5a..ab1f503 100644
--- a/src/Symfony/Component/Console/Tests/Helper/TableTest.php
+++ b/src/Symfony/Component/Console/Tests/Helper/TableTest.php
@@ -38,9 +38,7 @@ class TableTest extends TestCase
         unset($this->stream);
     }
 
-    /**
-     * @dataProvider renderProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('renderProvider')]
     public function testRender($headers, $rows, $style, $expected, $decorated = false)
     {
         $table = new Table($output = $this->getOutputStream($decorated));
@@ -54,9 +52,7 @@ class TableTest extends TestCase
         $this->assertEquals($expected, $this->getOutputContent($output));
     }
 
-    /**
-     * @dataProvider renderProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('renderProvider')]
     public function testRenderAddRows($headers, $rows, $style, $expected, $decorated = false)
     {
         $table = new Table($output = $this->getOutputStream($decorated));
@@ -70,9 +66,7 @@ class TableTest extends TestCase
         $this->assertEquals($expected, $this->getOutputContent($output));
     }
 
-    /**
-     * @dataProvider renderProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('renderProvider')]
     public function testRenderAddRowsOneByOne($headers, $rows, $style, $expected, $decorated = false)
     {
         $table = new Table($output = $this->getOutputStream($decorated));
@@ -1246,9 +1240,7 @@ TABLE;
         Table::getStyleDefinition('absent');
     }
 
-    /**
-     * @dataProvider renderSetTitle
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('renderSetTitle')]
     public function testSetTitle($headerTitle, $footerTitle, $style, $expected)
     {
         (new Table($output = $this->getOutputStream()))
@@ -1522,9 +1514,7 @@ EOTXT;
         yield [$headers, $rows, $expected];
     }
 
-    /**
-     * @dataProvider provideRenderHorizontalTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRenderHorizontalTests')]
     public function testRenderHorizontal(array $headers, array $rows, string $expected)
     {
         $table = new Table($output = $this->getOutputStream());
@@ -1970,9 +1960,7 @@ EOTXT
         ];
     }
 
-    /**
-     * @dataProvider provideRenderVerticalTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRenderVerticalTests')]
     public function testVerticalRender(string $expectedOutput, array $headers, array $rows, string $style = 'default', string $headerTitle = '', string $footerTitle = '')
     {
         $table = new Table($output = $this->getOutputStream());
diff --git a/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php b/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php
index a47d557..448f9b4 100644
--- a/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php
+++ b/src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php
@@ -39,9 +39,7 @@ class ArgvInputTest extends TestCase
         $this->assertEquals(['name' => 'foo'], $input->getArguments(), '->parse() is stateless');
     }
 
-    /**
-     * @dataProvider provideOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideOptions')]
     public function testParseOptions($input, $options, $expectedOptions, $message)
     {
         $input = new ArgvInput($input);
@@ -50,9 +48,7 @@ class ArgvInputTest extends TestCase
         $this->assertSame($expectedOptions, $input->getOptions(), $message);
     }
 
-    /**
-     * @dataProvider provideNegatableOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNegatableOptions')]
     public function testParseOptionsNegatable($input, $options, $expectedOptions, $message)
     {
         $input = new ArgvInput($input);
@@ -234,9 +230,7 @@ class ArgvInputTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideInvalidInput
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidInput')]
     public function testInvalidInput($argv, $definition, $expectedExceptionMessage)
     {
         $this->expectException(\RuntimeException::class);
@@ -245,9 +239,7 @@ class ArgvInputTest extends TestCase
         (new ArgvInput($argv))->bind($definition);
     }
 
-    /**
-     * @dataProvider provideInvalidNegatableInput
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidNegatableInput')]
     public function testInvalidInputNegatable($argv, $definition, $expectedExceptionMessage)
     {
         $this->expectException(\RuntimeException::class);
@@ -504,9 +496,7 @@ class ArgvInputTest extends TestCase
         $this->assertEquals('-f --bar=foo '.escapeshellarg('a b c d').' '.escapeshellarg("A\nB'C"), (string) $input);
     }
 
-    /**
-     * @dataProvider provideGetParameterOptionValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideGetParameterOptionValues')]
     public function testGetParameterOptionEqualSign($argv, $key, $default, $onlyParams, $expected)
     {
         $input = new ArgvInput($argv);
diff --git a/src/Symfony/Component/Console/Tests/Input/ArrayInputTest.php b/src/Symfony/Component/Console/Tests/Input/ArrayInputTest.php
index d6fe32b..59b030f 100644
--- a/src/Symfony/Component/Console/Tests/Input/ArrayInputTest.php
+++ b/src/Symfony/Component/Console/Tests/Input/ArrayInputTest.php
@@ -64,9 +64,7 @@ class ArrayInputTest extends TestCase
         $this->assertEquals(['name' => 'foo'], $input->getArguments(), '->parse() parses required arguments');
     }
 
-    /**
-     * @dataProvider provideOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideOptions')]
     public function testParseOptions($input, $options, $expectedOptions, $message)
     {
         $input = new ArrayInput($input, new InputDefinition($options));
@@ -122,9 +120,7 @@ class ArrayInputTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideInvalidInput
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidInput')]
     public function testParseInvalidInput($parameters, $definition, $expectedExceptionMessage)
     {
         $this->expectException(\InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php b/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php
index 1378346..136ee70 100644
--- a/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php
+++ b/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php
@@ -359,9 +359,7 @@ class InputDefinitionTest extends TestCase
         $this->assertSame($defaults, $definition->getOptionDefaults(), '->getOptionDefaults() returns the default values for all options');
     }
 
-    /**
-     * @dataProvider getGetSynopsisData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getGetSynopsisData')]
     public function testGetSynopsis(InputDefinition $definition, $expectedSynopsis, $message = null)
     {
         $this->assertEquals($expectedSynopsis, $definition->getSynopsis(), $message ? '->getSynopsis() '.$message : '');
diff --git a/src/Symfony/Component/Console/Tests/Input/StringInputTest.php b/src/Symfony/Component/Console/Tests/Input/StringInputTest.php
index 338c142..87670f7 100644
--- a/src/Symfony/Component/Console/Tests/Input/StringInputTest.php
+++ b/src/Symfony/Component/Console/Tests/Input/StringInputTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\Console\Input\StringInput;
 
 class StringInputTest extends TestCase
 {
-    /**
-     * @dataProvider getTokenizeData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTokenizeData')]
     public function testTokenize($input, $tokens, $message)
     {
         $input = new StringInput($input);
diff --git a/src/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php b/src/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php
index 43d7796..d4c19f1 100644
--- a/src/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php
+++ b/src/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php
@@ -54,9 +54,7 @@ class ConsoleLoggerTest extends TestCase
         return $this->output->getLogs();
     }
 
-    /**
-     * @dataProvider provideOutputMappingParams
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideOutputMappingParams')]
     public function testOutputMapping($logLevel, $outputVerbosity, $isOutput, $addVerbosityLevelMap = [])
     {
         $out = new BufferedOutput($outputVerbosity);
@@ -104,9 +102,7 @@ class ConsoleLoggerTest extends TestCase
         $this->assertInstanceOf(LoggerInterface::class, $this->getLogger());
     }
 
-    /**
-     * @dataProvider provideLevelsAndMessages
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLevelsAndMessages')]
     public function testLogsAtAllLevels($level, $message)
     {
         $logger = $this->getLogger();
diff --git a/src/Symfony/Component/Console/Tests/Output/AnsiColorModeTest.php b/src/Symfony/Component/Console/Tests/Output/AnsiColorModeTest.php
index eb3e463..32011a0 100644
--- a/src/Symfony/Component/Console/Tests/Output/AnsiColorModeTest.php
+++ b/src/Symfony/Component/Console/Tests/Output/AnsiColorModeTest.php
@@ -17,17 +17,13 @@ use Symfony\Component\Console\Output\AnsiColorMode;
 
 class AnsiColorModeTest extends TestCase
 {
-    /**
-     * @dataProvider provideColorsConversion
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideColorsConversion')]
     public function testColorsConversionToAnsi4(string $corlorHex, array $expected)
     {
         $this->assertSame((string) $expected[AnsiColorMode::Ansi4->name], AnsiColorMode::Ansi4->convertFromHexToAnsiColorCode($corlorHex));
     }
 
-    /**
-     * @dataProvider provideColorsConversion
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideColorsConversion')]
     public function testColorsConversionToAnsi8(string $corlorHex, array $expected)
     {
         $this->assertSame('8;5;'.$expected[AnsiColorMode::Ansi8->name], AnsiColorMode::Ansi8->convertFromHexToAnsiColorCode($corlorHex));
diff --git a/src/Symfony/Component/Console/Tests/Output/OutputTest.php b/src/Symfony/Component/Console/Tests/Output/OutputTest.php
index 8a1e284..aa834c2 100644
--- a/src/Symfony/Component/Console/Tests/Output/OutputTest.php
+++ b/src/Symfony/Component/Console/Tests/Output/OutputTest.php
@@ -94,9 +94,7 @@ class OutputTest extends TestCase
         yield 'bar';
     }
 
-    /**
-     * @dataProvider provideWriteArguments
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideWriteArguments')]
     public function testWriteRawMessage($message, $type, $expectedOutput)
     {
         $output = new TestOutput();
@@ -143,9 +141,7 @@ class OutputTest extends TestCase
         $this->assertEquals("<bar>foo</bar>\n", $output->output, '->writeln() do nothing when a style does not exist');
     }
 
-    /**
-     * @dataProvider verbosityProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('verbosityProvider')]
     public function testWriteWithVerbosityOption($verbosity, $expected, $msg)
     {
         $output = new TestOutput();
diff --git a/src/Symfony/Component/Console/Tests/Question/ChoiceQuestionTest.php b/src/Symfony/Component/Console/Tests/Question/ChoiceQuestionTest.php
index 564dee7..53cdf8e 100644
--- a/src/Symfony/Component/Console/Tests/Question/ChoiceQuestionTest.php
+++ b/src/Symfony/Component/Console/Tests/Question/ChoiceQuestionTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Console\Question\ChoiceQuestion;
 
 class ChoiceQuestionTest extends TestCase
 {
-    /**
-     * @dataProvider selectUseCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('selectUseCases')]
     public function testSelectUseCases($multiSelect, $answers, $expected, $message, $default = null)
     {
         $question = new ChoiceQuestion('A question', [
@@ -104,9 +102,7 @@ class ChoiceQuestionTest extends TestCase
         $this->assertSame(['First response ', ' Second response'], $question->getValidator()('First response , Second response'));
     }
 
-    /**
-     * @dataProvider selectAssociativeChoicesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('selectAssociativeChoicesProvider')]
     public function testSelectAssociativeChoices($providedAnswer, $expectedValue)
     {
         $question = new ChoiceQuestion('A question', [
diff --git a/src/Symfony/Component/Console/Tests/Question/ConfirmationQuestionTest.php b/src/Symfony/Component/Console/Tests/Question/ConfirmationQuestionTest.php
index bd11047..036edf5 100644
--- a/src/Symfony/Component/Console/Tests/Question/ConfirmationQuestionTest.php
+++ b/src/Symfony/Component/Console/Tests/Question/ConfirmationQuestionTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Console\Question\ConfirmationQuestion;
 
 class ConfirmationQuestionTest extends TestCase
 {
-    /**
-     * @dataProvider normalizerUsecases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('normalizerUsecases')]
     public function testDefaultRegexUsecases($default, $answers, $expected, $message)
     {
         $sut = new ConfirmationQuestion('A question', $default);
diff --git a/src/Symfony/Component/Console/Tests/Question/QuestionTest.php b/src/Symfony/Component/Console/Tests/Question/QuestionTest.php
index 0bc6f75..8851c7d 100644
--- a/src/Symfony/Component/Console/Tests/Question/QuestionTest.php
+++ b/src/Symfony/Component/Console/Tests/Question/QuestionTest.php
@@ -45,9 +45,7 @@ class QuestionTest extends TestCase
         self::assertNull($this->question->getDefault());
     }
 
-    /**
-     * @dataProvider providerTrueFalse
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerTrueFalse')]
     public function testIsSetHidden(bool $hidden)
     {
         $this->question->setHidden($hidden);
@@ -90,9 +88,7 @@ class QuestionTest extends TestCase
         $this->assertNull($exception);
     }
 
-    /**
-     * @dataProvider providerTrueFalse
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerTrueFalse')]
     public function testIsSetHiddenFallback(bool $hidden)
     {
         $this->question->setHiddenFallback($hidden);
@@ -123,9 +119,7 @@ class QuestionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider providerGetSetAutocompleterValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerGetSetAutocompleterValues')]
     public function testGetSetAutocompleterValues($values, $expectValues)
     {
         $this->question->setAutocompleterValues($values);
@@ -144,9 +138,7 @@ class QuestionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider providerSetAutocompleterValuesInvalid
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerSetAutocompleterValuesInvalid')]
     public function testSetAutocompleterValuesInvalid($values)
     {
         self::expectException(\TypeError::class);
@@ -237,9 +229,7 @@ class QuestionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider providerGetSetValidator
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerGetSetValidator')]
     public function testGetSetValidator($callback)
     {
         $this->question->setValidator($callback);
@@ -256,9 +246,7 @@ class QuestionTest extends TestCase
         return [[1], [5], [null]];
     }
 
-    /**
-     * @dataProvider providerGetSetMaxAttempts
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerGetSetMaxAttempts')]
     public function testGetSetMaxAttempts($attempts)
     {
         $this->question->setMaxAttempts($attempts);
@@ -270,9 +258,7 @@ class QuestionTest extends TestCase
         return [[0], [-1]];
     }
 
-    /**
-     * @dataProvider providerSetMaxAttemptsInvalid
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerSetMaxAttemptsInvalid')]
     public function testSetMaxAttemptsInvalid($attempts)
     {
         self::expectException(\InvalidArgumentException::class);
@@ -298,9 +284,7 @@ class QuestionTest extends TestCase
         self::assertNull($this->question->getNormalizer());
     }
 
-    /**
-     * @dataProvider providerTrueFalse
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerTrueFalse')]
     public function testSetMultiline(bool $multiline)
     {
         self::assertSame($this->question, $this->question->setMultiline($multiline));
diff --git a/src/Symfony/Component/Console/Tests/SignalRegistry/SignalMapTest.php b/src/Symfony/Component/Console/Tests/SignalRegistry/SignalMapTest.php
index 3a0c49b..630e992 100644
--- a/src/Symfony/Component/Console/Tests/SignalRegistry/SignalMapTest.php
+++ b/src/Symfony/Component/Console/Tests/SignalRegistry/SignalMapTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Console\SignalRegistry\SignalMap;
 
 class SignalMapTest extends TestCase
 {
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testSignalExists()
     {
         $this->assertSame('SIGINT', SignalMap::getSignalName(\SIGINT));
diff --git a/src/Symfony/Component/Console/Tests/SignalRegistry/SignalRegistryTest.php b/src/Symfony/Component/Console/Tests/SignalRegistry/SignalRegistryTest.php
index f997f7c..f2b754b 100644
--- a/src/Symfony/Component/Console/Tests/SignalRegistry/SignalRegistryTest.php
+++ b/src/Symfony/Component/Console/Tests/SignalRegistry/SignalRegistryTest.php
@@ -14,9 +14,7 @@ namespace Symfony\Component\Console\Tests\SignalRegistry;
 use PHPUnit\Framework\TestCase;
 use Symfony\Component\Console\SignalRegistry\SignalRegistry;
 
-/**
- * @requires extension pcntl
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
 class SignalRegistryTest extends TestCase
 {
     protected function tearDown(): void
diff --git a/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php b/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php
index 0b40c7c..3095ef8 100644
--- a/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php
+++ b/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php
@@ -45,9 +45,7 @@ class SymfonyStyleTest extends TestCase
         putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
     }
 
-    /**
-     * @dataProvider inputCommandToOutputFilesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('inputCommandToOutputFilesProvider')]
     public function testOutputs($inputCommandFilepath, $outputFilepath)
     {
         $code = require $inputCommandFilepath;
@@ -56,9 +54,7 @@ class SymfonyStyleTest extends TestCase
         $this->assertStringEqualsFile($outputFilepath, $this->tester->getDisplay(true));
     }
 
-    /**
-     * @dataProvider inputInteractiveCommandToOutputFilesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('inputInteractiveCommandToOutputFilesProvider')]
     public function testInteractiveOutputs($inputCommandFilepath, $outputFilepath)
     {
         $code = require $inputCommandFilepath;
diff --git a/src/Symfony/Component/Console/Tests/TerminalTest.php b/src/Symfony/Component/Console/Tests/TerminalTest.php
index d43469d..21bb512 100644
--- a/src/Symfony/Component/Console/Tests/TerminalTest.php
+++ b/src/Symfony/Component/Console/Tests/TerminalTest.php
@@ -95,9 +95,7 @@ class TerminalTest extends TestCase
         $this->assertSame((int) $matches[1], $terminal->getWidth());
     }
 
-    /**
-     * @dataProvider provideTerminalColorEnv
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTerminalColorEnv')]
     public function testGetColorMode(?string $testColorTerm, ?string $testTerm, AnsiColorMode $expected)
     {
         $oriColorTerm = getenv('COLORTERM');
diff --git a/src/Symfony/Component/Console/Tests/Tester/Constraint/CommandIsSuccessfulTest.php b/src/Symfony/Component/Console/Tests/Tester/Constraint/CommandIsSuccessfulTest.php
index 31c065e..1fbf4ce 100644
--- a/src/Symfony/Component/Console/Tests/Tester/Constraint/CommandIsSuccessfulTest.php
+++ b/src/Symfony/Component/Console/Tests/Tester/Constraint/CommandIsSuccessfulTest.php
@@ -28,9 +28,7 @@ final class CommandIsSuccessfulTest extends TestCase
         $this->assertFalse($constraint->evaluate(Command::INVALID, '', true));
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testUnsuccessfulCommand(string $expectedException, int $exitCode)
     {
         $constraint = new CommandIsSuccessful();
diff --git a/src/Symfony/Component/CssSelector/Tests/CssSelectorConverterTest.php b/src/Symfony/Component/CssSelector/Tests/CssSelectorConverterTest.php
index c197032..2adc089 100644
--- a/src/Symfony/Component/CssSelector/Tests/CssSelectorConverterTest.php
+++ b/src/Symfony/Component/CssSelector/Tests/CssSelectorConverterTest.php
@@ -51,7 +51,7 @@ class CssSelectorConverterTest extends TestCase
         (new CssSelectorConverter())->toXPath('h1:');
     }
 
-    /** @dataProvider getCssToXPathWithoutPrefixTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getCssToXPathWithoutPrefixTestData')]
     public function testCssToXPathWithoutPrefix($css, $xpath)
     {
         $converter = new CssSelectorConverter();
diff --git a/src/Symfony/Component/CssSelector/Tests/Node/AbstractNodeTestCase.php b/src/Symfony/Component/CssSelector/Tests/Node/AbstractNodeTestCase.php
index 521e6d8..03aca9f 100644
--- a/src/Symfony/Component/CssSelector/Tests/Node/AbstractNodeTestCase.php
+++ b/src/Symfony/Component/CssSelector/Tests/Node/AbstractNodeTestCase.php
@@ -16,13 +16,13 @@ use Symfony\Component\CssSelector\Node\NodeInterface;
 
 abstract class AbstractNodeTestCase extends TestCase
 {
-    /** @dataProvider getToStringConversionTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getToStringConversionTestData')]
     public function testToStringConversion(NodeInterface $node, $representation)
     {
         $this->assertEquals($representation, (string) $node);
     }
 
-    /** @dataProvider getSpecificityValueTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getSpecificityValueTestData')]
     public function testSpecificityValue(NodeInterface $node, $value)
     {
         $this->assertEquals($value, $node->getSpecificity()->getValue());
diff --git a/src/Symfony/Component/CssSelector/Tests/Node/SpecificityTest.php b/src/Symfony/Component/CssSelector/Tests/Node/SpecificityTest.php
index 8802e0c..9ccc81d 100644
--- a/src/Symfony/Component/CssSelector/Tests/Node/SpecificityTest.php
+++ b/src/Symfony/Component/CssSelector/Tests/Node/SpecificityTest.php
@@ -16,13 +16,13 @@ use Symfony\Component\CssSelector\Node\Specificity;
 
 class SpecificityTest extends TestCase
 {
-    /** @dataProvider getValueTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValueTestData')]
     public function testValue(Specificity $specificity, $value)
     {
         $this->assertEquals($value, $specificity->getValue());
     }
 
-    /** @dataProvider getValueTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValueTestData')]
     public function testPlusValue(Specificity $specificity, $value)
     {
         $this->assertEquals($value + 123, $specificity->plus(new Specificity(1, 2, 3))->getValue());
@@ -39,7 +39,7 @@ class SpecificityTest extends TestCase
         ];
     }
 
-    /** @dataProvider getCompareTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getCompareTestData')]
     public function testCompareTo(Specificity $a, Specificity $b, $result)
     {
         $this->assertEquals($result, $a->compareTo($b));
diff --git a/src/Symfony/Component/CssSelector/Tests/Parser/Handler/AbstractHandlerTestCase.php b/src/Symfony/Component/CssSelector/Tests/Parser/Handler/AbstractHandlerTestCase.php
index 30ce10e..8b05e4d 100644
--- a/src/Symfony/Component/CssSelector/Tests/Parser/Handler/AbstractHandlerTestCase.php
+++ b/src/Symfony/Component/CssSelector/Tests/Parser/Handler/AbstractHandlerTestCase.php
@@ -21,7 +21,7 @@ use Symfony\Component\CssSelector\Parser\TokenStream;
  */
 abstract class AbstractHandlerTestCase extends TestCase
 {
-    /** @dataProvider getHandleValueTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getHandleValueTestData')]
     public function testHandleValue($value, Token $expectedToken, $remainingContent)
     {
         $reader = new Reader($value);
@@ -32,7 +32,7 @@ abstract class AbstractHandlerTestCase extends TestCase
         $this->assertRemainingContent($reader, $remainingContent);
     }
 
-    /** @dataProvider getDontHandleValueTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDontHandleValueTestData')]
     public function testDontHandleValue($value)
     {
         $reader = new Reader($value);
diff --git a/src/Symfony/Component/CssSelector/Tests/Parser/Handler/CommentHandlerTest.php b/src/Symfony/Component/CssSelector/Tests/Parser/Handler/CommentHandlerTest.php
index c3be7f4..472b8be 100644
--- a/src/Symfony/Component/CssSelector/Tests/Parser/Handler/CommentHandlerTest.php
+++ b/src/Symfony/Component/CssSelector/Tests/Parser/Handler/CommentHandlerTest.php
@@ -18,7 +18,7 @@ use Symfony\Component\CssSelector\Parser\TokenStream;
 
 class CommentHandlerTest extends AbstractHandlerTestCase
 {
-    /** @dataProvider getHandleValueTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getHandleValueTestData')]
     public function testHandleValue($value, Token $unusedArgument, $remainingContent)
     {
         $reader = new Reader($value);
diff --git a/src/Symfony/Component/CssSelector/Tests/Parser/ParserTest.php b/src/Symfony/Component/CssSelector/Tests/Parser/ParserTest.php
index e34f2dc..9a01424 100644
--- a/src/Symfony/Component/CssSelector/Tests/Parser/ParserTest.php
+++ b/src/Symfony/Component/CssSelector/Tests/Parser/ParserTest.php
@@ -20,7 +20,7 @@ use Symfony\Component\CssSelector\Parser\Token;
 
 class ParserTest extends TestCase
 {
-    /** @dataProvider getParserTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getParserTestData')]
     public function testParser($source, $representation)
     {
         $parser = new Parser();
@@ -28,7 +28,7 @@ class ParserTest extends TestCase
         $this->assertEquals($representation, array_map(fn (SelectorNode $node) => (string) $node->getTree(), $parser->parse($source)));
     }
 
-    /** @dataProvider getParserExceptionTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getParserExceptionTestData')]
     public function testParserException($source, $message)
     {
         $parser = new Parser();
@@ -41,7 +41,7 @@ class ParserTest extends TestCase
         }
     }
 
-    /** @dataProvider getPseudoElementsTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPseudoElementsTestData')]
     public function testPseudoElements($source, $element, $pseudo)
     {
         $parser = new Parser();
@@ -54,7 +54,7 @@ class ParserTest extends TestCase
         $this->assertEquals($pseudo, (string) $selector->getPseudoElement());
     }
 
-    /** @dataProvider getSpecificityTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getSpecificityTestData')]
     public function testSpecificity($source, $value)
     {
         $parser = new Parser();
@@ -66,7 +66,7 @@ class ParserTest extends TestCase
         $this->assertEquals($value, $selector->getSpecificity()->getValue());
     }
 
-    /** @dataProvider getParseSeriesTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getParseSeriesTestData')]
     public function testParseSeries($series, $a, $b)
     {
         $parser = new Parser();
@@ -78,7 +78,7 @@ class ParserTest extends TestCase
         $this->assertEquals([$a, $b], Parser::parseSeries($function->getArguments()));
     }
 
-    /** @dataProvider getParseSeriesExceptionTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getParseSeriesExceptionTestData')]
     public function testParseSeriesException($series)
     {
         $parser = new Parser();
diff --git a/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ClassParserTest.php b/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ClassParserTest.php
index ded92ea..7a22267 100644
--- a/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ClassParserTest.php
+++ b/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ClassParserTest.php
@@ -20,7 +20,7 @@ use Symfony\Component\CssSelector\Parser\Shortcut\ClassParser;
  */
 class ClassParserTest extends TestCase
 {
-    /** @dataProvider getParseTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getParseTestData')]
     public function testParse($source, $representation)
     {
         $parser = new ClassParser();
diff --git a/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ElementParserTest.php b/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ElementParserTest.php
index 4c10029..b8e4055 100644
--- a/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ElementParserTest.php
+++ b/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ElementParserTest.php
@@ -20,7 +20,7 @@ use Symfony\Component\CssSelector\Parser\Shortcut\ElementParser;
  */
 class ElementParserTest extends TestCase
 {
-    /** @dataProvider getParseTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getParseTestData')]
     public function testParse($source, $representation)
     {
         $parser = new ElementParser();
diff --git a/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/HashParserTest.php b/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/HashParserTest.php
index c8bfdef..76a31be 100644
--- a/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/HashParserTest.php
+++ b/src/Symfony/Component/CssSelector/Tests/Parser/Shortcut/HashParserTest.php
@@ -20,7 +20,7 @@ use Symfony\Component\CssSelector\Parser\Shortcut\HashParser;
  */
 class HashParserTest extends TestCase
 {
-    /** @dataProvider getParseTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getParseTestData')]
     public function testParse($source, $representation)
     {
         $parser = new HashParser();
diff --git a/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php b/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php
index c161b80..4c0a367 100644
--- a/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php
+++ b/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php
@@ -22,13 +22,13 @@ use Symfony\Component\CssSelector\XPath\XPathExpr;
 
 class TranslatorTest extends TestCase
 {
-    /** @dataProvider getXpathLiteralTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getXpathLiteralTestData')]
     public function testXpathLiteral($value, $literal)
     {
         $this->assertEquals($literal, Translator::getXpathLiteral($value));
     }
 
-    /** @dataProvider getCssToXPathTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getCssToXPathTestData')]
     public function testCssToXPath($css, $xpath)
     {
         $translator = new Translator();
@@ -103,7 +103,7 @@ class TranslatorTest extends TestCase
         $translator->addAttributeMatching($xpath, '', '', '');
     }
 
-    /** @dataProvider getXmlLangTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getXmlLangTestData')]
     public function testXmlLang($css, array $elementsId)
     {
         $translator = new Translator();
@@ -115,7 +115,7 @@ class TranslatorTest extends TestCase
         }
     }
 
-    /** @dataProvider getHtmlIdsTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getHtmlIdsTestData')]
     public function testHtmlIds($css, array $elementsId)
     {
         $translator = new Translator();
@@ -136,7 +136,7 @@ class TranslatorTest extends TestCase
         libxml_use_internal_errors($internalErrors);
     }
 
-    /** @dataProvider getHtmlShakespearTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getHtmlShakespearTestData')]
     public function testHtmlShakespear($css, $count)
     {
         $translator = new Translator();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/AliasTest.php b/src/Symfony/Component/DependencyInjection/Tests/AliasTest.php
index b1c8a4d..c386475 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/AliasTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/AliasTest.php
@@ -69,9 +69,7 @@ class AliasTest extends TestCase
         $this->assertEquals('1.1', $deprecation['version']);
     }
 
-    /**
-     * @dataProvider invalidDeprecationMessageProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidDeprecationMessageProvider')]
     public function testCannotDeprecateWithAnInvalidTemplate($message)
     {
         $def = new Alias('foo');
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Argument/TaggedIteratorArgumentTest.php b/src/Symfony/Component/DependencyInjection/Tests/Argument/TaggedIteratorArgumentTest.php
index dcc38dd..7d53d05 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Argument/TaggedIteratorArgumentTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Argument/TaggedIteratorArgumentTest.php
@@ -57,9 +57,7 @@ class TaggedIteratorArgumentTest extends TestCase
         $this->assertSame('getDefaultQuxPriority', $taggedIteratorArgument->getDefaultPriorityMethod());
     }
 
-    /**
-     * @dataProvider defaultIndexMethodProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('defaultIndexMethodProvider')]
     public function testDefaultIndexMethod(?string $indexAttribute, ?string $defaultIndexMethod, ?string $expectedDefaultIndexMethod)
     {
         $taggedIteratorArgument = new TaggedIteratorArgument('foo', $indexAttribute, $defaultIndexMethod);
@@ -106,9 +104,7 @@ class TaggedIteratorArgumentTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider defaultPriorityMethodProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('defaultPriorityMethodProvider')]
     public function testDefaultPriorityIndexMethod(?string $indexAttribute, ?string $defaultPriorityMethod, ?string $expectedDefaultPriorityMethod)
     {
         $taggedIteratorArgument = new TaggedIteratorArgument('foo', $indexAttribute, null, false, $defaultPriorityMethod);
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Attribute/AutowireTest.php b/src/Symfony/Component/DependencyInjection/Tests/Attribute/AutowireTest.php
index aac42b0..f30d22d 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Attribute/AutowireTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Attribute/AutowireTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\ExpressionLanguage\Expression;
 
 class AutowireTest extends TestCase
 {
-    /**
-     * @dataProvider provideMultipleParameters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMultipleParameters')]
     public function testCanOnlySetOneParameter(array $parameters)
     {
         $this->expectException(LogicException::class);
diff --git a/src/Symfony/Component/DependencyInjection/Tests/ChildDefinitionTest.php b/src/Symfony/Component/DependencyInjection/Tests/ChildDefinitionTest.php
index 39c96f8..4d872a1 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/ChildDefinitionTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/ChildDefinitionTest.php
@@ -24,9 +24,7 @@ class ChildDefinitionTest extends TestCase
         $this->assertSame([], $def->getChanges());
     }
 
-    /**
-     * @dataProvider getPropertyTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPropertyTests')]
     public function testSetProperty($property, $changeKey)
     {
         $def = new ChildDefinition('foo');
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/AliasDeprecatedPublicServicesPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/AliasDeprecatedPublicServicesPassTest.php
index df8f939..0545b83 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/AliasDeprecatedPublicServicesPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/AliasDeprecatedPublicServicesPassTest.php
@@ -42,9 +42,7 @@ final class AliasDeprecatedPublicServicesPassTest extends TestCase
         ], $alias->getDeprecation('foo'));
     }
 
-    /**
-     * @dataProvider processWithMissingAttributeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('processWithMissingAttributeProvider')]
     public function testProcessWithMissingAttribute(string $attribute, array $attributes)
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php
index de8fea8..9fca960 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php
@@ -303,9 +303,7 @@ class AutowirePassTest extends TestCase
         $pass->process($container);
     }
 
-    /**
-     * @requires PHP 8.2
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.2')]
     public function testTypeNotGuessableCompositeType()
     {
         $container = new ContainerBuilder();
@@ -406,9 +404,7 @@ class AutowirePassTest extends TestCase
         $this->assertEquals(Foo::class, $container->getDefinition('bar')->getArgument(0));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testOptionalParameter()
     {
         $container = new ContainerBuilder();
@@ -440,9 +436,7 @@ class AutowirePassTest extends TestCase
         $this->assertNull($definition->getArgument(0));
     }
 
-    /**
-     * @requires PHP 8.2
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.2')]
     public function testParameterWithNullableIntersectionIsSkipped()
     {
         $container = new ContainerBuilder();
@@ -705,9 +699,7 @@ class AutowirePassTest extends TestCase
         );
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testSetterInjectionAnnotation()
     {
         $this->expectDeprecation('Since symfony/dependency-injection 6.3: Relying on the "@required" annotation on method "Symfony\Component\DependencyInjection\Tests\Compiler\SetterInjectionAnnotation::setFoo()" is deprecated, use the "Symfony\Contracts\Service\Attribute\Required" attribute instead.');
@@ -838,9 +830,7 @@ class AutowirePassTest extends TestCase
         $this->assertTrue($container->hasDefinition('bar'));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testSetterInjectionFromAnnotationCollisionThrowsException()
     {
         $this->expectDeprecation('Since symfony/dependency-injection 6.3: Relying on the "@required" annotation on method "Symfony\Component\DependencyInjection\Tests\Compiler\SetterInjectionCollisionAnnotation::setMultipleInstancesForOneArg()" is deprecated, use the "Symfony\Contracts\Service\Attribute\Required" attribute instead.');
@@ -954,9 +944,7 @@ class AutowirePassTest extends TestCase
         $this->assertEquals([new TypedReference(Foo::class, Foo::class)], $definition->getArguments());
     }
 
-    /**
-     * @dataProvider provideNotWireableCalls
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNotWireableCalls')]
     public function testNotWireableCalls($method, $expectedMsg)
     {
         $container = new ContainerBuilder();
@@ -1172,9 +1160,7 @@ class AutowirePassTest extends TestCase
         $this->assertSame(['Cannot autowire service "some_locator": it has type "Symfony\Component\DependencyInjection\Tests\Compiler\MissingClass" but this class was not found.'], $container->getDefinition('.errored.some_locator.'.MissingClass::class)->getErrors());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testNamedArgumentAliasResolveCollisionsAnnotation()
     {
         $this->expectDeprecation('Since symfony/dependency-injection 6.3: Relying on the "@required" annotation on method "Symfony\Component\DependencyInjection\Tests\Compiler\SetterInjectionCollisionAnnotation::setMultipleInstancesForOneArg()" is deprecated, use the "Symfony\Contracts\Service\Attribute\Required" attribute instead.');
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowireRequiredMethodsPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowireRequiredMethodsPassTest.php
index 73f9f62..8017a6b 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowireRequiredMethodsPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowireRequiredMethodsPassTest.php
@@ -25,9 +25,7 @@ class AutowireRequiredMethodsPassTest extends TestCase
 {
     use ExpectDeprecationTrait;
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testSetterInjectionAnnotation()
     {
         $this->expectDeprecation('Since symfony/dependency-injection 6.3: Relying on the "@required" annotation on method "Symfony\Component\DependencyInjection\Tests\Compiler\SetterInjectionAnnotation::setFoo()" is deprecated, use the "Symfony\Contracts\Service\Attribute\Required" attribute instead.');
@@ -81,10 +79,8 @@ class AutowireRequiredMethodsPassTest extends TestCase
         $this->assertSame([['setFoo', []]], $methodCalls);
     }
 
-    /**
-     * @group legacy
-     */
     // @deprecated since Symfony 6.3, to be removed in 7.0
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExplicitMethodInjectionAnnotation()
     {
         $this->expectDeprecation('Since symfony/dependency-injection 6.3: Relying on the "@required" annotation on method "Symfony\Component\DependencyInjection\Tests\Compiler\SetterInjectionAnnotation::setFoo()" is deprecated, use the "Symfony\Contracts\Service\Attribute\Required" attribute instead.');
@@ -140,9 +136,7 @@ class AutowireRequiredMethodsPassTest extends TestCase
         $this->assertEquals([], $methodCalls[0][1]);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testWitherInjection()
     {
         $this->expectDeprecation('Since symfony/dependency-injection 6.3: Relying on the "@required" annotation on method "Symfony\Component\DependencyInjection\Tests\Compiler\WitherAnnotation::withFoo1()" is deprecated, use the "Symfony\Contracts\Service\Attribute\Required" attribute instead.');
@@ -168,9 +162,7 @@ class AutowireRequiredMethodsPassTest extends TestCase
         $this->assertSame($expected, $methodCalls);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testWitherAnnotationWithStaticReturnTypeInjection()
     {
         $this->expectDeprecation('Since symfony/dependency-injection 6.3: Relying on the "@required" annotation on method "Symfony\Component\DependencyInjection\Tests\Fixtures\WitherAnnotationStaticReturnType::withFoo()" is deprecated, use the "Symfony\Contracts\Service\Attribute\Required" attribute instead.');
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowireRequiredPropertiesPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowireRequiredPropertiesPassTest.php
index 62e12f9..d50682a 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowireRequiredPropertiesPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowireRequiredPropertiesPassTest.php
@@ -24,9 +24,7 @@ class AutowireRequiredPropertiesPassTest extends TestCase
 {
     use ExpectDeprecationTrait;
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInjection()
     {
         $this->expectDeprecation('Since symfony/dependency-injection 6.3: Using the "@required" annotation on property "Symfony\Component\DependencyInjection\Tests\Compiler\PropertiesInjection::$plop" is deprecated, use the "Symfony\Contracts\Service\Attribute\Required" attribute instead.');
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckArgumentsValidityPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckArgumentsValidityPassTest.php
index 6d0a2ed..700fad5 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckArgumentsValidityPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckArgumentsValidityPassTest.php
@@ -41,9 +41,7 @@ class CheckArgumentsValidityPassTest extends TestCase
         ], $container->getDefinition('foo')->getMethodCalls());
     }
 
-    /**
-     * @dataProvider definitionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('definitionProvider')]
     public function testException(array $arguments, array $methodCalls)
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckCircularReferencesPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckCircularReferencesPassTest.php
index 20a0a7b..7765fe4 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckCircularReferencesPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckCircularReferencesPassTest.php
@@ -106,6 +106,7 @@ class CheckCircularReferencesPassTest extends TestCase
         $this->process($container);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessIgnoresMethodCalls()
     {
         $container = new ContainerBuilder();
@@ -117,6 +118,7 @@ class CheckCircularReferencesPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessIgnoresLazyServices()
     {
         $container = new ContainerBuilder();
@@ -144,6 +146,7 @@ class CheckCircularReferencesPassTest extends TestCase
         $this->process($container);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessIgnoresIteratorArguments()
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php
index df7dd03..de10802 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php
@@ -39,6 +39,7 @@ class CheckDefinitionValidityPassTest extends TestCase
         $this->process($container);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessAcceptsServiceLocatorWithoutClass()
     {
         $container = new ContainerBuilder();
@@ -62,6 +63,7 @@ class CheckDefinitionValidityPassTest extends TestCase
         $this->process($container);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcess()
     {
         $container = new ContainerBuilder();
@@ -74,6 +76,7 @@ class CheckDefinitionValidityPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testValidTags()
     {
         $container = new ContainerBuilder();
@@ -89,9 +92,7 @@ class CheckDefinitionValidityPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
-    /**
-     * @dataProvider provideInvalidTags
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidTags')]
     public function testInvalidTags(string $name, array $attributes, string $message)
     {
         $this->expectExceptionMessage($message);
@@ -145,6 +146,7 @@ class CheckDefinitionValidityPassTest extends TestCase
         $this->process($container);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDynamicPrivateName()
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php
index 04a121d..f15448e 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php
@@ -24,6 +24,7 @@ use Symfony\Component\DependencyInjection\Reference;
 
 class CheckExceptionOnInvalidReferenceBehaviorPassTest extends TestCase
 {
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcess()
     {
         $container = new ContainerBuilder();
@@ -70,6 +71,7 @@ class CheckExceptionOnInvalidReferenceBehaviorPassTest extends TestCase
         $this->process($container);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessDefinitionWithBindings()
     {
         $container = new ContainerBuilder();
@@ -84,10 +86,8 @@ class CheckExceptionOnInvalidReferenceBehaviorPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testWithErroredServiceLocator(bool $inline)
     {
         $container = new ContainerBuilder();
@@ -105,10 +105,8 @@ class CheckExceptionOnInvalidReferenceBehaviorPassTest extends TestCase
         $this->process($container);
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testWithErroredHiddenService(bool $inline)
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckReferenceValidityPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckReferenceValidityPassTest.php
index 1589e3d..d5d637f 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckReferenceValidityPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckReferenceValidityPassTest.php
@@ -30,6 +30,7 @@ class CheckReferenceValidityPassTest extends TestCase
         $this->process($container);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcess()
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckTypeDeclarationsPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckTypeDeclarationsPassTest.php
index 52611f8..2648d6d 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckTypeDeclarationsPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckTypeDeclarationsPassTest.php
@@ -97,6 +97,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         (new CheckTypeDeclarationsPass(true))->process($container);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessSuccessWhenPassingTooManyArgumentInConstructor()
     {
         $container = new ContainerBuilder();
@@ -392,6 +393,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         (new CheckTypeDeclarationsPass(true))->process($container);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessSuccessWhenPassingAnIteratorArgumentToIterable()
     {
         $container = new ContainerBuilder();
@@ -404,6 +406,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessSuccessWhenPassingDefinitionForObjectType()
     {
         $container = new ContainerBuilder();
@@ -474,6 +477,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         (new CheckTypeDeclarationsPass(true))->process($container);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessFactorySuccessOnValidTypes()
     {
         $container = new ContainerBuilder();
@@ -505,6 +509,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->assertInstanceOf(\DateTimeImmutable::class, $container->get('bar'));
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessDoesNotLoadCodeByDefault()
     {
         $container = new ContainerBuilder();
@@ -523,6 +528,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessFactoryDoesNotLoadCodeByDefault()
     {
         $container = new ContainerBuilder();
@@ -539,6 +545,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessFactoryForTypeSameAsClass()
     {
         $container = new ContainerBuilder();
@@ -557,6 +564,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessFactoryForIterableTypeAndArrayClass()
     {
         $container = new ContainerBuilder();
@@ -575,6 +583,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessPassingBuiltinTypeDoesNotLoadCodeByDefault()
     {
         $container = new ContainerBuilder();
@@ -613,6 +622,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         (new CheckTypeDeclarationsPass(true))->process($container);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessResolveExpressions()
     {
         $container = new ContainerBuilder();
@@ -627,6 +637,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessSuccessWhenExpressionReturnsObject()
     {
         $container = new ContainerBuilder();
@@ -675,6 +686,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         (new CheckTypeDeclarationsPass(true))->process($container);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessHandleExistingEnvPlaceholder()
     {
         putenv('ARRAY={"foo":"bar"}');
@@ -695,6 +707,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         putenv('ARRAY=');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessHandleNotFoundEnvPlaceholder()
     {
         $container = new ContainerBuilder(new EnvPlaceholderParameterBag([
@@ -711,6 +724,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessSkipSkippedIds()
     {
         $container = new ContainerBuilder();
@@ -723,6 +737,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessSkipsDeprecatedDefinitions()
     {
         $container = new ContainerBuilder();
@@ -736,6 +751,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessHandleClosureForCallable()
     {
         $closureDefinition = new Definition(\Closure::class);
@@ -752,6 +768,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessSuccessWhenPassingServiceClosureArgumentToCallable()
     {
         $container = new ContainerBuilder();
@@ -764,6 +781,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessSuccessWhenPassingServiceClosureArgumentToClosure()
     {
         $container = new ContainerBuilder();
@@ -776,6 +794,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testExpressionLanguageWithSyntheticService()
     {
         $container = new ContainerBuilder();
@@ -792,6 +811,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessResolveParameters()
     {
         putenv('ARRAY={"foo":"bar"}');
@@ -818,6 +838,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         putenv('ARRAY=');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testUnionTypePassesWithReference()
     {
         $container = new ContainerBuilder();
@@ -831,6 +852,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testUnionTypePassesWithBuiltin()
     {
         $container = new ContainerBuilder();
@@ -843,6 +865,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testUnionTypePassesWithFalse()
     {
         $container = new ContainerBuilder();
@@ -856,9 +879,8 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
-    /**
-     * @requires PHP 8.2
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.2')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testUnionTypePassesWithTrue()
     {
         $container = new ContainerBuilder();
@@ -933,6 +955,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         (new CheckTypeDeclarationsPass(true))->process($container);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testReferencePassesMixed()
     {
         $container = new ContainerBuilder();
@@ -947,6 +970,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testIntersectionTypePassesWithReference()
     {
         $container = new ContainerBuilder();
@@ -974,6 +998,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         (new CheckTypeDeclarationsPass(true))->process($container);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCallableClass()
     {
         $container = new ContainerBuilder();
@@ -985,6 +1010,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testStaticCallableClass()
     {
         $container = new ContainerBuilder();
@@ -996,6 +1022,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testIgnoreDefinitionFactoryArgument()
     {
         $container = new ContainerBuilder();
@@ -1010,6 +1037,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testErroredDefinitionsAreNotChecked()
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php
index b74704d..b406141 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php
@@ -245,9 +245,7 @@ class IntegrationTest extends TestCase
         $this->assertSame($container->get('service'), $container->get('decorator'));
     }
 
-    /**
-     * @dataProvider getYamlCompileTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getYamlCompileTests')]
     public function testYamlContainerCompiles($directory, $actualServiceId, $expectedServiceId, ?ContainerBuilder $mainContainer = null)
     {
         // allow a container to be passed in, which might have autoconfigure settings
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php
index 088991d..1235493 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php
@@ -132,6 +132,7 @@ class MergeExtensionConfigurationPassTest extends TestCase
         $this->assertSame(['FOO'], array_keys($container->getParameterBag()->getEnvPlaceholders()));
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testReuseEnvPlaceholderGeneratedByPreviousExtension()
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php
index 204bf65..71153bb 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/PriorityTaggedServiceTraitTest.php
@@ -171,9 +171,7 @@ class PriorityTaggedServiceTraitTest extends TestCase
         $this->assertEquals($expected, $priorityTaggedServiceTraitImplementation->test($tag, $container));
     }
 
-    /**
-     * @dataProvider provideInvalidDefaultMethods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidDefaultMethods')]
     public function testTheIndexedTagsByDefaultIndexMethodFailure(string $defaultIndexMethod, ?string $indexAttribute, string $expectedExceptionMessage)
     {
         $this->expectException(InvalidArgumentException::class);
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterAutoconfigureAttributesPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterAutoconfigureAttributesPassTest.php
index 7328aa1..e3f4144 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterAutoconfigureAttributesPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterAutoconfigureAttributesPassTest.php
@@ -175,6 +175,7 @@ class RegisterAutoconfigureAttributesPassTest extends TestCase
         $this->assertEquals([AutoconfigureRepeatedProperties::class => $expected], $container->getAutoconfiguredInstanceof());
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testMissingParent()
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveBindingsPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveBindingsPassTest.php
index d1ce565..189631c 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveBindingsPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveBindingsPassTest.php
@@ -147,9 +147,7 @@ class ResolveBindingsPassTest extends TestCase
         $this->assertEquals([new Reference('bar')], $container->getDefinition('def3')->getArguments());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testScalarSetterAnnotation()
     {
         $this->expectDeprecation('Since symfony/dependency-injection 6.3: Relying on the "@required" annotation on method "Symfony\Component\DependencyInjection\Tests\Compiler\ScalarSetterAnnotation::setDefaultLocale()" is deprecated, use the "Symfony\Contracts\Service\Attribute\Required" attribute instead.');
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveClassPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveClassPassTest.php
index 914115f..3895733 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveClassPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveClassPassTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass;
 
 class ResolveClassPassTest extends TestCase
 {
-    /**
-     * @dataProvider provideValidClassId
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidClassId')]
     public function testResolveClassFromId($serviceId)
     {
         $container = new ContainerBuilder();
@@ -39,9 +37,7 @@ class ResolveClassPassTest extends TestCase
         yield [CaseSensitiveClass::class];
     }
 
-    /**
-     * @dataProvider provideInvalidClassId
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidClassId')]
     public function testWontResolveClassFromId($serviceId)
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveFactoryClassPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveFactoryClassPassTest.php
index 8d93eeb..75d780e 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveFactoryClassPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveFactoryClassPassTest.php
@@ -55,9 +55,7 @@ class ResolveFactoryClassPassTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideFulfilledFactories
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFulfilledFactories')]
     public function testIgnoresFulfilledFactories($factory)
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveReferencesToAliasesPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveReferencesToAliasesPassTest.php
index 6937012..4bfb24e 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveReferencesToAliasesPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveReferencesToAliasesPassTest.php
@@ -85,9 +85,8 @@ class ResolveReferencesToAliasesPassTest extends TestCase
         $this->assertSame('Factory', (string) $resolvedBarFactory[0]);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDeprecationNoticeWhenReferencedByAlias()
     {
         $this->expectDeprecation('Since foobar 1.2.3.4: The "deprecated_foo_alias" service alias is deprecated. You should stop using it, as it will be removed in the future. It is being referenced by the "alias" alias.');
@@ -105,9 +104,8 @@ class ResolveReferencesToAliasesPassTest extends TestCase
         $this->process($container);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDeprecationNoticeWhenReferencedByDefinition()
     {
         $this->expectDeprecation('Since foobar 1.2.3.4: The "foo_aliased" service alias is deprecated. You should stop using it, as it will be removed in the future. It is being referenced by the "definition" service.');
@@ -127,6 +125,7 @@ class ResolveReferencesToAliasesPassTest extends TestCase
         $this->process($container);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testNoDeprecationNoticeWhenReferencedByDeprecatedAlias()
     {
         $container = new ContainerBuilder();
@@ -145,6 +144,7 @@ class ResolveReferencesToAliasesPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testNoDeprecationNoticeWhenReferencedByDeprecatedDefinition()
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ValidateEnvPlaceholdersPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ValidateEnvPlaceholdersPassTest.php
index 17ef87c..46faa48 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ValidateEnvPlaceholdersPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ValidateEnvPlaceholdersPassTest.php
@@ -288,6 +288,7 @@ class ValidateEnvPlaceholdersPassTest extends TestCase
         $this->assertSame($expected, $container->resolveEnvPlaceholders($ext->getConfig()));
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testEmptyConfigFromMoreThanOneSource()
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php b/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php
index 95de7a8..0d8be88 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php
@@ -35,9 +35,7 @@ class ContainerParametersResourceCheckerTest extends TestCase
         $this->assertTrue($this->resourceChecker->supports($this->resource));
     }
 
-    /**
-     * @dataProvider isFreshProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('isFreshProvider')]
     public function testIsFresh(callable $mockContainer, $expected)
     {
         $mockContainer($this->container, $this);
diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerAwareTraitTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerAwareTraitTest.php
index b2a3e72..a09a4d2 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/ContainerAwareTraitTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerAwareTraitTest.php
@@ -16,9 +16,7 @@ use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\DependencyInjection\Tests\Fixtures\ContainerAwareDummy;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class ContainerAwareTraitTest extends TestCase
 {
     use ExpectDeprecationTrait;
diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php
index a04f54e..47bc9c0 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php
@@ -109,9 +109,9 @@ class ContainerBuilderTest extends TestCase
 
     /**
      * The test should be kept in the group as it always expects a deprecation.
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDeprecateParameter()
     {
         $builder = new ContainerBuilder();
@@ -126,9 +126,9 @@ class ContainerBuilderTest extends TestCase
 
     /**
      * The test should be kept in the group as it always expects a deprecation.
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testParameterDeprecationIsTrgiggeredWhenCompiled()
     {
         $builder = new ContainerBuilder();
@@ -303,18 +303,14 @@ class ContainerBuilderTest extends TestCase
         $this->assertNotSame($builder->get('bar'), $builder->get('bar'));
     }
 
-    /**
-     * @dataProvider provideBadId
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBadId')]
     public function testBadAliasId($id)
     {
         $this->expectException(InvalidArgumentException::class);
         (new ContainerBuilder())->setAlias($id, 'foo');
     }
 
-    /**
-     * @dataProvider provideBadId
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBadId')]
     public function testBadDefinitionId($id)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -1557,6 +1553,7 @@ class ContainerBuilderTest extends TestCase
         $container->compile();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testUnusedServiceRemovedByPassAndServiceNotFoundExceptionWasNotThrown()
     {
         $container = new ContainerBuilder();
@@ -1625,9 +1622,7 @@ class ContainerBuilderTest extends TestCase
         $this->assertEquals(['foo1' => new \stdClass(), 'foo3' => new \stdClass()], iterator_to_array($bar->iter));
     }
 
-    /**
-     * @dataProvider provideAlmostCircular
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAlmostCircular')]
     public function testAlmostCircular($visibility)
     {
         $container = include __DIR__.'/Fixtures/containers/container_almost_circular.php';
@@ -1894,9 +1889,7 @@ class ContainerBuilderTest extends TestCase
         $this->assertInstanceOf(Wither::class, $wither->withFoo1($wither->foo));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testWitherAnnotationWithStaticReturnType()
     {
         $this->expectDeprecation('Since symfony/dependency-injection 6.3: Relying on the "@required" annotation on method "Symfony\Component\DependencyInjection\Tests\Fixtures\WitherAnnotationStaticReturnType::withFoo()" is deprecated, use the "Symfony\Contracts\Service\Attribute\Required" attribute instead.');
@@ -1950,9 +1943,8 @@ class ContainerBuilderTest extends TestCase
         $this->assertInstanceOf(D::class, $container->get(X::class));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDirectlyAccessingDeprecatedPublicService()
     {
         $this->expectDeprecation('Since foo/bar 3.8: Accessing the "Symfony\Component\DependencyInjection\Tests\A" service directly from the container is deprecated, use dependency injection instead.');
@@ -1968,6 +1960,7 @@ class ContainerBuilderTest extends TestCase
         $container->get(A::class);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testReferencingDeprecatedPublicService()
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php
index 65716ce..ec7cd8f 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php
@@ -34,9 +34,7 @@ class ContainerTest extends TestCase
         $this->assertEquals(['foo' => 'bar'], $sc->getParameterBag()->all(), '__construct() takes an array of parameters as its first argument');
     }
 
-    /**
-     * @dataProvider dataForTestCamelize
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dataForTestCamelize')]
     public function testCamelize($id, $expected)
     {
         $this->assertEquals($expected, Container::camelize($id), \sprintf('Container::camelize("%s")', $id));
@@ -58,9 +56,7 @@ class ContainerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider dataForTestUnderscore
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dataForTestUnderscore')]
     public function testUnderscore($id, $expected)
     {
         $this->assertEquals($expected, Container::underscore($id), \sprintf('Container::underscore("%s")', $id));
diff --git a/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php b/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php
index db17da4..426a951 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php
@@ -27,9 +27,7 @@ class CrossCheckTest extends TestCase
         require_once self::$fixturesPath.'/includes/foo.php';
     }
 
-    /**
-     * @dataProvider crossCheckLoadersDumpers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('crossCheckLoadersDumpers')]
     public function testCrossCheck($fixture, $type)
     {
         $loaderClass = 'Symfony\\Component\\DependencyInjection\\Loader\\'.ucfirst($type).'FileLoader';
diff --git a/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php b/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php
index 8f33418..2cef216 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php
@@ -186,9 +186,7 @@ class DefinitionTest extends TestCase
         $this->assertSame('1.1', $deprecation['version']);
     }
 
-    /**
-     * @dataProvider invalidDeprecationMessageProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidDeprecationMessageProvider')]
     public function testSetDeprecatedWithInvalidDeprecationTemplate($message)
     {
         $def = new Definition('stdClass');
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php
index 8206a4a..d2becda 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php
@@ -403,9 +403,7 @@ class PhpDumperTest extends TestCase
         $this->assertTrue(method_exists($class, 'getFoobar2Service'));
     }
 
-    /**
-     * @dataProvider provideInvalidFactories
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidFactories')]
     public function testInvalidFactories($factory)
     {
         $this->expectException(RuntimeException::class);
@@ -480,9 +478,8 @@ class PhpDumperTest extends TestCase
 
     /**
      * The test should be kept in the group as it always expects a deprecation.
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testDeprecatedParameters()
     {
         $container = include self::$fixturesPath.'/containers/container_deprecated_parameters.php';
@@ -497,9 +494,8 @@ class PhpDumperTest extends TestCase
 
     /**
      * The test should be kept in the group as it always expects a deprecation.
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testDeprecatedParametersAsFiles()
     {
         $container = include self::$fixturesPath.'/containers/container_deprecated_parameters.php';
@@ -831,10 +827,8 @@ class PhpDumperTest extends TestCase
         $this->assertNotSame($foo1, $foo2);
     }
 
-    /**
-     * @testWith [false]
-     *           [true]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
     public function testNonSharedLazyDefinitionReferences(bool $asGhostObject)
     {
         $container = new ContainerBuilder();
@@ -1184,9 +1178,7 @@ class PhpDumperTest extends TestCase
         $this->assertEquals(['foo1' => new \stdClass(), 'foo3' => new \stdClass()], iterator_to_array($bar->iter));
     }
 
-    /**
-     * @dataProvider provideAlmostCircular
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAlmostCircular')]
     public function testAlmostCircular($visibility)
     {
         $container = include self::$fixturesPath.'/containers/container_almost_circular.php';
@@ -1551,9 +1543,7 @@ PHP
         $this->assertContains('bar', $service_ids);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testWitherAnnotation()
     {
         $this->expectDeprecation('Since symfony/dependency-injection 6.3: Relying on the "@required" annotation on method "Symfony\Component\DependencyInjection\Tests\Compiler\FooAnnotation::cloneFoo()" is deprecated, use the "Symfony\Contracts\Service\Attribute\Required" attribute instead.');
@@ -1785,9 +1775,8 @@ PHP
         $dumper->dump();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDirectlyAccessingDeprecatedPublicService()
     {
         $this->expectDeprecation('Since foo/bar 3.8: Accessing the "bar" service directly from the container is deprecated, use dependency injection instead.');
@@ -1808,6 +1797,7 @@ PHP
         $container->get('bar');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testReferencingDeprecatedPublicService()
     {
         $container = new ContainerBuilder();
@@ -2039,9 +2029,7 @@ PHP
         $this->assertInstanceOf(Foo::class, $container->get('bar')->foo->theMethod());
     }
 
-    /**
-     * @dataProvider getStripCommentsCodes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getStripCommentsCodes')]
     public function testStripComments(string $source, string $expected)
     {
         $reflection = new \ReflectionClass(PhpDumper::class);
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php
index 548e5a1..da19d12 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php
@@ -110,9 +110,7 @@ class XmlDumperTest extends TestCase
 ", $dumper->dump());
     }
 
-    /**
-     * @dataProvider provideDecoratedServicesData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDecoratedServicesData')]
     public function testDumpDecoratedServices($expectedXmlDump, $container)
     {
         $dumper = new XmlDumper($container);
@@ -151,9 +149,8 @@ class XmlDumperTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideCompiledContainerData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompiledContainerData')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCompiledContainerCanBeDumped($containerFile)
     {
         $fixturesPath = __DIR__.'/../Fixtures';
@@ -282,9 +279,7 @@ class XmlDumperTest extends TestCase
         $this->assertEquals(file_get_contents(self::$fixturesPath.'/xml/services_with_enumeration.xml'), $dumper->dump());
     }
 
-    /**
-     * @dataProvider provideDefaultClasses
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDefaultClasses')]
     public function testDumpHandlesDefaultAttribute($class, $expectedFile)
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php
index 3a21d7a..cd50eb2 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php
@@ -170,9 +170,7 @@ class YamlDumperTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provideDefaultClasses
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDefaultClasses')]
     public function testDumpHandlesDefaultAttribute($class, $expectedFile)
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php b/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php
index 3677a4e..1ab75db 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/EnvVarProcessorTest.php
@@ -27,9 +27,7 @@ class EnvVarProcessorTest extends TestCase
 {
     public const TEST_CONST = 'test';
 
-    /**
-     * @dataProvider validStrings
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validStrings')]
     public function testGetEnvString($value, $processed)
     {
         $container = new ContainerBuilder();
@@ -59,9 +57,7 @@ class EnvVarProcessorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider validRealEnvValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validRealEnvValues')]
     public function testGetEnvRealEnv($value, $processed)
     {
         $_ENV['FOO'] = $value;
@@ -120,9 +116,7 @@ class EnvVarProcessorTest extends TestCase
         unset($_ENV['FOO']);
     }
 
-    /**
-     * @dataProvider validBools
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validBools')]
     public function testGetEnvBool($value, $processed)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -136,9 +130,7 @@ class EnvVarProcessorTest extends TestCase
         $this->assertSame($processed, $result);
     }
 
-    /**
-     * @dataProvider validBools
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validBools')]
     public function testGetEnvNot($value, $processed)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -166,9 +158,7 @@ class EnvVarProcessorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider validInts
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validInts')]
     public function testGetEnvInt($value, $processed)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -191,9 +181,7 @@ class EnvVarProcessorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider invalidInts
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidInts')]
     public function testGetEnvIntInvalid($value)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -217,9 +205,7 @@ class EnvVarProcessorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider validFloats
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validFloats')]
     public function testGetEnvFloat($value, $processed)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -242,9 +228,7 @@ class EnvVarProcessorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider invalidFloats
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidFloats')]
     public function testGetEnvFloatInvalid($value)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -268,9 +252,7 @@ class EnvVarProcessorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider validConsts
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validConsts')]
     public function testGetEnvConst($value, $processed)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -292,9 +274,7 @@ class EnvVarProcessorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider invalidConsts
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidConsts')]
     public function testGetEnvConstInvalid($value)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -349,9 +329,7 @@ class EnvVarProcessorTest extends TestCase
         $this->assertSame('hello', $result);
     }
 
-    /**
-     * @dataProvider validJson
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validJson')]
     public function testGetEnvJson($value, $processed)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -388,9 +366,7 @@ class EnvVarProcessorTest extends TestCase
         });
     }
 
-    /**
-     * @dataProvider otherJsonValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('otherJsonValues')]
     public function testGetEnvJsonOther($value)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -442,9 +418,7 @@ class EnvVarProcessorTest extends TestCase
         });
     }
 
-    /**
-     * @dataProvider noArrayValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('noArrayValues')]
     public function testGetEnvKeyNoArrayResult($value)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -469,9 +443,7 @@ class EnvVarProcessorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider invalidArrayValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidArrayValues')]
     public function testGetEnvKeyArrayKeyNotFound($value)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -495,9 +467,7 @@ class EnvVarProcessorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider arrayValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('arrayValues')]
     public function testGetEnvKey($value)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -537,9 +507,7 @@ class EnvVarProcessorTest extends TestCase
         }));
     }
 
-    /**
-     * @dataProvider provideGetEnvEnum
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideGetEnvEnum')]
     public function testGetEnvEnum(\BackedEnum $backedEnum)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -603,9 +571,7 @@ class EnvVarProcessorTest extends TestCase
         $processor->getEnv('enum', StringBackedEnum::class.':foo', fn () => 'bogus');
     }
 
-    /**
-     * @dataProvider validNullables
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validNullables')]
     public function testGetEnvNullable($value, $processed)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -653,9 +619,7 @@ class EnvVarProcessorTest extends TestCase
         $this->assertEquals('foo', $result);
     }
 
-    /**
-     * @dataProvider validResolve
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validResolve')]
     public function testGetEnvResolve($value, $processed)
     {
         $container = new ContainerBuilder();
@@ -689,9 +653,7 @@ class EnvVarProcessorTest extends TestCase
         $this->assertSame('%', $result);
     }
 
-    /**
-     * @dataProvider notScalarResolve
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('notScalarResolve')]
     public function testGetEnvResolveNotScalar($value)
     {
         $container = new ContainerBuilder();
@@ -746,9 +708,7 @@ class EnvVarProcessorTest extends TestCase
         unset($_ENV['BAR']);
     }
 
-    /**
-     * @dataProvider validCsv
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validCsv')]
     public function testGetEnvCsv($value, $processed)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -914,9 +874,7 @@ CSV;
         });
     }
 
-    /**
-     * @dataProvider provideGetEnvUrlPath
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideGetEnvUrlPath')]
     public function testGetEnvUrlPath(?string $expected, string $url)
     {
         $this->assertSame($expected, (new EnvVarProcessor(new Container()))->getEnv('url', 'foo', static fn (): string => $url)['path']);
@@ -934,14 +892,12 @@ CSV;
         ];
     }
 
-    /**
-     * @testWith    ["", "string"]
-     *              [null, ""]
-     *              [false, "bool"]
-     *              [true, "not"]
-     *              [0, "int"]
-     *              [0.0, "float"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['', 'string'])]
+    #[\PHPUnit\Framework\Attributes\TestWith([null, ''])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false, 'bool'])]
+    #[\PHPUnit\Framework\Attributes\TestWith([true, 'not'])]
+    #[\PHPUnit\Framework\Attributes\TestWith([0, 'int'])]
+    #[\PHPUnit\Framework\Attributes\TestWith([0.0, 'float'])]
     public function testGetEnvCastsNullBehavior($expected, string $prefix)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -966,9 +922,7 @@ CSV;
         }
     }
 
-    /**
-     * @dataProvider provideGetEnvDefined
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideGetEnvDefined')]
     public function testGetEnvDefined(bool $expected, callable $callback)
     {
         $this->assertSame($expected, (new EnvVarProcessor(new Container()))->getEnv('defined', 'NO_SOMETHING', $callback));
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Exception/InvalidParameterTypeExceptionTest.php b/src/Symfony/Component/DependencyInjection/Tests/Exception/InvalidParameterTypeExceptionTest.php
index ef88c71..db2b6f0 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Exception/InvalidParameterTypeExceptionTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Exception/InvalidParameterTypeExceptionTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\DependencyInjection\Exception\InvalidParameterTypeExceptio
 
 final class InvalidParameterTypeExceptionTest extends TestCase
 {
-    /**
-     * @dataProvider provideReflectionParameters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideReflectionParameters')]
     public function testExceptionMessage(\ReflectionParameter $parameter, string $expectedMessage)
     {
         $exception = new InvalidParameterTypeException('my_service', 'int', $parameter);
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Extension/ExtensionTest.php b/src/Symfony/Component/DependencyInjection/Tests/Extension/ExtensionTest.php
index d2b5128..3af80e0 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Extension/ExtensionTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Extension/ExtensionTest.php
@@ -23,9 +23,7 @@ use Symfony\Component\DependencyInjection\Tests\Fixtures\Extension\ValidConfig\V
 
 class ExtensionTest extends TestCase
 {
-    /**
-     * @dataProvider getResolvedEnabledFixtures
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getResolvedEnabledFixtures')]
     public function testIsConfigEnabledReturnsTheResolvedValue($enabled)
     {
         $extension = new EnableableExtension();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/PhpDumper/LazyServiceDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/PhpDumper/LazyServiceDumperTest.php
index 467972a..62dbe55 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/PhpDumper/LazyServiceDumperTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/PhpDumper/LazyServiceDumperTest.php
@@ -54,9 +54,7 @@ class LazyServiceDumperTest extends TestCase
         $dumper->getProxyCode($definition);
     }
 
-    /**
-     * @requires PHP 8.3
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.3')]
     public function testReadonlyClass()
     {
         $dumper = new LazyServiceDumper();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/Configurator/EnvConfiguratorTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/Configurator/EnvConfiguratorTest.php
index 75ddca1..4588b93 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Loader/Configurator/EnvConfiguratorTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/Configurator/EnvConfiguratorTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\DependencyInjection\Tests\Fixtures\StringBackedEnum;
 
 final class EnvConfiguratorTest extends TestCase
 {
-    /**
-     * @dataProvider provide
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provide')]
     public function test(string $expected, EnvConfigurator $envConfigurator)
     {
         $this->assertSame($expected, (string) $envConfigurator);
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php
index 406e51e..06ae71a 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php
@@ -146,10 +146,8 @@ class FileLoaderTest extends TestCase
         );
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testRegisterClassesWithExcludeAttribute(bool $autoconfigure)
     {
         $container = new ContainerBuilder();
@@ -253,9 +251,7 @@ class FileLoaderTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider excludeTrailingSlashConsistencyProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('excludeTrailingSlashConsistencyProvider')]
     public function testExcludeTrailingSlashConsistency(string $exclude, string $excludedId)
     {
         $container = new ContainerBuilder();
@@ -283,12 +279,10 @@ class FileLoaderTest extends TestCase
         yield ['Prototype/OtherDir/AnotherSub/DeeperBaz.php', DeeperBaz::class];
     }
 
-    /**
-     * @testWith ["prod", false]
-     *           ["dev", false]
-     *           ["bar", true]
-     *           [null, false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['prod', false])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['dev', false])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['bar', true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([null, false])]
     public function testRegisterClassesWithWhenEnv(?string $env, bool $expected)
     {
         $container = new ContainerBuilder();
@@ -302,9 +296,7 @@ class FileLoaderTest extends TestCase
         $this->assertSame($expected, $container->getDefinition(Foo::class)->hasTag('container.excluded'));
     }
 
-    /**
-     * @dataProvider provideResourcesWithAsAliasAttributes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideResourcesWithAsAliasAttributes')]
     public function testRegisterClassesWithAsAlias(string $resource, array $expectedAliases)
     {
         $container = new ContainerBuilder();
@@ -332,9 +324,7 @@ class FileLoaderTest extends TestCase
         ]];
     }
 
-    /**
-     * @dataProvider provideResourcesWithDuplicatedAsAliasAttributes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideResourcesWithDuplicatedAsAliasAttributes')]
     public function testRegisterClassesWithDuplicatedAsAlias(string $resource, string $expectedExceptionMessage)
     {
         $this->expectException(LogicException::class);
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php
index 1de64bb..af42369 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php
@@ -34,9 +34,7 @@ class IniFileLoaderTest extends TestCase
         $this->assertEquals(['foo' => 'bar', 'bar' => '%foo%'], $this->container->getParameterBag()->all(), '->load() takes a single file name as its first argument');
     }
 
-    /**
-     * @dataProvider getTypeConversions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTypeConversions')]
     public function testTypeConversions($key, $value, $supported)
     {
         $this->loader->load('types.ini');
@@ -44,10 +42,7 @@ class IniFileLoaderTest extends TestCase
         $this->assertSame($value, $parameters[$key], '->load() converts values to PHP types');
     }
 
-    /**
-     * @dataProvider getTypeConversions
-     * This test illustrates where our conversions differs from INI_SCANNER_TYPED introduced in PHP 5.6.1
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTypeConversions')]
     public function testTypeConversionsWithNativePhp($key, $value, $supported)
     {
         if (!$supported) {
@@ -93,11 +88,8 @@ class IniFileLoaderTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getLegacyTypeConversions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLegacyTypeConversions')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyTypeConversionsWithNativePhp($key, $value, $supported)
     {
         if (!$supported) {
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/LoaderResolverTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/LoaderResolverTest.php
index 996cc52..59ee677 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Loader/LoaderResolverTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/LoaderResolverTest.php
@@ -51,9 +51,7 @@ class LoaderResolverTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideResourcesToLoad
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideResourcesToLoad')]
     public function testResolvesForcedType($resource, $type, $expectedClass)
     {
         $this->assertInstanceOf($expectedClass, $this->resolver->resolve($resource, $type));
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php
index ec193bc..3d92817 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php
@@ -73,9 +73,7 @@ class PhpFileLoaderTest extends TestCase
         $this->assertStringEqualsFile($fixtures.'/php/services_closure_argument_compiled.php', $dumper->dump());
     }
 
-    /**
-     * @dataProvider provideConfig
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConfig')]
     public function testConfig($file)
     {
         $fixtures = realpath(__DIR__.'/../Fixtures');
@@ -213,9 +211,7 @@ class PhpFileLoaderTest extends TestCase
         $loader->load($fixtures.'/config/when_env.php');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testServiceWithServiceLocatorArgument()
     {
         $this->expectDeprecation('Since symfony/dependency-injection 6.3: Using integers as keys in a "service_locator()" argument is deprecated. The keys will default to the IDs of the original services in 7.0.');
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php
index 675ec57..e90c3ef 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php
@@ -379,10 +379,8 @@ class XmlFileLoaderTest extends TestCase
         $this->assertEquals([new IteratorArgument(['k1' => new Reference('foo.baz'), 'k2' => new Reference('service_container')]), new IteratorArgument([])], $lazyDefinition->getArguments(), '->load() parses lazy arguments');
     }
 
-    /**
-     * @testWith ["foo_tag"]
-     *           ["bar_tag"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo_tag'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['bar_tag'])]
     public function testParsesTags(string $tag)
     {
         $container = new ContainerBuilder();
@@ -431,9 +429,7 @@ class XmlFileLoaderTest extends TestCase
         $this->assertEquals(new ServiceLocatorArgument($taggedIterator3), $container->getDefinition('foo3_tagged_locator')->getArgument(0));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testServiceWithServiceLocatorArgument()
     {
         $this->expectDeprecation('Since symfony/dependency-injection 6.3: Skipping "key" argument or using integers as values in a "service_locator" tag is deprecated. The keys will default to the IDs of the original services in 7.0.');
@@ -801,9 +797,7 @@ class XmlFileLoaderTest extends TestCase
         $this->assertContains('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\Bar', $resources);
     }
 
-    /**
-     * @dataProvider prototypeExcludeWithArrayDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('prototypeExcludeWithArrayDataProvider')]
     public function testPrototypeExcludeWithArray(string $fileName)
     {
         $container = new ContainerBuilder();
@@ -1204,9 +1198,7 @@ class XmlFileLoaderTest extends TestCase
         $this->assertEquals((new Definition('Closure'))->setFactory(['Closure', 'fromCallable'])->addArgument(new Reference('bar')), $definition);
     }
 
-    /**
-     * @dataProvider dataForBindingsAndInnerCollections
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dataForBindingsAndInnerCollections')]
     public function testBindingsAndInnerCollections($bindName, $expected)
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php
index a2f8aa7..15fb769 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php
@@ -81,9 +81,7 @@ class YamlFileLoaderTest extends TestCase
         $m->invoke($loader, $path.'/parameters.ini');
     }
 
-    /**
-     * @dataProvider provideInvalidFiles
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidFiles')]
     public function testLoadInvalidFile($file)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -422,9 +420,7 @@ class YamlFileLoaderTest extends TestCase
         $this->assertEquals(new ServiceLocatorArgument($taggedIterator), $container->getDefinition('bar_service_tagged_locator')->getArgument(0));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testServiceWithServiceLocatorArgument()
     {
         $this->expectDeprecation('Since symfony/dependency-injection 6.3: Using integers as keys in a "!service_locator" tag is deprecated. The keys will default to the IDs of the original services in 7.0.');
@@ -568,9 +564,7 @@ class YamlFileLoaderTest extends TestCase
         $this->assertContains('reflection.Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\Bar', $resources);
     }
 
-    /**
-     * @dataProvider prototypeWithNullOrEmptyNodeDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('prototypeWithNullOrEmptyNodeDataProvider')]
     public function testPrototypeWithNullOrEmptyNode(string $fileName)
     {
         $this->expectException(InvalidArgumentException::class);
diff --git a/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/FrozenParameterBagTest.php b/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/FrozenParameterBagTest.php
index 792a9c2..ef56df3 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/FrozenParameterBagTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/FrozenParameterBagTest.php
@@ -66,9 +66,9 @@ class FrozenParameterBagTest extends TestCase
 
     /**
      * The test should be kept in the group as it always expects a deprecation.
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testGetDeprecated()
     {
         $bag = new FrozenParameterBag(
diff --git a/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php b/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php
index aa85d1a..0228f13 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php
@@ -81,10 +81,8 @@ class ParameterBagTest extends TestCase
         }
     }
 
-    /**
-     * @group legacy
-     * Test it will throw in 7.0
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy
+Test it will throw in 7.0')]
     public function testGetSetNumericName()
     {
         $bag = new ParameterBag(['foo']);
@@ -110,9 +108,7 @@ class ParameterBagTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provideGetThrowParameterNotFoundExceptionData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideGetThrowParameterNotFoundExceptionData')]
     public function testGetThrowParameterNotFoundException($parameterKey, $exceptionMessage)
     {
         $bag = new ParameterBag([
@@ -142,9 +138,9 @@ class ParameterBagTest extends TestCase
 
     /**
      * The test should be kept in the group as it always expects a deprecation.
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDeprecate()
     {
         $bag = new ParameterBag(['foo' => 'bar']);
@@ -158,9 +154,9 @@ class ParameterBagTest extends TestCase
 
     /**
      * The test should be kept in the group as it always expects a deprecation.
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDeprecateWithMessage()
     {
         $bag = new ParameterBag(['foo' => 'bar']);
@@ -174,9 +170,9 @@ class ParameterBagTest extends TestCase
 
     /**
      * The test should be kept in the group as it always expects a deprecation.
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDeprecationIsTriggeredWhenResolved()
     {
         $bag = new ParameterBag(['foo' => '%bar%', 'bar' => 'baz']);
@@ -333,9 +329,7 @@ class ParameterBagTest extends TestCase
         $this->assertEquals(['bar' => ['ding' => 'I\'m a bar %%foo %%bar', 'zero' => null]], $bag->get('foo'), '->escapeValue() escapes % by doubling it');
     }
 
-    /**
-     * @dataProvider stringsWithSpacesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('stringsWithSpacesProvider')]
     public function testResolveStringWithSpacesReturnsString($expected, $test, $description)
     {
         $bag = new ParameterBag(['foo' => 'bar']);
diff --git a/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTestCase.php b/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTestCase.php
index 53169ef..0b4d4bc 100644
--- a/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTestCase.php
+++ b/src/Symfony/Component/DomCrawler/Tests/AbstractCrawlerTestCase.php
@@ -104,9 +104,7 @@ abstract class AbstractCrawlerTestCase extends TestCase
         $this->assertEquals('http://symfony.com/contact', $crawler->filterXPath('//a')->link()->getUri(), '->addHtmlContent() adds nodes from an HTML string');
     }
 
-    /**
-     * @requires extension mbstring
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('mbstring')]
     public function testAddHtmlContentCharset()
     {
         $crawler = $this->createCrawler();
@@ -123,9 +121,7 @@ abstract class AbstractCrawlerTestCase extends TestCase
         $this->assertEquals('http://symfony.com/contact', current($crawler->filterXPath('//a')->links())->getUri(), '->addHtmlContent() correctly handles a non-existent base tag href attribute');
     }
 
-    /**
-     * @requires extension mbstring
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('mbstring')]
     public function testAddHtmlContentCharsetGbk()
     {
         $crawler = $this->createCrawler();
@@ -190,9 +186,7 @@ abstract class AbstractCrawlerTestCase extends TestCase
         $this->assertEquals('var foo = "bär";', $crawler->filterXPath('//script')->text(), '->addContent() does not interfere with script content');
     }
 
-    /**
-     * @requires extension iconv
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('iconv')]
     public function testAddContentNonUtf8()
     {
         $crawler = $this->createCrawler();
@@ -393,9 +387,7 @@ abstract class AbstractCrawlerTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideInnerTextExamples
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInnerTextExamples')]
     public function testInnerText(
         string $xPathQuery,
         string $expectedText,
@@ -975,7 +967,7 @@ HTML;
         yield ['#bar', false, '.foo'];
     }
 
-    /** @dataProvider provideMatchTests */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMatchTests')]
     public function testMatch(string $mainNodeSelector, bool $expected, string $selector)
     {
         $html = <<<'HTML'
@@ -1199,9 +1191,7 @@ HTML;
         $this->createTestCrawler()->filterXPath('//ol')->ancestors();
     }
 
-    /**
-     * @dataProvider getBaseTagData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getBaseTagData')]
     public function testBaseTag($baseValue, $linkValue, $expectedUri, $currentUri = null, $description = '')
     {
         $crawler = $this->createCrawler($this->getDoctype().'<html><base href="'.$baseValue.'"><a href="'.$linkValue.'"></a></html>', $currentUri);
@@ -1219,9 +1209,7 @@ HTML;
         ];
     }
 
-    /**
-     * @dataProvider getBaseTagWithFormData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getBaseTagWithFormData')]
     public function testBaseTagWithForm($baseValue, $actionValue, $expectedUri, $currentUri = null, $description = null)
     {
         $crawler = $this->createCrawler($this->getDoctype().'<html><base href="'.$baseValue.'"><form method="post" action="'.$actionValue.'"><button type="submit" name="submit"/></form></html>', $currentUri);
diff --git a/src/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php b/src/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php
index 7934402..d097cea 100644
--- a/src/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php
@@ -39,9 +39,7 @@ class FileFormFieldTest extends FormFieldTestCase
         }
     }
 
-    /**
-     * @dataProvider getSetValueMethods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getSetValueMethods')]
     public function testSetValue($method)
     {
         $node = $this->createNode('input', '', ['type' => 'file']);
diff --git a/src/Symfony/Component/DomCrawler/Tests/FormTest.php b/src/Symfony/Component/DomCrawler/Tests/FormTest.php
index a169831..b7bdfb2 100644
--- a/src/Symfony/Component/DomCrawler/Tests/FormTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/FormTest.php
@@ -66,11 +66,7 @@ class FormTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider constructorThrowsExceptionIfNoRelatedFormProvider
-     *
-     * __construct() should throw a \LogicException if the form attribute is invalid.
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('constructorThrowsExceptionIfNoRelatedFormProvider')]
     public function testConstructorThrowsExceptionIfNoRelatedForm(\DOMElement $node)
     {
         $this->expectException(\LogicException::class);
@@ -197,9 +193,7 @@ class FormTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideInitializeValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInitializeValues')]
     public function testConstructor($message, $form, $values)
     {
         $form = $this->createForm('<form>'.$form.'</form>');
@@ -515,9 +509,7 @@ class FormTest extends TestCase
         $this->assertEquals(['size' => ['error' => ['name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0]]], $form->getPhpFiles(), '->getPhpFiles() int conversion does not collide with file names');
     }
 
-    /**
-     * @dataProvider provideGetUriValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideGetUriValues')]
     public function testGetUri($message, $form, $values, $uri, $method = null)
     {
         $form = $this->createForm($form, $method);
diff --git a/src/Symfony/Component/DomCrawler/Tests/Html5ParserCrawlerTest.php b/src/Symfony/Component/DomCrawler/Tests/Html5ParserCrawlerTest.php
index 58c1db8..744b559 100644
--- a/src/Symfony/Component/DomCrawler/Tests/Html5ParserCrawlerTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/Html5ParserCrawlerTest.php
@@ -26,7 +26,7 @@ class Html5ParserCrawlerTest extends AbstractCrawlerTestCase
         $this->assertEquals('Foo', $crawler->filterXPath('//h1')->text(), '->add() adds nodes from a string');
     }
 
-    /** @dataProvider validHtml5Provider */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validHtml5Provider')]
     public function testHtml5ParserParseContentStartingWithValidHeading(string $content)
     {
         $crawler = $this->createCrawler();
@@ -38,7 +38,7 @@ class Html5ParserCrawlerTest extends AbstractCrawlerTestCase
         );
     }
 
-    /** @dataProvider invalidHtml5Provider */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidHtml5Provider')]
     public function testHtml5ParserWithInvalidHeadedContent(string $content)
     {
         $crawler = $this->createCrawler();
@@ -60,10 +60,8 @@ class Html5ParserCrawlerTest extends AbstractCrawlerTestCase
         $this->assertNotEquals($nativeCrawler->filterXPath('//h1')->text(), $html5Crawler->filterXPath('//h1')->text(), 'Native parser and Html5 parser must be different');
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testHasHtml5Parser(bool $useHtml5Parser)
     {
         $crawler = $this->createCrawler(null, null, null, $useHtml5Parser);
diff --git a/src/Symfony/Component/DomCrawler/Tests/ImageTest.php b/src/Symfony/Component/DomCrawler/Tests/ImageTest.php
index 61c448a..24b8346 100644
--- a/src/Symfony/Component/DomCrawler/Tests/ImageTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/ImageTest.php
@@ -44,9 +44,7 @@ class ImageTest extends TestCase
         $image->getUri();
     }
 
-    /**
-     * @dataProvider getGetUriTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getGetUriTests')]
     public function testGetUri($url, $currentUri, $expected)
     {
         $dom = new \DOMDocument();
diff --git a/src/Symfony/Component/DomCrawler/Tests/LinkTest.php b/src/Symfony/Component/DomCrawler/Tests/LinkTest.php
index 3360c32..f9fdcfe 100644
--- a/src/Symfony/Component/DomCrawler/Tests/LinkTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/LinkTest.php
@@ -69,9 +69,7 @@ class LinkTest extends TestCase
         $this->assertEquals('POST', $link->getMethod(), '->getMethod() returns the method of the link');
     }
 
-    /**
-     * @dataProvider getGetUriTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getGetUriTests')]
     public function testGetUri($url, $currentUri, $expected)
     {
         $dom = new \DOMDocument();
@@ -81,9 +79,7 @@ class LinkTest extends TestCase
         $this->assertEquals($expected, $link->getUri());
     }
 
-    /**
-     * @dataProvider getGetUriTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getGetUriTests')]
     public function testGetUriOnArea($url, $currentUri, $expected)
     {
         $dom = new \DOMDocument();
@@ -93,9 +89,7 @@ class LinkTest extends TestCase
         $this->assertEquals($expected, $link->getUri());
     }
 
-    /**
-     * @dataProvider getGetUriTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getGetUriTests')]
     public function testGetUriOnLink($url, $currentUri, $expected)
     {
         $dom = new \DOMDocument();
diff --git a/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerAnySelectorTextContainsTest.php b/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerAnySelectorTextContainsTest.php
index 44543e5..e44f33b 100644
--- a/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerAnySelectorTextContainsTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerAnySelectorTextContainsTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\DomCrawler\Test\Constraint\CrawlerAnySelectorTextContains;
 
 class CrawlerAnySelectorTextContainsTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testConstraint()
     {
         $constraint = new CrawlerAnySelectorTextContains('ul li', 'Foo');
diff --git a/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerAnySelectorTextSameTest.php b/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerAnySelectorTextSameTest.php
index a4126b6..082445f 100644
--- a/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerAnySelectorTextSameTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerAnySelectorTextSameTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\DomCrawler\Test\Constraint\CrawlerAnySelectorTextSame;
 
 final class CrawlerAnySelectorTextSameTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testConstraint()
     {
         $constraint = new CrawlerAnySelectorTextSame('ul li', 'Foo');
diff --git a/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorAttributeValueSameTest.php b/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorAttributeValueSameTest.php
index c57e7a6..0780f1f 100644
--- a/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorAttributeValueSameTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorAttributeValueSameTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\DomCrawler\Test\Constraint\CrawlerSelectorAttributeValueSa
 
 class CrawlerSelectorAttributeValueSameTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testConstraint()
     {
         $constraint = new CrawlerSelectorAttributeValueSame('input[name="username"]', 'value', 'Fabien');
diff --git a/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorExistsTest.php b/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorExistsTest.php
index b056da2..201df09 100644
--- a/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorExistsTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorExistsTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\DomCrawler\Test\Constraint\CrawlerSelectorExists;
 
 class CrawlerSelectorExistsTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testConstraint()
     {
         $constraint = new CrawlerSelectorExists('title');
diff --git a/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorTextContainsTest.php b/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorTextContainsTest.php
index 9d721fe..473dec5 100644
--- a/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorTextContainsTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorTextContainsTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\DomCrawler\Test\Constraint\CrawlerSelectorTextContains;
 
 class CrawlerSelectorTextContainsTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testConstraint()
     {
         $constraint = new CrawlerSelectorTextContains('title', 'Foo');
diff --git a/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorTextSameTest.php b/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorTextSameTest.php
index 43c04bd..8d6b2e1 100644
--- a/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorTextSameTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorTextSameTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\DomCrawler\Test\Constraint\CrawlerSelectorTextSame;
 
 class CrawlerSelectorTextSameTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testConstraint()
     {
         $constraint = new CrawlerSelectorTextSame('title', 'Foo');
diff --git a/src/Symfony/Component/DomCrawler/Tests/UriResolverTest.php b/src/Symfony/Component/DomCrawler/Tests/UriResolverTest.php
index 6328861..d95de0a 100644
--- a/src/Symfony/Component/DomCrawler/Tests/UriResolverTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/UriResolverTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\DomCrawler\UriResolver;
 
 class UriResolverTest extends TestCase
 {
-    /**
-     * @dataProvider provideResolverTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideResolverTests')]
     public function testResolver(string $uri, string $baseUri, string $expected)
     {
         $this->assertEquals($expected, UriResolver::resolve($uri, $baseUri));
diff --git a/src/Symfony/Component/Dotenv/Tests/Command/DebugCommandTest.php b/src/Symfony/Component/Dotenv/Tests/Command/DebugCommandTest.php
index 78e2b97..d6fa365 100644
--- a/src/Symfony/Component/Dotenv/Tests/Command/DebugCommandTest.php
+++ b/src/Symfony/Component/Dotenv/Tests/Command/DebugCommandTest.php
@@ -22,9 +22,7 @@ use Symfony\Component\Dotenv\Dotenv;
 
 class DebugCommandTest extends TestCase
 {
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testErrorOnUninitializedDotenv()
     {
         unset($_SERVER['SYMFONY_DOTENV_VARS']);
@@ -38,9 +36,7 @@ class DebugCommandTest extends TestCase
         $this->assertStringContainsString('[ERROR] Dotenv component is not initialized', $output);
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testEmptyDotEnvVarsList()
     {
         $_SERVER['SYMFONY_DOTENV_VARS'] = '';
@@ -237,9 +233,7 @@ OUTPUT;
         $this->assertStringContainsString('TEST       1234    1234             1234        0000', $output);
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testCompletion()
     {
         $env = 'prod';
diff --git a/src/Symfony/Component/Dotenv/Tests/DotenvTest.php b/src/Symfony/Component/Dotenv/Tests/DotenvTest.php
index 7f8bd27..2b7d635 100644
--- a/src/Symfony/Component/Dotenv/Tests/DotenvTest.php
+++ b/src/Symfony/Component/Dotenv/Tests/DotenvTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\Dotenv\Exception\PathException;
 
 class DotenvTest extends TestCase
 {
-    /**
-     * @dataProvider getEnvDataWithFormatErrors
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getEnvDataWithFormatErrors')]
     public function testParseWithFormatError($data, $error)
     {
         $dotenv = new Dotenv();
@@ -63,9 +61,7 @@ class DotenvTest extends TestCase
         return $tests;
     }
 
-    /**
-     * @dataProvider getEnvData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getEnvData')]
     public function testParse($data, $expected)
     {
         $dotenv = new Dotenv();
diff --git a/src/Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php b/src/Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php
index d534dc2..3f5baf0 100644
--- a/src/Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php
+++ b/src/Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php
@@ -37,9 +37,7 @@ class DebugClassLoaderTest extends TestCase
         putenv('SYMFONY_PATCH_TYPE_DECLARATIONS'.(false !== $this->patchTypes ? '='.$this->patchTypes : ''));
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testIdempotence()
     {
         DebugClassLoader::enable();
@@ -119,9 +117,7 @@ class DebugClassLoaderTest extends TestCase
         $this->assertTrue(class_exists(Fixtures\ClassAlias::class, true));
     }
 
-    /**
-     * @dataProvider provideDeprecatedSuper
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDeprecatedSuper')]
     public function testDeprecatedSuper(string $class, string $super, string $type)
     {
         set_error_handler(fn () => false);
@@ -225,9 +221,7 @@ class DebugClassLoaderTest extends TestCase
         ], $deprecations);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testExtendedFinalMethod()
     {
         $deprecations = [];
@@ -247,9 +241,7 @@ class DebugClassLoaderTest extends TestCase
         $this->assertSame($xError, $deprecations);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testExtendedDeprecatedMethodDoesntTriggerAnyNotice()
     {
         set_error_handler(fn () => false);
@@ -286,9 +278,7 @@ class DebugClassLoaderTest extends TestCase
         ], $deprecations);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testExtendedMethodDefinesNewParameters()
     {
         $deprecations = [];
@@ -419,9 +409,7 @@ class DebugClassLoaderTest extends TestCase
         ], $deprecations);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testOverrideFinalProperty()
     {
         $deprecations = [];
@@ -443,9 +431,7 @@ class DebugClassLoaderTest extends TestCase
         ], $deprecations);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testOverrideFinalConstant()
     {
         $deprecations = [];
@@ -463,9 +449,7 @@ class DebugClassLoaderTest extends TestCase
         ], $deprecations);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testOverrideFinalConstant81()
     {
         $deprecations = [];
diff --git a/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/ClassNotFoundErrorEnhancerTest.php b/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/ClassNotFoundErrorEnhancerTest.php
index 72ee199..f4138ca 100644
--- a/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/ClassNotFoundErrorEnhancerTest.php
+++ b/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/ClassNotFoundErrorEnhancerTest.php
@@ -43,9 +43,7 @@ class ClassNotFoundErrorEnhancerTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provideClassNotFoundData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideClassNotFoundData')]
     public function testEnhance(string $originalMessage, string $enhancedMessage, $autoloader = null)
     {
         try {
diff --git a/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/UndefinedFunctionErrorEnhancerTest.php b/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/UndefinedFunctionErrorEnhancerTest.php
index 547e333..9ecb9b9 100644
--- a/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/UndefinedFunctionErrorEnhancerTest.php
+++ b/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/UndefinedFunctionErrorEnhancerTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\ErrorHandler\ErrorEnhancer\UndefinedFunctionErrorEnhancer;
 
 class UndefinedFunctionErrorEnhancerTest extends TestCase
 {
-    /**
-     * @dataProvider provideUndefinedFunctionData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUndefinedFunctionData')]
     public function testEnhance(string $originalMessage, string $enhancedMessage)
     {
         $enhancer = new UndefinedFunctionErrorEnhancer();
diff --git a/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/UndefinedMethodErrorEnhancerTest.php b/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/UndefinedMethodErrorEnhancerTest.php
index f417200..a10cbac 100644
--- a/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/UndefinedMethodErrorEnhancerTest.php
+++ b/src/Symfony/Component/ErrorHandler/Tests/ErrorEnhancer/UndefinedMethodErrorEnhancerTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\ErrorHandler\ErrorEnhancer\UndefinedMethodErrorEnhancer;
 
 class UndefinedMethodErrorEnhancerTest extends TestCase
 {
-    /**
-     * @dataProvider provideUndefinedMethodData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUndefinedMethodData')]
     public function testEnhance(string $originalMessage, string $enhancedMessage)
     {
         $enhancer = new UndefinedMethodErrorEnhancer();
diff --git a/src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php b/src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php
index 9278b50..ebe13ea 100644
--- a/src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php
+++ b/src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php
@@ -370,9 +370,7 @@ class ErrorHandlerTest extends TestCase
         @$handler->handleError(\E_USER_DEPRECATED, 'Foo deprecation', __FILE__, __LINE__, []);
     }
 
-    /**
-     * @dataProvider handleExceptionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('handleExceptionProvider')]
     public function testHandleException(string $expectedMessage, \Throwable $exception, ?string $enhancedMessage = null)
     {
         try {
@@ -580,9 +578,7 @@ class ErrorHandlerTest extends TestCase
         self::assertStringContainsString('Class Foo not found', $response);
     }
 
-    /**
-     * @dataProvider errorHandlerWhenLoggingProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('errorHandlerWhenLoggingProvider')]
     public function testErrorHandlerWhenLogging(bool $previousHandlerWasDefined, bool $loggerSetsAnotherHandler, bool $nextHandlerIsDefined)
     {
         try {
diff --git a/src/Symfony/Component/ErrorHandler/Tests/ErrorRenderer/FileLinkFormatterTest.php b/src/Symfony/Component/ErrorHandler/Tests/ErrorRenderer/FileLinkFormatterTest.php
index fd6d44e..0528f5c 100644
--- a/src/Symfony/Component/ErrorHandler/Tests/ErrorRenderer/FileLinkFormatterTest.php
+++ b/src/Symfony/Component/ErrorHandler/Tests/ErrorRenderer/FileLinkFormatterTest.php
@@ -86,9 +86,7 @@ class FileLinkFormatterTest extends TestCase
         $this->assertInstanceOf(FileLinkFormatter::class, unserialize(serialize(new FileLinkFormatter())));
     }
 
-    /**
-     * @dataProvider providePathMappings
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePathMappings')]
     public function testIdeFileLinkFormatWithPathMappingParameters($mappings)
     {
         $params = array_reduce($mappings, function ($c, $m) {
diff --git a/src/Symfony/Component/ErrorHandler/Tests/ErrorRenderer/HtmlErrorRendererTest.php b/src/Symfony/Component/ErrorHandler/Tests/ErrorRenderer/HtmlErrorRendererTest.php
index 3885307..218a32a 100644
--- a/src/Symfony/Component/ErrorHandler/Tests/ErrorRenderer/HtmlErrorRendererTest.php
+++ b/src/Symfony/Component/ErrorHandler/Tests/ErrorRenderer/HtmlErrorRendererTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer;
 
 class HtmlErrorRendererTest extends TestCase
 {
-    /**
-     * @dataProvider getRenderData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRenderData')]
     public function testRender(\Throwable $exception, HtmlErrorRenderer $errorRenderer, string $expected)
     {
         $this->assertStringMatchesFormat($expected, $errorRenderer->render($exception)->getAsString());
@@ -55,9 +53,7 @@ HTML;
         ];
     }
 
-    /**
-     * @dataProvider provideFileLinkFormats
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFileLinkFormats')]
     public function testFileLinkFormat(\ErrorException $exception, string $fileLinkFormat, bool $withSymfonyIde, string $expected)
     {
         if ($withSymfonyIde) {
diff --git a/src/Symfony/Component/ErrorHandler/Tests/Exception/FlattenExceptionTest.php b/src/Symfony/Component/ErrorHandler/Tests/Exception/FlattenExceptionTest.php
index c6efb3c..6c6c3ad 100644
--- a/src/Symfony/Component/ErrorHandler/Tests/Exception/FlattenExceptionTest.php
+++ b/src/Symfony/Component/ErrorHandler/Tests/Exception/FlattenExceptionTest.php
@@ -115,9 +115,7 @@ class FlattenExceptionTest extends TestCase
         $this->assertEquals(['Retry-After' => 120], $flattened->getHeaders());
     }
 
-    /**
-     * @dataProvider flattenDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('flattenDataProvider')]
     public function testFlattenHttpException(\Throwable $exception)
     {
         $flattened = FlattenException::createFromThrowable($exception);
@@ -140,9 +138,7 @@ class FlattenExceptionTest extends TestCase
         $this->assertSame('DivisionByZeroError', $flattened->getClass(), 'The class is set to the class of the original error');
     }
 
-    /**
-     * @dataProvider flattenDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('flattenDataProvider')]
     public function testPrevious(\Throwable $exception)
     {
         $flattened = FlattenException::createFromThrowable($exception);
@@ -166,36 +162,28 @@ class FlattenExceptionTest extends TestCase
         $this->assertEquals('ParseError', $flattened->getClass(), 'The class is set to the class of the original exception');
     }
 
-    /**
-     * @dataProvider flattenDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('flattenDataProvider')]
     public function testLine(\Throwable $exception)
     {
         $flattened = FlattenException::createFromThrowable($exception);
         $this->assertSame($exception->getLine(), $flattened->getLine());
     }
 
-    /**
-     * @dataProvider flattenDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('flattenDataProvider')]
     public function testFile(\Throwable $exception)
     {
         $flattened = FlattenException::createFromThrowable($exception);
         $this->assertSame($exception->getFile(), $flattened->getFile());
     }
 
-    /**
-     * @dataProvider stringAndIntDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('stringAndIntDataProvider')]
     public function testCode(\Throwable $exception)
     {
         $flattened = FlattenException::createFromThrowable($exception);
         $this->assertSame($exception->getCode(), $flattened->getCode());
     }
 
-    /**
-     * @dataProvider flattenDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('flattenDataProvider')]
     public function testToArray(\Throwable $exception, string $expectedClass)
     {
         $flattened = FlattenException::createFromThrowable($exception);
diff --git a/src/Symfony/Component/EventDispatcher/Tests/Debug/WrappedListenerTest.php b/src/Symfony/Component/EventDispatcher/Tests/Debug/WrappedListenerTest.php
index 1a5fe11..09f9e79 100644
--- a/src/Symfony/Component/EventDispatcher/Tests/Debug/WrappedListenerTest.php
+++ b/src/Symfony/Component/EventDispatcher/Tests/Debug/WrappedListenerTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\Stopwatch\StopwatchEvent;
 
 class WrappedListenerTest extends TestCase
 {
-    /**
-     * @dataProvider provideListenersToDescribe
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideListenersToDescribe')]
     public function testListenerDescription($listener, $expected)
     {
         $wrappedListener = new WrappedListener($listener, null, $this->createMock(Stopwatch::class), $this->createMock(EventDispatcherInterface::class));
diff --git a/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php b/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php
index df05548..4952ff9 100644
--- a/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php
+++ b/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php
@@ -140,18 +140,14 @@ class ExpressionLanguageTest extends TestCase
         $this->assertEquals('\Symfony\Component\ExpressionLanguage\Tests\Fixtures\fn_namespaced()', $expressionLanguage->compile('fn_namespaced()'));
     }
 
-    /**
-     * @dataProvider shortCircuitProviderEvaluate
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('shortCircuitProviderEvaluate')]
     public function testShortCircuitOperatorsEvaluate($expression, array $values, $expected)
     {
         $expressionLanguage = new ExpressionLanguage();
         $this->assertEquals($expected, $expressionLanguage->evaluate($expression, $values));
     }
 
-    /**
-     * @dataProvider shortCircuitProviderCompile
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('shortCircuitProviderCompile')]
     public function testShortCircuitOperatorsCompile($expression, array $names, $expected)
     {
         $result = null;
@@ -275,9 +271,7 @@ class ExpressionLanguageTest extends TestCase
         $this->assertTrue($result);
     }
 
-    /**
-     * @dataProvider getRegisterCallbacks
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRegisterCallbacks')]
     public function testRegisterAfterParse($registerCallback)
     {
         $this->expectException(\LogicException::class);
@@ -286,9 +280,7 @@ class ExpressionLanguageTest extends TestCase
         $registerCallback($el);
     }
 
-    /**
-     * @dataProvider getRegisterCallbacks
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRegisterCallbacks')]
     public function testRegisterAfterEval($registerCallback)
     {
         $this->expectException(\LogicException::class);
@@ -297,18 +289,14 @@ class ExpressionLanguageTest extends TestCase
         $registerCallback($el);
     }
 
-    /**
-     * @dataProvider provideNullSafe
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNullSafe')]
     public function testNullSafeEvaluate($expression, $foo)
     {
         $expressionLanguage = new ExpressionLanguage();
         $this->assertNull($expressionLanguage->evaluate($expression, ['foo' => $foo]));
     }
 
-    /**
-     * @dataProvider provideNullSafe
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNullSafe')]
     public function testNullSafeCompile($expression, $foo)
     {
         $expressionLanguage = new ExpressionLanguage();
@@ -345,9 +333,7 @@ class ExpressionLanguageTest extends TestCase
         yield ['foo?.bar()["baz"]["qux"].quux()', null];
     }
 
-    /**
-     * @dataProvider provideInvalidNullSafe
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidNullSafe')]
     public function testNullSafeEvaluateFails($expression, $foo, $message)
     {
         $expressionLanguage = new ExpressionLanguage();
@@ -357,9 +343,7 @@ class ExpressionLanguageTest extends TestCase
         $expressionLanguage->evaluate($expression, ['foo' => $foo]);
     }
 
-    /**
-     * @dataProvider provideInvalidNullSafe
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidNullSafe')]
     public function testNullSafeCompileFails($expression, $foo)
     {
         $expressionLanguage = new ExpressionLanguage();
@@ -388,18 +372,14 @@ class ExpressionLanguageTest extends TestCase
         yield ['foo?.bar["baz"].qux.quux', (object) ['bar' => ['baz' => null]], 'Unable to get property "qux" of non-object "foo?.bar["baz"]".'];
     }
 
-    /**
-     * @dataProvider provideNullCoalescing
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNullCoalescing')]
     public function testNullCoalescingEvaluate($expression, $foo)
     {
         $expressionLanguage = new ExpressionLanguage();
         $this->assertSame($expressionLanguage->evaluate($expression, ['foo' => $foo]), 'default');
     }
 
-    /**
-     * @dataProvider provideNullCoalescing
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNullCoalescing')]
     public function testNullCoalescingCompile($expression, $foo)
     {
         $expressionLanguage = new ExpressionLanguage();
@@ -429,9 +409,7 @@ class ExpressionLanguageTest extends TestCase
         yield ['foo[123][456][789] ?? "default"', [123 => []]];
     }
 
-    /**
-     * @dataProvider getRegisterCallbacks
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRegisterCallbacks')]
     public function testRegisterAfterCompile($registerCallback)
     {
         $this->expectException(\LogicException::class);
diff --git a/src/Symfony/Component/ExpressionLanguage/Tests/LexerTest.php b/src/Symfony/Component/ExpressionLanguage/Tests/LexerTest.php
index 6143ad3..d137adc 100644
--- a/src/Symfony/Component/ExpressionLanguage/Tests/LexerTest.php
+++ b/src/Symfony/Component/ExpressionLanguage/Tests/LexerTest.php
@@ -26,9 +26,7 @@ class LexerTest extends TestCase
         $this->lexer = new Lexer();
     }
 
-    /**
-     * @dataProvider getTokenizeData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTokenizeData')]
     public function testTokenize($tokens, $expression)
     {
         $tokens[] = new Token('end of expression', null, \strlen($expression) + 1);
diff --git a/src/Symfony/Component/ExpressionLanguage/Tests/Node/AbstractNodeTestCase.php b/src/Symfony/Component/ExpressionLanguage/Tests/Node/AbstractNodeTestCase.php
index 7521788..59bca48 100644
--- a/src/Symfony/Component/ExpressionLanguage/Tests/Node/AbstractNodeTestCase.php
+++ b/src/Symfony/Component/ExpressionLanguage/Tests/Node/AbstractNodeTestCase.php
@@ -16,9 +16,7 @@ use Symfony\Component\ExpressionLanguage\Compiler;
 
 abstract class AbstractNodeTestCase extends TestCase
 {
-    /**
-     * @dataProvider getEvaluateData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getEvaluateData')]
     public function testEvaluate($expected, $node, $variables = [], $functions = [])
     {
         $this->assertSame($expected, $node->evaluate($functions, $variables));
@@ -26,9 +24,7 @@ abstract class AbstractNodeTestCase extends TestCase
 
     abstract public static function getEvaluateData();
 
-    /**
-     * @dataProvider getCompileData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getCompileData')]
     public function testCompile($expected, $node, $functions = [])
     {
         $compiler = new Compiler($functions);
@@ -38,9 +34,7 @@ abstract class AbstractNodeTestCase extends TestCase
 
     abstract public static function getCompileData();
 
-    /**
-     * @dataProvider getDumpData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDumpData')]
     public function testDump($expected, $node)
     {
         $this->assertSame($expected, $node->dump());
diff --git a/src/Symfony/Component/ExpressionLanguage/Tests/Node/BinaryNodeTest.php b/src/Symfony/Component/ExpressionLanguage/Tests/Node/BinaryNodeTest.php
index fd6cc53..52e17fa 100644
--- a/src/Symfony/Component/ExpressionLanguage/Tests/Node/BinaryNodeTest.php
+++ b/src/Symfony/Component/ExpressionLanguage/Tests/Node/BinaryNodeTest.php
@@ -238,9 +238,7 @@ class BinaryNodeTest extends AbstractNodeTestCase
         $node->evaluate([], []);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInOperatorStrictness()
     {
         $array = new ArrayNode();
diff --git a/src/Symfony/Component/ExpressionLanguage/Tests/ParserTest.php b/src/Symfony/Component/ExpressionLanguage/Tests/ParserTest.php
index 1429be8..6424970 100644
--- a/src/Symfony/Component/ExpressionLanguage/Tests/ParserTest.php
+++ b/src/Symfony/Component/ExpressionLanguage/Tests/ParserTest.php
@@ -48,9 +48,7 @@ class ParserTest extends TestCase
         $parser->parse($stream);
     }
 
-    /**
-     * @dataProvider getParseData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getParseData')]
     public function testParse($node, $expression, $names = [])
     {
         $lexer = new Lexer();
@@ -249,9 +247,7 @@ class ParserTest extends TestCase
         return new Node\GetAttrNode($node, new Node\ConstantNode($item, Node\GetAttrNode::ARRAY_CALL !== $type), new Node\ArgumentsNode(), $type);
     }
 
-    /**
-     * @dataProvider getInvalidPostfixData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidPostfixData')]
     public function testParseWithInvalidPostfixData($expr, $names = [])
     {
         $this->expectException(SyntaxError::class);
@@ -292,9 +288,7 @@ class ParserTest extends TestCase
         $parser->parse($lexer->tokenize('foo > bar'), ['foo', 'baz']);
     }
 
-    /**
-     * @dataProvider getLintData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLintData')]
     public function testLint($expression, $names, ?string $exception = null)
     {
         if ($exception) {
diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
index 147ea9b..d35c7e7 100644
--- a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
+++ b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
@@ -889,9 +889,7 @@ class FilesystemTest extends FilesystemTestCase
         $this->assertEquals($file, readlink($link));
     }
 
-    /**
-     * @depends testSymlink
-     */
+    #[\PHPUnit\Framework\Attributes\Depends('testSymlink')]
     public function testRemoveSymlink()
     {
         $this->markAsSkippedIfSymlinkIsMissing();
@@ -970,9 +968,7 @@ class FilesystemTest extends FilesystemTestCase
         $this->assertEquals(fileinode($file), fileinode($link));
     }
 
-    /**
-     * @depends testLink
-     */
+    #[\PHPUnit\Framework\Attributes\Depends('testLink')]
     public function testRemoveLink()
     {
         $this->markAsSkippedIfLinkIsMissing();
@@ -1142,9 +1138,7 @@ class FilesystemTest extends FilesystemTestCase
         $this->assertNull($this->filesystem->readlink($this->normalize($this->workspace.'invalid'), true));
     }
 
-    /**
-     * @dataProvider providePathsForMakePathRelative
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePathsForMakePathRelative')]
     public function testMakePathRelative($endPath, $startPath, $expectedPath)
     {
         $path = $this->filesystem->makePathRelative($endPath, $startPath);
@@ -1430,9 +1424,7 @@ class FilesystemTest extends FilesystemTestCase
         $this->assertFileEquals($file1, $targetPath.'file1');
     }
 
-    /**
-     * @dataProvider providePathsForIsAbsolutePath
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePathsForIsAbsolutePath')]
     public function testIsAbsolutePath($path, $expectedResult)
     {
         $result = $this->filesystem->isAbsolutePath($path);
diff --git a/src/Symfony/Component/Filesystem/Tests/PathTest.php b/src/Symfony/Component/Filesystem/Tests/PathTest.php
index 285d55f..6018325 100644
--- a/src/Symfony/Component/Filesystem/Tests/PathTest.php
+++ b/src/Symfony/Component/Filesystem/Tests/PathTest.php
@@ -164,9 +164,7 @@ class PathTest extends TestCase
         yield ['~/../../css/style.css', '/css/style.css'];
     }
 
-    /**
-     * @dataProvider provideCanonicalizationTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCanonicalizationTests')]
     public function testCanonicalize(string $path, string $canonicalized)
     {
         $this->assertSame($canonicalized, Path::canonicalize($path));
@@ -227,9 +225,7 @@ class PathTest extends TestCase
         yield ['D:/Folder/Aééé/Subfolder', 'D:/Folder/Aééé'];
     }
 
-    /**
-     * @dataProvider provideGetDirectoryTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideGetDirectoryTests')]
     public function testGetDirectory(string $path, string $directory)
     {
         $this->assertSame($directory, Path::getDirectory($path));
@@ -258,9 +254,7 @@ class PathTest extends TestCase
         yield ['/webmozart/symfony/.style.css', '.css', '.style'];
     }
 
-    /**
-     * @dataProvider provideGetFilenameWithoutExtensionTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideGetFilenameWithoutExtensionTests')]
     public function testGetFilenameWithoutExtension(string $path, ?string $extension, string $filename)
     {
         $this->assertSame($filename, Path::getFilenameWithoutExtension($path, $extension));
@@ -283,9 +277,7 @@ class PathTest extends TestCase
         yield ['/webmozart/symfony/style.ÄÖÜ', true, 'äöü'];
     }
 
-    /**
-     * @dataProvider provideGetExtensionTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideGetExtensionTests')]
     public function testGetExtension(string $path, bool $forceLowerCase, string $extension)
     {
         $this->assertSame($extension, Path::getExtension($path, $forceLowerCase));
@@ -329,10 +321,9 @@ class PathTest extends TestCase
     }
 
     /**
-     * @dataProvider provideHasExtensionTests
-     *
      * @param string|string[]|null $extension
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideHasExtensionTests')]
     public function testHasExtension(bool $hasExtension, string $path, $extension, bool $ignoreCase)
     {
         $this->assertSame($hasExtension, Path::hasExtension($path, $extension, $ignoreCase));
@@ -354,9 +345,7 @@ class PathTest extends TestCase
         yield ['', 'css', ''];
     }
 
-    /**
-     * @dataProvider provideChangeExtensionTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideChangeExtensionTests')]
     public function testChangeExtension(string $path, string $extension, string $pathExpected)
     {
         $this->assertSame($pathExpected, Path::changeExtension($path, $extension));
@@ -391,17 +380,13 @@ class PathTest extends TestCase
         yield ['C:css/style.css', false];
     }
 
-    /**
-     * @dataProvider provideIsAbsolutePathTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIsAbsolutePathTests')]
     public function testIsAbsolute(string $path, bool $isAbsolute)
     {
         $this->assertSame($isAbsolute, Path::isAbsolute($path));
     }
 
-    /**
-     * @dataProvider provideIsAbsolutePathTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIsAbsolutePathTests')]
     public function testIsRelative(string $path, bool $isAbsolute)
     {
         $this->assertSame(!$isAbsolute, Path::isRelative($path));
@@ -433,9 +418,7 @@ class PathTest extends TestCase
         yield ['phar://C:', 'phar://C:/'];
     }
 
-    /**
-     * @dataProvider provideGetRootTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideGetRootTests')]
     public function testGetRoot(string $path, string $root)
     {
         $this->assertSame($root, Path::getRoot($path));
@@ -529,9 +512,7 @@ class PathTest extends TestCase
         yield ['D:\\css\\style.css', 'D:/webmozart/symfony', 'D:/css/style.css'];
     }
 
-    /**
-     * @dataProvider provideMakeAbsoluteTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMakeAbsoluteTests')]
     public function testMakeAbsolute(string $relativePath, string $basePath, string $absolutePath)
     {
         $this->assertSame($absolutePath, Path::makeAbsolute($relativePath, $basePath));
@@ -579,9 +560,7 @@ class PathTest extends TestCase
         yield ['phar://C:\\css\\style.css', 'C:\\webmozart\\symfony'];
     }
 
-    /**
-     * @dataProvider provideAbsolutePathsWithDifferentRoots
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAbsolutePathsWithDifferentRoots')]
     public function testMakeAbsoluteDoesNotFailIfDifferentRoot(string $basePath, string $absolutePath)
     {
         // If a path in partition D: is passed, but $basePath is in partition
@@ -682,9 +661,7 @@ class PathTest extends TestCase
         yield ['\\webmozart\\symfony\\css\\style.css', '/webmozart/symfony', 'css/style.css'];
     }
 
-    /**
-     * @dataProvider provideMakeRelativeTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMakeRelativeTests')]
     public function testMakeRelative(string $absolutePath, string $basePath, string $relativePath)
     {
         $this->assertSame($relativePath, Path::makeRelative($absolutePath, $basePath));
@@ -705,9 +682,7 @@ class PathTest extends TestCase
         Path::makeRelative('/webmozart/symfony/css/style.css', '');
     }
 
-    /**
-     * @dataProvider provideAbsolutePathsWithDifferentRoots
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAbsolutePathsWithDifferentRoots')]
     public function testMakeRelativeFailsIfDifferentRoot(string $absolutePath, string $basePath)
     {
         $this->expectException(\InvalidArgumentException::class);
@@ -724,9 +699,7 @@ class PathTest extends TestCase
         yield ['', false];
     }
 
-    /**
-     * @dataProvider provideIsLocalTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIsLocalTests')]
     public function testIsLocal(string $path, bool $isLocal)
     {
         $this->assertSame($isLocal, Path::isLocal($path));
@@ -843,10 +816,9 @@ class PathTest extends TestCase
     }
 
     /**
-     * @dataProvider provideGetLongestCommonBasePathTests
-     *
      * @param string[] $paths
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideGetLongestCommonBasePathTests')]
     public function testGetLongestCommonBasePath(array $paths, ?string $basePath)
     {
         $this->assertSame($basePath, Path::getLongestCommonBasePath(...$paths));
@@ -933,9 +905,7 @@ class PathTest extends TestCase
         yield ['phar://C:/base/path', 'phar://D:/base/path', false];
     }
 
-    /**
-     * @dataProvider provideIsBasePathTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIsBasePathTests')]
     public function testIsBasePath(string $path, string $ofPath, bool $result)
     {
         $this->assertSame($result, Path::isBasePath($path, $ofPath));
@@ -1012,9 +982,7 @@ class PathTest extends TestCase
         yield [['phar://C:/', '/path/to/test'], 'phar://C:/path/to/test'];
     }
 
-    /**
-     * @dataProvider provideJoinTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideJoinTests')]
     public function testJoin(array $paths, $result)
     {
         $this->assertSame($result, Path::join(...$paths));
diff --git a/src/Symfony/Component/Finder/Tests/Comparator/ComparatorTest.php b/src/Symfony/Component/Finder/Tests/Comparator/ComparatorTest.php
index 722199c..0f994dd 100644
--- a/src/Symfony/Component/Finder/Tests/Comparator/ComparatorTest.php
+++ b/src/Symfony/Component/Finder/Tests/Comparator/ComparatorTest.php
@@ -24,9 +24,7 @@ class ComparatorTest extends TestCase
         new Comparator('some target', 'foo');
     }
 
-    /**
-     * @dataProvider provideMatches
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMatches')]
     public function testTestSucceeds(string $operator, string $target, string $testedValue)
     {
         $c = new Comparator($target, $operator);
@@ -53,9 +51,7 @@ class ComparatorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideNonMatches
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNonMatches')]
     public function testTestFails(string $operator, string $target, string $testedValue)
     {
         $c = new Comparator($target, $operator);
diff --git a/src/Symfony/Component/Finder/Tests/Comparator/DateComparatorTest.php b/src/Symfony/Component/Finder/Tests/Comparator/DateComparatorTest.php
index e50b713..bcb814b 100644
--- a/src/Symfony/Component/Finder/Tests/Comparator/DateComparatorTest.php
+++ b/src/Symfony/Component/Finder/Tests/Comparator/DateComparatorTest.php
@@ -33,9 +33,7 @@ class DateComparatorTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider getTestData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTestData')]
     public function testTest($test, $match, $noMatch)
     {
         $c = new DateComparator($test);
diff --git a/src/Symfony/Component/Finder/Tests/Comparator/NumberComparatorTest.php b/src/Symfony/Component/Finder/Tests/Comparator/NumberComparatorTest.php
index 60c5f1c..35bccb4 100644
--- a/src/Symfony/Component/Finder/Tests/Comparator/NumberComparatorTest.php
+++ b/src/Symfony/Component/Finder/Tests/Comparator/NumberComparatorTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Finder\Comparator\NumberComparator;
 
 class NumberComparatorTest extends TestCase
 {
-    /**
-     * @dataProvider getConstructorTestData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConstructorTestData')]
     public function testConstructor($successes, $failures)
     {
         foreach ($successes as $s) {
@@ -35,9 +33,7 @@ class NumberComparatorTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider getTestData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTestData')]
     public function testTest($test, $match, $noMatch)
     {
         $c = new NumberComparator($test);
diff --git a/src/Symfony/Component/Finder/Tests/FinderOpenBasedirTest.php b/src/Symfony/Component/Finder/Tests/FinderOpenBasedirTest.php
index ec47a55..9ed5184 100644
--- a/src/Symfony/Component/Finder/Tests/FinderOpenBasedirTest.php
+++ b/src/Symfony/Component/Finder/Tests/FinderOpenBasedirTest.php
@@ -15,9 +15,7 @@ use Symfony\Component\Finder\Finder;
 
 class FinderOpenBasedirTest extends Iterator\RealIteratorTestCase
 {
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testIgnoreVCSIgnoredWithOpenBasedir()
     {
         $this->markTestIncomplete('Test case needs to be refactored so that PHPUnit can run it');
diff --git a/src/Symfony/Component/Finder/Tests/FinderTest.php b/src/Symfony/Component/Finder/Tests/FinderTest.php
index 1ca2e78..b8447ab 100644
--- a/src/Symfony/Component/Finder/Tests/FinderTest.php
+++ b/src/Symfony/Component/Finder/Tests/FinderTest.php
@@ -297,9 +297,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
         ]), $finder->in(self::$tmpDir)->getIterator());
     }
 
-    /**
-     * @dataProvider getRegexNameTestData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRegexNameTestData')]
     public function testRegexName($regex)
     {
         $finder = $this->buildFinder();
@@ -1367,9 +1365,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
         $this->assertFalse($finder->hasResults());
     }
 
-    /**
-     * @dataProvider getContainsTestData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getContainsTestData')]
     public function testContains($matchPatterns, $noMatchPatterns, $expected)
     {
         $finder = $this->buildFinder();
@@ -1498,9 +1494,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getTestPathData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTestPathData')]
     public function testPath($matchPatterns, $noMatchPatterns, array $expected)
     {
         $finder = $this->buildFinder();
diff --git a/src/Symfony/Component/Finder/Tests/GitignoreTest.php b/src/Symfony/Component/Finder/Tests/GitignoreTest.php
index aea9b48..a42d161 100644
--- a/src/Symfony/Component/Finder/Tests/GitignoreTest.php
+++ b/src/Symfony/Component/Finder/Tests/GitignoreTest.php
@@ -19,10 +19,8 @@ use Symfony\Component\Finder\Gitignore;
  */
 class GitignoreTest extends TestCase
 {
-    /**
-     * @dataProvider provider
-     * @dataProvider providerExtended
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provider')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerExtended')]
     public function testToRegex(array $gitignoreLines, array $matchingCases, array $nonMatchingCases)
     {
         $patterns = implode("\n", $gitignoreLines);
@@ -444,9 +442,7 @@ class GitignoreTest extends TestCase
         return $cases;
     }
 
-    /**
-     * @dataProvider provideNegatedPatternsCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNegatedPatternsCases')]
     public function testToRegexMatchingNegatedPatterns(array $gitignoreLines, array $matchingCases, array $nonMatchingCases)
     {
         $patterns = implode("\n", $gitignoreLines);
diff --git a/src/Symfony/Component/Finder/Tests/Iterator/CustomFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/CustomFilterIteratorTest.php
index e3806c4..46ef565 100644
--- a/src/Symfony/Component/Finder/Tests/Iterator/CustomFilterIteratorTest.php
+++ b/src/Symfony/Component/Finder/Tests/Iterator/CustomFilterIteratorTest.php
@@ -21,9 +21,7 @@ class CustomFilterIteratorTest extends IteratorTestCase
         new CustomFilterIterator(new Iterator(), ['foo']);
     }
 
-    /**
-     * @dataProvider getAcceptData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAcceptData')]
     public function testAccept($filters, $expected)
     {
         $inner = new Iterator(['test.php', 'test.py', 'foo.php']);
diff --git a/src/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php
index ba86ed1..ed86615 100644
--- a/src/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php
+++ b/src/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Finder\Iterator\DateRangeFilterIterator;
 
 class DateRangeFilterIteratorTest extends RealIteratorTestCase
 {
-    /**
-     * @dataProvider getAcceptData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAcceptData')]
     public function testAccept($size, $expected)
     {
         $this->markTestSkipped('Test failing on current reproducible infrastructure');
diff --git a/src/Symfony/Component/Finder/Tests/Iterator/DepthRangeFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/DepthRangeFilterIteratorTest.php
index 3a4d679..2bfef6f 100644
--- a/src/Symfony/Component/Finder/Tests/Iterator/DepthRangeFilterIteratorTest.php
+++ b/src/Symfony/Component/Finder/Tests/Iterator/DepthRangeFilterIteratorTest.php
@@ -15,9 +15,7 @@ use Symfony\Component\Finder\Iterator\DepthRangeFilterIterator;
 
 class DepthRangeFilterIteratorTest extends RealIteratorTestCase
 {
-    /**
-     * @dataProvider getAcceptData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAcceptData')]
     public function testAccept($minDepth, $maxDepth, $expected)
     {
         $inner = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->toAbsolute(), \FilesystemIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST);
diff --git a/src/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php
index 728b783..a81bbd3 100644
--- a/src/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php
+++ b/src/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator;
 
 class ExcludeDirectoryFilterIteratorTest extends RealIteratorTestCase
 {
-    /**
-     * @dataProvider getAcceptData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAcceptData')]
     public function testAccept($directories, $expected)
     {
         $inner = new \RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->toAbsolute(), \FilesystemIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST);
diff --git a/src/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php
index e349fc7..e906068 100644
--- a/src/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php
+++ b/src/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php
@@ -15,9 +15,7 @@ use Symfony\Component\Finder\Iterator\FileTypeFilterIterator;
 
 class FileTypeFilterIteratorTest extends RealIteratorTestCase
 {
-    /**
-     * @dataProvider getAcceptData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAcceptData')]
     public function testAccept($mode, $expected)
     {
         $inner = new InnerTypeIterator(self::$files);
diff --git a/src/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php
index 578b34d..430b54a 100644
--- a/src/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php
+++ b/src/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php
@@ -36,9 +36,7 @@ class FilecontentFilterIteratorTest extends IteratorTestCase
         $this->assertIterator([], $iterator);
     }
 
-    /**
-     * @dataProvider getTestFilterData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTestFilterData')]
     public function testFilter(\Iterator $inner, array $matchPatterns, array $noMatchPatterns, array $resultArray)
     {
         $iterator = new FilecontentFilterIterator($inner, $matchPatterns, $noMatchPatterns);
diff --git a/src/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php
index db4eb2b..e573ec5 100644
--- a/src/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php
+++ b/src/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php
@@ -15,9 +15,7 @@ use Symfony\Component\Finder\Iterator\FilenameFilterIterator;
 
 class FilenameFilterIteratorTest extends IteratorTestCase
 {
-    /**
-     * @dataProvider getAcceptData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAcceptData')]
     public function testAccept($matchPatterns, $noMatchPatterns, $expected)
     {
         $inner = new InnerNameIterator(['test.php', 'test.py', 'foo.php']);
diff --git a/src/Symfony/Component/Finder/Tests/Iterator/MultiplePcreFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/MultiplePcreFilterIteratorTest.php
index e6abf94..b1e2096 100644
--- a/src/Symfony/Component/Finder/Tests/Iterator/MultiplePcreFilterIteratorTest.php
+++ b/src/Symfony/Component/Finder/Tests/Iterator/MultiplePcreFilterIteratorTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Finder\Iterator\MultiplePcreFilterIterator;
 
 class MultiplePcreFilterIteratorTest extends TestCase
 {
-    /**
-     * @dataProvider getIsRegexFixtures
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getIsRegexFixtures')]
     public function testIsRegex($string, $isRegex, $message)
     {
         $testIterator = new TestMultiplePcreFilterIterator();
diff --git a/src/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php
index 5c0663e..d895c77 100644
--- a/src/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php
+++ b/src/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php
@@ -15,9 +15,7 @@ use Symfony\Component\Finder\Iterator\PathFilterIterator;
 
 class PathFilterIteratorTest extends IteratorTestCase
 {
-    /**
-     * @dataProvider getTestFilterData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTestFilterData')]
     public function testFilter(\Iterator $inner, array $matchPatterns, array $noMatchPatterns, array $resultArray)
     {
         $iterator = new PathFilterIterator($inner, $matchPatterns, $noMatchPatterns);
diff --git a/src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php
index ddeca18..44d2192 100644
--- a/src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php
+++ b/src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php
@@ -22,10 +22,8 @@ class RecursiveDirectoryIteratorTest extends IteratorTestCase
         }
     }
 
-    /**
-     * @group network
-     * @group integration
-     */
+    #[\PHPUnit\Framework\Attributes\Group('network')]
+    #[\PHPUnit\Framework\Attributes\Group('integration')]
     public function testRewindOnFtp()
     {
         if (!getenv('INTEGRATION_FTP_URL')) {
@@ -39,10 +37,8 @@ class RecursiveDirectoryIteratorTest extends IteratorTestCase
         $this->expectNotToPerformAssertions();
     }
 
-    /**
-     * @group network
-     * @group integration
-     */
+    #[\PHPUnit\Framework\Attributes\Group('network')]
+    #[\PHPUnit\Framework\Attributes\Group('integration')]
     public function testSeekOnFtp()
     {
         if (!getenv('INTEGRATION_FTP_URL')) {
diff --git a/src/Symfony/Component/Finder/Tests/Iterator/SizeRangeFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/SizeRangeFilterIteratorTest.php
index e5f3b6a..49380e3 100644
--- a/src/Symfony/Component/Finder/Tests/Iterator/SizeRangeFilterIteratorTest.php
+++ b/src/Symfony/Component/Finder/Tests/Iterator/SizeRangeFilterIteratorTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Finder\Iterator\SizeRangeFilterIterator;
 
 class SizeRangeFilterIteratorTest extends RealIteratorTestCase
 {
-    /**
-     * @dataProvider getAcceptData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAcceptData')]
     public function testAccept($size, $expected)
     {
         $inner = new InnerSizeIterator(self::$files);
diff --git a/src/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php
index 32b1a39..b77c803 100644
--- a/src/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php
+++ b/src/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php
@@ -25,9 +25,7 @@ class SortableIteratorTest extends RealIteratorTestCase
         }
     }
 
-    /**
-     * @dataProvider getAcceptData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAcceptData')]
     public function testAccept($mode, $expected)
     {
         if (!\is_callable($mode)) {
diff --git a/src/Symfony/Component/Finder/Tests/Iterator/VcsIgnoredFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/VcsIgnoredFilterIteratorTest.php
index f725374..6bc9dee 100644
--- a/src/Symfony/Component/Finder/Tests/Iterator/VcsIgnoredFilterIteratorTest.php
+++ b/src/Symfony/Component/Finder/Tests/Iterator/VcsIgnoredFilterIteratorTest.php
@@ -31,9 +31,8 @@ class VcsIgnoredFilterIteratorTest extends IteratorTestCase
 
     /**
      * @param array<string, string> $gitIgnoreFiles
-     *
-     * @dataProvider getAcceptData
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAcceptData')]
     public function testAccept(array $gitIgnoreFiles, array $otherFileNames, array $expectedResult, string $baseDir = '')
     {
         $otherFileNames = $this->toAbsolute($otherFileNames);
diff --git a/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTestCase.php b/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTestCase.php
index f80efff..5d2560f 100644
--- a/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTestCase.php
+++ b/src/Symfony/Component/Form/Tests/AbstractRequestHandlerTestCase.php
@@ -76,9 +76,7 @@ abstract class AbstractRequestHandlerTestCase extends TestCase
         ], self::methodExceptGetProvider());
     }
 
-    /**
-     * @dataProvider methodProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('methodProvider')]
     public function testSubmitIfNameInRequest($method)
     {
         $form = $this->createForm('param1', $method);
@@ -93,9 +91,7 @@ abstract class AbstractRequestHandlerTestCase extends TestCase
         $this->assertSame('DATA', $form->getData());
     }
 
-    /**
-     * @dataProvider methodProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('methodProvider')]
     public function testDoNotSubmitIfWrongRequestMethod($method)
     {
         $form = $this->createForm('param1', $method);
@@ -111,9 +107,7 @@ abstract class AbstractRequestHandlerTestCase extends TestCase
         $this->assertFalse($form->isSubmitted());
     }
 
-    /**
-     * @dataProvider methodExceptGetProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('methodExceptGetProvider')]
     public function testDoNoSubmitSimpleFormIfNameNotInRequestAndNotGetRequest($method)
     {
         $form = $this->createForm('param1', $method, false);
@@ -127,9 +121,7 @@ abstract class AbstractRequestHandlerTestCase extends TestCase
         $this->assertFalse($form->isSubmitted());
     }
 
-    /**
-     * @dataProvider methodExceptGetProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('methodExceptGetProvider')]
     public function testDoNotSubmitCompoundFormIfNameNotInRequestAndNotGetRequest($method)
     {
         $form = $this->createForm('param1', $method, true);
@@ -156,9 +148,7 @@ abstract class AbstractRequestHandlerTestCase extends TestCase
         $this->assertFalse($form->isSubmitted());
     }
 
-    /**
-     * @dataProvider methodProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('methodProvider')]
     public function testSubmitFormWithEmptyNameIfAtLeastOneFieldInRequest($method)
     {
         $form = $this->createForm('', $method, true);
@@ -185,9 +175,7 @@ abstract class AbstractRequestHandlerTestCase extends TestCase
         $this->assertNull($form->get('param2')->getData());
     }
 
-    /**
-     * @dataProvider methodProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('methodProvider')]
     public function testDoNotSubmitFormWithEmptyNameIfNoFieldInRequest($method)
     {
         $form = $this->createForm('', $method, true);
@@ -203,9 +191,7 @@ abstract class AbstractRequestHandlerTestCase extends TestCase
         $this->assertFalse($form->isSubmitted());
     }
 
-    /**
-     * @dataProvider methodExceptGetProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('methodExceptGetProvider')]
     public function testMergeParamsAndFiles($method)
     {
         $form = $this->createForm('param1', $method, true);
@@ -248,9 +234,7 @@ abstract class AbstractRequestHandlerTestCase extends TestCase
         $this->assertSame('bar', $form->get('1')->getData());
     }
 
-    /**
-     * @dataProvider methodExceptGetProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('methodExceptGetProvider')]
     public function testMergeParamsAndFilesMultiple($method)
     {
         $form = $this->createForm('param1', $method, true);
@@ -284,9 +268,7 @@ abstract class AbstractRequestHandlerTestCase extends TestCase
         $this->assertSame(['foo', 'bar', 'baz', $file1, $file2], $data);
     }
 
-    /**
-     * @dataProvider methodExceptGetProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('methodExceptGetProvider')]
     public function testParamTakesPrecedenceOverFile($method)
     {
         $form = $this->createForm('param1', $method);
@@ -346,9 +328,7 @@ abstract class AbstractRequestHandlerTestCase extends TestCase
         $this->assertNotNull($itemsForm->get('0')->get('file'));
     }
 
-    /**
-     * @dataProvider methodExceptGetProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('methodExceptGetProvider')]
     public function testSubmitFileIfNoParam($method)
     {
         $form = $this->createBuilder('param1', false, ['allow_file_upload' => true])
@@ -368,9 +348,7 @@ abstract class AbstractRequestHandlerTestCase extends TestCase
         $this->assertSame($file, $form->getData());
     }
 
-    /**
-     * @dataProvider methodExceptGetProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('methodExceptGetProvider')]
     public function testSubmitMultipleFiles($method)
     {
         $form = $this->createBuilder('param1', false, ['allow_file_upload' => true])
@@ -392,9 +370,7 @@ abstract class AbstractRequestHandlerTestCase extends TestCase
         $this->assertSame($file, $form->getData());
     }
 
-    /**
-     * @dataProvider methodExceptGetProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('methodExceptGetProvider')]
     public function testSubmitFileWithNamelessForm($method)
     {
         $form = $this->createForm('', $method, true);
@@ -412,9 +388,7 @@ abstract class AbstractRequestHandlerTestCase extends TestCase
         $this->assertSame($file, $fileForm->getData());
     }
 
-    /**
-     * @dataProvider getPostMaxSizeFixtures
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPostMaxSizeFixtures')]
     public function testAddFormErrorIfPostMaxSizeExceeded(?int $contentLength, string $iniMax, bool $shouldFail, array $errorParams = [])
     {
         $this->serverParams->contentLength = $contentLength;
@@ -463,9 +437,7 @@ abstract class AbstractRequestHandlerTestCase extends TestCase
         $this->assertFalse($this->requestHandler->isFileUpload($this->getInvalidFile()));
     }
 
-    /**
-     * @dataProvider uploadFileErrorCodes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('uploadFileErrorCodes')]
     public function testFailedFileUploadIsTurnedIntoFormError($errorCode, $expectedErrorCode)
     {
         $this->assertSame($expectedErrorCode, $this->requestHandler->getUploadFileError($this->getFailedUploadedFile($errorCode)));
diff --git a/src/Symfony/Component/Form/Tests/ButtonBuilderTest.php b/src/Symfony/Component/Form/Tests/ButtonBuilderTest.php
index 71668dd..b83ec98 100644
--- a/src/Symfony/Component/Form/Tests/ButtonBuilderTest.php
+++ b/src/Symfony/Component/Form/Tests/ButtonBuilderTest.php
@@ -31,9 +31,7 @@ class ButtonBuilderTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidNames
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidNames')]
     public function testValidNames($name)
     {
         $this->assertInstanceOf(ButtonBuilder::class, new ButtonBuilder($name));
@@ -56,9 +54,7 @@ class ButtonBuilderTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidNames
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidNames')]
     public function testInvalidNames($name)
     {
         $this->expectException(InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Form/Tests/ButtonTest.php b/src/Symfony/Component/Form/Tests/ButtonTest.php
index 9431328..c1d64ad 100644
--- a/src/Symfony/Component/Form/Tests/ButtonTest.php
+++ b/src/Symfony/Component/Form/Tests/ButtonTest.php
@@ -37,9 +37,7 @@ class ButtonTest extends TestCase
         $button->setParent($this->getFormBuilder()->getForm());
     }
 
-    /**
-     * @dataProvider getDisabledStates
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDisabledStates')]
     public function testDisabledIfParentIsDisabled($parentDisabled, $buttonDisabled, $result)
     {
         $form = $this->getFormBuilder()
diff --git a/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php b/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php
index 67e8620..e979578 100644
--- a/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php
+++ b/src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php
@@ -71,9 +71,7 @@ class CachingFactoryDecoratorTest extends TestCase
         $this->assertEquals(new ArrayChoiceList(['A' => 'a']), $list2);
     }
 
-    /**
-     * @dataProvider provideSameChoices
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSameChoices')]
     public function testCreateFromChoicesSameChoices($choice1, $choice2)
     {
         $list1 = $this->factory->createListFromChoices([$choice1]);
@@ -84,9 +82,7 @@ class CachingFactoryDecoratorTest extends TestCase
         $this->assertEquals(new ArrayChoiceList([$choice2]), $list2);
     }
 
-    /**
-     * @dataProvider provideDistinguishedChoices
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDistinguishedChoices')]
     public function testCreateFromChoicesDifferentChoices($choice1, $choice2)
     {
         $list1 = $this->factory->createListFromChoices([$choice1]);
diff --git a/src/Symfony/Component/Form/Tests/Command/DebugCommandTest.php b/src/Symfony/Component/Form/Tests/Command/DebugCommandTest.php
index 4537099..3f10437 100644
--- a/src/Symfony/Component/Form/Tests/Command/DebugCommandTest.php
+++ b/src/Symfony/Component/Form/Tests/Command/DebugCommandTest.php
@@ -184,9 +184,7 @@ TXT
             , $tester->getDisplay(true));
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $formRegistry = new FormRegistry([], new ResolvedFormTypeFactory());
diff --git a/src/Symfony/Component/Form/Tests/CompoundFormPerformanceTest.php b/src/Symfony/Component/Form/Tests/CompoundFormPerformanceTest.php
index b9c81f1..94665cc 100644
--- a/src/Symfony/Component/Form/Tests/CompoundFormPerformanceTest.php
+++ b/src/Symfony/Component/Form/Tests/CompoundFormPerformanceTest.php
@@ -20,9 +20,9 @@ class CompoundFormPerformanceTest extends FormPerformanceTestCase
 {
     /**
      * Create a compound form multiple times, as happens in a collection form.
-     *
-     * @group benchmark
      */
+    #[\PHPUnit\Framework\Attributes\Group('benchmark')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testArrayBasedForm()
     {
         $this->setMaxRunningTime(1);
diff --git a/src/Symfony/Component/Form/Tests/CompoundFormTest.php b/src/Symfony/Component/Form/Tests/CompoundFormTest.php
index 882e730..ba2de46 100644
--- a/src/Symfony/Component/Form/Tests/CompoundFormTest.php
+++ b/src/Symfony/Component/Form/Tests/CompoundFormTest.php
@@ -585,9 +585,7 @@ class CompoundFormTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider requestMethodProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('requestMethodProvider')]
     public function testSubmitPostOrPutRequest($method)
     {
         $path = tempnam(sys_get_temp_dir(), 'sf');
@@ -633,9 +631,7 @@ class CompoundFormTest extends TestCase
         unlink($path);
     }
 
-    /**
-     * @dataProvider requestMethodProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('requestMethodProvider')]
     public function testSubmitPostOrPutRequestWithEmptyRootFormName($method)
     {
         $path = tempnam(sys_get_temp_dir(), 'sf');
@@ -681,9 +677,7 @@ class CompoundFormTest extends TestCase
         unlink($path);
     }
 
-    /**
-     * @dataProvider requestMethodProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('requestMethodProvider')]
     public function testSubmitPostOrPutRequestWithSingleChildForm($method)
     {
         $path = tempnam(sys_get_temp_dir(), 'sf');
@@ -718,9 +712,7 @@ class CompoundFormTest extends TestCase
         unlink($path);
     }
 
-    /**
-     * @dataProvider requestMethodProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('requestMethodProvider')]
     public function testSubmitPostOrPutRequestWithSingleChildFormUploadedFile($method)
     {
         $path = tempnam(sys_get_temp_dir(), 'sf');
diff --git a/src/Symfony/Component/Form/Tests/Console/Descriptor/AbstractDescriptorTestCase.php b/src/Symfony/Component/Form/Tests/Console/Descriptor/AbstractDescriptorTestCase.php
index 8a99c20..81cf0ce 100644
--- a/src/Symfony/Component/Form/Tests/Console/Descriptor/AbstractDescriptorTestCase.php
+++ b/src/Symfony/Component/Form/Tests/Console/Descriptor/AbstractDescriptorTestCase.php
@@ -41,7 +41,7 @@ abstract class AbstractDescriptorTestCase extends TestCase
         putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
     }
 
-    /** @dataProvider getDescribeDefaultsTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeDefaultsTestData')]
     public function testDescribeDefaults($object, array $options, $fixtureName)
     {
         $describedObject = $this->getObjectDescription($object, $options);
@@ -54,7 +54,7 @@ abstract class AbstractDescriptorTestCase extends TestCase
         }
     }
 
-    /** @dataProvider getDescribeResolvedFormTypeTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeResolvedFormTypeTestData')]
     public function testDescribeResolvedFormType(ResolvedFormTypeInterface $type, array $options, $fixtureName)
     {
         $describedObject = $this->getObjectDescription($type, $options);
@@ -67,7 +67,7 @@ abstract class AbstractDescriptorTestCase extends TestCase
         }
     }
 
-    /** @dataProvider getDescribeOptionTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeOptionTestData')]
     public function testDescribeOption(OptionsResolver $optionsResolver, array $options, $fixtureName)
     {
         $describedObject = $this->getObjectDescription($optionsResolver, $options);
diff --git a/src/Symfony/Component/Form/Tests/DependencyInjection/FormPassTest.php b/src/Symfony/Component/Form/Tests/DependencyInjection/FormPassTest.php
index e9a7b50..b29af38 100644
--- a/src/Symfony/Component/Form/Tests/DependencyInjection/FormPassTest.php
+++ b/src/Symfony/Component/Form/Tests/DependencyInjection/FormPassTest.php
@@ -95,9 +95,7 @@ class FormPassTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider addTaggedTypeExtensionsDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('addTaggedTypeExtensionsDataProvider')]
     public function testAddTaggedTypeExtensions(array $extensions, array $expectedRegisteredExtensions, array $parameters = [])
     {
         $container = $this->createContainerBuilder();
@@ -260,9 +258,8 @@ class FormPassTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider privateTaggedServicesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('privateTaggedServicesProvider')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testPrivateTaggedServices($id, $class, $tagName, callable $assertion, array $tagAttributes = [])
     {
         $formPass = new FormPass();
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/DataMapperTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/DataMapperTest.php
index 1a8f267..238ba9b 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/DataMapperTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/DataMapperTest.php
@@ -317,9 +317,7 @@ class DataMapperTest extends TestCase
         self::assertSame('BMW', $car->engine);
     }
 
-    /**
-     * @dataProvider provideDate
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDate')]
     public function testMapFormsToDataDoesNotChangeEqualDateTimeInstance($date)
     {
         $article = [];
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php
index 4c6f749..3b915c6 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ChoiceToValueTransformerTest.php
@@ -41,9 +41,7 @@ class ChoiceToValueTransformerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider transformProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('transformProvider')]
     public function testTransform($in, $out, $inWithNull, $outWithNull)
     {
         $this->assertSame($out, $this->transformer->transform($in));
@@ -62,9 +60,7 @@ class ChoiceToValueTransformerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider reverseTransformProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('reverseTransformProvider')]
     public function testReverseTransform($in, $out, $inWithNull, $outWithNull)
     {
         $this->assertSame($out, $this->transformer->reverseTransform($in));
@@ -81,9 +77,7 @@ class ChoiceToValueTransformerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider reverseTransformExpectsStringOrNullProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('reverseTransformExpectsStringOrNullProvider')]
     public function testReverseTransformExpectsStringOrNull($value)
     {
         $this->expectException(TransformationFailedException::class);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToStringTransformerTest.php
index 1a97873..4e85e76 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToStringTransformerTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateIntervalToStringTransformerTest.php
@@ -52,9 +52,7 @@ class DateIntervalToStringTransformerTest extends DateIntervalTestCase
         ];
     }
 
-    /**
-     * @dataProvider dataProviderISO
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderISO')]
     public function testTransform($format, $output, $input)
     {
         $transformer = new DateIntervalToStringTransformer($format);
@@ -75,9 +73,7 @@ class DateIntervalToStringTransformerTest extends DateIntervalTestCase
         $transformer->transform('1234');
     }
 
-    /**
-     * @dataProvider dataProviderISO
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderISO')]
     public function testReverseTransform($format, $input, $output)
     {
         $reverseTransformer = new DateIntervalToStringTransformer($format, true);
@@ -85,9 +81,7 @@ class DateIntervalToStringTransformerTest extends DateIntervalTestCase
         $this->assertDateIntervalEquals($interval, $reverseTransformer->reverseTransform($input));
     }
 
-    /**
-     * @dataProvider dataProviderDate
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderDate')]
     public function testReverseTransformDateString($format, $input, $output)
     {
         $reverseTransformer = new DateIntervalToStringTransformer($format, true);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeImmutableToDateTimeTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeImmutableToDateTimeTransformerTest.php
index 04f8e74..94e954f 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeImmutableToDateTimeTransformerTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeImmutableToDateTimeTransformerTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeImmutableToDat
 
 class DateTimeImmutableToDateTimeTransformerTest extends TestCase
 {
-    /**
-     * @dataProvider provider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provider')]
     public function testTransform(\DateTime $expectedOutput, \DateTimeImmutable $input)
     {
         $transformer = new DateTimeImmutableToDateTimeTransformer();
@@ -61,9 +59,7 @@ class DateTimeImmutableToDateTimeTransformerTest extends TestCase
         $transformer->transform(new \DateTime());
     }
 
-    /**
-     * @dataProvider provider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provider')]
     public function testReverseTransform(\DateTime $input, \DateTimeImmutable $expectedOutput)
     {
         $transformer = new DateTimeImmutableToDateTimeTransformer();
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformerTest.php
index f2fb15c..970bea9 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformerTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToHtml5LocalDateTimeTransformerTest.php
@@ -56,9 +56,7 @@ class DateTimeToHtml5LocalDateTimeTransformerTest extends BaseDateTimeTransforme
         ];
     }
 
-    /**
-     * @dataProvider transformProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('transformProvider')]
     public function testTransform($fromTz, $toTz, $from, $to, bool $withSeconds)
     {
         $transformer = new DateTimeToHtml5LocalDateTimeTransformer($fromTz, $toTz, $withSeconds);
@@ -66,9 +64,7 @@ class DateTimeToHtml5LocalDateTimeTransformerTest extends BaseDateTimeTransforme
         $this->assertSame($to, $transformer->transform(null !== $from ? new \DateTime($from) : null));
     }
 
-    /**
-     * @dataProvider transformProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('transformProvider')]
     public function testTransformDateTimeImmutable($fromTz, $toTz, $from, $to, bool $withSeconds)
     {
         $transformer = new DateTimeToHtml5LocalDateTimeTransformer($fromTz, $toTz, $withSeconds);
@@ -83,9 +79,7 @@ class DateTimeToHtml5LocalDateTimeTransformerTest extends BaseDateTimeTransforme
         $transformer->transform('2010-01-01');
     }
 
-    /**
-     * @dataProvider reverseTransformProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('reverseTransformProvider')]
     public function testReverseTransform($toTz, $fromTz, $to, $from)
     {
         $transformer = new DateTimeToHtml5LocalDateTimeTransformer($toTz, $fromTz);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php
index c3806fd..71fba47 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php
@@ -91,9 +91,7 @@ class DateTimeToLocalizedStringTransformerTest extends BaseDateTimeTransformerTe
         ];
     }
 
-    /**
-     * @dataProvider dataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dataProvider')]
     public function testTransform($dateFormat, $timeFormat, $pattern, $output, $input)
     {
         IntlTestHelper::requireFullIntl($this, '59.1');
@@ -194,6 +192,7 @@ class DateTimeToLocalizedStringTransformerTest extends BaseDateTimeTransformerTe
         $transformer->transform('2010-01-01');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testTransformWrapsIntlErrors()
     {
         $this->markTestIncomplete('Checking for intl errors needs to be reimplemented');
@@ -207,9 +206,7 @@ class DateTimeToLocalizedStringTransformerTest extends BaseDateTimeTransformerTe
         // $transformer->transform(1.5);
     }
 
-    /**
-     * @dataProvider dataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dataProvider')]
     public function testReverseTransform($dateFormat, $timeFormat, $pattern, $input, $output)
     {
         $transformer = new DateTimeToLocalizedStringTransformer(
@@ -342,10 +339,8 @@ class DateTimeToLocalizedStringTransformerTest extends BaseDateTimeTransformerTe
         $transformer->reverseTransform('20107-03-21 12:34:56');
     }
 
-    /**
-     * @requires extension intl
-     * @requires PHP < 8.5
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.5')]
     public function testReverseTransformWrapsIntlErrorsWithErrorLevel()
     {
         $errorLevel = ini_set('intl.error_level', \E_WARNING);
@@ -359,9 +354,7 @@ class DateTimeToLocalizedStringTransformerTest extends BaseDateTimeTransformerTe
         }
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testReverseTransformWrapsIntlErrorsWithExceptions()
     {
         $initialUseExceptions = ini_set('intl.use_exceptions', 1);
@@ -375,10 +368,8 @@ class DateTimeToLocalizedStringTransformerTest extends BaseDateTimeTransformerTe
         }
     }
 
-    /**
-     * @requires extension intl
-     * @requires PHP < 8.5
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.5')]
     public function testReverseTransformWrapsIntlErrorsWithExceptionsAndErrorLevel()
     {
         $initialUseExceptions = ini_set('intl.use_exceptions', 1);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php
index 6a4d770..bf525e1 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php
@@ -59,9 +59,7 @@ class DateTimeToRfc3339TransformerTest extends BaseDateTimeTransformerTestCase
         ]);
     }
 
-    /**
-     * @dataProvider transformProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('transformProvider')]
     public function testTransform($fromTz, $toTz, $from, $to)
     {
         $transformer = new DateTimeToRfc3339Transformer($fromTz, $toTz);
@@ -69,9 +67,7 @@ class DateTimeToRfc3339TransformerTest extends BaseDateTimeTransformerTestCase
         $this->assertSame($to, $transformer->transform(null !== $from ? new \DateTime($from) : null));
     }
 
-    /**
-     * @dataProvider transformProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('transformProvider')]
     public function testTransformDateTimeImmutable($fromTz, $toTz, $from, $to)
     {
         $transformer = new DateTimeToRfc3339Transformer($fromTz, $toTz);
@@ -86,9 +82,7 @@ class DateTimeToRfc3339TransformerTest extends BaseDateTimeTransformerTestCase
         $transformer->transform('2010-01-01');
     }
 
-    /**
-     * @dataProvider reverseTransformProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('reverseTransformProvider')]
     public function testReverseTransform($toTz, $fromTz, $to, $from)
     {
         $transformer = new DateTimeToRfc3339Transformer($toTz, $fromTz);
@@ -115,9 +109,7 @@ class DateTimeToRfc3339TransformerTest extends BaseDateTimeTransformerTestCase
         $transformer->reverseTransform('2010-04-31T04:05Z');
     }
 
-    /**
-     * @dataProvider invalidDateStringProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidDateStringProvider')]
     public function testReverseTransformExpectsValidDateString($date)
     {
         $this->expectException(TransformationFailedException::class);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToStringTransformerTest.php
index f7ef667..61f6c09 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToStringTransformerTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToStringTransformerTest.php
@@ -64,9 +64,7 @@ class DateTimeToStringTransformerTest extends BaseDateTimeTransformerTestCase
         ];
     }
 
-    /**
-     * @dataProvider dataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dataProvider')]
     public function testTransform($format, $output, $input)
     {
         $transformer = new DateTimeToStringTransformer('UTC', 'UTC', $format);
@@ -114,9 +112,7 @@ class DateTimeToStringTransformerTest extends BaseDateTimeTransformerTestCase
         $transformer->transform('1234');
     }
 
-    /**
-     * @dataProvider dataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dataProvider')]
     public function testReverseTransform($format, $input, $output)
     {
         $reverseTransformer = new DateTimeToStringTransformer('UTC', 'UTC', $format);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php
index 92443e2..61773d8 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php
@@ -82,9 +82,7 @@ class IntegerToLocalizedStringTransformerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider transformWithRoundingProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('transformWithRoundingProvider')]
     public function testTransformWithRounding($input, $output, $roundingMode)
     {
         $transformer = new IntegerToLocalizedStringTransformer(null, $roundingMode);
@@ -178,9 +176,7 @@ class IntegerToLocalizedStringTransformerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider reverseTransformWithRoundingProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('reverseTransformWithRoundingProvider')]
     public function testReverseTransformWithRounding($input, $output, $roundingMode)
     {
         $transformer = new IntegerToLocalizedStringTransformer(null, $roundingMode);
@@ -204,9 +200,7 @@ class IntegerToLocalizedStringTransformerTest extends TestCase
         $transformer->reverseTransform('foo');
     }
 
-    /**
-     * @dataProvider floatNumberProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('floatNumberProvider')]
     public function testReverseTransformExpectsInteger($number, $locale)
     {
         $this->expectException(TransformationFailedException::class);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntlTimeZoneToStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntlTimeZoneToStringTransformerTest.php
index ca80a21..49e723c 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntlTimeZoneToStringTransformerTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntlTimeZoneToStringTransformerTest.php
@@ -15,9 +15,7 @@ use PHPUnit\Framework\TestCase;
 use Symfony\Component\Form\Exception\TransformationFailedException;
 use Symfony\Component\Form\Extension\Core\DataTransformer\IntlTimeZoneToStringTransformer;
 
-/**
- * @requires extension intl
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
 class IntlTimeZoneToStringTransformerTest extends TestCase
 {
     public function testSingle()
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php
index f22fa5d..fa04b38 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php
@@ -56,9 +56,7 @@ class NumberToLocalizedStringTransformerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideTransformations
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTransformations')]
     public function testTransform($from, $to, $locale)
     {
         // Since we test against other locales, we need the full implementation
@@ -82,9 +80,7 @@ class NumberToLocalizedStringTransformerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideTransformationsWithGrouping
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTransformationsWithGrouping')]
     public function testTransformWithGrouping($from, $to, $locale)
     {
         // Since we test against other locales, we need the full implementation
@@ -199,9 +195,7 @@ class NumberToLocalizedStringTransformerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider transformWithRoundingProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('transformWithRoundingProvider')]
     public function testTransformWithRounding($scale, $input, $output, $roundingMode)
     {
         // Since we test against "de_AT", we need the full implementation
@@ -226,9 +220,7 @@ class NumberToLocalizedStringTransformerTest extends TestCase
         $this->assertEquals('1234,547', $transformer->transform(1234.547));
     }
 
-    /**
-     * @dataProvider provideTransformations
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTransformations')]
     public function testReverseTransform($to, $from, $locale)
     {
         // Since we test against other locales, we need the full implementation
@@ -241,9 +233,7 @@ class NumberToLocalizedStringTransformerTest extends TestCase
         $this->assertEquals($to, $transformer->reverseTransform($from));
     }
 
-    /**
-     * @dataProvider provideTransformationsWithGrouping
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTransformationsWithGrouping')]
     public function testReverseTransformWithGrouping($to, $from, $locale)
     {
         // Since we test against other locales, we need the full implementation
@@ -376,9 +366,7 @@ class NumberToLocalizedStringTransformerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider reverseTransformWithRoundingProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('reverseTransformWithRoundingProvider')]
     public function testReverseTransformWithRounding($scale, $input, $output, $roundingMode)
     {
         $transformer = new NumberToLocalizedStringTransformer($scale, null, $roundingMode);
@@ -518,10 +506,9 @@ class NumberToLocalizedStringTransformerTest extends TestCase
     }
 
     /**
-     * @dataProvider nanRepresentationProvider
-     *
      * @see https://github.com/symfony/symfony/issues/3161
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('nanRepresentationProvider')]
     public function testReverseTransformDisallowsNaN($nan)
     {
         $this->expectException(TransformationFailedException::class);
@@ -645,9 +632,7 @@ class NumberToLocalizedStringTransformerTest extends TestCase
         $this->assertSame(1.0, $transformer->reverseTransform('1'));
     }
 
-    /**
-     * @dataProvider eNotationProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('eNotationProvider')]
     public function testReverseTransformENotation($output, $input)
     {
         IntlTestHelper::requireFullIntl($this);
@@ -659,10 +644,8 @@ class NumberToLocalizedStringTransformerTest extends TestCase
         $this->assertSame($output, $transformer->reverseTransform($input));
     }
 
-    /**
-     * @requires extension intl
-     * @requires PHP < 8.5
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.5')]
     public function testReverseTransformWrapsIntlErrorsWithErrorLevel()
     {
         $errorLevel = ini_set('intl.error_level', \E_WARNING);
@@ -676,9 +659,7 @@ class NumberToLocalizedStringTransformerTest extends TestCase
         }
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testReverseTransformWrapsIntlErrorsWithExceptions()
     {
         $initialUseExceptions = ini_set('intl.use_exceptions', 1);
@@ -692,10 +673,8 @@ class NumberToLocalizedStringTransformerTest extends TestCase
         }
     }
 
-    /**
-     * @requires extension intl
-     * @requires PHP < 8.5
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.5')]
     public function testReverseTransformWrapsIntlErrorsWithExceptionsAndErrorLevel()
     {
         $initialUseExceptions = ini_set('intl.use_exceptions', 1);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php
index ca935d5..c3c1a5f 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php
@@ -191,9 +191,7 @@ class PercentToLocalizedStringTransformerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider reverseTransformWithRoundingProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('reverseTransformWithRoundingProvider')]
     public function testReverseTransformWithRounding($type, $scale, $input, $output, $roundingMode)
     {
         $transformer = new PercentToLocalizedStringTransformer($scale, $type, $roundingMode);
@@ -364,9 +362,7 @@ class PercentToLocalizedStringTransformerTest extends TestCase
         $transformer->reverseTransform('12foo3');
     }
 
-    /**
-     * @requires extension mbstring
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('mbstring')]
     public function testReverseTransformDisallowsCenteredExtraCharactersMultibyte()
     {
         $this->expectException(TransformationFailedException::class);
@@ -390,9 +386,7 @@ class PercentToLocalizedStringTransformerTest extends TestCase
         $transformer->reverseTransform('123foo');
     }
 
-    /**
-     * @requires extension mbstring
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('mbstring')]
     public function testReverseTransformDisallowsTrailingExtraCharactersMultibyte()
     {
         $this->expectException(TransformationFailedException::class);
@@ -487,10 +481,8 @@ class PercentToLocalizedStringTransformerTest extends TestCase
         $this->assertEquals(0.1234, $transformer->reverseTransform('12.34'));
     }
 
-    /**
-     * @requires extension intl
-     * @requires PHP < 8.5
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.5')]
     public function testReverseTransformWrapsIntlErrorsWithErrorLevel()
     {
         $errorLevel = ini_set('intl.error_level', \E_WARNING);
@@ -504,9 +496,7 @@ class PercentToLocalizedStringTransformerTest extends TestCase
         }
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testReverseTransformWrapsIntlErrorsWithExceptions()
     {
         $initialUseExceptions = ini_set('intl.use_exceptions', 1);
@@ -520,10 +510,8 @@ class PercentToLocalizedStringTransformerTest extends TestCase
         }
     }
 
-    /**
-     * @requires extension intl
-     * @requires PHP < 8.5
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.5')]
     public function testReverseTransformWrapsIntlErrorsWithExceptionsAndErrorLevel()
     {
         $initialUseExceptions = ini_set('intl.use_exceptions', 1);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/StringToFloatTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/StringToFloatTransformerTest.php
index aaea8b2..8e64444 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/StringToFloatTransformerTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/StringToFloatTransformerTest.php
@@ -28,9 +28,7 @@ class StringToFloatTransformerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideTransformations
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTransformations')]
     public function testTransform($from, $to)
     {
         $transformer = new StringToFloatTransformer();
@@ -68,9 +66,7 @@ class StringToFloatTransformerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideReverseTransformations
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideReverseTransformations')]
     public function testReverseTransform($from, $to, ?int $scale = null)
     {
         $transformer = new StringToFloatTransformer($scale);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/UlidToStringTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/UlidToStringTransformerTest.php
index 7978941..acd5526 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/UlidToStringTransformerTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/UlidToStringTransformerTest.php
@@ -25,9 +25,7 @@ class UlidToStringTransformerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideValidUlid
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidUlid')]
     public function testTransform($output, $input)
     {
         $transformer = new UlidToStringTransformer();
@@ -53,9 +51,7 @@ class UlidToStringTransformerTest extends TestCase
         $transformer->transform('1234');
     }
 
-    /**
-     * @dataProvider provideValidUlid
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidUlid')]
     public function testReverseTransform($input, $output)
     {
         $reverseTransformer = new UlidToStringTransformer();
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/WeekToArrayTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/WeekToArrayTransformerTest.php
index 67e7f7a..f7ec8be 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/WeekToArrayTransformerTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/WeekToArrayTransformerTest.php
@@ -31,9 +31,7 @@ class WeekToArrayTransformerTest extends TestCase
         $this->assertSame(['year' => null, 'week' => null], $transformer->transform(null));
     }
 
-    /**
-     * @dataProvider transformationFailuresProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('transformationFailuresProvider')]
     public function testTransformationFailures($input, string $message)
     {
         $this->expectException(TransformationFailedException::class);
@@ -89,9 +87,7 @@ class WeekToArrayTransformerTest extends TestCase
         $this->assertNull($transformer->reverseTransform([]));
     }
 
-    /**
-     * @dataProvider reverseTransformationFailuresProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('reverseTransformationFailuresProvider')]
     public function testReverseTransformFailures($input, string $message)
     {
         $this->expectException(TransformationFailedException::class);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php
index 038ca9c..dc522dd 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\Form\FormEvent;
 
 class FixUrlProtocolListenerTest extends TestCase
 {
-    /**
-     * @dataProvider provideUrlToFix
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUrlToFix')]
     public function testFixUrl($data)
     {
         $form = new Form(new FormConfigBuilder('name', null, new EventDispatcher()));
@@ -46,9 +44,7 @@ class FixUrlProtocolListenerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideUrlToSkip
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUrlToSkip')]
     public function testSkipUrl($url)
     {
         $form = new Form(new FormConfigBuilder('name', null, new EventDispatcher()));
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTestCase.php b/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTestCase.php
index 7070db9..771f8c5 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTestCase.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/MergeCollectionListenerTestCase.php
@@ -56,9 +56,7 @@ abstract class MergeCollectionListenerTestCase extends TestCase
 
     abstract protected function getData(array $data);
 
-    /**
-     * @dataProvider getBooleanMatrix1
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getBooleanMatrix1')]
     public function testAddExtraEntriesIfAllowAdd($allowDelete)
     {
         $originalData = $this->getData([1 => 'second']);
@@ -80,9 +78,7 @@ abstract class MergeCollectionListenerTestCase extends TestCase
         $this->assertEquals($newData, $event->getData());
     }
 
-    /**
-     * @dataProvider getBooleanMatrix1
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getBooleanMatrix1')]
     public function testAddExtraEntriesIfAllowAddDontOverwriteExistingIndices($allowDelete)
     {
         $originalData = $this->getData([1 => 'first']);
@@ -104,9 +100,7 @@ abstract class MergeCollectionListenerTestCase extends TestCase
         $this->assertEquals($this->getData([1 => 'first', 2 => 'second']), $event->getData());
     }
 
-    /**
-     * @dataProvider getBooleanMatrix1
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getBooleanMatrix1')]
     public function testDoNothingIfNotAllowAdd($allowDelete)
     {
         $originalDataArray = [1 => 'second'];
@@ -129,9 +123,7 @@ abstract class MergeCollectionListenerTestCase extends TestCase
         $this->assertEquals($this->getData($originalDataArray), $event->getData());
     }
 
-    /**
-     * @dataProvider getBooleanMatrix1
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getBooleanMatrix1')]
     public function testRemoveMissingEntriesIfAllowDelete($allowAdd)
     {
         $originalData = $this->getData([0 => 'first', 1 => 'second', 2 => 'third']);
@@ -153,9 +145,7 @@ abstract class MergeCollectionListenerTestCase extends TestCase
         $this->assertEquals($newData, $event->getData());
     }
 
-    /**
-     * @dataProvider getBooleanMatrix1
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getBooleanMatrix1')]
     public function testDoNothingIfNotAllowDelete($allowAdd)
     {
         $originalDataArray = [0 => 'first', 1 => 'second', 2 => 'third'];
@@ -178,9 +168,7 @@ abstract class MergeCollectionListenerTestCase extends TestCase
         $this->assertEquals($this->getData($originalDataArray), $event->getData());
     }
 
-    /**
-     * @dataProvider getBooleanMatrix2
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getBooleanMatrix2')]
     public function testRequireArrayOrTraversable($allowAdd, $allowDelete)
     {
         $this->expectException(UnexpectedTypeException::class);
@@ -205,9 +193,7 @@ abstract class MergeCollectionListenerTestCase extends TestCase
         $this->assertSame($originalData, $event->getData());
     }
 
-    /**
-     * @dataProvider getBooleanMatrix1
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getBooleanMatrix1')]
     public function testDealWithNullOriginalDataIfAllowAdd($allowDelete)
     {
         $originalData = null;
@@ -223,9 +209,7 @@ abstract class MergeCollectionListenerTestCase extends TestCase
         $this->assertSame($newData, $event->getData());
     }
 
-    /**
-     * @dataProvider getBooleanMatrix1
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getBooleanMatrix1')]
     public function testDontDealWithNullOriginalDataIfNotAllowAdd($allowDelete)
     {
         $originalData = null;
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CheckboxTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CheckboxTypeTest.php
index 62312e2..0c9c305 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CheckboxTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CheckboxTypeTest.php
@@ -139,9 +139,7 @@ class CheckboxTypeTest extends BaseTypeTestCase
         $this->assertSame('', $form->getViewData());
     }
 
-    /**
-     * @dataProvider provideCustomModelTransformerData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCustomModelTransformerData')]
     public function testCustomModelTransformer($data, $checked)
     {
         // present a binary status field as a checkbox
@@ -170,9 +168,7 @@ class CheckboxTypeTest extends BaseTypeTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideCustomFalseValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCustomFalseValues')]
     public function testCustomFalseValues($falseValue)
     {
         $form = $this->factory->create(static::TESTED_TYPE, null, [
@@ -200,6 +196,7 @@ class CheckboxTypeTest extends BaseTypeTestCase
         ]);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNull($expected = null, $norm = null, $view = null)
     {
         parent::testSubmitNull(false, false, null);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypePerformanceTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypePerformanceTest.php
index 3616a13..ec06f62 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypePerformanceTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypePerformanceTest.php
@@ -21,9 +21,9 @@ class ChoiceTypePerformanceTest extends FormPerformanceTestCase
     /**
      * This test case is realistic in collection forms where each
      * row contains the same choice field.
-     *
-     * @group benchmark
      */
+    #[\PHPUnit\Framework\Attributes\Group('benchmark')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSameChoiceFieldCreatedMultipleTimes()
     {
         $this->setMaxRunningTime(1);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php
index c4f1873..423e2a7 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php
@@ -1669,9 +1669,7 @@ class ChoiceTypeTest extends BaseTypeTestCase
         $this->assertSame('', $view->vars['placeholder']);
     }
 
-    /**
-     * @dataProvider getOptionsWithPlaceholder
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getOptionsWithPlaceholder')]
     public function testPassPlaceholderToView($multiple, $expanded, $required, $placeholder, $placeholderViewValue, $placeholderAttr, $placeholderAttrViewValue)
     {
         $view = $this->factory->create(static::TESTED_TYPE, null, [
@@ -1689,9 +1687,7 @@ class ChoiceTypeTest extends BaseTypeTestCase
         $this->assertFalse($view->vars['placeholder_in_choices']);
     }
 
-    /**
-     * @dataProvider getOptionsWithPlaceholder
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getOptionsWithPlaceholder')]
     public function testDontPassPlaceholderIfContainedInChoices($multiple, $expanded, $required, $placeholder, $placeholderViewValue, $placeholderAttr, $placeholderAttrViewValue)
     {
         $view = $this->factory->create(static::TESTED_TYPE, null, [
@@ -1944,9 +1940,7 @@ class ChoiceTypeTest extends BaseTypeTestCase
         $this->assertNull($form->get('subChoice')->getConfig()->getOption('choice_label'));
     }
 
-    /**
-     * @dataProvider invalidNestedValueTestMatrix
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidNestedValueTestMatrix')]
     public function testSubmitInvalidNestedValue($multiple, $expanded, $submissionData)
     {
         $form = $this->factory->create(static::TESTED_TYPE, null, [
@@ -2112,9 +2106,7 @@ class ChoiceTypeTest extends BaseTypeTestCase
         $this->assertSame('choice_translation_domain', $form->children[1]->vars['translation_domain']);
     }
 
-    /**
-     * @dataProvider provideTrimCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTrimCases')]
     public function testTrimIsDisabled($multiple, $expanded)
     {
         $form = $this->factory->create(static::TESTED_TYPE, null, [
@@ -2139,9 +2131,7 @@ class ChoiceTypeTest extends BaseTypeTestCase
         }
     }
 
-    /**
-     * @dataProvider provideTrimCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTrimCases')]
     public function testSubmitValueWithWhiteSpace($multiple, $expanded)
     {
         $valueWhitWhiteSpace = '1 ';
@@ -2170,9 +2160,7 @@ class ChoiceTypeTest extends BaseTypeTestCase
         ];
     }
 
-    /**
-     * @dataProvider expandedIsEmptyWhenNoRealChoiceIsSelectedProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('expandedIsEmptyWhenNoRealChoiceIsSelectedProvider')]
     public function testExpandedIsEmptyWhenNoRealChoiceIsSelected($expected, $submittedData, $multiple, $required, $placeholder)
     {
         $options = [
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php
index 08d512c..0182936 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php
@@ -551,11 +551,13 @@ class CollectionTypeTest extends BaseTypeTestCase
         $this->assertSame($expectedBlockPrefixes, $collectionView->vars['prototype']->vars['block_prefixes']);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNull($expected = null, $norm = null, $view = null)
     {
         parent::testSubmitNull([], [], []);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNullUsesDefaultEmptyData($emptyData = [], $expectedData = [])
     {
         // resize form listener always set an empty array
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ColorTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ColorTypeTest.php
index 52382ce..bba53f4 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ColorTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ColorTypeTest.php
@@ -18,9 +18,7 @@ final class ColorTypeTest extends BaseTypeTestCase
 {
     public const TESTED_TYPE = ColorType::class;
 
-    /**
-     * @dataProvider validationShouldPassProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validationShouldPassProvider')]
     public function testValidationShouldPass(bool $html5, ?string $submittedValue)
     {
         $form = $this->factory->create(static::TESTED_TYPE, null, [
@@ -51,9 +49,7 @@ final class ColorTypeTest extends BaseTypeTestCase
         ];
     }
 
-    /**
-     * @dataProvider validationShouldFailProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validationShouldFailProvider')]
     public function testValidationShouldFail(string $expectedValueParameterValue, ?string $submittedValue, bool $trim = true)
     {
         $form = $this->factory->create(static::TESTED_TYPE, null, [
@@ -82,6 +78,7 @@ final class ColorTypeTest extends BaseTypeTestCase
         ];
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNull($expected = null, $norm = null, $view = null)
     {
         parent::testSubmitNull($expected, $norm, '');
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php
index 5f61b34..c41248e 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php
@@ -38,9 +38,7 @@ class CountryTypeTest extends BaseTypeTestCase
         $this->assertContainsEquals(new ChoiceView('MY', 'MY', 'Malaysia'), $choices);
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testChoiceTranslationLocaleOption()
     {
         $choices = $this->factory
@@ -73,9 +71,7 @@ class CountryTypeTest extends BaseTypeTestCase
         $this->assertContainsEquals(new ChoiceView('MYS', 'MYS', 'Malaysia'), $choices);
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testChoiceTranslationLocaleAndAlpha3Option()
     {
         $choices = $this->factory
@@ -107,11 +103,13 @@ class CountryTypeTest extends BaseTypeTestCase
         $this->assertNotContains('ZZ', $countryCodes);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNull($expected = null, $norm = null, $view = null)
     {
         parent::testSubmitNull($expected, $norm, '');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNullUsesDefaultEmptyData($emptyData = 'FR', $expectedData = 'FR')
     {
         parent::testSubmitNullUsesDefaultEmptyData($emptyData, $expectedData);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php
index ff6c5c1..8d4c3ce 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php
@@ -35,9 +35,7 @@ class CurrencyTypeTest extends BaseTypeTestCase
         $this->assertContainsEquals(new ChoiceView('SIT', 'SIT', 'Slovenian Tolar'), $choices);
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testChoiceTranslationLocaleOption()
     {
         $choices = $this->factory
@@ -52,11 +50,13 @@ class CurrencyTypeTest extends BaseTypeTestCase
         $this->assertContainsEquals(new ChoiceView('SIT', 'SIT', 'словенський толар'), $choices);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNull($expected = null, $norm = null, $view = null)
     {
         parent::testSubmitNull($expected, $norm, '');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNullUsesDefaultEmptyData($emptyData = 'EUR', $expectedData = 'EUR')
     {
         parent::testSubmitNullUsesDefaultEmptyData($emptyData, $expectedData);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateIntervalTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateIntervalTypeTest.php
index 58e2422..b54fd56 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateIntervalTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateIntervalTypeTest.php
@@ -402,6 +402,7 @@ class DateIntervalTypeTest extends BaseTypeTestCase
         $this->assertSame('Negative interval', $view['invert']->vars['label']);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNull($expected = null, $norm = null, $view = null)
     {
         parent::testSubmitNull($expected, $norm, [
@@ -424,9 +425,7 @@ class DateIntervalTypeTest extends BaseTypeTestCase
         $this->assertSame($expectedData, $form->getData());
     }
 
-    /**
-     * @dataProvider provideEmptyData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEmptyData')]
     public function testSubmitNullUsesDateEmptyData($widget, $emptyData, $expectedData)
     {
         $form = $this->factory->create(static::TESTED_TYPE, null, [
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php
index 4d55936..13b7d03 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php
@@ -648,6 +648,7 @@ class DateTimeTypeTest extends BaseTypeTestCase
         $this->assertSame('test', $view['time']['second']->vars['choice_translation_domain']);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNull($expected = null, $norm = null, $view = null)
     {
         parent::testSubmitNull($expected, $norm, [
@@ -702,9 +703,7 @@ class DateTimeTypeTest extends BaseTypeTestCase
         $this->assertSame($expectedData, $form->getData());
     }
 
-    /**
-     * @dataProvider provideEmptyData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEmptyData')]
     public function testSubmitNullUsesDateEmptyData($widget, $emptyData, $expectedData)
     {
         $form = $this->factory->create(static::TESTED_TYPE, null, [
@@ -752,9 +751,8 @@ class DateTimeTypeTest extends BaseTypeTestCase
         $this->assertSame('14/01/2018 21:29:00 +00:00', $form->getData());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDateTimeInputTimezoneNotMatchingModelTimezone()
     {
         $this->expectDeprecation('Since symfony/form 6.4: Using a "DateTime" instance with a timezone ("UTC") not matching the configured model timezone "Europe/Berlin" is deprecated.');
@@ -766,9 +764,8 @@ class DateTimeTypeTest extends BaseTypeTestCase
         ]);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDateTimeImmutableInputTimezoneNotMatchingModelTimezone()
     {
         $this->expectDeprecation('Since symfony/form 6.4: Using a "DateTimeImmutable" instance with a timezone ("UTC") not matching the configured model timezone "Europe/Berlin" is deprecated.');
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php
index 56f9a73..5b3a3ac 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php
@@ -397,9 +397,7 @@ class DateTypeTest extends BaseTypeTestCase
         $this->assertEquals('06*2010*02', $form->getViewData());
     }
 
-    /**
-     * @dataProvider provideDateFormats
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDateFormats')]
     public function testDatePatternWithFormatOption($format, $pattern)
     {
         $view = $this->factory->create(static::TESTED_TYPE, null, [
@@ -956,9 +954,7 @@ class DateTypeTest extends BaseTypeTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideCompoundWidgets
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompoundWidgets')]
     public function testYearErrorsBubbleUp($widget)
     {
         $error = new FormError('Invalid!');
@@ -971,9 +967,7 @@ class DateTypeTest extends BaseTypeTestCase
         $this->assertSame([$error], iterator_to_array($form->getErrors()));
     }
 
-    /**
-     * @dataProvider provideCompoundWidgets
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompoundWidgets')]
     public function testMonthErrorsBubbleUp($widget)
     {
         $error = new FormError('Invalid!');
@@ -986,9 +980,7 @@ class DateTypeTest extends BaseTypeTestCase
         $this->assertSame([$error], iterator_to_array($form->getErrors()));
     }
 
-    /**
-     * @dataProvider provideCompoundWidgets
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompoundWidgets')]
     public function testDayErrorsBubbleUp($widget)
     {
         $error = new FormError('Invalid!');
@@ -1056,6 +1048,7 @@ class DateTypeTest extends BaseTypeTestCase
         $this->assertSame('test', $view['day']->vars['choice_translation_domain']);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNull($expected = null, $norm = null, $view = null)
     {
         parent::testSubmitNull($expected, $norm, ['year' => '', 'month' => '', 'day' => '']);
@@ -1087,9 +1080,7 @@ class DateTypeTest extends BaseTypeTestCase
         $this->assertSame($expectedData, $form->getData());
     }
 
-    /**
-     * @dataProvider provideEmptyData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEmptyData')]
     public function testSubmitNullUsesDateEmptyData($widget, $emptyData, $expectedData)
     {
         $form = $this->factory->create(static::TESTED_TYPE, null, [
@@ -1137,9 +1128,8 @@ class DateTypeTest extends BaseTypeTestCase
         $this->assertSame('14/01/2018', $form->getData());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDateTimeInputTimezoneNotMatchingModelTimezone()
     {
         $this->expectDeprecation('Since symfony/form 6.4: Using a "DateTime" instance with a timezone ("UTC") not matching the configured model timezone "Europe/Berlin" is deprecated.');
@@ -1151,9 +1141,8 @@ class DateTypeTest extends BaseTypeTestCase
         ]);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDateTimeImmutableInputTimezoneNotMatchingModelTimezone()
     {
         $this->expectDeprecation('Since symfony/form 6.4: Using a "DateTimeImmutable" instance with a timezone ("UTC") not matching the configured model timezone "Europe/Berlin" is deprecated.');
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/EnumTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/EnumTypeTest.php
index 0458720..574332b 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/EnumTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/EnumTypeTest.php
@@ -48,9 +48,7 @@ class EnumTypeTest extends BaseTypeTestCase
         ]);
     }
 
-    /**
-     * @dataProvider provideSingleSubmitData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSingleSubmitData')]
     public function testSubmitSingleNonExpanded(string $class, string $submittedData, \UnitEnum $expectedData)
     {
         $form = $this->factory->create($this->getTestedType(), null, [
@@ -66,9 +64,7 @@ class EnumTypeTest extends BaseTypeTestCase
         $this->assertTrue($form->isSynchronized());
     }
 
-    /**
-     * @dataProvider provideSingleSubmitData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSingleSubmitData')]
     public function testSubmitSingleExpanded(string $class, string $submittedData, \UnitEnum $expectedData)
     {
         $form = $this->factory->create($this->getTestedType(), null, [
@@ -190,9 +186,7 @@ class EnumTypeTest extends BaseTypeTestCase
         $this->assertSame([Suit::Spades], $form->getData());
     }
 
-    /**
-     * @dataProvider provideMultiSubmitData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMultiSubmitData')]
     public function testSubmitMultipleNonExpanded(string $class, array $submittedValues, array $expectedValues)
     {
         $form = $this->factory->create($this->getTestedType(), null, [
@@ -208,9 +202,7 @@ class EnumTypeTest extends BaseTypeTestCase
         $this->assertTrue($form->isSynchronized());
     }
 
-    /**
-     * @dataProvider provideMultiSubmitData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMultiSubmitData')]
     public function testSubmitMultipleExpanded(string $class, array $submittedValues, array $expectedValues)
     {
         $form = $this->factory->create($this->getTestedType(), null, [
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ExtendedChoiceTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ExtendedChoiceTypeTest.php
index 122ff44..a8b5752 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ExtendedChoiceTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ExtendedChoiceTypeTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\Form\Tests\Fixtures\LazyChoiceTypeExtension;
 
 class ExtendedChoiceTypeTest extends TestCase
 {
-    /**
-     * @dataProvider provideTestedTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTestedTypes')]
     public function testChoicesAreOverridden($type)
     {
         ChoiceTypeExtension::$extendedType = $type;
@@ -38,9 +36,7 @@ class ExtendedChoiceTypeTest extends TestCase
         $this->assertSame('b', $choices[1]->value);
     }
 
-    /**
-     * @dataProvider provideTestedTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTestedTypes')]
     public function testChoiceLoaderIsOverridden($type)
     {
         LazyChoiceTypeExtension::$extendedType = $type;
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php
index b7f3332..2104393 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php
@@ -40,9 +40,7 @@ class FileTypeTest extends BaseTypeTestCase
         $this->assertSame($data, $form->getData());
     }
 
-    /**
-     * @dataProvider requestHandlerProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('requestHandlerProvider')]
     public function testSubmit(RequestHandlerInterface $requestHandler)
     {
         $form = $this->factory->createBuilder(static::TESTED_TYPE)->setRequestHandler($requestHandler)->getForm();
@@ -53,9 +51,7 @@ class FileTypeTest extends BaseTypeTestCase
         $this->assertSame($data, $form->getData());
     }
 
-    /**
-     * @dataProvider requestHandlerProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('requestHandlerProvider')]
     public function testSetDataMultiple(RequestHandlerInterface $requestHandler)
     {
         $form = $this->factory->createBuilder(static::TESTED_TYPE, null, [
@@ -71,9 +67,7 @@ class FileTypeTest extends BaseTypeTestCase
         $this->assertSame($data, $form->getData());
     }
 
-    /**
-     * @dataProvider requestHandlerProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('requestHandlerProvider')]
     public function testSubmitMultiple(RequestHandlerInterface $requestHandler)
     {
         $form = $this->factory->createBuilder(static::TESTED_TYPE, null, [
@@ -93,9 +87,7 @@ class FileTypeTest extends BaseTypeTestCase
         $this->assertArrayHasKey('multiple', $view->vars['attr']);
     }
 
-    /**
-     * @dataProvider requestHandlerProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('requestHandlerProvider')]
     public function testDontPassValueToView(RequestHandlerInterface $requestHandler)
     {
         $form = $this->factory->createBuilder(static::TESTED_TYPE)->setRequestHandler($requestHandler)->getForm();
@@ -114,6 +106,7 @@ class FileTypeTest extends BaseTypeTestCase
         $this->assertTrue($view->vars['multipart']);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNull($expected = null, $norm = null, $view = null)
     {
         parent::testSubmitNull($expected, $norm, '');
@@ -132,9 +125,7 @@ class FileTypeTest extends BaseTypeTestCase
         $this->assertSame([], $form->getViewData());
     }
 
-    /**
-     * @dataProvider requestHandlerProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('requestHandlerProvider')]
     public function testSubmittedFilePathsAreDropped(RequestHandlerInterface $requestHandler)
     {
         $form = $this->factory->createBuilder(static::TESTED_TYPE)->setRequestHandler($requestHandler)->getForm();
@@ -145,9 +136,7 @@ class FileTypeTest extends BaseTypeTestCase
         $this->assertSame('', $form->getViewData());
     }
 
-    /**
-     * @dataProvider requestHandlerProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('requestHandlerProvider')]
     public function testMultipleSubmittedFilePathsAreDropped(RequestHandlerInterface $requestHandler)
     {
         $form = $this->factory
@@ -165,9 +154,7 @@ class FileTypeTest extends BaseTypeTestCase
         $this->assertCount(1, $form->getData());
     }
 
-    /**
-     * @dataProvider requestHandlerProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('requestHandlerProvider')]
     public function testSubmitNonArrayValueWhenMultiple(RequestHandlerInterface $requestHandler)
     {
         $form = $this->factory
@@ -191,9 +178,7 @@ class FileTypeTest extends BaseTypeTestCase
         ];
     }
 
-    /**
-     * @dataProvider uploadFileErrorCodes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('uploadFileErrorCodes')]
     public function testFailedFileUploadIsTurnedIntoFormErrorUsingHttpFoundationRequestHandler($errorCode, $expectedErrorMessage)
     {
         $requestHandler = new HttpFoundationRequestHandler();
@@ -211,9 +196,7 @@ class FileTypeTest extends BaseTypeTestCase
         }
     }
 
-    /**
-     * @dataProvider uploadFileErrorCodes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('uploadFileErrorCodes')]
     public function testFailedFileUploadIsTurnedIntoFormErrorUsingNativeRequestHandler($errorCode, $expectedErrorMessage)
     {
         $form = $this->factory
@@ -236,9 +219,7 @@ class FileTypeTest extends BaseTypeTestCase
         }
     }
 
-    /**
-     * @dataProvider uploadFileErrorCodes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('uploadFileErrorCodes')]
     public function testMultipleSubmittedFailedFileUploadsAreTurnedIntoFormErrorUsingHttpFoundationRequestHandler($errorCode, $expectedErrorMessage)
     {
         $requestHandler = new HttpFoundationRequestHandler();
@@ -263,9 +244,7 @@ class FileTypeTest extends BaseTypeTestCase
         }
     }
 
-    /**
-     * @dataProvider uploadFileErrorCodes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('uploadFileErrorCodes')]
     public function testMultipleSubmittedFailedFileUploadsAreTurnedIntoFormErrorUsingNativeRequestHandler($errorCode, $expectedErrorMessage)
     {
         $form = $this->factory
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php
index fe83888..7d61dd7 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php
@@ -184,6 +184,7 @@ class FormTypeTest extends BaseTypeTestCase
         ]);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNullUsesDefaultEmptyData($emptyData = [], $expectedData = [])
     {
         parent::testSubmitNullUsesDefaultEmptyData($emptyData, $expectedData);
@@ -687,6 +688,7 @@ $ref2
         $this->assertSame('0', $view->vars['label']);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNull($expected = null, $norm = null, $view = null)
     {
         parent::testSubmitNull([], [], []);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php
index 34f7bf3..1729c48 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php
@@ -31,9 +31,7 @@ class IntegerTypeTest extends BaseTypeTestCase
         \Locale::setDefault($this->previousLocale);
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testArabicLocale()
     {
         \Locale::setDefault('ar');
@@ -45,9 +43,7 @@ class IntegerTypeTest extends BaseTypeTestCase
         $this->assertSame('123456', $form->getViewData());
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testArabicLocaleNonHtml5()
     {
         \Locale::setDefault('ar');
@@ -69,6 +65,7 @@ class IntegerTypeTest extends BaseTypeTestCase
         $this->assertFalse($form->isSynchronized());
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNull($expected = null, $norm = null, $view = null)
     {
         parent::testSubmitNull($expected, $norm, '');
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php
index 405696a..1baa4e8 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php
@@ -36,9 +36,7 @@ class LanguageTypeTest extends BaseTypeTestCase
         $this->assertContainsEquals(new ChoiceView('my', 'my', 'Burmese'), $choices);
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testChoiceTranslationLocaleOption()
     {
         $choices = $this->factory
@@ -68,9 +66,7 @@ class LanguageTypeTest extends BaseTypeTestCase
         $this->assertNotContainsEquals(new ChoiceView('my', 'my', 'Burmese'), $choices);
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testChoiceTranslationLocaleAndAlpha3Option()
     {
         $choices = $this->factory
@@ -87,9 +83,7 @@ class LanguageTypeTest extends BaseTypeTestCase
         $this->assertNotContainsEquals(new ChoiceView('my', 'my', 'бірманська'), $choices);
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testChoiceSelfTranslationOption()
     {
         $choices = $this->factory
@@ -107,9 +101,7 @@ class LanguageTypeTest extends BaseTypeTestCase
         $this->assertContainsEquals(new ChoiceView('zh', 'zh', '中文'), $choices);
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testChoiceSelfTranslationAndAlpha3Options()
     {
         $choices = $this->factory
@@ -141,11 +133,13 @@ class LanguageTypeTest extends BaseTypeTestCase
         $this->assertNotContainsEquals(new ChoiceView('mul', 'mul', 'Mehrsprachig'), $choices);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNull($expected = null, $norm = null, $view = null)
     {
         parent::testSubmitNull($expected, $norm, '');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNullUsesDefaultEmptyData($emptyData = 'en', $expectedData = 'en')
     {
         parent::testSubmitNullUsesDefaultEmptyData($emptyData, $expectedData);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php
index 6acd181..93dd85e 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php
@@ -35,9 +35,7 @@ class LocaleTypeTest extends BaseTypeTestCase
         $this->assertContainsEquals(new ChoiceView('zh_Hant_HK', 'zh_Hant_HK', 'Chinese (Traditional, Hong Kong SAR China)'), $choices);
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testChoiceTranslationLocaleOption()
     {
         $choices = $this->factory
@@ -52,11 +50,13 @@ class LocaleTypeTest extends BaseTypeTestCase
         $this->assertContainsEquals(new ChoiceView('zh_Hant_TW', 'zh_Hant_TW', 'китайська (традиційна, Тайвань)'), $choices);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNull($expected = null, $norm = null, $view = null)
     {
         parent::testSubmitNull($expected, $norm, '');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNullUsesDefaultEmptyData($emptyData = 'en', $expectedData = 'en')
     {
         parent::testSubmitNullUsesDefaultEmptyData($emptyData, $expectedData);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php
index 55bc8ee..0b4bc5b 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/MoneyTypeTest.php
@@ -69,6 +69,7 @@ class MoneyTypeTest extends BaseTypeTestCase
         $this->assertSame('{{ widget }} €', $view2->vars['money_pattern']);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNull($expected = null, $norm = null, $view = null)
     {
         parent::testSubmitNull($expected, $norm, '');
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php
index 132f35e..54e575d 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php
@@ -109,6 +109,7 @@ class NumberTypeTest extends BaseTypeTestCase
         $this->assertSame('12346', $form->createView()->vars['value']);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNull($expected = null, $norm = null, $view = null)
     {
         parent::testSubmitNull($expected, $norm, '');
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php
index 8d428a2..62f8519 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php
@@ -47,6 +47,7 @@ class PasswordTypeTest extends BaseTypeTestCase
         $this->assertSame(' pAs5w0rd ', $form->getData());
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNull($expected = null, $norm = null, $view = null)
     {
         parent::testSubmitNull($expected, $norm, '');
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php
index f9379a8..19f7306 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php
@@ -91,9 +91,7 @@ class RepeatedTypeTest extends BaseTypeTestCase
         $this->assertTrue($form['second']->getConfig()->getMapped());
     }
 
-    /**
-     * @dataProvider notMappedConfigurationKeys
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('notMappedConfigurationKeys')]
     public function testNotMappedInnerIsOverridden($configurationKey)
     {
         $form = $this->factory->create(static::TESTED_TYPE, null, [
@@ -189,9 +187,7 @@ class RepeatedTypeTest extends BaseTypeTestCase
         $this->assertTrue($form['second']->isRequired());
     }
 
-    /**
-     * @dataProvider emptyDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('emptyDataProvider')]
     public function testSubmitNullForTextTypeWithEmptyDataOptionSetToEmptyString($emptyData, $submittedData, $expected)
     {
         $form = $this->factory->create(static::TESTED_TYPE, null, [
@@ -245,6 +241,7 @@ class RepeatedTypeTest extends BaseTypeTestCase
         $this->assertSame('foo', $this->form->getData());
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNull($expected = null, $norm = null, $view = null)
     {
         parent::testSubmitNull($expected, $norm, ['first' => null, 'second' => null]);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TextTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TextTypeTest.php
index e14a816..1d8a382 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TextTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TextTypeTest.php
@@ -15,6 +15,7 @@ class TextTypeTest extends BaseTypeTestCase
 {
     public const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\TextType';
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNull($expected = null, $norm = null, $view = null)
     {
         parent::testSubmitNull($expected, $norm, '');
@@ -42,10 +43,9 @@ class TextTypeTest extends BaseTypeTestCase
     }
 
     /**
-     * @dataProvider provideZeros
-     *
      * @see https://github.com/symfony/symfony/issues/1986
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideZeros')]
     public function testSetDataThroughParamsWithZero($data, $dataAsString)
     {
         $form = $this->factory->create(static::TESTED_TYPE, null, [
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php
index 3e8e42f..41365ee 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php
@@ -909,9 +909,7 @@ class TimeTypeTest extends BaseTypeTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideCompoundWidgets
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompoundWidgets')]
     public function testHourErrorsBubbleUp($widget)
     {
         $error = new FormError('Invalid!');
@@ -924,9 +922,7 @@ class TimeTypeTest extends BaseTypeTestCase
         $this->assertSame([$error], iterator_to_array($form->getErrors()));
     }
 
-    /**
-     * @dataProvider provideCompoundWidgets
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompoundWidgets')]
     public function testMinuteErrorsBubbleUp($widget)
     {
         $error = new FormError('Invalid!');
@@ -939,9 +935,7 @@ class TimeTypeTest extends BaseTypeTestCase
         $this->assertSame([$error], iterator_to_array($form->getErrors()));
     }
 
-    /**
-     * @dataProvider provideCompoundWidgets
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompoundWidgets')]
     public function testSecondErrorsBubbleUp($widget)
     {
         $error = new FormError('Invalid!');
@@ -1064,6 +1058,7 @@ class TimeTypeTest extends BaseTypeTestCase
         $this->assertSame('test', $view['second']->vars['choice_translation_domain']);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNull($expected = null, $norm = null, $view = null)
     {
         $view = ['hour' => '', 'minute' => ''];
@@ -1130,9 +1125,7 @@ class TimeTypeTest extends BaseTypeTestCase
         ], $form->getViewData());
     }
 
-    /**
-     * @dataProvider provideEmptyData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEmptyData')]
     public function testSubmitNullUsesDateEmptyData($widget, $emptyData, $expectedData)
     {
         $form = $this->factory->create(static::TESTED_TYPE, null, [
@@ -1164,9 +1157,8 @@ class TimeTypeTest extends BaseTypeTestCase
         ];
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDateTimeInputTimezoneNotMatchingModelTimezone()
     {
         $this->expectDeprecation('Since symfony/form 6.4: Using a "DateTime" instance with a timezone ("UTC") not matching the configured model timezone "Europe/Berlin" is deprecated.');
@@ -1178,9 +1170,8 @@ class TimeTypeTest extends BaseTypeTestCase
         ]);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDateTimeImmutableInputTimezoneNotMatchingModelTimezone()
     {
         $this->expectDeprecation('Since symfony/form 6.4: Using a "DateTimeImmutable" instance with a timezone ("UTC") not matching the configured model timezone "Europe/Berlin" is deprecated.');
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimezoneTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimezoneTypeTest.php
index bd68c5a..757ba31 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimezoneTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimezoneTypeTest.php
@@ -28,6 +28,7 @@ class TimezoneTypeTest extends BaseTypeTestCase
         $this->assertContainsEquals(new ChoiceView('America/New_York', 'America/New_York', 'America / New York'), $choices);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNull($expected = null, $norm = null, $view = null)
     {
         parent::testSubmitNull($expected, $norm, '');
@@ -73,9 +74,7 @@ class TimezoneTypeTest extends BaseTypeTestCase
         $this->assertContainsEquals('Europe/Saratov', $form->getConfig()->getAttribute('choice_list')->getValues());
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testIntlTimeZoneInput()
     {
         $form = $this->factory->create(static::TESTED_TYPE, \IntlTimeZone::createTimeZone('America/New_York'), ['input' => 'intltimezone']);
@@ -95,9 +94,7 @@ class TimezoneTypeTest extends BaseTypeTestCase
         $this->assertEquals([\IntlTimeZone::createTimeZone('Europe/Amsterdam'), \IntlTimeZone::createTimeZone('Europe/Paris')], $form->getData());
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testIntlTimeZoneInputWithBc()
     {
         $reflector = new \ReflectionExtension('intl');
@@ -118,9 +115,7 @@ class TimezoneTypeTest extends BaseTypeTestCase
         $this->assertNotContains('Europe/Saratov', $form->getConfig()->getAttribute('choice_list')->getValues());
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testIntlTimeZoneInputWithBcAndIntl()
     {
         $reflector = new \ReflectionExtension('intl');
@@ -152,9 +147,7 @@ class TimezoneTypeTest extends BaseTypeTestCase
         $this->assertContainsEquals(new ChoiceView('Etc/UTC', 'Etc/UTC', 'Coordinated Universal Time'), $choices);
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testChoiceTranslationLocaleOptionWithIntl()
     {
         $choices = $this->factory
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/WeekTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/WeekTypeTest.php
index a69b96a..4d36137 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/WeekTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/WeekTypeTest.php
@@ -299,9 +299,7 @@ class WeekTypeTest extends BaseTypeTestCase
         $this->assertSame(['year' => null, 'week' => null], $form->getData());
     }
 
-    /**
-     * @dataProvider provideEmptyData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEmptyData')]
     public function testSubmitNullUsesDateEmptyDataString($widget, $emptyData, $expectedData)
     {
         $form = $this->factory->create(static::TESTED_TYPE, null, [
diff --git a/src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php b/src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php
index bfa3025..fae5e96 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php
@@ -166,9 +166,7 @@ class FormTypeCsrfExtensionTest extends TypeTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideBoolean
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBoolean')]
     public function testValidateTokenOnSubmitIfRootAndCompound($valid)
     {
         $this->tokenManager->expects($this->once())
@@ -198,9 +196,7 @@ class FormTypeCsrfExtensionTest extends TypeTestCase
         $this->assertSame($valid, $form->isValid());
     }
 
-    /**
-     * @dataProvider provideBoolean
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBoolean')]
     public function testValidateTokenOnSubmitIfRootAndCompoundUsesFormNameAsIntentionByDefault($valid)
     {
         $this->tokenManager->expects($this->once())
@@ -229,9 +225,7 @@ class FormTypeCsrfExtensionTest extends TypeTestCase
         $this->assertSame($valid, $form->isValid());
     }
 
-    /**
-     * @dataProvider provideBoolean
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBoolean')]
     public function testValidateTokenOnSubmitIfRootAndCompoundUsesTypeClassAsIntentionIfEmptyFormName($valid)
     {
         $this->tokenManager->expects($this->once())
diff --git a/src/Symfony/Component/Form/Tests/Extension/PasswordHasher/Type/PasswordTypePasswordHasherExtensionTest.php b/src/Symfony/Component/Form/Tests/Extension/PasswordHasher/Type/PasswordTypePasswordHasherExtensionTest.php
index 4ec91c8..acc29dc 100644
--- a/src/Symfony/Component/Form/Tests/Extension/PasswordHasher/Type/PasswordTypePasswordHasherExtensionTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/PasswordHasher/Type/PasswordTypePasswordHasherExtensionTest.php
@@ -144,9 +144,7 @@ class PasswordTypePasswordHasherExtensionTest extends TypeTestCase
         $this->assertSame($user->getPassword(), $hashedPassword);
     }
 
-    /**
-     * @dataProvider provideRepeatedPasswordField
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRepeatedPasswordField')]
     public function testRepeatedPasswordField(string $type, array $options = [])
     {
         $user = new User();
diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorPerformanceTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorPerformanceTest.php
index e8bfbc6..0714afd 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorPerformanceTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorPerformanceTest.php
@@ -29,9 +29,9 @@ class FormValidatorPerformanceTest extends FormPerformanceTestCase
 
     /**
      * findClickedButton() used to have an exponential number of calls.
-     *
-     * @group benchmark
      */
+    #[\PHPUnit\Framework\Attributes\Group('benchmark')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testValidationPerformance()
     {
         $this->setMaxRunningTime(1);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php
index c561cd7..ca337ef 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php
@@ -60,9 +60,7 @@ class ValidatorTypeGuesserTest extends TestCase
         $this->guesser = new ValidatorTypeGuesser($this->metadataFactory);
     }
 
-    /**
-     * @dataProvider guessTypeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('guessTypeProvider')]
     public function testGuessType(Constraint $constraint, TypeGuess $guess)
     {
         $this->metadata->addPropertyConstraint(self::TEST_PROPERTY, $constraint);
@@ -101,9 +99,7 @@ class ValidatorTypeGuesserTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider guessRequiredProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('guessRequiredProvider')]
     public function testGuessRequired($constraint, $guess)
     {
         // add distracting constraint
@@ -185,9 +181,7 @@ class ValidatorTypeGuesserTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider maxLengthTypeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('maxLengthTypeProvider')]
     public function testGuessMaxLengthForConstraintWithType($type)
     {
         $constraint = new Type($type);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php
index 0aeb35a..07e90cc 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php
@@ -786,9 +786,7 @@ class ViolationMapperTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideDefaultTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDefaultTests')]
     public function testDefaultErrorMapping($target, $childName, $childPath, $grandChildName, $grandChildPath, $violationPath)
     {
         $violation = $this->getConstraintViolation($violationPath);
@@ -1241,9 +1239,7 @@ class ViolationMapperTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideCustomDataErrorTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCustomDataErrorTests')]
     public function testCustomDataErrorMapping($target, $mapFrom, $mapTo, $childName, $childPath, $grandChildName, $grandChildPath, $violationPath)
     {
         $violation = $this->getConstraintViolation($violationPath);
@@ -1441,9 +1437,7 @@ class ViolationMapperTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideCustomFormErrorTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCustomFormErrorTests')]
     public function testCustomFormErrorMapping($target, $mapFrom, $mapTo, $errorName, $errorPath, $childName, $childPath, $grandChildName, $grandChildPath, $violationPath)
     {
         $violation = $this->getConstraintViolation($violationPath);
@@ -1508,9 +1502,7 @@ class ViolationMapperTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideErrorTestsForFormInheritingParentData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideErrorTestsForFormInheritingParentData')]
     public function testErrorMappingForFormInheritingParentData($target, $childName, $childPath, $grandChildName, $grandChildPath, $violationPath)
     {
         $violation = $this->getConstraintViolation($violationPath);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationPathTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationPathTest.php
index ebae56e..43921f7 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationPathTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationPathTest.php
@@ -84,9 +84,7 @@ class ViolationPathTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider providePaths
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePaths')]
     public function testCreatePath($string, $entries, $slicedPath = null)
     {
         $slicedPath ??= $string;
@@ -120,9 +118,7 @@ class ViolationPathTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideParents
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideParents')]
     public function testGetParent($violationPath, $parentPath)
     {
         $path = new ViolationPath($violationPath);
diff --git a/src/Symfony/Component/Form/Tests/FormConfigTest.php b/src/Symfony/Component/Form/Tests/FormConfigTest.php
index 6de3e94..f811861 100644
--- a/src/Symfony/Component/Form/Tests/FormConfigTest.php
+++ b/src/Symfony/Component/Form/Tests/FormConfigTest.php
@@ -62,9 +62,7 @@ class FormConfigTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getHtml4Ids
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getHtml4Ids')]
     public function testNameAcceptsOnlyNamesValidAsIdsInHtml4($name, $expectedException = null)
     {
         if (null !== $expectedException) {
diff --git a/src/Symfony/Component/Form/Tests/FormErrorIteratorTest.php b/src/Symfony/Component/Form/Tests/FormErrorIteratorTest.php
index 56472c8..b37c4a9 100644
--- a/src/Symfony/Component/Form/Tests/FormErrorIteratorTest.php
+++ b/src/Symfony/Component/Form/Tests/FormErrorIteratorTest.php
@@ -23,9 +23,7 @@ use Symfony\Component\Validator\ConstraintViolation;
 
 class FormErrorIteratorTest extends TestCase
 {
-    /**
-     * @dataProvider findByCodesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('findByCodesProvider')]
     public function testFindByCodes($code, $violationsCount)
     {
         $formBuilder = new FormBuilder(
diff --git a/src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php b/src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php
index fa28f75..30f65c3 100644
--- a/src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/ResolvedFormTypeTest.php
@@ -151,9 +151,7 @@ class ResolvedFormTypeTest extends TestCase
         $this->assertSame('configurable_form_prefix', $resolvedType->getBlockPrefix());
     }
 
-    /**
-     * @dataProvider provideTypeClassBlockPrefixTuples
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTypeClassBlockPrefixTuples')]
     public function testBlockPrefixDefaultsToFQCNIfNoName($typeClass, $blockPrefix)
     {
         $resolvedType = new ResolvedFormType(new $typeClass());
diff --git a/src/Symfony/Component/Form/Tests/Resources/TranslationFilesTest.php b/src/Symfony/Component/Form/Tests/Resources/TranslationFilesTest.php
index 157335d..6995a52 100644
--- a/src/Symfony/Component/Form/Tests/Resources/TranslationFilesTest.php
+++ b/src/Symfony/Component/Form/Tests/Resources/TranslationFilesTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Translation\Util\XliffUtils;
 
 class TranslationFilesTest extends TestCase
 {
-    /**
-     * @dataProvider provideTranslationFiles
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTranslationFiles')]
     public function testTranslationFileIsValid($filePath)
     {
         $document = new \DOMDocument();
@@ -29,9 +27,7 @@ class TranslationFilesTest extends TestCase
         $this->assertCount(0, $errors, \sprintf('"%s" is invalid:%s', $filePath, \PHP_EOL.implode(\PHP_EOL, array_column($errors, 'message'))));
     }
 
-    /**
-     * @dataProvider provideTranslationFiles
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTranslationFiles')]
     public function testTranslationFileIsValidWithoutEntityLoader($filePath)
     {
         $document = new \DOMDocument();
diff --git a/src/Symfony/Component/Form/Tests/SimpleFormTest.php b/src/Symfony/Component/Form/Tests/SimpleFormTest.php
index 0f9a6dc..f3864e0 100644
--- a/src/Symfony/Component/Form/Tests/SimpleFormTest.php
+++ b/src/Symfony/Component/Form/Tests/SimpleFormTest.php
@@ -75,9 +75,7 @@ class SimpleFormTest extends TestCase
         $this->form = $this->createForm();
     }
 
-    /**
-     * @dataProvider provideFormNames
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFormNames')]
     public function testGetPropertyPath($name, $propertyPath)
     {
         $config = new FormConfigBuilder($name, null, new EventDispatcher());
@@ -230,9 +228,7 @@ class SimpleFormTest extends TestCase
         $this->assertFalse($child->isRequired());
     }
 
-    /**
-     * @dataProvider getDisabledStates
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDisabledStates')]
     public function testAlwaysDisabledIfParentDisabled($parentDisabled, $disabled, $result)
     {
         $parent = $this->getBuilder()->setDisabled($parentDisabled)->getForm();
diff --git a/src/Symfony/Component/Form/Tests/Util/ServerParamsTest.php b/src/Symfony/Component/Form/Tests/Util/ServerParamsTest.php
index 1904812..e84b5f4 100644
--- a/src/Symfony/Component/Form/Tests/Util/ServerParamsTest.php
+++ b/src/Symfony/Component/Form/Tests/Util/ServerParamsTest.php
@@ -40,7 +40,7 @@ class ServerParamsTest extends TestCase
         $this->assertEquals(1024, $serverParams->getContentLength());
     }
 
-    /** @dataProvider getGetPostMaxSizeTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getGetPostMaxSizeTestData')]
     public function testGetPostMaxSize($size, $bytes)
     {
         $serverParams = new DummyServerParams($size);
diff --git a/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php b/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php
index d51481f..0838b2c 100644
--- a/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php
+++ b/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php
@@ -24,17 +24,13 @@ class StringUtilTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider trimProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('trimProvider')]
     public function testTrim($data, $expectedData)
     {
         $this->assertSame($expectedData, StringUtil::trim($data));
     }
 
-    /**
-     * @dataProvider spaceProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('spaceProvider')]
     public function testTrimUtf8Separators($hex)
     {
         // Convert hexadecimal representation into binary
@@ -87,9 +83,7 @@ class StringUtilTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider fqcnToBlockPrefixProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('fqcnToBlockPrefixProvider')]
     public function testFqcnToBlockPrefix($fqcn, $expectedBlockPrefix)
     {
         $blockPrefix = StringUtil::fqcnToBlockPrefix($fqcn);
diff --git a/src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerAllTest.php b/src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerAllTest.php
index 90436ca..17ec92a 100644
--- a/src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerAllTest.php
+++ b/src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerAllTest.php
@@ -30,9 +30,7 @@ class HtmlSanitizerAllTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideSanitizeHead
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSanitizeHead')]
     public function testSanitizeHead(string $input, string $expected)
     {
         $this->assertSame($expected, $this->createSanitizer()->sanitizeFor('head', $input));
@@ -63,9 +61,7 @@ class HtmlSanitizerAllTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provideSanitizeBody
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSanitizeBody')]
     public function testSanitizeBody(string $input, string $expected)
     {
         $this->assertSame($expected, $this->createSanitizer()->sanitize($input));
diff --git a/src/Symfony/Component/HtmlSanitizer/Tests/Reference/W3CReferenceTest.php b/src/Symfony/Component/HtmlSanitizer/Tests/Reference/W3CReferenceTest.php
index 981dab5..21c9ae3 100644
--- a/src/Symfony/Component/HtmlSanitizer/Tests/Reference/W3CReferenceTest.php
+++ b/src/Symfony/Component/HtmlSanitizer/Tests/Reference/W3CReferenceTest.php
@@ -24,9 +24,7 @@ class W3CReferenceTest extends TestCase
         'attributes' => 'https://raw.githubusercontent.com/WICG/sanitizer-api/main/resources/baseline-attribute-allow-list.json',
     ];
 
-    /**
-     * @group network
-     */
+    #[\PHPUnit\Framework\Attributes\Group('network')]
     public function testElements()
     {
         $referenceElements = array_values(array_merge(array_keys(W3CReference::HEAD_ELEMENTS), array_keys(W3CReference::BODY_ELEMENTS)));
@@ -38,9 +36,7 @@ class W3CReferenceTest extends TestCase
         );
     }
 
-    /**
-     * @group network
-     */
+    #[\PHPUnit\Framework\Attributes\Group('network')]
     public function testAttributes()
     {
         $this->assertSame(
diff --git a/src/Symfony/Component/HtmlSanitizer/Tests/TextSanitizer/StringSanitizerTest.php b/src/Symfony/Component/HtmlSanitizer/Tests/TextSanitizer/StringSanitizerTest.php
index 52d992d..66406c7 100644
--- a/src/Symfony/Component/HtmlSanitizer/Tests/TextSanitizer/StringSanitizerTest.php
+++ b/src/Symfony/Component/HtmlSanitizer/Tests/TextSanitizer/StringSanitizerTest.php
@@ -30,9 +30,7 @@ class StringSanitizerTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provideHtmlLower
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideHtmlLower')]
     public function testHtmlLower(string $input, string $expected)
     {
         $this->assertSame($expected, StringSanitizer::htmlLower($input));
@@ -66,9 +64,7 @@ class StringSanitizerTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provideEncodeHtmlEntites
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEncodeHtmlEntites')]
     public function testEncodeHtmlEntites(string $input, string $expected)
     {
         $this->assertSame($expected, StringSanitizer::encodeHtmlEntities($input));
diff --git a/src/Symfony/Component/HtmlSanitizer/Tests/TextSanitizer/UrlSanitizerTest.php b/src/Symfony/Component/HtmlSanitizer/Tests/TextSanitizer/UrlSanitizerTest.php
index 3918950..639147b 100644
--- a/src/Symfony/Component/HtmlSanitizer/Tests/TextSanitizer/UrlSanitizerTest.php
+++ b/src/Symfony/Component/HtmlSanitizer/Tests/TextSanitizer/UrlSanitizerTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\HtmlSanitizer\TextSanitizer\UrlSanitizer;
 
 class UrlSanitizerTest extends TestCase
 {
-    /**
-     * @dataProvider provideSanitize
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSanitize')]
     public function testSanitize(?string $input, ?array $allowedSchemes, ?array $allowedHosts, bool $forceHttps, bool $allowRelative, ?string $expected)
     {
         $this->assertSame($expected, UrlSanitizer::sanitize($input, $allowedSchemes, $forceHttps, $allowedHosts, $allowRelative));
@@ -303,9 +301,7 @@ class UrlSanitizerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideParse
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideParse')]
     public function testParse(string $url, ?array $expected)
     {
         $parsed = UrlSanitizer::parse($url);
diff --git a/src/Symfony/Component/HttpClient/Tests/AmpHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/AmpHttpClientTest.php
index dd45668..f790821 100644
--- a/src/Symfony/Component/HttpClient/Tests/AmpHttpClientTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/AmpHttpClientTest.php
@@ -14,14 +14,11 @@ namespace Symfony\Component\HttpClient\Tests;
 use Symfony\Component\HttpClient\AmpHttpClient;
 use Symfony\Contracts\HttpClient\HttpClientInterface;
 
-/**
- * @group dns-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('dns-sensitive')]
 class AmpHttpClientTest extends HttpClientTestCase
 {
-    /**
-     * @group transient
-     */
+    #[\PHPUnit\Framework\Attributes\Group('transient')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testNonBlockingStream()
     {
         parent::testNonBlockingStream();
@@ -32,6 +29,7 @@ class AmpHttpClientTest extends HttpClientTestCase
         return new AmpHttpClient(['verify_peer' => false, 'verify_host' => false, 'timeout' => 5]);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProxy()
     {
         $this->markTestSkipped('A real proxy server would be needed.');
diff --git a/src/Symfony/Component/HttpClient/Tests/AsyncDecoratorTraitTest.php b/src/Symfony/Component/HttpClient/Tests/AsyncDecoratorTraitTest.php
index 8e8b433..ec2f04b 100644
--- a/src/Symfony/Component/HttpClient/Tests/AsyncDecoratorTraitTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/AsyncDecoratorTraitTest.php
@@ -56,6 +56,7 @@ class AsyncDecoratorTraitTest extends NativeHttpClientTest
         };
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testTimeoutOnDestruct()
     {
         if (HttpClient::create() instanceof NativeHttpClient) {
diff --git a/src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php
index a18b253..d19994b 100644
--- a/src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php
@@ -15,11 +15,8 @@ use Symfony\Component\HttpClient\CurlHttpClient;
 use Symfony\Component\HttpClient\Exception\InvalidArgumentException;
 use Symfony\Contracts\HttpClient\HttpClientInterface;
 
-/**
- * @requires extension curl
- *
- * @group dns-sensitive
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('curl')]
+#[\PHPUnit\Framework\Attributes\Group('dns-sensitive')]
 class CurlHttpClientTest extends HttpClientTestCase
 {
     protected function getHttpClient(string $testCase): HttpClientInterface
@@ -35,6 +32,7 @@ class CurlHttpClientTest extends HttpClientTestCase
         return new CurlHttpClient(['verify_peer' => false, 'verify_host' => false], 6, 50);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testTimeoutIsNotAFatalError()
     {
         if ('\\' === \DIRECTORY_SEPARATOR) {
@@ -127,9 +125,7 @@ class CurlHttpClientTest extends HttpClientTestCase
         $this->assertSame('/302', $response->toArray()['REQUEST_URI'] ?? null);
     }
 
-    /**
-     * @group integration
-     */
+    #[\PHPUnit\Framework\Attributes\Group('integration')]
     public function testMaxConnections()
     {
         foreach ($ports = [80, 8681, 8682, 8683, 8684] as $port) {
diff --git a/src/Symfony/Component/HttpClient/Tests/DataCollector/HttpClientDataCollectorTest.php b/src/Symfony/Component/HttpClient/Tests/DataCollector/HttpClientDataCollectorTest.php
index b57ea82..66c445c 100644
--- a/src/Symfony/Component/HttpClient/Tests/DataCollector/HttpClientDataCollectorTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/DataCollector/HttpClientDataCollectorTest.php
@@ -164,9 +164,7 @@ class HttpClientDataCollectorTest extends TestCase
         $this->assertEquals(0, $sut->getRequestCount());
     }
 
-    /**
-     * @dataProvider provideCurlRequests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCurlRequests')]
     public function testItGeneratesCurlCommandsAsExpected(array $request, string $expectedCurlCommand)
     {
         $sut = new HttpClientDataCollector();
diff --git a/src/Symfony/Component/HttpClient/Tests/EventSourceHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/EventSourceHttpClientTest.php
index de199ac..ce57219 100644
--- a/src/Symfony/Component/HttpClient/Tests/EventSourceHttpClientTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/EventSourceHttpClientTest.php
@@ -29,11 +29,11 @@ use Symfony\Contracts\HttpClient\HttpClientInterface;
  */
 class EventSourceHttpClientTest extends TestCase
 {
-    /**
-     * @testWith ["\n"]
-     *           ["\r"]
-     *           ["\r\n"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['
+'])]
+    #[\PHPUnit\Framework\Attributes\TestWith([''])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['
+'])]
     public function testGetServerSentEvents(string $sep)
     {
         $es = new EventSourceHttpClient(new MockHttpClient(function (string $method, string $url, array $options) use ($sep): MockResponse {
@@ -135,9 +135,7 @@ TXT
         $res = $es->connect('http://localhost:8080/events', ['body' => 'mybody'], 'POST');
     }
 
-    /**
-     * @dataProvider contentTypeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('contentTypeProvider')]
     public function testContentType($contentType, $expected)
     {
         $chunk = new DataChunk(0, '');
diff --git a/src/Symfony/Component/HttpClient/Tests/Exception/HttpExceptionTraitTest.php b/src/Symfony/Component/HttpClient/Tests/Exception/HttpExceptionTraitTest.php
index f2df403..5960408 100644
--- a/src/Symfony/Component/HttpClient/Tests/Exception/HttpExceptionTraitTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/Exception/HttpExceptionTraitTest.php
@@ -36,9 +36,7 @@ ERROR;
         yield ['application/json', '{"title": "An error occurred", "detail": {"field_name": ["Some details"]}}', $errorWithoutMessage];
     }
 
-    /**
-     * @dataProvider provideParseError
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideParseError')]
     public function testParseError(string $mimeType, string $json, string $expectedMessage)
     {
         $response = $this->createMock(ResponseInterface::class);
diff --git a/src/Symfony/Component/HttpClient/Tests/HttpClientTestCase.php b/src/Symfony/Component/HttpClient/Tests/HttpClientTestCase.php
index f7eeaa8..2f21d19 100644
--- a/src/Symfony/Component/HttpClient/Tests/HttpClientTestCase.php
+++ b/src/Symfony/Component/HttpClient/Tests/HttpClientTestCase.php
@@ -42,6 +42,7 @@ abstract class HttpClientTestCase extends BaseHttpClientTestCase
 
     private static bool $vulcainStarted = false;
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testTimeoutOnDestruct()
     {
         if (!method_exists(parent::class, 'testTimeoutOnDestruct')) {
@@ -605,9 +606,7 @@ abstract class HttpClientTestCase extends BaseHttpClientTestCase
         $this->assertSame(302, $response->getStatusCode());
     }
 
-    /**
-     * @dataProvider getRedirectWithAuthTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRedirectWithAuthTests')]
     public function testRedirectWithAuth(string $url, bool $redirectWithAuth)
     {
         $p = TestHttpServer::start(8067);
@@ -681,11 +680,9 @@ abstract class HttpClientTestCase extends BaseHttpClientTestCase
         $this->assertSame('HEAD', $vars['REQUEST_METHOD']);
     }
 
-    /**
-     * @testWith [301]
-     *           [302]
-     *           [303]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([301])]
+    #[\PHPUnit\Framework\Attributes\TestWith([302])]
+    #[\PHPUnit\Framework\Attributes\TestWith([303])]
     public function testPostToGetRedirect(int $status)
     {
         $p = TestHttpServer::start(8067);
@@ -703,6 +700,7 @@ abstract class HttpClientTestCase extends BaseHttpClientTestCase
         $this->assertSame('/', $body['REQUEST_URI']);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testResponseCanBeProcessedAfterClientReset()
     {
         $client = $this->getHttpClient(__FUNCTION__);
diff --git a/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php b/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php
index 87ef918..6a9f7b5 100644
--- a/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/HttpClientTraitTest.php
@@ -23,9 +23,7 @@ class HttpClientTraitTest extends TestCase
 
     private const RFC3986_BASE = 'http://a/b/c/d;p?q';
 
-    /**
-     * @dataProvider providePrepareRequestUrl
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePrepareRequestUrl')]
     public function testPrepareRequestUrl(string $expected, string $url, array $query = [])
     {
         $defaults = [
@@ -122,9 +120,7 @@ class HttpClientTraitTest extends TestCase
         yield 'symfony' => [HttpClient::create()->request('GET', 'https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png')->toStream()];
     }
 
-    /**
-     * @dataProvider provideResolveUrl
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideResolveUrl')]
     public function testResolveUrl(string $base, string $url, string $expected)
     {
         $this->assertSame($expected, implode('', self::resolveUrl(self::parseUrl($url), self::parseUrl($base))));
@@ -212,9 +208,7 @@ class HttpClientTraitTest extends TestCase
         self::resolveUrl(self::parseUrl('/foo'), self::parseUrl('localhost:8081'));
     }
 
-    /**
-     * @dataProvider provideParseUrl
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideParseUrl')]
     public function testParseUrl(array $expected, string $url, array $query = [])
     {
         $expected = array_combine(['scheme', 'authority', 'path', 'query', 'fragment'], $expected);
@@ -243,9 +237,7 @@ class HttpClientTraitTest extends TestCase
         yield [['https:', '//xn--fuball-cta.test', null, null, null], 'https://fußball.test'];
     }
 
-    /**
-     * @dataProvider provideRemoveDotSegments
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRemoveDotSegments')]
     public function testRemoveDotSegments($expected, $url)
     {
         $this->assertSame($expected, self::removeDotSegments($url));
@@ -308,9 +300,7 @@ class HttpClientTraitTest extends TestCase
         yield [['foo'], 'Zm9v'];
     }
 
-    /**
-     * @dataProvider providePrepareAuthBasic
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePrepareAuthBasic')]
     public function testPrepareAuthBasic($arg, $result)
     {
         [, $options] = $this->prepareRequest('POST', 'http://example.com', ['auth_basic' => $arg], HttpClientInterface::OPTIONS_DEFAULTS);
@@ -327,9 +317,7 @@ class HttpClientTraitTest extends TestCase
         yield ['AAAA:BBBB:CCCC:DDDD:EEEE:FFFF:GGGG:HHHH:IIII:JJJJ:KKKK', ['pin-sha256' => ['AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHHIIIIJJJJKKKK']]];
     }
 
-    /**
-     * @dataProvider provideFingerprints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFingerprints')]
     public function testNormalizePeerFingerprint($fingerprint, $expected)
     {
         self::assertSame($expected, $this->normalizePeerFingerprint($fingerprint));
diff --git a/src/Symfony/Component/HttpClient/Tests/HttpOptionsTest.php b/src/Symfony/Component/HttpClient/Tests/HttpOptionsTest.php
index 9dbbff7..b1c04ef 100644
--- a/src/Symfony/Component/HttpClient/Tests/HttpOptionsTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/HttpOptionsTest.php
@@ -27,9 +27,7 @@ class HttpOptionsTest extends TestCase
         yield ['user:0', 'user', '0'];
     }
 
-    /**
-     * @dataProvider provideSetAuthBasic
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSetAuthBasic')]
     public function testSetAuthBasic(string $expected, string $user, string $password = '')
     {
         $this->assertSame($expected, (new HttpOptions())->setAuthBasic($user, $password)->toArray()['auth_basic']);
diff --git a/src/Symfony/Component/HttpClient/Tests/HttplugClientTest.php b/src/Symfony/Component/HttpClient/Tests/HttplugClientTest.php
index b500c95..cfba37a 100644
--- a/src/Symfony/Component/HttpClient/Tests/HttplugClientTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/HttplugClientTest.php
@@ -32,9 +32,7 @@ class HttplugClientTest extends TestCase
         TestHttpServer::start();
     }
 
-    /**
-     * @requires function ob_gzhandler
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresFunction('ob_gzhandler')]
     public function testSendRequest()
     {
         $client = new HttplugClient(new NativeHttpClient());
@@ -49,9 +47,7 @@ class HttplugClientTest extends TestCase
         $this->assertSame('HTTP/1.1', $body['SERVER_PROTOCOL']);
     }
 
-    /**
-     * @requires function ob_gzhandler
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresFunction('ob_gzhandler')]
     public function testSendAsyncRequest()
     {
         $client = new HttplugClient(new NativeHttpClient());
diff --git a/src/Symfony/Component/HttpClient/Tests/MockHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/MockHttpClientTest.php
index e453201..45d7861 100644
--- a/src/Symfony/Component/HttpClient/Tests/MockHttpClientTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/MockHttpClientTest.php
@@ -25,9 +25,7 @@ use Symfony\Contracts\HttpClient\HttpClientInterface;
 
 class MockHttpClientTest extends HttpClientTestCase
 {
-    /**
-     * @dataProvider mockingProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('mockingProvider')]
     public function testMocking($factory, array $expectedResponses)
     {
         $client = new MockHttpClient($factory);
@@ -96,9 +94,8 @@ class MockHttpClientTest extends HttpClientTestCase
         ];
     }
 
-    /**
-     * @dataProvider validResponseFactoryProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validResponseFactoryProvider')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testValidResponseFactory($responseFactory)
     {
         (new MockHttpClient($responseFactory))->request('GET', 'https://foo.bar');
@@ -118,9 +115,7 @@ class MockHttpClientTest extends HttpClientTestCase
         ];
     }
 
-    /**
-     * @dataProvider transportExceptionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('transportExceptionProvider')]
     public function testTransportExceptionThrowsIfPerformedMoreRequestsThanConfigured($factory)
     {
         $client = new MockHttpClient($factory);
@@ -158,9 +153,7 @@ class MockHttpClientTest extends HttpClientTestCase
         ];
     }
 
-    /**
-     * @dataProvider invalidResponseFactoryProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidResponseFactoryProvider')]
     public function testInvalidResponseFactory($responseFactory, string $expectedExceptionMessage)
     {
         $this->expectException(TransportException::class);
@@ -489,11 +482,13 @@ class MockHttpClientTest extends HttpClientTestCase
         return new MockHttpClient($responses);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testHttp2PushVulcain()
     {
         $this->markTestSkipped('MockHttpClient doesn\'t support HTTP/2 PUSH.');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testHttp2PushVulcainWithUnusedResponse()
     {
         $this->markTestSkipped('MockHttpClient doesn\'t support HTTP/2 PUSH.');
diff --git a/src/Symfony/Component/HttpClient/Tests/NativeHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/NativeHttpClientTest.php
index 35ab614..482eae2 100644
--- a/src/Symfony/Component/HttpClient/Tests/NativeHttpClientTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/NativeHttpClientTest.php
@@ -14,9 +14,7 @@ namespace Symfony\Component\HttpClient\Tests;
 use Symfony\Component\HttpClient\NativeHttpClient;
 use Symfony\Contracts\HttpClient\HttpClientInterface;
 
-/**
- * @group dns-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('dns-sensitive')]
 class NativeHttpClientTest extends HttpClientTestCase
 {
     protected function getHttpClient(string $testCase): HttpClientInterface
@@ -24,26 +22,31 @@ class NativeHttpClientTest extends HttpClientTestCase
         return new NativeHttpClient();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testInformationalResponseStream()
     {
         $this->markTestSkipped('NativeHttpClient doesn\'t support informational status codes.');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testTimeoutOnInitialize()
     {
         $this->markTestSkipped('NativeHttpClient doesn\'t support opening concurrent requests.');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testTimeoutOnDestruct()
     {
         $this->markTestSkipped('NativeHttpClient doesn\'t support opening concurrent requests.');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testHttp2PushVulcain()
     {
         $this->markTestSkipped('NativeHttpClient doesn\'t support HTTP/2.');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testHttp2PushVulcainWithUnusedResponse()
     {
         $this->markTestSkipped('NativeHttpClient doesn\'t support HTTP/2.');
diff --git a/src/Symfony/Component/HttpClient/Tests/NoPrivateNetworkHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/NoPrivateNetworkHttpClientTest.php
index 1a0a94d..f4b0ae3 100644
--- a/src/Symfony/Component/HttpClient/Tests/NoPrivateNetworkHttpClientTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/NoPrivateNetworkHttpClientTest.php
@@ -66,12 +66,9 @@ class NoPrivateNetworkHttpClientTest extends TestCase
         yield ['fc00::1',  '10.0.0.0/8', true];
     }
 
-    /**
-     * @dataProvider getExcludeIpData
-     *
-     * @group nophpunit11
-     * @group dns-sensitive
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getExcludeIpData')]
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
+    #[\PHPUnit\Framework\Attributes\Group('dns-sensitive')]
     public function testExcludeByIp(string $ipAddr, $subnets, bool $mustThrow)
     {
         $host = strtr($ipAddr, '.:', '--');
@@ -105,12 +102,9 @@ class NoPrivateNetworkHttpClientTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider getExcludeHostData
-     *
-     * @group nophpunit11
-     * @group dns-sensitive
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getExcludeHostData')]
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
+    #[\PHPUnit\Framework\Attributes\Group('dns-sensitive')]
     public function testExcludeByHost(string $ipAddr, $subnets, bool $mustThrow)
     {
         $host = strtr($ipAddr, '.:', '--');
diff --git a/src/Symfony/Component/HttpClient/Tests/Psr18ClientTest.php b/src/Symfony/Component/HttpClient/Tests/Psr18ClientTest.php
index bf49535..61b38e4 100644
--- a/src/Symfony/Component/HttpClient/Tests/Psr18ClientTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/Psr18ClientTest.php
@@ -28,9 +28,7 @@ class Psr18ClientTest extends TestCase
         TestHttpServer::start();
     }
 
-    /**
-     * @requires function ob_gzhandler
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresFunction('ob_gzhandler')]
     public function testSendRequest()
     {
         $factory = new Psr17Factory();
diff --git a/src/Symfony/Component/HttpClient/Tests/Response/JsonMockResponseTest.php b/src/Symfony/Component/HttpClient/Tests/Response/JsonMockResponseTest.php
index 768353b..a90e1f0 100644
--- a/src/Symfony/Component/HttpClient/Tests/Response/JsonMockResponseTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/Response/JsonMockResponseTest.php
@@ -75,9 +75,7 @@ final class JsonMockResponseTest extends TestCase
         ], $response->toArray());
     }
 
-    /**
-     * @dataProvider responseHeadersProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('responseHeadersProvider')]
     public function testResponseHeaders(string $expectedContentType, array $responseHeaders)
     {
         $client = new MockHttpClient(new JsonMockResponse([
diff --git a/src/Symfony/Component/HttpClient/Tests/Response/MockResponseTest.php b/src/Symfony/Component/HttpClient/Tests/Response/MockResponseTest.php
index 3051e29..c0d5525 100644
--- a/src/Symfony/Component/HttpClient/Tests/Response/MockResponseTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/Response/MockResponseTest.php
@@ -49,9 +49,7 @@ class MockResponseTest extends TestCase
         $this->assertSame($data, $response->toArray());
     }
 
-    /**
-     * @dataProvider toArrayErrors
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('toArrayErrors')]
     public function testToArrayError($content, $responseHeaders, $message)
     {
         $this->expectException(JsonException::class);
diff --git a/src/Symfony/Component/HttpClient/Tests/Retry/GenericRetryStrategyTest.php b/src/Symfony/Component/HttpClient/Tests/Retry/GenericRetryStrategyTest.php
index 8219bbe..97a9945 100644
--- a/src/Symfony/Component/HttpClient/Tests/Retry/GenericRetryStrategyTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/Retry/GenericRetryStrategyTest.php
@@ -21,9 +21,7 @@ use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
 
 class GenericRetryStrategyTest extends TestCase
 {
-    /**
-     * @dataProvider provideRetryable
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRetryable')]
     public function testShouldRetry(string $method, int $code, ?TransportExceptionInterface $exception)
     {
         $strategy = new GenericRetryStrategy();
@@ -31,9 +29,7 @@ class GenericRetryStrategyTest extends TestCase
         self::assertTrue($strategy->shouldRetry($this->getContext(0, $method, 'http://example.com/', $code), null, $exception));
     }
 
-    /**
-     * @dataProvider provideNotRetryable
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNotRetryable')]
     public function testShouldNotRetry(string $method, int $code, ?TransportExceptionInterface $exception)
     {
         $strategy = new GenericRetryStrategy();
@@ -55,9 +51,7 @@ class GenericRetryStrategyTest extends TestCase
         yield ['POST', 500, null];
     }
 
-    /**
-     * @dataProvider provideDelay
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDelay')]
     public function testGetDelay(int $delay, int $multiplier, int $maxDelay, int $previousRetries, int $expectedDelay)
     {
         $strategy = new GenericRetryStrategy([], $delay, $multiplier, $maxDelay, 0);
@@ -90,9 +84,7 @@ class GenericRetryStrategyTest extends TestCase
         yield [0, 2, 10000, 1, 0];
     }
 
-    /**
-     * @dataProvider provideJitter
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideJitter')]
     public function testJitter(float $multiplier, int $previousRetries)
     {
         $strategy = new GenericRetryStrategy([], 1000, $multiplier, 0, 1);
diff --git a/src/Symfony/Component/HttpClient/Tests/ScopingHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/ScopingHttpClientTest.php
index 0fbda4e..4516bb1 100644
--- a/src/Symfony/Component/HttpClient/Tests/ScopingHttpClientTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/ScopingHttpClientTest.php
@@ -35,9 +35,7 @@ class ScopingHttpClientTest extends TestCase
         $this->assertSame('http://example.com/foo?f=g&a=b', $client->request('GET', '/foo?f=g')->getInfo('url'));
     }
 
-    /**
-     * @dataProvider provideMatchingUrls
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMatchingUrls')]
     public function testMatchingUrls(string $regexp, string $url, array $options)
     {
         $mockClient = new MockHttpClient();
diff --git a/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderItemTest.php b/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderItemTest.php
index 7ec8c30..1217d58 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderItemTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderItemTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\HttpFoundation\AcceptHeaderItem;
 
 class AcceptHeaderItemTest extends TestCase
 {
-    /**
-     * @dataProvider provideFromStringData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFromStringData')]
     public function testFromString($string, $value, array $attributes)
     {
         $item = AcceptHeaderItem::fromString($string);
@@ -48,9 +46,7 @@ class AcceptHeaderItemTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideToStringData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideToStringData')]
     public function testToString($value, array $attributes, $string)
     {
         $item = new AcceptHeaderItem($value, $attributes);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php b/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php
index e972d71..6c59662 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php
@@ -23,9 +23,7 @@ class AcceptHeaderTest extends TestCase
         $this->assertSame('text/html', $header->first()->getValue());
     }
 
-    /**
-     * @dataProvider provideFromStringData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFromStringData')]
     public function testFromString($string, array $items)
     {
         $header = AcceptHeader::fromString($string);
@@ -50,9 +48,7 @@ class AcceptHeaderTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideToStringData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideToStringData')]
     public function testToString(array $items, $string)
     {
         $header = new AcceptHeader($items);
@@ -69,9 +65,7 @@ class AcceptHeaderTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideFilterData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFilterData')]
     public function testFilter($string, $filter, array $values)
     {
         $header = AcceptHeader::fromString($string)->filter($filter);
@@ -85,9 +79,7 @@ class AcceptHeaderTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideSortingData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSortingData')]
     public function testSorting($string, array $values)
     {
         $header = AcceptHeader::fromString($string);
@@ -103,9 +95,7 @@ class AcceptHeaderTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideDefaultValueData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDefaultValueData')]
     public function testDefaultValue($acceptHeader, $value, $expectedQuality)
     {
         $header = AcceptHeader::fromString($acceptHeader);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php
index 8f298b7..fb06884 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php
@@ -79,9 +79,7 @@ class BinaryFileResponseTest extends ResponseTestCase
         $this->assertSame('attachment; filename=f__.html; filename*=utf-8\'\'f%F6%F6.html', $response->headers->get('Content-Disposition'));
     }
 
-    /**
-     * @dataProvider provideRanges
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRanges')]
     public function testRequests($requestRange, $offset, $length, $responseRange)
     {
         $response = (new BinaryFileResponse(__DIR__.'/File/Fixtures/test.gif', 200, ['Content-Type' => 'application/octet-stream']))->setAutoEtag();
@@ -111,9 +109,7 @@ class BinaryFileResponseTest extends ResponseTestCase
         $this->assertSame((string) $length, $response->headers->get('Content-Length'));
     }
 
-    /**
-     * @dataProvider provideRanges
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRanges')]
     public function testRequestsWithoutEtag($requestRange, $offset, $length, $responseRange)
     {
         $response = new BinaryFileResponse(__DIR__.'/File/Fixtures/test.gif', 200, ['Content-Type' => 'application/octet-stream']);
@@ -173,9 +169,7 @@ class BinaryFileResponseTest extends ResponseTestCase
         $this->assertNull($response->headers->get('Content-Range'));
     }
 
-    /**
-     * @dataProvider provideFullFileRanges
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFullFileRanges')]
     public function testFullFileRequests($requestRange)
     {
         $response = (new BinaryFileResponse(__DIR__.'/File/Fixtures/test.gif', 200, ['Content-Type' => 'application/octet-stream']))->setAutoEtag();
@@ -243,9 +237,7 @@ class BinaryFileResponseTest extends ResponseTestCase
         $this->assertEquals(200, $response->getStatusCode());
     }
 
-    /**
-     * @dataProvider provideInvalidRanges
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidRanges')]
     public function testInvalidRequests($requestRange)
     {
         $response = (new BinaryFileResponse(__DIR__.'/File/Fixtures/test.gif', 200, ['Content-Type' => 'application/octet-stream']))->setAutoEtag();
@@ -270,9 +262,7 @@ class BinaryFileResponseTest extends ResponseTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideXSendfileFiles
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideXSendfileFiles')]
     public function testXSendfile($file)
     {
         $request = Request::create('/');
@@ -296,9 +286,7 @@ class BinaryFileResponseTest extends ResponseTestCase
         ];
     }
 
-    /**
-     * @dataProvider getSampleXAccelMappings
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getSampleXAccelMappings')]
     public function testXAccelMapping($realpath, $mapping, $virtual)
     {
         $request = Request::create('/');
diff --git a/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php b/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php
index b55d29c..30f9bf9 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php
@@ -19,9 +19,8 @@ use Symfony\Component\HttpFoundation\Cookie;
  *
  * @author John Kary <john@johnkary.net>
  * @author Hugo Hamon <hugo.hamon@sensio.com>
- *
- * @group time-sensitive
  */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class CookieTest extends TestCase
 {
     public static function namesWithSpecialCharacters()
@@ -38,27 +37,21 @@ class CookieTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider namesWithSpecialCharacters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('namesWithSpecialCharacters')]
     public function testInstantiationThrowsExceptionIfRawCookieNameContainsSpecialCharacters($name)
     {
         $this->expectException(\InvalidArgumentException::class);
         Cookie::create($name, null, 0, null, null, null, false, true);
     }
 
-    /**
-     * @dataProvider namesWithSpecialCharacters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('namesWithSpecialCharacters')]
     public function testWithRawThrowsExceptionIfCookieNameContainsSpecialCharacters($name)
     {
         $this->expectException(\InvalidArgumentException::class);
         Cookie::create($name)->withRaw();
     }
 
-    /**
-     * @dataProvider namesWithSpecialCharacters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('namesWithSpecialCharacters')]
     public function testInstantiationSucceedNonRawCookieNameContainsSpecialCharacters($name)
     {
         $this->assertInstanceOf(Cookie::class, Cookie::create($name));
diff --git a/src/Symfony/Component/HttpFoundation/Tests/ExpressionRequestMatcherTest.php b/src/Symfony/Component/HttpFoundation/Tests/ExpressionRequestMatcherTest.php
index 02917f3..aa56a79 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/ExpressionRequestMatcherTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/ExpressionRequestMatcherTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
 use Symfony\Component\HttpFoundation\ExpressionRequestMatcher;
 use Symfony\Component\HttpFoundation\Request;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class ExpressionRequestMatcherTest extends TestCase
 {
     public function testWhenNoExpressionIsSet()
@@ -28,9 +26,7 @@ class ExpressionRequestMatcherTest extends TestCase
         $expressionRequestMatcher->matches(new Request());
     }
 
-    /**
-     * @dataProvider provideExpressions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideExpressions')]
     public function testMatchesWhenParentMatchesIsTrue($expression, $expected)
     {
         $request = Request::create('/foo');
@@ -40,9 +36,7 @@ class ExpressionRequestMatcherTest extends TestCase
         $this->assertSame($expected, $expressionRequestMatcher->matches($request));
     }
 
-    /**
-     * @dataProvider provideExpressions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideExpressions')]
     public function testMatchesWhenParentMatchesIsFalse($expression)
     {
         $request = Request::create('/foo');
diff --git a/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php b/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php
index 65ce230..7cbd45c 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php
@@ -15,9 +15,7 @@ use PHPUnit\Framework\TestCase;
 use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException;
 use Symfony\Component\HttpFoundation\File\File;
 
-/**
- * @requires extension fileinfo
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('fileinfo')]
 class FileTest extends TestCase
 {
     public function testGetMimeTypeUsesMimeTypeGuessers()
@@ -103,9 +101,7 @@ class FileTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getFilenameFixtures
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFilenameFixtures')]
     public function testMoveWithNonLatinName($filename, $sanitizedFilename)
     {
         $path = __DIR__.'/Fixtures/'.$sanitizedFilename;
diff --git a/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php b/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php
index 69179fc..e88f632 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php
@@ -168,9 +168,7 @@ class UploadedFileTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider failedUploadedFile
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('failedUploadedFile')]
     public function testMoveFailed(UploadedFile $file)
     {
         $exceptionClass = match ($file->getError()) {
@@ -268,9 +266,7 @@ class UploadedFileTest extends TestCase
         $this->assertTrue($file->isValid());
     }
 
-    /**
-     * @dataProvider uploadedFileErrorProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('uploadedFileErrorProvider')]
     public function testIsInvalidOnUploadError($error)
     {
         $file = new UploadedFile(
diff --git a/src/Symfony/Component/HttpFoundation/Tests/HeaderUtilsTest.php b/src/Symfony/Component/HttpFoundation/Tests/HeaderUtilsTest.php
index 3279b9a..c6c86cd 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/HeaderUtilsTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/HeaderUtilsTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\HttpFoundation\HeaderUtils;
 
 class HeaderUtilsTest extends TestCase
 {
-    /**
-     * @dataProvider provideHeaderToSplit
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideHeaderToSplit')]
     public function testSplit(array $expected, string $header, string $separator)
     {
         $this->assertSame($expected, HeaderUtils::split($header, $separator));
@@ -105,9 +103,7 @@ class HeaderUtilsTest extends TestCase
         HeaderUtils::makeDisposition('invalid', 'foo.html');
     }
 
-    /**
-     * @dataProvider provideMakeDisposition
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMakeDisposition')]
     public function testMakeDisposition($disposition, $filename, $filenameFallback, $expected)
     {
         $this->assertEquals($expected, HeaderUtils::makeDisposition($disposition, $filename, $filenameFallback));
@@ -125,9 +121,7 @@ class HeaderUtilsTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideMakeDispositionFail
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMakeDispositionFail')]
     public function testMakeDispositionFail($disposition, $filename)
     {
         $this->expectException(\InvalidArgumentException::class);
@@ -146,9 +140,7 @@ class HeaderUtilsTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideParseQuery
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideParseQuery')]
     public function testParseQuery(string $query, ?string $expected = null)
     {
         $this->assertSame($expected ?? $query, http_build_query(HeaderUtils::parseQuery($query), '', '&'));
diff --git a/src/Symfony/Component/HttpFoundation/Tests/InputBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/InputBagTest.php
index cb0d449..bf6ceeb 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/InputBagTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/InputBagTest.php
@@ -39,9 +39,7 @@ class InputBagTest extends TestCase
         $this->assertFalse($bag->get('bool'), '->get() gets the value of a bool parameter');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGetIntError()
     {
         $this->expectDeprecation('Since symfony/http-foundation 6.3: Ignoring invalid values when using "Symfony\Component\HttpFoundation\InputBag::getInt(\'foo\')" is deprecated and will throw a "Symfony\Component\HttpFoundation\Exception\BadRequestException" in 7.0; use method "filter()" with flag "FILTER_NULL_ON_FAILURE" to keep ignoring them.');
@@ -51,9 +49,7 @@ class InputBagTest extends TestCase
         $this->assertSame(0, $result);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGetBooleanError()
     {
         $this->expectDeprecation('Since symfony/http-foundation 6.3: Ignoring invalid values when using "Symfony\Component\HttpFoundation\InputBag::getBoolean(\'foo\')" is deprecated and will throw a "Symfony\Component\HttpFoundation\Exception\BadRequestException" in 7.0; use method "filter()" with flag "FILTER_NULL_ON_FAILURE" to keep ignoring them.');
diff --git a/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php b/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php
index 2a86fbc..14d3341 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php
@@ -31,9 +31,7 @@ class IpUtilsTest extends TestCase
         $this->assertTrue(IpUtils::checkIp6($ip, $subnet));
     }
 
-    /**
-     * @dataProvider getIpv4Data
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getIpv4Data')]
     public function testIpv4($matches, $remoteAddr, $cidr)
     {
         $this->assertSame($matches, IpUtils::checkIp($remoteAddr, $cidr));
@@ -58,9 +56,7 @@ class IpUtilsTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getIpv6Data
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getIpv6Data')]
     public function testIpv6($matches, $remoteAddr, $cidr)
     {
         if (!\defined('AF_INET6')) {
@@ -94,9 +90,7 @@ class IpUtilsTest extends TestCase
         ];
     }
 
-    /**
-     * @requires extension sockets
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('sockets')]
     public function testAnIpv6WithOptionDisabledIpv6()
     {
         $this->expectException(\RuntimeException::class);
@@ -107,9 +101,7 @@ class IpUtilsTest extends TestCase
         IpUtils::checkIp('2a01:198:603:0:396e:4789:8e99:890f', '2a01:198:603:0::/65');
     }
 
-    /**
-     * @dataProvider invalidIpAddressData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidIpAddressData')]
     public function testInvalidIpAddressesDoNotMatch($requestIp, $proxyIp)
     {
         $this->assertFalse(IpUtils::checkIp4($requestIp, $proxyIp));
@@ -124,9 +116,7 @@ class IpUtilsTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider anonymizedIpData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('anonymizedIpData')]
     public function testAnonymize($ip, $expected)
     {
         $this->assertSame($expected, IpUtils::anonymize($ip));
@@ -151,9 +141,7 @@ class IpUtilsTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getIp4SubnetMaskZeroData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getIp4SubnetMaskZeroData')]
     public function testIp4SubnetMaskZero($matches, $remoteAddr, $cidr)
     {
         $this->assertSame($matches, IpUtils::checkIp4($remoteAddr, $cidr));
@@ -168,9 +156,7 @@ class IpUtilsTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getIsPrivateIpData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getIsPrivateIpData')]
     public function testIsPrivateIp(string $ip, bool $matches)
     {
         $this->assertSame($matches, IpUtils::isPrivateIp($ip));
diff --git a/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php
index 0d9ae47..634b239 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php
@@ -187,9 +187,7 @@ class ParameterBagTest extends TestCase
         $this->assertSame(1, $bag->getInt('bool', 0), '->getInt() returns 1 if a parameter is true');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGetIntExceptionWithArray()
     {
         $this->expectDeprecation(\sprintf('Since symfony/http-foundation 6.3: Ignoring invalid values when using "%s::getInt(\'digits\')" is deprecated and will throw an "%s" in 7.0; use method "filter()" with flag "FILTER_NULL_ON_FAILURE" to keep ignoring them.', ParameterBag::class, UnexpectedValueException::class));
@@ -199,9 +197,7 @@ class ParameterBagTest extends TestCase
         $this->assertSame(0, $result);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGetIntExceptionWithInvalid()
     {
         $this->expectDeprecation(\sprintf('Since symfony/http-foundation 6.3: Ignoring invalid values when using "%s::getInt(\'word\')" is deprecated and will throw an "%s" in 7.0; use method "filter()" with flag "FILTER_NULL_ON_FAILURE" to keep ignoring them.', ParameterBag::class, UnexpectedValueException::class));
@@ -334,9 +330,7 @@ class ParameterBagTest extends TestCase
         $this->assertTrue($bag->getBoolean('unknown', true), '->getBoolean() returns default if a parameter is not defined');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGetBooleanExceptionWithInvalid()
     {
         $this->expectDeprecation(\sprintf('Since symfony/http-foundation 6.3: Ignoring invalid values when using "%s::getBoolean(\'invalid\')" is deprecated and will throw an "%s" in 7.0; use method "filter()" with flag "FILTER_NULL_ON_FAILURE" to keep ignoring them.', ParameterBag::class, UnexpectedValueException::class));
diff --git a/src/Symfony/Component/HttpFoundation/Tests/RateLimiter/AbstractRequestRateLimiterTest.php b/src/Symfony/Component/HttpFoundation/Tests/RateLimiter/AbstractRequestRateLimiterTest.php
index 087d7ae..dc0b41d 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/RateLimiter/AbstractRequestRateLimiterTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/RateLimiter/AbstractRequestRateLimiterTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\RateLimiter\RateLimit;
 
 class AbstractRequestRateLimiterTest extends TestCase
 {
-    /**
-     * @dataProvider provideRateLimits
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRateLimits')]
     public function testConsume(array $rateLimits, ?RateLimit $expected)
     {
         $rateLimiter = new MockAbstractRequestRateLimiter(array_map(function (RateLimit $rateLimit) {
diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/AttributesRequestMatcherTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/AttributesRequestMatcherTest.php
index dcb2d0b..9c46665 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/AttributesRequestMatcherTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/AttributesRequestMatcherTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\HttpFoundation\Response;
 
 class AttributesRequestMatcherTest extends TestCase
 {
-    /**
-     * @dataProvider getData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getData')]
     public function test(string $key, string $regexp, bool $expected)
     {
         $matcher = new AttributesRequestMatcher([$key => $regexp]);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/ExpressionRequestMatcherTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/ExpressionRequestMatcherTest.php
index a0118e2..30f3374 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/ExpressionRequestMatcherTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/ExpressionRequestMatcherTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\HttpFoundation\RequestMatcher\ExpressionRequestMatcher;
 
 class ExpressionRequestMatcherTest extends TestCase
 {
-    /**
-     * @dataProvider provideExpressions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideExpressions')]
     public function testMatchesWhenParentMatchesIsTrue($expression, $expected)
     {
         $request = Request::create('/foo');
diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/HostRequestMatcherTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/HostRequestMatcherTest.php
index 903bde0..12f8e40 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/HostRequestMatcherTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/HostRequestMatcherTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\HttpFoundation\RequestMatcher\HostRequestMatcher;
 
 class HostRequestMatcherTest extends TestCase
 {
-    /**
-     * @dataProvider getData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getData')]
     public function test($pattern, $isMatch)
     {
         $matcher = new HostRequestMatcher($pattern);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/IpsRequestMatcherTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/IpsRequestMatcherTest.php
index 57014b5..12e420a 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/IpsRequestMatcherTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/IpsRequestMatcherTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\HttpFoundation\RequestMatcher\IpsRequestMatcher;
 
 class IpsRequestMatcherTest extends TestCase
 {
-    /**
-     * @dataProvider getData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getData')]
     public function test($ips, bool $expected)
     {
         $matcher = new IpsRequestMatcher($ips);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/IsJsonRequestMatcherTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/IsJsonRequestMatcherTest.php
index a32172e..0d40325 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/IsJsonRequestMatcherTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/IsJsonRequestMatcherTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\HttpFoundation\RequestMatcher\IsJsonRequestMatcher;
 
 class IsJsonRequestMatcherTest extends TestCase
 {
-    /**
-     * @dataProvider getData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getData')]
     public function test($json, bool $isValid)
     {
         $matcher = new IsJsonRequestMatcher();
diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/MethodRequestMatcherTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/MethodRequestMatcherTest.php
index 19db917..fedb953 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/MethodRequestMatcherTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/MethodRequestMatcherTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\HttpFoundation\RequestMatcher\MethodRequestMatcher;
 
 class MethodRequestMatcherTest extends TestCase
 {
-    /**
-     * @dataProvider getData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getData')]
     public function test(string $requestMethod, array|string $matcherMethod, bool $isMatch)
     {
         $matcher = new MethodRequestMatcher($matcherMethod);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/PathRequestMatcherTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/PathRequestMatcherTest.php
index 04ecdc9..2629305 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/PathRequestMatcherTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/PathRequestMatcherTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\HttpFoundation\RequestMatcher\PathRequestMatcher;
 
 class PathRequestMatcherTest extends TestCase
 {
-    /**
-     * @dataProvider getData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getData')]
     public function test(string $regexp, bool $expected)
     {
         $matcher = new PathRequestMatcher($regexp);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/PortRequestMatcherTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/PortRequestMatcherTest.php
index 77b394f..3c38cc2 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/PortRequestMatcherTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/PortRequestMatcherTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\HttpFoundation\RequestMatcher\PortRequestMatcher;
 
 class PortRequestMatcherTest extends TestCase
 {
-    /**
-     * @dataProvider getData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getData')]
     public function test(int $port, bool $expected)
     {
         $matcher = new PortRequestMatcher($port);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/SchemeRequestMatcherTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/SchemeRequestMatcherTest.php
index 6614bfc..6137bd6 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/SchemeRequestMatcherTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/SchemeRequestMatcherTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\HttpFoundation\RequestMatcher\SchemeRequestMatcher;
 
 class SchemeRequestMatcherTest extends TestCase
 {
-    /**
-     * @dataProvider getData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getData')]
     public function test(string $requestScheme, array|string $matcherScheme, bool $isMatch)
     {
         $httpRequest = Request::create('');
diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php
index cda2b1f..60ac8d6 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php
@@ -16,14 +16,10 @@ use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\RequestMatcher;
 use Symfony\Component\HttpFoundation\Response;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class RequestMatcherTest extends TestCase
 {
-    /**
-     * @dataProvider getMethodData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getMethodData')]
     public function testMethod($requestMethod, $matcherMethod, $isMatch)
     {
         $matcher = new RequestMatcher();
@@ -67,9 +63,7 @@ class RequestMatcherTest extends TestCase
         $this->assertTrue($matcher->matches($httpRequest));
     }
 
-    /**
-     * @dataProvider getHostData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getHostData')]
     public function testHost($pattern, $isMatch)
     {
         $matcher = new RequestMatcher();
diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
index 3ab13d1..47b82fd 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
@@ -82,9 +82,7 @@ class RequestTest extends TestCase
         $this->assertFalse($isNoCache);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGetContentType()
     {
         $this->expectDeprecation('Since symfony/http-foundation 6.2: The "Symfony\Component\HttpFoundation\Request::getContentType()" method is deprecated, use "getContentTypeFormat()" instead.');
@@ -316,18 +314,17 @@ class RequestTest extends TestCase
         $this->assertEquals('bar=f%5Co', $request->getQueryString());
     }
 
-    /**
-     * @testWith ["http://foo.com\\bar"]
-     *           ["\\\\foo.com/bar"]
-     *           ["a\rb"]
-     *           ["a\nb"]
-     *           ["a\tb"]
-     *           ["\u0000foo"]
-     *           ["foo\u0000"]
-     *           [" foo"]
-     *           ["foo "]
-     *           ["//"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['http://foo.com\bar'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['\\\\foo.com/bar'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['ab'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['a
+b'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['a	b'])]
+    #[\PHPUnit\Framework\Attributes\TestWith([' foo'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo '])]
+    #[\PHPUnit\Framework\Attributes\TestWith([' foo'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo '])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['//'])]
     public function testCreateWithBadRequestUri(string $uri)
     {
         $this->expectException(BadRequestException::class);
@@ -336,9 +333,7 @@ class RequestTest extends TestCase
         Request::create($uri);
     }
 
-    /**
-     * @dataProvider getRequestUriData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRequestUriData')]
     public function testGetRequestUri($serverRequestUri, $expected, $message)
     {
         $request = new Request();
@@ -476,9 +471,7 @@ class RequestTest extends TestCase
         $this->assertSame('xml', $request->getPreferredFormat());
     }
 
-    /**
-     * @dataProvider getFormatToMimeTypeMapProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFormatToMimeTypeMapProvider')]
     public function testGetFormatFromMimeType($format, $mimeTypes)
     {
         $request = new Request();
@@ -504,18 +497,14 @@ class RequestTest extends TestCase
         $this->assertEquals('json', $request->getFormat('application/json ;charset=utf-8'));
     }
 
-    /**
-     * @dataProvider getFormatToMimeTypeMapProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFormatToMimeTypeMapProvider')]
     public function testGetMimeTypeFromFormat($format, $mimeTypes)
     {
         $request = new Request();
         $this->assertEquals($mimeTypes[0], $request->getMimeType($format));
     }
 
-    /**
-     * @dataProvider getFormatToMimeTypeMapProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFormatToMimeTypeMapProvider')]
     public function testGetMimeTypesFromFormat($format, $mimeTypes)
     {
         $this->assertEquals($mimeTypes, Request::getMimeTypes($format));
@@ -770,9 +759,7 @@ class RequestTest extends TestCase
         $this->assertEquals('http://servername/some/path', $request->getUriForPath('/some/path'));
     }
 
-    /**
-     * @dataProvider getRelativeUriForPathData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRelativeUriForPathData')]
     public function testGetRelativeUriForPath($expected, $pathinfo, $path)
     {
         $this->assertEquals($expected, Request::create($pathinfo)->getRelativeUriForPath($path));
@@ -830,9 +817,7 @@ class RequestTest extends TestCase
         $this->assertEquals('http://servername:90', $request->getSchemeAndHttpHost());
     }
 
-    /**
-     * @dataProvider getQueryStringNormalizationData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getQueryStringNormalizationData')]
     public function testGetQueryString($query, $expectedQuery, $msg)
     {
         $request = new Request();
@@ -1028,9 +1013,7 @@ class RequestTest extends TestCase
         $this->assertSame('POST', $request->getMethod(), '->getMethod() returns the request method if invalid type is defined in query');
     }
 
-    /**
-     * @dataProvider getClientIpsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getClientIpsProvider')]
     public function testGetClientIp($expected, $remoteAddr, $httpForwardedFor, $trustedProxies)
     {
         $request = $this->getRequestInstanceForClientIpTests($remoteAddr, $httpForwardedFor, $trustedProxies);
@@ -1038,9 +1021,7 @@ class RequestTest extends TestCase
         $this->assertEquals($expected[0], $request->getClientIp());
     }
 
-    /**
-     * @dataProvider getClientIpsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getClientIpsProvider')]
     public function testGetClientIps($expected, $remoteAddr, $httpForwardedFor, $trustedProxies)
     {
         $request = $this->getRequestInstanceForClientIpTests($remoteAddr, $httpForwardedFor, $trustedProxies);
@@ -1048,9 +1029,7 @@ class RequestTest extends TestCase
         $this->assertEquals($expected, $request->getClientIps());
     }
 
-    /**
-     * @dataProvider getClientIpsForwardedProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getClientIpsForwardedProvider')]
     public function testGetClientIpsForwarded($expected, $remoteAddr, $httpForwarded, $trustedProxies)
     {
         $request = $this->getRequestInstanceForClientIpsForwardedTests($remoteAddr, $httpForwarded, $trustedProxies);
@@ -1126,9 +1105,7 @@ class RequestTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getClientIpsWithConflictingHeadersProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getClientIpsWithConflictingHeadersProvider')]
     public function testGetClientIpsWithConflictingHeaders($httpForwarded, $httpXForwardedFor)
     {
         $this->expectException(ConflictingHeadersException::class);
@@ -1147,9 +1124,7 @@ class RequestTest extends TestCase
         $request->getClientIps();
     }
 
-    /**
-     * @dataProvider getClientIpsWithConflictingHeadersProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getClientIpsWithConflictingHeadersProvider')]
     public function testGetClientIpsOnlyXHttpForwardedForTrusted($httpForwarded, $httpXForwardedFor)
     {
         $request = new Request();
@@ -1179,9 +1154,7 @@ class RequestTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getClientIpsWithAgreeingHeadersProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getClientIpsWithAgreeingHeadersProvider')]
     public function testGetClientIpsWithAgreeingHeaders($httpForwarded, $httpXForwardedFor, $expectedIps)
     {
         $request = new Request();
@@ -1258,9 +1231,7 @@ class RequestTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getContentCanBeCalledTwiceWithResourcesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getContentCanBeCalledTwiceWithResourcesProvider')]
     public function testGetContentCanBeCalledTwiceWithResources($first, $second)
     {
         $req = new Request();
@@ -1338,9 +1309,7 @@ class RequestTest extends TestCase
         $this->assertSame([], $req->getPayload()->all());
     }
 
-    /**
-     * @dataProvider provideOverloadedMethods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideOverloadedMethods')]
     public function testCreateFromGlobals($method)
     {
         $normalizedMethod = strtoupper($method);
@@ -1577,9 +1546,7 @@ class RequestTest extends TestCase
         $this->assertFalse($request->isXmlHttpRequest());
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testIntlLocale()
     {
         $request = new Request();
@@ -1780,9 +1747,7 @@ class RequestTest extends TestCase
         $this->assertFalse($request->isMethod('post'));
     }
 
-    /**
-     * @dataProvider getBaseUrlData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getBaseUrlData')]
     public function testGetBaseUrl($uri, $server, $expectedBaseUrl, $expectedPathInfo)
     {
         $request = Request::create($uri, 'GET', [], [], [], $server);
@@ -1907,9 +1872,7 @@ class RequestTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider baseUriDetectionOnIisWithRewriteData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('baseUriDetectionOnIisWithRewriteData')]
     public function testBaseUriDetectionOnIisWithRewrite(array $server, string $expectedBaseUrl, string $expectedPathInfo)
     {
         $request = new Request([], [], [], [], [], $server);
@@ -1963,9 +1926,7 @@ class RequestTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider urlencodedStringPrefixData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('urlencodedStringPrefixData')]
     public function testUrlencodedStringPrefix($string, $prefix, $expect)
     {
         $request = new Request();
@@ -2134,9 +2095,7 @@ class RequestTest extends TestCase
         $this->assertTrue($request->isSecure());
     }
 
-    /**
-     * @dataProvider iisRequestUriProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('iisRequestUriProvider')]
     public function testIISRequestUri($headers, $server, $expectedRequestUri)
     {
         $request = new Request();
@@ -2237,9 +2196,7 @@ class RequestTest extends TestCase
         Request::setFactory(null);
     }
 
-    /**
-     * @dataProvider getLongHostNames
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLongHostNames')]
     public function testVeryLongHosts($host)
     {
         $start = microtime(true);
@@ -2250,9 +2207,7 @@ class RequestTest extends TestCase
         $this->assertLessThan(5, microtime(true) - $start);
     }
 
-    /**
-     * @dataProvider getHostValidities
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getHostValidities')]
     public function testHostValidity($host, $isValid, $expectedHost = null, $expectedPort = null)
     {
         $request = Request::create('/');
@@ -2292,9 +2247,7 @@ class RequestTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider methodIdempotentProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('methodIdempotentProvider')]
     public function testMethodIdempotent($method, $idempotent)
     {
         $request = new Request();
@@ -2318,9 +2271,7 @@ class RequestTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider methodSafeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('methodSafeProvider')]
     public function testMethodSafe($method, $safe)
     {
         $request = new Request();
@@ -2344,9 +2295,7 @@ class RequestTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider methodCacheableProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('methodCacheableProvider')]
     public function testMethodCacheable($method, $cacheable)
     {
         $request = new Request();
@@ -2370,9 +2319,7 @@ class RequestTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider protocolVersionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('protocolVersionProvider')]
     public function testProtocolVersion($serverProtocol, $trustedProxy, $via, $expected)
     {
         if ($trustedProxy) {
@@ -2433,9 +2380,7 @@ class RequestTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider nonstandardRequestsData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('nonstandardRequestsData')]
     public function testNonstandardRequests($requestUri, $queryString, $expectedPathInfo, $expectedUri, $expectedBasePath = '', $expectedBaseUrl = null)
     {
         $expectedBaseUrl ??= $expectedBasePath;
@@ -2566,9 +2511,7 @@ class RequestTest extends TestCase
         $this->assertSame(80, $request->getPort());
     }
 
-    /**
-     * @dataProvider trustedProxiesRemoteAddr
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('trustedProxiesRemoteAddr')]
     public function testTrustedProxiesRemoteAddr($serverRemoteAddr, $trustedProxies, $result)
     {
         $_SERVER['REMOTE_ADDR'] = $serverRemoteAddr;
@@ -2603,9 +2546,7 @@ class RequestTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider preferSafeContentData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('preferSafeContentData')]
     public function testPreferSafeContent($server, bool $safePreferenceExpected)
     {
         $request = new Request([], [], [], [], [], $server);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php b/src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php
index 0e3d0af..4732a8c 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php
@@ -40,9 +40,7 @@ class ResponseFunctionalTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provideCookie
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCookie')]
     public function testCookie($fixture)
     {
         $this->markTestSkipped('Test currently failing on Debian.');
@@ -61,9 +59,7 @@ class ResponseFunctionalTest extends TestCase
         }
     }
 
-    /**
-     * @group integration
-     */
+    #[\PHPUnit\Framework\Attributes\Group('integration')]
     public function testInformationalResponse()
     {
         if (!(new ExecutableFinder())->find('curl')) {
diff --git a/src/Symfony/Component/HttpFoundation/Tests/ResponseHeaderBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/ResponseHeaderBagTest.php
index 9e61dd6..5717872 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/ResponseHeaderBagTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/ResponseHeaderBagTest.php
@@ -15,9 +15,7 @@ use PHPUnit\Framework\TestCase;
 use Symfony\Component\HttpFoundation\Cookie;
 use Symfony\Component\HttpFoundation\ResponseHeaderBag;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class ResponseHeaderBagTest extends TestCase
 {
     public function testAllPreserveCase()
diff --git a/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php
index 491a50f..0a00c73 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php
@@ -15,9 +15,7 @@ use Symfony\Component\HttpFoundation\Cookie;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Response;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class ResponseTest extends ResponseTestCase
 {
     public function testToString()
@@ -879,9 +877,7 @@ class ResponseTest extends ResponseTestCase
         $this->assertFalse($response->isInvalid());
     }
 
-    /**
-     * @dataProvider getStatusCodeFixtures
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getStatusCodeFixtures')]
     public function testSetStatusCode($code, $text, $expectedText)
     {
         $response = new Response();
@@ -1005,9 +1001,7 @@ class ResponseTest extends ResponseTestCase
         $this->assertNull($response->headers->get('Etag'), '->setEtag() removes Etags when call with null');
     }
 
-    /**
-     * @dataProvider validContentProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validContentProvider')]
     public function testSetContent($content)
     {
         $response = new Response();
@@ -1037,6 +1031,7 @@ class ResponseTest extends ResponseTestCase
         }
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testNoDeprecationsAreTriggered()
     {
         new DefaultResponse();
@@ -1128,9 +1123,7 @@ class ResponseTest extends ResponseTestCase
         return $ianaCodesReasonPhrases;
     }
 
-    /**
-     * @dataProvider ianaCodesReasonPhrasesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('ianaCodesReasonPhrasesProvider')]
     public function testReasonPhraseDefaultsAgainstIana($code, $reasonPhrase)
     {
         $this->assertEquals($reasonPhrase, Response::$statusTexts[$code]);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php
index afd281f..e3320c7 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php
@@ -76,17 +76,13 @@ class AttributeBagTest extends TestCase
         $this->assertEquals('foo', $this->bag->getName());
     }
 
-    /**
-     * @dataProvider attributesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('attributesProvider')]
     public function testHas($key, $value, $exists)
     {
         $this->assertEquals($exists, $this->bag->has($key));
     }
 
-    /**
-     * @dataProvider attributesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('attributesProvider')]
     public function testGet($key, $value, $expected)
     {
         $this->assertEquals($value, $this->bag->get($key));
@@ -98,9 +94,7 @@ class AttributeBagTest extends TestCase
         $this->assertEquals('default', $this->bag->get('user2.login', 'default'));
     }
 
-    /**
-     * @dataProvider attributesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('attributesProvider')]
     public function testSet($key, $value, $expected)
     {
         $this->bag->set($key, $value);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php
index 56ef608..20a8c19 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php
@@ -98,18 +98,14 @@ class SessionTest extends TestCase
         $this->assertEquals(1, $this->session->get('foo', 1));
     }
 
-    /**
-     * @dataProvider setProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('setProvider')]
     public function testSet($key, $value)
     {
         $this->session->set($key, $value);
         $this->assertEquals($value, $this->session->get($key));
     }
 
-    /**
-     * @dataProvider setProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('setProvider')]
     public function testHas($key, $value)
     {
         $this->session->set($key, $value);
@@ -125,18 +121,14 @@ class SessionTest extends TestCase
         $this->assertEquals([], $this->session->all());
     }
 
-    /**
-     * @dataProvider setProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('setProvider')]
     public function testAll($key, $value, $result)
     {
         $this->session->set($key, $value);
         $this->assertEquals($result, $this->session->all());
     }
 
-    /**
-     * @dataProvider setProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('setProvider')]
     public function testClear($key, $value)
     {
         $this->session->set('hi', 'fabien');
@@ -154,9 +146,7 @@ class SessionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider setProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('setProvider')]
     public function testRemove($key, $value)
     {
         $this->session->set('hi.world', 'have a nice day');
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php
index a582909..9a21c1e 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php
@@ -15,11 +15,8 @@ use PHPUnit\Framework\TestCase;
 use Relay\Relay;
 use Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler;
 
-/**
- * @requires extension redis
- *
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('redis')]
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 abstract class AbstractRedisSessionHandlerTestCase extends TestCase
 {
     protected const PREFIX = 'prefix_';
@@ -112,9 +109,7 @@ abstract class AbstractRedisSessionHandlerTestCase extends TestCase
         $this->assertGreaterThan($lowTtl, $this->redisClient->ttl(self::PREFIX.'id'));
     }
 
-    /**
-     * @dataProvider getOptionFixtures
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getOptionFixtures')]
     public function testSupportedParam(array $options, bool $supported)
     {
         try {
@@ -136,9 +131,7 @@ abstract class AbstractRedisSessionHandlerTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getTtlFixtures
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTtlFixtures')]
     public function testUseTtlOption(int $ttl)
     {
         $options = [
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php
index b881bc4..25e7959 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php
@@ -38,9 +38,7 @@ class AbstractSessionHandlerTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provideSession
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSession')]
     public function testSession($fixture)
     {
         $this->markTestSkipped('Test currently failing on Debian.');
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/IdentityMarshallerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/IdentityMarshallerTest.php
index 6f15f96..4270625 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/IdentityMarshallerTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/IdentityMarshallerTest.php
@@ -28,9 +28,7 @@ class IdentityMarshallerTest extends TestCase
         $this->assertSame($values, $marshaller->marshall($values, $failed));
     }
 
-    /**
-     * @dataProvider invalidMarshallDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidMarshallDataProvider')]
     public function testMarshallInvalidData($values)
     {
         $marshaller = new IdentityMarshaller();
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php
index 60bae22..e389a39 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php
@@ -15,11 +15,8 @@ use PHPUnit\Framework\MockObject\MockObject;
 use PHPUnit\Framework\TestCase;
 use Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcachedSessionHandler;
 
-/**
- * @requires extension memcached
- *
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('memcached')]
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class MemcachedSessionHandlerTest extends TestCase
 {
     private const PREFIX = 'prefix_';
@@ -125,9 +122,7 @@ class MemcachedSessionHandlerTest extends TestCase
         $this->assertIsInt($this->storage->gc(123));
     }
 
-    /**
-     * @dataProvider getOptionFixtures
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getOptionFixtures')]
     public function testSupportedOptions($options, $supported)
     {
         try {
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
index d607e19..f6c0586 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
@@ -28,11 +28,11 @@ require_once __DIR__.'/stubs/mongodb.php';
 /**
  * @author Markus Bachmann <markus.bachmann@bachi.biz>
  *
- * @group integration
- * @group time-sensitive
  *
- * @requires extension mongodb
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('mongodb')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class MongoDbSessionHandlerTest extends TestCase
 {
     private const DABASE_NAME = 'sf-test';
@@ -91,7 +91,7 @@ class MongoDbSessionHandlerTest extends TestCase
         }
     }
 
-    /** @dataProvider provideInvalidOptions */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidOptions')]
     public function testConstructorShouldThrowExceptionForMissingOptions(array $options)
     {
         $this->expectException(\InvalidArgumentException::class);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php
index e93ed2d..d6a8955 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php
@@ -20,10 +20,10 @@ use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage;
  *
  * @author Drak <drak@zikula.org>
  *
- * @runTestsInSeparateProcesses
  *
- * @preserveGlobalState disabled
  */
+#[\PHPUnit\Framework\Attributes\PreserveGlobalState(false)]
+#[\PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses]
 class NativeFileSessionHandlerTest extends TestCase
 {
     public function testConstruct()
@@ -36,9 +36,7 @@ class NativeFileSessionHandlerTest extends TestCase
         $this->assertEquals('TESTING', \ini_get('session.name'));
     }
 
-    /**
-     * @dataProvider savePathDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('savePathDataProvider')]
     public function testConstructSavePath($savePath, $expectedSavePath, $path)
     {
         new NativeFileSessionHandler($savePath);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php
index 27704b9..12f874c 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php
@@ -21,10 +21,10 @@ use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage;
  *
  * @author Drak <drak@zikula.org>
  *
- * @runTestsInSeparateProcesses
  *
- * @preserveGlobalState disabled
  */
+#[\PHPUnit\Framework\Attributes\PreserveGlobalState(false)]
+#[\PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses]
 class NullSessionHandlerTest extends TestCase
 {
     public function testSaveHandlers()
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php
index 55a2387..96cc0f1 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php
@@ -15,11 +15,8 @@ use Doctrine\DBAL\Schema\Schema;
 use PHPUnit\Framework\TestCase;
 use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler;
 
-/**
- * @requires extension pdo_sqlite
- *
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pdo_sqlite')]
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class PdoSessionHandlerTest extends TestCase
 {
     private ?string $dbFile = null;
@@ -260,9 +257,7 @@ class PdoSessionHandlerTest extends TestCase
         $this->assertSame('', $data, 'Destroyed session returns empty string');
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testSessionGC()
     {
         $previousLifeTime = ini_set('session.gc_maxlifetime', 1000);
@@ -310,9 +305,7 @@ class PdoSessionHandlerTest extends TestCase
         $this->assertInstanceOf(\PDO::class, $method->invoke($storage));
     }
 
-    /**
-     * @dataProvider provideUrlDsnPairs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUrlDsnPairs')]
     public function testUrlDsn($url, $expectedDsn, $expectedUser = null, $expectedPassword = null)
     {
         $storage = new PdoSessionHandler($url);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php
index 4924877..09afcef 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php
@@ -13,9 +13,7 @@ namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler;
 
 use Predis\Client;
 
-/**
- * @group integration
- */
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class PredisClusterSessionHandlerTest extends AbstractRedisSessionHandlerTestCase
 {
     protected function createRedisClient(string $host): Client
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisSessionHandlerTest.php
index 0dc194b..5439314 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisSessionHandlerTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisSessionHandlerTest.php
@@ -13,9 +13,7 @@ namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler;
 
 use Predis\Client;
 
-/**
- * @group integration
- */
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class PredisSessionHandlerTest extends AbstractRedisSessionHandlerTestCase
 {
     protected function createRedisClient(string $host): Client
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisArraySessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisArraySessionHandlerTest.php
index af66915..659b684 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisArraySessionHandlerTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisArraySessionHandlerTest.php
@@ -11,9 +11,7 @@
 
 namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler;
 
-/**
- * @group integration
- */
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class RedisArraySessionHandlerTest extends AbstractRedisSessionHandlerTestCase
 {
     protected function createRedisClient(string $host): \RedisArray
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisClusterSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisClusterSessionHandlerTest.php
index 6a30f55..4a8523e 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisClusterSessionHandlerTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisClusterSessionHandlerTest.php
@@ -11,9 +11,7 @@
 
 namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler;
 
-/**
- * @group integration
- */
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class RedisClusterSessionHandlerTest extends AbstractRedisSessionHandlerTestCase
 {
     public static function setUpBeforeClass(): void
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisSessionHandlerTest.php
index 0bb3c16..ef52cc9 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisSessionHandlerTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisSessionHandlerTest.php
@@ -11,9 +11,7 @@
 
 namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler;
 
-/**
- * @group integration
- */
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class RedisSessionHandlerTest extends AbstractRedisSessionHandlerTestCase
 {
     protected function createRedisClient(string $host): \Redis
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RelaySessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RelaySessionHandlerTest.php
index 76553f9..be83e22 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RelaySessionHandlerTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RelaySessionHandlerTest.php
@@ -14,11 +14,8 @@ namespace Session\Storage\Handler;
 use Relay\Relay;
 use Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler\AbstractRedisSessionHandlerTestCase;
 
-/**
- * @requires extension relay
- *
- * @group integration
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('relay')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class RelaySessionHandlerTest extends AbstractRedisSessionHandlerTestCase
 {
     protected function createRedisClient(string $host): Relay
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/SessionHandlerFactoryTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/SessionHandlerFactoryTest.php
index 41699cf..6e6a7a7 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/SessionHandlerFactoryTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/SessionHandlerFactoryTest.php
@@ -21,15 +21,13 @@ use Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandle
  *
  * @author Simon <simon.chrzanowski@quentic.com>
  *
- * @runTestsInSeparateProcesses
  *
- * @preserveGlobalState disabled
  */
+#[\PHPUnit\Framework\Attributes\PreserveGlobalState(false)]
+#[\PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses]
 class SessionHandlerFactoryTest extends TestCase
 {
-    /**
-     * @dataProvider provideConnectionDSN
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConnectionDSN')]
     public function testCreateFileHandler(string $connectionDSN, string $expectedPath, string $expectedHandlerType)
     {
         $handler = SessionHandlerFactory::createHandler($connectionDSN);
@@ -48,18 +46,14 @@ class SessionHandlerFactoryTest extends TestCase
         ];
     }
 
-    /**
-     * @requires extension redis
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('redis')]
     public function testCreateRedisHandlerFromConnectionObject()
     {
         $handler = SessionHandlerFactory::createHandler($this->createMock(\Redis::class));
         $this->assertInstanceOf(RedisSessionHandler::class, $handler);
     }
 
-    /**
-     * @requires extension redis
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('redis')]
     public function testCreateRedisHandlerFromDsn()
     {
         $handler = SessionHandlerFactory::createHandler('redis://localhost?prefix=foo&ttl=3600&ignored=bar');
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php
index b2f3de4..ebcf0a4 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php
@@ -16,9 +16,8 @@ use Symfony\Component\HttpFoundation\Session\Storage\MetadataBag;
 
 /**
  * Test class for MetadataBag.
- *
- * @group time-sensitive
  */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class MetadataBagTest extends TestCase
 {
     protected MetadataBag $bag;
@@ -86,6 +85,7 @@ class MetadataBagTest extends TestCase
         $this->assertLessThanOrEqual(time(), $this->bag->getLastUsed());
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testClear()
     {
         $this->bag->clear();
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php
index ed900e3..5051b31 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php
@@ -26,10 +26,10 @@ use Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy;
  *
  * These tests require separate processes.
  *
- * @runTestsInSeparateProcesses
  *
- * @preserveGlobalState disabled
  */
+#[\PHPUnit\Framework\Attributes\PreserveGlobalState(false)]
+#[\PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses]
 class NativeSessionStorageTest extends TestCase
 {
     private string $savePath;
@@ -293,6 +293,7 @@ class NativeSessionStorageTest extends TestCase
         $this->assertSame(7, $storage->getBag('attributes')->get('lucky'), 'Data still available');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCanCreateNativeSessionStorageWhenSessionAlreadyStarted()
     {
         session_start();
@@ -302,6 +303,7 @@ class NativeSessionStorageTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSetSessionOptionsOnceSessionStartedIsIgnored()
     {
         session_start();
@@ -353,6 +355,7 @@ class NativeSessionStorageTest extends TestCase
         $this->assertSame('&~[', session_id());
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSaveHandlesNullSessionGracefully()
     {
         $storage = $this->getStorage();
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php
index 5fbc383..8ad019c 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php
@@ -22,10 +22,10 @@ use Symfony\Component\HttpFoundation\Session\Storage\PhpBridgeSessionStorage;
  *
  * These tests require separate processes.
  *
- * @runTestsInSeparateProcesses
  *
- * @preserveGlobalState disabled
  */
+#[\PHPUnit\Framework\Attributes\PreserveGlobalState(false)]
+#[\PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses]
 class PhpBridgeSessionStorageTest extends TestCase
 {
     private string $savePath;
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php
index 9551d52..a864648 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php
@@ -46,11 +46,8 @@ class AbstractProxyTest extends TestCase
         $this->assertFalse($this->proxy->isWrapper());
     }
 
-    /**
-     * @runInSeparateProcess
-     *
-     * @preserveGlobalState disabled
-     */
+    #[\PHPUnit\Framework\Attributes\PreserveGlobalState(false)]
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testIsActive()
     {
         $this->assertFalse($this->proxy->isActive());
@@ -58,11 +55,8 @@ class AbstractProxyTest extends TestCase
         $this->assertTrue($this->proxy->isActive());
     }
 
-    /**
-     * @runInSeparateProcess
-     *
-     * @preserveGlobalState disabled
-     */
+    #[\PHPUnit\Framework\Attributes\PreserveGlobalState(false)]
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testName()
     {
         $this->assertEquals(session_name(), $this->proxy->getName());
@@ -71,11 +65,8 @@ class AbstractProxyTest extends TestCase
         $this->assertEquals(session_name(), $this->proxy->getName());
     }
 
-    /**
-     * @runInSeparateProcess
-     *
-     * @preserveGlobalState disabled
-     */
+    #[\PHPUnit\Framework\Attributes\PreserveGlobalState(false)]
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testNameException()
     {
         $this->expectException(\LogicException::class);
@@ -83,11 +74,8 @@ class AbstractProxyTest extends TestCase
         $this->proxy->setName('foo');
     }
 
-    /**
-     * @runInSeparateProcess
-     *
-     * @preserveGlobalState disabled
-     */
+    #[\PHPUnit\Framework\Attributes\PreserveGlobalState(false)]
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testId()
     {
         $this->assertEquals(session_id(), $this->proxy->getId());
@@ -96,11 +84,8 @@ class AbstractProxyTest extends TestCase
         $this->assertEquals(session_id(), $this->proxy->getId());
     }
 
-    /**
-     * @runInSeparateProcess
-     *
-     * @preserveGlobalState disabled
-     */
+    #[\PHPUnit\Framework\Attributes\PreserveGlobalState(false)]
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testIdException()
     {
         $this->expectException(\LogicException::class);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php
index d9c4974..5bb88a1 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php
@@ -22,10 +22,10 @@ use Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy;
  *
  * @author Drak <drak@zikula.org>
  *
- * @runTestsInSeparateProcesses
  *
- * @preserveGlobalState disabled
  */
+#[\PHPUnit\Framework\Attributes\PreserveGlobalState(false)]
+#[\PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses]
 class SessionHandlerProxyTest extends TestCase
 {
     private MockObject&\SessionHandlerInterface $mock;
@@ -152,9 +152,7 @@ class SessionHandlerProxyTest extends TestCase
         $this->proxy->updateTimestamp('id', 'data');
     }
 
-    /**
-     * @dataProvider provideNativeSessionStorageHandler
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNativeSessionStorageHandler')]
     public function testNativeSessionStorageSaveHandlerName($handler)
     {
         $this->assertSame('files', (new NativeSessionStorage([], $handler))->getSaveHandler()->getSaveHandlerName());
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/RequestAttributeValueSameTest.php b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/RequestAttributeValueSameTest.php
index 7951bd6..dfa9732 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/RequestAttributeValueSameTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/RequestAttributeValueSameTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\HttpFoundation\Test\Constraint\RequestAttributeValueSame;
 
 class RequestAttributeValueSameTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testConstraint()
     {
         $request = new Request();
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseCookieValueSameTest.php b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseCookieValueSameTest.php
index 70b9281..7658614 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseCookieValueSameTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseCookieValueSameTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\HttpFoundation\Test\Constraint\ResponseCookieValueSame;
 
 class ResponseCookieValueSameTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testConstraint()
     {
         $response = new Response();
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseFormatSameTest.php b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseFormatSameTest.php
index 9c4491c..acf62f4 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseFormatSameTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseFormatSameTest.php
@@ -23,9 +23,7 @@ use Symfony\Component\HttpFoundation\Test\Constraint\ResponseFormatSame;
  */
 class ResponseFormatSameTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testConstraint()
     {
         $request = new Request();
@@ -46,9 +44,7 @@ class ResponseFormatSameTest extends TestCase
         $this->fail();
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testNullFormat()
     {
         $constraint = new ResponseFormatSame(new Request(), null);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHasCookieTest.php b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHasCookieTest.php
index dc1d76a..a4e4c63 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHasCookieTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHasCookieTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\HttpFoundation\Test\Constraint\ResponseHasCookie;
 
 class ResponseHasCookieTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testConstraint()
     {
         $response = new Response();
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHasHeaderTest.php b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHasHeaderTest.php
index 04d1294..d52e286 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHasHeaderTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHasHeaderTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\HttpFoundation\Test\Constraint\ResponseHasHeader;
 
 class ResponseHasHeaderTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testConstraint()
     {
         $constraint = new ResponseHasHeader('Date');
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHeaderLocationSameTest.php b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHeaderLocationSameTest.php
index d05a9f8..65b918b 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHeaderLocationSameTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHeaderLocationSameTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\HttpFoundation\Test\Constraint\ResponseHeaderLocationSame;
 
 class ResponseHeaderLocationSameTest extends TestCase
 {
-    /**
-     * @dataProvider provideSuccessCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSuccessCases')]
     public function testConstraintSuccess(string $requestUrl, ?string $location, string $expectedLocation)
     {
         $request = Request::create($requestUrl);
@@ -91,9 +89,7 @@ class ResponseHeaderLocationSameTest extends TestCase
         yield ['http://example.com/', 'http://another-example.com', 'http://another-example.com'];
     }
 
-    /**
-     * @dataProvider provideFailureCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFailureCases')]
     public function testConstraintFailure(string $requestUrl, ?string $location, string $expectedLocation)
     {
         $request = Request::create($requestUrl);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHeaderSameTest.php b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHeaderSameTest.php
index cea3959..6356cc8 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHeaderSameTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHeaderSameTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\HttpFoundation\Test\Constraint\ResponseHeaderSame;
 
 class ResponseHeaderSameTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testConstraint()
     {
         $constraint = new ResponseHeaderSame('Cache-Control', 'no-cache, private');
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseIsRedirectedTest.php b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseIsRedirectedTest.php
index 71c8a1e..bfec602 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseIsRedirectedTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseIsRedirectedTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\HttpFoundation\Test\Constraint\ResponseIsRedirected;
 
 class ResponseIsRedirectedTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testConstraint()
     {
         $constraint = new ResponseIsRedirected();
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseIsSuccessfulTest.php b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseIsSuccessfulTest.php
index b7cdf0c..2f47aa2 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseIsSuccessfulTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseIsSuccessfulTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\HttpFoundation\Test\Constraint\ResponseIsSuccessful;
 
 class ResponseIsSuccessfulTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testConstraint()
     {
         $constraint = new ResponseIsSuccessful();
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseStatusCodeSameTest.php b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseStatusCodeSameTest.php
index a025ab6..a74edbc 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseStatusCodeSameTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseStatusCodeSameTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\HttpFoundation\Test\Constraint\ResponseStatusCodeSame;
 
 class ResponseStatusCodeSameTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testConstraint()
     {
         $constraint = new ResponseStatusCodeSame(200);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/UrlHelperTest.php b/src/Symfony/Component/HttpFoundation/Tests/UrlHelperTest.php
index 02f6c64..c7108eab 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/UrlHelperTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/UrlHelperTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\Routing\RequestContextAwareInterface;
 
 class UrlHelperTest extends TestCase
 {
-    /**
-     * @dataProvider getGenerateAbsoluteUrlData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getGenerateAbsoluteUrlData')]
     public function testGenerateAbsoluteUrl($expected, $path, $pathinfo)
     {
         $stack = new RequestStack();
@@ -55,9 +53,7 @@ class UrlHelperTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getGenerateAbsoluteUrlRequestContextData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getGenerateAbsoluteUrlRequestContextData')]
     public function testGenerateAbsoluteUrlWithRequestContext($path, $baseUrl, $host, $scheme, $httpPort, $httpsPort, $expected)
     {
         if (!class_exists(RequestContext::class)) {
@@ -71,9 +67,7 @@ class UrlHelperTest extends TestCase
         $this->assertEquals($expected, $helper->getAbsoluteUrl($path));
     }
 
-    /**
-     * @dataProvider getGenerateAbsoluteUrlRequestContextData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getGenerateAbsoluteUrlRequestContextData')]
     public function testGenerateAbsoluteUrlWithRequestContextAwareInterface($path, $baseUrl, $host, $scheme, $httpPort, $httpsPort, $expected)
     {
         if (!class_exists(RequestContext::class)) {
@@ -103,9 +97,7 @@ class UrlHelperTest extends TestCase
         $this->assertEquals($expected, $helper->getAbsoluteUrl($path));
     }
 
-    /**
-     * @dataProvider getGenerateAbsoluteUrlRequestContextData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getGenerateAbsoluteUrlRequestContextData')]
     public function testGenerateAbsoluteUrlWithoutRequestAndRequestContext($path)
     {
         if (!class_exists(RequestContext::class)) {
@@ -146,9 +138,7 @@ class UrlHelperTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider getGenerateRelativePathData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getGenerateRelativePathData')]
     public function testGenerateRelativePath($expected, $path, $pathinfo)
     {
         $stack = new RequestStack();
diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/BackedEnumValueResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/BackedEnumValueResolverTest.php
index 9dc6a08..72ac18b 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/BackedEnumValueResolverTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/BackedEnumValueResolverTest.php
@@ -24,10 +24,10 @@ class BackedEnumValueResolverTest extends TestCase
     /**
      * In Symfony 7, keep this test case but remove the call to supports().
      *
-     * @group legacy
      *
-     * @dataProvider provideTestSupportsData
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTestSupportsData')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testSupports(Request $request, ArgumentMetadata $metadata, bool $expectedSupport)
     {
         $resolver = new BackedEnumValueResolver();
@@ -75,9 +75,7 @@ class BackedEnumValueResolverTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideTestResolveData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTestResolveData')]
     public function testResolve(Request $request, ArgumentMetadata $metadata, $expected)
     {
         $resolver = new BackedEnumValueResolver();
diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/DateTimeValueResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/DateTimeValueResolverTest.php
index 6529ca9..4cd7e99 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/DateTimeValueResolverTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/DateTimeValueResolverTest.php
@@ -50,9 +50,7 @@ class DateTimeValueResolverTest extends TestCase
         yield [FooDateTime::class];
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testSupports()
     {
         $resolver = new DateTimeValueResolver();
@@ -79,9 +77,7 @@ class DateTimeValueResolverTest extends TestCase
         $this->assertSame([], $resolver->resolve($request, $argument));
     }
 
-    /**
-     * @dataProvider getTimeZones
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTimeZones')]
     public function testFullDate(string $timezone, bool $withClock)
     {
         date_default_timezone_set($withClock ? 'UTC' : $timezone);
@@ -98,9 +94,7 @@ class DateTimeValueResolverTest extends TestCase
         $this->assertEquals('2012-07-21 00:00:00', $results[0]->format('Y-m-d H:i:s'));
     }
 
-    /**
-     * @dataProvider getTimeZones
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTimeZones')]
     public function testUnixTimestamp(string $timezone, bool $withClock)
     {
         date_default_timezone_set($withClock ? 'UTC' : $timezone);
@@ -132,9 +126,8 @@ class DateTimeValueResolverTest extends TestCase
 
     /**
      * @param class-string<\DateTimeInterface> $class
-     *
-     * @dataProvider getClasses
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getClasses')]
     public function testNow(string $class)
     {
         date_default_timezone_set($timezone = 'Pacific/Honolulu');
@@ -153,9 +146,8 @@ class DateTimeValueResolverTest extends TestCase
 
     /**
      * @param class-string<\DateTimeInterface> $class
-     *
-     * @dataProvider getClasses
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getClasses')]
     public function testNowWithClock(string $class)
     {
         date_default_timezone_set('Pacific/Honolulu');
@@ -175,9 +167,8 @@ class DateTimeValueResolverTest extends TestCase
 
     /**
      * @param class-string<\DateTimeInterface> $class
-     *
-     * @dataProvider getClasses
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getClasses')]
     public function testPreviouslyConvertedAttribute(string $class)
     {
         $resolver = new DateTimeValueResolver();
@@ -207,9 +198,7 @@ class DateTimeValueResolverTest extends TestCase
         $this->assertEquals('2016-09-08 00:00:00+00:00', $results[0]->format('Y-m-d H:i:sP'));
     }
 
-    /**
-     * @dataProvider getTimeZones
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTimeZones')]
     public function testDateTimeImmutable(string $timezone, bool $withClock)
     {
         date_default_timezone_set($withClock ? 'UTC' : $timezone);
@@ -226,9 +215,7 @@ class DateTimeValueResolverTest extends TestCase
         $this->assertEquals('2016-09-08 00:00:00', $results[0]->format('Y-m-d H:i:s'));
     }
 
-    /**
-     * @dataProvider getTimeZones
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTimeZones')]
     public function testWithFormat(string $timezone, bool $withClock)
     {
         date_default_timezone_set($withClock ? 'UTC' : $timezone);
@@ -265,9 +252,7 @@ class DateTimeValueResolverTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideInvalidDates
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidDates')]
     public function test404Exception(ArgumentMetadata $argument, Request $request)
     {
         $resolver = new DateTimeValueResolver();
diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/NotTaggedControllerValueResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/NotTaggedControllerValueResolverTest.php
index e28f8d5..cf30767 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/NotTaggedControllerValueResolverTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/NotTaggedControllerValueResolverTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
 
 class NotTaggedControllerValueResolverTest extends TestCase
 {
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testDoSupportWhenControllerDoNotExists()
     {
         $resolver = new NotTaggedControllerValueResolver(new ServiceLocator([]));
@@ -34,9 +32,8 @@ class NotTaggedControllerValueResolverTest extends TestCase
 
     /**
      * In Symfony 7, keep this test case but remove the call to supports().
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testDoNotSupportWhenControllerExists()
     {
         $resolver = new NotTaggedControllerValueResolver(new ServiceLocator([
@@ -52,9 +49,8 @@ class NotTaggedControllerValueResolverTest extends TestCase
 
     /**
      * In Symfony 7, keep this test case but remove the call to supports().
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testDoNotSupportEmptyController()
     {
         $resolver = new NotTaggedControllerValueResolver(new ServiceLocator([]));
@@ -106,9 +102,8 @@ class NotTaggedControllerValueResolverTest extends TestCase
 
     /**
      * In Symfony 7, keep this test case but remove the call to supports().
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvokableController()
     {
         $this->expectException(RuntimeException::class);
diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/QueryParameterValueResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/QueryParameterValueResolverTest.php
index 682421c..4274c14 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/QueryParameterValueResolverTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/QueryParameterValueResolverTest.php
@@ -29,9 +29,7 @@ class QueryParameterValueResolverTest extends TestCase
         $this->resolver = new QueryParameterValueResolver();
     }
 
-    /**
-     * @dataProvider provideTestResolve
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTestResolve')]
     public function testResolve(Request $request, ArgumentMetadata $metadata, array $expected, ?string $exceptionClass = null, ?string $exceptionMessage = null)
     {
         if ($exceptionMessage) {
diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/RequestPayloadValueResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/RequestPayloadValueResolverTest.php
index 033b23a..d4857b5 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/RequestPayloadValueResolverTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/RequestPayloadValueResolverTest.php
@@ -339,10 +339,8 @@ class RequestPayloadValueResolverTest extends TestCase
         $this->assertEquals([$payload], $event->getArguments());
     }
 
-    /**
-     * @testWith [null]
-     *           [[]]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([null])]
+    #[\PHPUnit\Framework\Attributes\TestWith([[]])]
     public function testRequestContentWithUntypedErrors(?array $types)
     {
         $this->expectException(HttpException::class);
@@ -503,9 +501,7 @@ class RequestPayloadValueResolverTest extends TestCase
         $resolver->resolve($request, $argument);
     }
 
-    /**
-     * @dataProvider provideMatchedFormatContext
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMatchedFormatContext')]
     public function testAcceptFormatPassed(mixed $acceptFormat, string $contentType, string $content)
     {
         $encoders = ['json' => new JsonEncoder(), 'xml' => new XmlEncoder()];
@@ -567,9 +563,7 @@ class RequestPayloadValueResolverTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideMismatchedFormatContext
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMismatchedFormatContext')]
     public function testAcceptFormatNotPassed(mixed $acceptFormat, string $contentType, string $content, string $expectedExceptionMessage)
     {
         $serializer = new Serializer([new ObjectNormalizer()]);
@@ -633,9 +627,7 @@ class RequestPayloadValueResolverTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideValidationGroupsOnManyTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidationGroupsOnManyTypes')]
     public function testValidationGroupsPassed(string $method, ValueResolver $attribute)
     {
         $input = ['price' => '50', 'title' => 'A long title, so the validation passes'];
@@ -662,9 +654,7 @@ class RequestPayloadValueResolverTest extends TestCase
         $this->assertEquals([$payload], $event->getArguments());
     }
 
-    /**
-     * @dataProvider provideValidationGroupsOnManyTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidationGroupsOnManyTypes')]
     public function testValidationGroupsNotPassed(string $method, ValueResolver $attribute)
     {
         $input = ['price' => '50', 'title' => 'Too short'];
diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/ServiceValueResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/ServiceValueResolverTest.php
index 63a35b4..9c625a0 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/ServiceValueResolverTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/ServiceValueResolverTest.php
@@ -24,9 +24,8 @@ class ServiceValueResolverTest extends TestCase
 {
     /**
      * In Symfony 7, keep this test case but remove the call to supports().
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testDoNotSupportWhenControllerDoNotExists()
     {
         $resolver = new ServiceValueResolver(new ServiceLocator([]));
diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/TraceableValueResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/TraceableValueResolverTest.php
index bf5c42f..f33a0c5 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/TraceableValueResolverTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/TraceableValueResolverTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\Stopwatch\Stopwatch;
 
 class TraceableValueResolverTest extends TestCase
 {
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testTimingsInSupports()
     {
         $stopwatch = new Stopwatch();
diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/UidValueResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/UidValueResolverTest.php
index cc43417..a70dae9 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/UidValueResolverTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/UidValueResolverTest.php
@@ -27,10 +27,10 @@ class UidValueResolverTest extends TestCase
     /**
      * In Symfony 7, keep this test case but remove the call to supports().
      *
-     * @group legacy
      *
-     * @dataProvider provideSupports
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSupports')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testSupports(bool $expected, Request $request, ArgumentMetadata $argument)
     {
         if (!$expected) {
@@ -57,9 +57,7 @@ class UidValueResolverTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideResolveOK
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideResolveOK')]
     public function testResolveOK(AbstractUid $expected, string $requestUid)
     {
         $this->assertEquals([$expected], (new UidValueResolver())->resolve(
@@ -83,9 +81,7 @@ class UidValueResolverTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideResolveKO
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideResolveKO')]
     public function testResolveKO(string $requestUid, string $argumentType)
     {
         $this->expectException(NotFoundHttpException::class);
diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolverTest.php
index ba8728e..c252005 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolverTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolverTest.php
@@ -178,9 +178,7 @@ class ArgumentResolverTest extends TestCase
         self::getResolver()->getArguments($request, $controller);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGetArgumentWithoutArray()
     {
         $this->expectException(\InvalidArgumentException::class);
diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ContainerControllerResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ContainerControllerResolverTest.php
index 944f7ce..0d25dd0 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Controller/ContainerControllerResolverTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ContainerControllerResolverTest.php
@@ -94,9 +94,7 @@ class ContainerControllerResolverTest extends ControllerResolverTest
         $this->assertSame($service, $controller);
     }
 
-    /**
-     * @dataProvider getControllers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getControllers')]
     public function testInstantiateControllerWhenControllerStartsWithABackslash($controller)
     {
         $service = new ControllerTestService('foo');
diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php
index 9693b27..0087b20 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php
@@ -127,9 +127,7 @@ class ControllerResolverTest extends TestCase
         $this->assertSame('test', $controller());
     }
 
-    /**
-     * @dataProvider getStaticControllers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getStaticControllers')]
     public function testGetControllerWithStaticController($staticController, $returnValue)
     {
         $resolver = $this->createControllerResolver();
@@ -151,9 +149,7 @@ class ControllerResolverTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getUndefinedControllers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getUndefinedControllers')]
     public function testGetControllerWithUndefinedController($controller, $exceptionName = null, $exceptionMessage = null)
     {
         $resolver = $this->createControllerResolver();
diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ErrorControllerTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ErrorControllerTest.php
index 12b84aa..4552ecb 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Controller/ErrorControllerTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ErrorControllerTest.php
@@ -22,9 +22,7 @@ use Symfony\Component\HttpKernel\HttpKernelInterface;
 
 class ErrorControllerTest extends TestCase
 {
-    /**
-     * @dataProvider getInvokeControllerDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvokeControllerDataProvider')]
     public function testInvokeController(Request $request, \Exception $exception, int $statusCode, string $content)
     {
         $kernel = $this->createMock(HttpKernelInterface::class);
diff --git a/src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php
index 8babfe4..d4c3842 100644
--- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php
@@ -132,9 +132,7 @@ class LoggerDataCollectorTest extends TestCase
         $c->lateCollect();
     }
 
-    /**
-     * @dataProvider getCollectTestData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getCollectTestData')]
     public function testCollect($nb, $logs, $expectedLogs, $expectedDeprecationCount, $expectedScreamCount, $expectedPriorities = null)
     {
         $logger = $this
diff --git a/src/Symfony/Component/HttpKernel/Tests/DataCollector/MemoryDataCollectorTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/MemoryDataCollectorTest.php
index 20e4bb5..577ff32 100644
--- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/MemoryDataCollectorTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/MemoryDataCollectorTest.php
@@ -28,7 +28,7 @@ class MemoryDataCollectorTest extends TestCase
         $this->assertSame('memory', $collector->getName());
     }
 
-    /** @dataProvider getBytesConversionTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getBytesConversionTestData')]
     public function testBytesConversion($limit, $bytes)
     {
         $collector = new MemoryDataCollector();
diff --git a/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php
index 6560885..b936dc6 100644
--- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php
@@ -77,9 +77,7 @@ class RequestDataCollectorTest extends TestCase
         $this->assertEquals([], $c->getRouteParams());
     }
 
-    /**
-     * @dataProvider provideControllerCallables
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideControllerCallables')]
     public function testControllerInspection($name, $callable, $expected)
     {
         $c = new RequestDataCollector();
@@ -415,9 +413,7 @@ class RequestDataCollectorTest extends TestCase
         throw new \InvalidArgumentException(\sprintf('Cookie named "%s" is not in response', $name));
     }
 
-    /**
-     * @dataProvider provideJsonContentTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideJsonContentTypes')]
     public function testIsJson($contentType, $expected)
     {
         $response = $this->createResponse();
@@ -443,9 +439,7 @@ class RequestDataCollectorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider providePrettyJson
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePrettyJson')]
     public function testGetPrettyJsonValidity($content, $expected)
     {
         $response = $this->createResponse();
diff --git a/src/Symfony/Component/HttpKernel/Tests/DataCollector/TimeDataCollectorTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/TimeDataCollectorTest.php
index 50657f7..c00bc24 100644
--- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/TimeDataCollectorTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/TimeDataCollectorTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\HttpKernel\KernelInterface;
 use Symfony\Component\Stopwatch\Stopwatch;
 use Symfony\Component\Stopwatch\StopwatchEvent;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class TimeDataCollectorTest extends TestCase
 {
     public function testCollect()
diff --git a/src/Symfony/Component/HttpKernel/Tests/Debug/ErrorHandlerConfiguratorTest.php b/src/Symfony/Component/HttpKernel/Tests/Debug/ErrorHandlerConfiguratorTest.php
index 2dba9be..632690c 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Debug/ErrorHandlerConfiguratorTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Debug/ErrorHandlerConfiguratorTest.php
@@ -33,9 +33,7 @@ class ErrorHandlerConfiguratorTest extends TestCase
         $this->assertSame([$logger, LogLevel::INFO], $loggers[\E_DEPRECATED]);
     }
 
-    /**
-     * @dataProvider provideLevelsAssignedToLoggers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLevelsAssignedToLoggers')]
     public function testLevelsAssignedToLoggers(bool $hasLogger, bool $hasDeprecationLogger, array|int $levels, array|int|null $expectedLoggerLevels, array|int|null $expectedDeprecationLoggerLevels)
     {
         $handler = $this->createMock(ErrorHandler::class);
diff --git a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php
index 62d0cde..6dc9aca 100644
--- a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php
@@ -306,9 +306,7 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase
         $this->assertFalse($container->getDefinition('foo')->isLazy());
     }
 
-    /**
-     * @dataProvider provideBindings
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBindings')]
     public function testBindings($bindingName)
     {
         $container = new ContainerBuilder();
@@ -338,9 +336,7 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideBindScalarValueToControllerArgument
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBindScalarValueToControllerArgument')]
     public function testBindScalarValueToControllerArgument($bindingKey)
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/HttpKernel/Tests/Event/ControllerEventTest.php b/src/Symfony/Component/HttpKernel/Tests/Event/ControllerEventTest.php
index bee08cd..cda0bfe 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Event/ControllerEventTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Event/ControllerEventTest.php
@@ -22,9 +22,7 @@ use Symfony\Component\HttpKernel\Tests\TestHttpKernel;
 
 class ControllerEventTest extends TestCase
 {
-    /**
-     * @dataProvider provideGetAttributes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideGetAttributes')]
     public function testGetAttributes(callable $controller)
     {
         $event = new ControllerEvent(new TestHttpKernel(), $controller, new Request(), HttpKernelInterface::MAIN_REQUEST);
@@ -42,9 +40,7 @@ class ControllerEventTest extends TestCase
         $this->assertEquals($expected, $event->getAttributes());
     }
 
-    /**
-     * @dataProvider provideGetAttributes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideGetAttributes')]
     public function testGetAttributesByClassName(callable $controller)
     {
         $event = new ControllerEvent(new TestHttpKernel(), $controller, new Request(), HttpKernelInterface::MAIN_REQUEST);
@@ -57,9 +53,7 @@ class ControllerEventTest extends TestCase
         $this->assertEquals($expected, $event->getAttributes(Bar::class));
     }
 
-    /**
-     * @dataProvider provideGetAttributes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideGetAttributes')]
     public function testGetAttributesByInvalidClassName(callable $controller)
     {
         $event = new ControllerEvent(new TestHttpKernel(), $controller, new Request(), HttpKernelInterface::MAIN_REQUEST);
diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/CacheAttributeListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/CacheAttributeListenerTest.php
index 1542b35..4bf93cc 100644
--- a/src/Symfony/Component/HttpKernel/Tests/EventListener/CacheAttributeListenerTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/CacheAttributeListenerTest.php
@@ -170,10 +170,8 @@ class CacheAttributeListenerTest extends TestCase
         $this->assertSame('86400', $this->response->headers->getCacheControlDirective('stale-if-error'));
     }
 
-    /**
-     * @testWith ["test.getDate()"]
-     *           ["date"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['test.getDate()'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['date'])]
     public function testLastModifiedNotModifiedResponse(string $expression)
     {
         $entity = new TestEntity();
@@ -191,10 +189,8 @@ class CacheAttributeListenerTest extends TestCase
         $this->assertSame(304, $response->getStatusCode());
     }
 
-    /**
-     * @testWith ["test.getDate()"]
-     *           ["date"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['test.getDate()'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['date'])]
     public function testLastModifiedHeader(string $expression)
     {
         $entity = new TestEntity();
@@ -217,10 +213,8 @@ class CacheAttributeListenerTest extends TestCase
         $this->assertSame('Fri, 23 Aug 2013 00:00:00 GMT', $response->headers->get('Last-Modified'));
     }
 
-    /**
-     * @testWith ["test.getId()"]
-     *           ["id"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['test.getId()'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['id'])]
     public function testEtagNotModifiedResponse(string $expression)
     {
         $entity = new TestEntity();
@@ -238,10 +232,8 @@ class CacheAttributeListenerTest extends TestCase
         $this->assertSame(304, $response->getStatusCode());
     }
 
-    /**
-     * @testWith ["test.getId()"]
-     *           ["id"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['test.getId()'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['id'])]
     public function testEtagHeader(string $expression)
     {
         $entity = new TestEntity();
@@ -330,7 +322,7 @@ class CacheAttributeListenerTest extends TestCase
 
     private function getKernel(): MockObject&HttpKernelInterface
     {
-        return $this->getMockBuilder(HttpKernelInterface::class)->getMock();
+        return $this->createMock(HttpKernelInterface::class);
     }
 }
 
diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/DisallowRobotsIndexingListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/DisallowRobotsIndexingListenerTest.php
index b0263f8..0c9ca65 100644
--- a/src/Symfony/Component/HttpKernel/Tests/EventListener/DisallowRobotsIndexingListenerTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/DisallowRobotsIndexingListenerTest.php
@@ -21,9 +21,7 @@ use Symfony\Component\HttpKernel\KernelInterface;
 
 class DisallowRobotsIndexingListenerTest extends TestCase
 {
-    /**
-     * @dataProvider provideResponses
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideResponses')]
     public function testInvoke(?string $expected, array $responseArgs)
     {
         $response = new Response(...$responseArgs);
diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/ErrorListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/ErrorListenerTest.php
index e9bc584..306187c 100644
--- a/src/Symfony/Component/HttpKernel/Tests/EventListener/ErrorListenerTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/ErrorListenerTest.php
@@ -33,9 +33,8 @@ use Symfony\Component\HttpKernel\Tests\Logger;
 
 /**
  * @author Robert Schönthal <seroscho@googlemail.com>
- *
- * @group time-sensitive
  */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class ErrorListenerTest extends TestCase
 {
     public function testConstruct()
@@ -50,9 +49,7 @@ class ErrorListenerTest extends TestCase
         $this->assertSame('foo', $_controller->getValue($l));
     }
 
-    /**
-     * @dataProvider provider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provider')]
     public function testHandleWithoutLogger($event, $event2)
     {
         $initialErrorLog = ini_set('error_log', file_exists('/dev/null') ? '/dev/null' : 'nul');
@@ -77,9 +74,7 @@ class ErrorListenerTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provider')]
     public function testHandleWithLogger($event, $event2)
     {
         $logger = new TestLogger();
@@ -162,9 +157,7 @@ class ErrorListenerTest extends TestCase
         $this->assertCount(1, $logger->getLogs('info'));
     }
 
-    /**
-     * @dataProvider exceptionWithAttributeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('exceptionWithAttributeProvider')]
     public function testHandleHttpAttribute(\Throwable $exception, int $expectedStatusCode, array $expectedHeaders)
     {
         $request = new Request();
@@ -248,9 +241,7 @@ class ErrorListenerTest extends TestCase
         $this->assertFalse($response->headers->has('content-security-policy'), 'CSP header has been removed');
     }
 
-    /**
-     * @dataProvider controllerProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('controllerProvider')]
     public function testOnControllerArguments(callable $controller)
     {
         $listener = new ErrorListener($controller, $this->createMock(LoggerInterface::class), true);
diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php
index fdf550d..f4e29bf 100644
--- a/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php
@@ -60,9 +60,7 @@ class ProfilerListenerTest extends TestCase
         $listener->onKernelTerminate(new TerminateEvent($kernel, $mainRequest, $response));
     }
 
-    /**
-     * @dataProvider collectRequestProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('collectRequestProvider')]
     public function testCollectParameter(Request $request, ?bool $enable)
     {
         $profile = new Profile('token');
diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php
index 8c270a8..fddc98a 100644
--- a/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php
@@ -44,9 +44,7 @@ class RouterListenerTest extends TestCase
         $this->requestStack = $this->createMock(RequestStack::class);
     }
 
-    /**
-     * @dataProvider getPortData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPortData')]
     public function testPort($defaultHttpPort, $defaultHttpsPort, $uri, $expectedHttpPort, $expectedHttpsPort)
     {
         $urlMatcher = $this->createMock(UrlMatcherInterface::class);
@@ -129,9 +127,7 @@ class RouterListenerTest extends TestCase
         $this->assertEquals('GET', $context->getMethod());
     }
 
-    /**
-     * @dataProvider getLoggingParameterData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLoggingParameterData')]
     public function testLoggingParameter($parameter, $log, $parameters)
     {
         $requestMatcher = $this->createMock(RequestMatcherInterface::class);
diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/SessionListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/SessionListenerTest.php
index 995930e..b4a932d 100644
--- a/src/Symfony/Component/HttpKernel/Tests/EventListener/SessionListenerTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/SessionListenerTest.php
@@ -37,11 +37,8 @@ use Symfony\Component\HttpKernel\KernelInterface;
 
 class SessionListenerTest extends TestCase
 {
-    /**
-     * @dataProvider provideSessionOptions
-     *
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSessionOptions')]
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testSessionCookieOptions(array $phpSessionOptions, array $sessionOptions, array $expectedSessionOptions)
     {
         $session = $this->createMock(Session::class);
@@ -139,9 +136,7 @@ class SessionListenerTest extends TestCase
         ];
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testPhpBridgeAlreadyStartedSession()
     {
         session_start();
@@ -158,9 +153,7 @@ class SessionListenerTest extends TestCase
         $this->assertSame($sessionId, $request->getSession()->getId());
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testSessionCookieWrittenNoCookieGiven()
     {
         $request = new Request();
@@ -184,9 +177,7 @@ class SessionListenerTest extends TestCase
         $this->assertFalse($sessionCookie->isCleared());
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testSessionCookieNotWrittenCookieGiven()
     {
         $sessionId = $this->createValidSessionId();
@@ -213,9 +204,7 @@ class SessionListenerTest extends TestCase
         $this->assertCount(0, $cookies);
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testNewSessionIdIsNotOverwritten()
     {
         $newSessionId = $this->createValidSessionId();
@@ -247,9 +236,7 @@ class SessionListenerTest extends TestCase
         $this->assertSame($newSessionId, $sessionCookie->getValue());
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testSessionCookieClearedWhenInvalidated()
     {
         $sessionId = $this->createValidSessionId();
@@ -279,9 +266,7 @@ class SessionListenerTest extends TestCase
         $this->assertTrue($sessionCookie->isCleared());
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testSessionCookieNotClearedWhenOtherVariablesSet()
     {
         $sessionId = $this->createValidSessionId();
@@ -305,9 +290,7 @@ class SessionListenerTest extends TestCase
         $this->assertCount(0, $cookies);
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testSessionCookieSetWhenOtherNativeVariablesSet()
     {
         $request = new Request();
@@ -499,7 +482,7 @@ class SessionListenerTest extends TestCase
 
     public function testSessionSaveAndResponseHasSessionCookie()
     {
-        $session = $this->getMockBuilder(Session::class)->disableOriginalConstructor()->getMock();
+        $session = $this->createMock(Session::class);
         $session->expects($this->exactly(1))->method('getUsageIndex')->willReturn(0);
         $session->expects($this->exactly(1))->method('getId')->willReturn('123456');
         $session->expects($this->exactly(1))->method('getName')->willReturn('PHPSESSID');
@@ -509,7 +492,7 @@ class SessionListenerTest extends TestCase
         $container = new Container();
 
         $listener = new SessionListener($container);
-        $kernel = $this->getMockBuilder(HttpKernelInterface::class)->disableOriginalConstructor()->getMock();
+        $kernel = $this->createMock(HttpKernelInterface::class);
 
         $request = new Request();
         $request->setSession($session);
@@ -882,9 +865,7 @@ class SessionListenerTest extends TestCase
         (new SessionListener($container, true))->onSessionUsage();
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testReset()
     {
         session_start();
@@ -903,9 +884,7 @@ class SessionListenerTest extends TestCase
         $this->assertSame(\PHP_SESSION_NONE, session_status());
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testResetUnclosedSession()
     {
         session_start();
diff --git a/src/Symfony/Component/HttpKernel/Tests/Exception/HttpExceptionTest.php b/src/Symfony/Component/HttpKernel/Tests/Exception/HttpExceptionTest.php
index 781cb85..7d2b460 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Exception/HttpExceptionTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Exception/HttpExceptionTest.php
@@ -36,18 +36,14 @@ class HttpExceptionTest extends TestCase
         $this->assertSame([], $exception->getHeaders());
     }
 
-    /**
-     * @dataProvider headerDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('headerDataProvider')]
     public function testHeadersConstructor($headers)
     {
         $exception = new HttpException(200, '', null, $headers);
         $this->assertSame($headers, $exception->getHeaders());
     }
 
-    /**
-     * @dataProvider headerDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('headerDataProvider')]
     public function testHeadersSetter($headers)
     {
         $exception = $this->createException();
diff --git a/src/Symfony/Component/HttpKernel/Tests/Exception/MethodNotAllowedHttpExceptionTest.php b/src/Symfony/Component/HttpKernel/Tests/Exception/MethodNotAllowedHttpExceptionTest.php
index a5cc1f7..4a1881c 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Exception/MethodNotAllowedHttpExceptionTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Exception/MethodNotAllowedHttpExceptionTest.php
@@ -35,9 +35,7 @@ class MethodNotAllowedHttpExceptionTest extends HttpExceptionTest
         $this->assertSame($headers, $exception->getHeaders());
     }
 
-    /**
-     * @dataProvider headerDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('headerDataProvider')]
     public function testHeadersSetter($headers)
     {
         $exception = new MethodNotAllowedHttpException(['GET']);
diff --git a/src/Symfony/Component/HttpKernel/Tests/Exception/ServiceUnavailableHttpExceptionTest.php b/src/Symfony/Component/HttpKernel/Tests/Exception/ServiceUnavailableHttpExceptionTest.php
index 34172b4..f7fc88b 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Exception/ServiceUnavailableHttpExceptionTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Exception/ServiceUnavailableHttpExceptionTest.php
@@ -35,9 +35,7 @@ class ServiceUnavailableHttpExceptionTest extends HttpExceptionTest
         $this->assertSame($headers, $exception->getHeaders());
     }
 
-    /**
-     * @dataProvider headerDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('headerDataProvider')]
     public function testHeadersSetter($headers)
     {
         $exception = new ServiceUnavailableHttpException(10);
diff --git a/src/Symfony/Component/HttpKernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php b/src/Symfony/Component/HttpKernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php
index 995e56d..39a6b6c 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php
@@ -35,9 +35,7 @@ class TooManyRequestsHttpExceptionTest extends HttpExceptionTest
         $this->assertSame($headers, $exception->getHeaders());
     }
 
-    /**
-     * @dataProvider headerDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('headerDataProvider')]
     public function testHeadersSetter($headers)
     {
         $exception = new TooManyRequestsHttpException(10);
diff --git a/src/Symfony/Component/HttpKernel/Tests/Exception/UnauthorizedHttpExceptionTest.php b/src/Symfony/Component/HttpKernel/Tests/Exception/UnauthorizedHttpExceptionTest.php
index 3797ce0..bcda9c5 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Exception/UnauthorizedHttpExceptionTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Exception/UnauthorizedHttpExceptionTest.php
@@ -35,9 +35,7 @@ class UnauthorizedHttpExceptionTest extends HttpExceptionTest
         $this->assertSame($headers, $exception->getHeaders());
     }
 
-    /**
-     * @dataProvider headerDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('headerDataProvider')]
     public function testHeadersSetter($headers)
     {
         $exception = new UnauthorizedHttpException('Challenge');
diff --git a/src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php b/src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php
index 2d492c5..987267b 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php
@@ -26,9 +26,7 @@ use Symfony\Component\HttpKernel\HttpKernelInterface;
 use Symfony\Component\HttpKernel\KernelEvents;
 use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class InlineFragmentRendererTest extends TestCase
 {
     public function testRender()
@@ -169,6 +167,7 @@ class InlineFragmentRendererTest extends TestCase
         $this->assertEquals('Foo', ob_get_clean());
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLocaleAndFormatAreKeptInSubrequest()
     {
         $expectedSubRequest = Request::create('/');
@@ -189,6 +188,7 @@ class InlineFragmentRendererTest extends TestCase
         $strategy->render('/', $request);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testESIHeaderIsKeptInSubrequest()
     {
         $expectedSubRequest = Request::create('/');
@@ -208,6 +208,7 @@ class InlineFragmentRendererTest extends TestCase
         $strategy->render('/', $request);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testESIHeaderIsKeptInSubrequestWithTrustedHeaderDisabled()
     {
         Request::setTrustedProxies([], Request::HEADER_FORWARDED);
@@ -217,6 +218,7 @@ class InlineFragmentRendererTest extends TestCase
         Request::setTrustedProxies([], -1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testHeadersPossiblyResultingIn304AreNotAssignedToSubrequest()
     {
         $expectedSubRequest = Request::create('/');
@@ -230,6 +232,7 @@ class InlineFragmentRendererTest extends TestCase
         $strategy->render('/', $request);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testFirstTrustedProxyIsSetAsRemote()
     {
         Request::setTrustedProxies(['1.1.1.1'], -1);
@@ -251,6 +254,7 @@ class InlineFragmentRendererTest extends TestCase
         Request::setTrustedProxies([], -1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testIpAddressOfRangedTrustedProxyIsSetAsRemote()
     {
         $expectedSubRequest = Request::create('/');
diff --git a/src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php b/src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php
index 2421221..7041694 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php
@@ -18,17 +18,13 @@ use Symfony\Component\HttpKernel\Fragment\RoutableFragmentRenderer;
 
 class RoutableFragmentRendererTest extends TestCase
 {
-    /**
-     * @dataProvider getGenerateFragmentUriData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getGenerateFragmentUriData')]
     public function testGenerateFragmentUri($uri, $controller)
     {
         $this->assertEquals($uri, $this->callGenerateFragmentUriMethod($controller, Request::create('/')));
     }
 
-    /**
-     * @dataProvider getGenerateFragmentUriData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getGenerateFragmentUriData')]
     public function testGenerateAbsoluteFragmentUri($uri, $controller)
     {
         $this->assertEquals('http://localhost'.$uri, $this->callGenerateFragmentUriMethod($controller, Request::create('/'), true));
@@ -56,9 +52,7 @@ class RoutableFragmentRendererTest extends TestCase
         $this->assertEquals('/_fragment?_path=_format%3Djson%26_locale%3Dfr%26_controller%3Dcontroller', $this->callGenerateFragmentUriMethod($controller, $request));
     }
 
-    /**
-     * @dataProvider getGenerateFragmentUriDataWithNonScalar
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getGenerateFragmentUriDataWithNonScalar')]
     public function testGenerateFragmentUriWithNonScalar($controller)
     {
         $this->expectException(\LogicException::class);
diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php
index afd79e1..a8c750e 100644
--- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php
@@ -23,18 +23,14 @@ use Symfony\Component\HttpKernel\HttpCache\StoreInterface;
 use Symfony\Component\HttpKernel\HttpKernelInterface;
 use Symfony\Component\HttpKernel\Kernel;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class HttpCacheTest extends HttpCacheTestCase
 {
     use ExpectDeprecationTrait;
 
     public function testTerminateDelegatesTerminationOnlyForTerminableInterface()
     {
-        $storeMock = $this->getMockBuilder(StoreInterface::class)
-            ->disableOriginalConstructor()
-            ->getMock();
+        $storeMock = $this->createMock(StoreInterface::class);
 
         // does not implement TerminableInterface
         $kernel = new TestKernel();
@@ -102,9 +98,7 @@ class HttpCacheTest extends HttpCacheTestCase
         $this->assertCount(1, $terminateEvents);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testDoesCallTerminateOnFreshResponseIfConfigured()
     {
         $this->expectDeprecation('Since symfony/http-kernel 6.2: Setting "terminate_on_cache_hit" to "true" is deprecated and will be changed to "false" in Symfony 7.0.');
@@ -1697,9 +1691,7 @@ class HttpCacheTest extends HttpCacheTestCase
         });
     }
 
-    /**
-     * @dataProvider getTrustedProxyData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTrustedProxyData')]
     public function testHttpCacheIsSetAsATrustedProxy(array $existing)
     {
         Request::setTrustedProxies($existing, Request::HEADER_X_FORWARDED_FOR);
@@ -1726,9 +1718,7 @@ class HttpCacheTest extends HttpCacheTestCase
         ];
     }
 
-    /**
-     * @dataProvider getForwardedData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getForwardedData')]
     public function testForwarderHeaderForForwardedRequests($forwarded, $expected)
     {
         $this->setNextResponse();
@@ -1904,9 +1894,7 @@ class HttpCacheTest extends HttpCacheTestCase
         $this->assertEquals(500, $this->response->getStatusCode()); // fail
     }
 
-    /**
-     * @dataProvider getResponseDataThatMayBeServedStaleIfError
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getResponseDataThatMayBeServedStaleIfError')]
     public function testResponsesThatMayBeUsedStaleIfError($responseHeaders, $sleepBetweenRequests = null)
     {
         $responses = [
@@ -1947,9 +1935,7 @@ class HttpCacheTest extends HttpCacheTestCase
         yield 'public, s-maxage will be served stale-if-error, even if the RFC mandates otherwise' => [['Cache-Control' => 'public, s-maxage=20'], 25];
     }
 
-    /**
-     * @dataProvider getResponseDataThatMustNotBeServedStaleIfError
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getResponseDataThatMustNotBeServedStaleIfError')]
     public function testResponsesThatMustNotBeUsedStaleIfError($responseHeaders, $sleepBetweenRequests = null)
     {
         $responses = [
diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/ResponseCacheStrategyTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/ResponseCacheStrategyTest.php
index a465064..09f7967 100644
--- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/ResponseCacheStrategyTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/ResponseCacheStrategyTest.php
@@ -340,11 +340,8 @@ class ResponseCacheStrategyTest extends TestCase
         $this->assertFalse($mainResponse->isValidateable());
     }
 
-    /**
-     * @group time-sensitive
-     *
-     * @dataProvider cacheControlMergingProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('cacheControlMergingProvider')]
+    #[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
     public function testCacheControlMerging(array $expects, array $main, array $surrogates)
     {
         $cacheStrategy = new ResponseCacheStrategy();
diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpKernelBrowserTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpKernelBrowserTest.php
index 8c9f532..fe46126 100644
--- a/src/Symfony/Component/HttpKernel/Tests/HttpKernelBrowserTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/HttpKernelBrowserTest.php
@@ -21,9 +21,7 @@ use Symfony\Component\HttpKernel\HttpKernelBrowser;
 use Symfony\Component\HttpKernel\Tests\Fixtures\MockableUploadFileWithClientSize;
 use Symfony\Component\HttpKernel\Tests\Fixtures\TestClient;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class HttpKernelBrowserTest extends TestCase
 {
     public function testDoRequest()
@@ -45,9 +43,7 @@ class HttpKernelBrowserTest extends TestCase
         $this->assertEquals('http://www.example.com/?parameter='.urlencode('http://example.com'), $client->getRequest()->getUri(), '->doRequest() uses the request handler to make the request');
     }
 
-    /**
-     * @group composer
-     */
+    #[\PHPUnit\Framework\Attributes\Group('composer')]
     public function testGetScript()
     {
         $client = new TestClient(new TestHttpKernel());
diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php
index 585b338..8e10827 100644
--- a/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php
@@ -245,9 +245,7 @@ class HttpKernelTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getSpecificStatusCodes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getSpecificStatusCodes')]
     public function testHandleWhenAnExceptionIsHandledWithASpecificStatusCode($expectedStatusCode)
     {
         $dispatcher = new EventDispatcher();
diff --git a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php
index 268f8c7..b703abe 100644
--- a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php
@@ -211,9 +211,7 @@ class KernelTest extends TestCase
         $catch = true;
         $request = new Request();
 
-        $httpKernelMock = $this->getMockBuilder(HttpKernel::class)
-            ->disableOriginalConstructor()
-            ->getMock();
+        $httpKernelMock = $this->createMock(HttpKernel::class);
         $httpKernelMock
             ->expects($this->once())
             ->method('handle')
@@ -233,9 +231,7 @@ class KernelTest extends TestCase
         $catch = true;
         $request = new Request();
 
-        $httpKernelMock = $this->getMockBuilder(HttpKernel::class)
-            ->disableOriginalConstructor()
-            ->getMock();
+        $httpKernelMock = $this->createMock(HttpKernel::class);
 
         $kernel = $this->getKernel(['getHttpKernel', 'boot']);
         $kernel->expects($this->once())
@@ -248,11 +244,8 @@ class KernelTest extends TestCase
         $kernel->handle($request, $type, $catch);
     }
 
-    /**
-     * @dataProvider getStripCommentsCodes
-     *
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getStripCommentsCodes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testStripComments(string $source, string $expected)
     {
         $this->expectDeprecation('Since symfony/http-kernel 6.4: Method "Symfony\Component\HttpKernel\Kernel::stripComments()" is deprecated without replacement.');
@@ -568,9 +561,7 @@ EOF
 
     public function testServicesResetter()
     {
-        $httpKernelMock = $this->getMockBuilder(HttpKernelInterface::class)
-            ->disableOriginalConstructor()
-            ->getMock();
+        $httpKernelMock = $this->createMock(HttpKernelInterface::class);
         $httpKernelMock
             ->expects($this->exactly(2))
             ->method('handle');
@@ -598,9 +589,7 @@ EOF
         $this->assertEquals(1, ResettableService::$counter);
     }
 
-    /**
-     * @group time-sensitive
-     */
+    #[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
     public function testKernelStartTimeIsResetWhileBootingAlreadyBootedKernel()
     {
         $kernel = $this->getKernel(['initializeBundles'], [], true);
@@ -634,9 +623,8 @@ EOF
         $this->assertMatchesRegularExpression('/^[a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*TestDebugContainer$/', $kernel->getContainerClass());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testKernelWithParameterDeprecation()
     {
         $kernel = new class('test', true) extends Kernel {
diff --git a/src/Symfony/Component/HttpKernel/Tests/Log/LoggerTest.php b/src/Symfony/Component/HttpKernel/Tests/Log/LoggerTest.php
index f6c943e..3357f53 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Log/LoggerTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Log/LoggerTest.php
@@ -60,9 +60,7 @@ class LoggerTest extends TestCase
         $this->assertInstanceOf(LoggerInterface::class, $this->logger);
     }
 
-    /**
-     * @dataProvider provideLevelsAndMessages
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLevelsAndMessages')]
     public function testLogsAtAllLevels($level, $message)
     {
         $this->logger->{$level}($message, ['user' => 'Bob']);
diff --git a/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php b/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php
index d191ff0..33b5cbf 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php
@@ -351,9 +351,7 @@ class FileProfilerStorageTest extends TestCase
         $this->assertFalse(fgetcsv($handle, null, ',', '"', '\\'));
     }
 
-    /**
-     * @dataProvider provideExpiredProfiles
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideExpiredProfiles')]
     public function testRemoveExpiredProfiles(string $index, string $expectedOffset)
     {
         $file = $this->tmpDir.'/index.csv';
diff --git a/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php b/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php
index c701a89..b2cbbf9 100644
--- a/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php
@@ -15,9 +15,7 @@ use PHPUnit\Framework\TestCase;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpKernel\UriSigner;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class UriSignerTest extends TestCase
 {
     public function testSign()
diff --git a/src/Symfony/Component/Intl/Tests/CountriesTest.php b/src/Symfony/Component/Intl/Tests/CountriesTest.php
index 285dad8..fedc6fe 100644
--- a/src/Symfony/Component/Intl/Tests/CountriesTest.php
+++ b/src/Symfony/Component/Intl/Tests/CountriesTest.php
@@ -15,9 +15,7 @@ use Symfony\Component\Intl\Countries;
 use Symfony\Component\Intl\Exception\MissingResourceException;
 use Symfony\Component\Intl\Util\IntlTestHelper;
 
-/**
- * @group intl-data
- */
+#[\PHPUnit\Framework\Attributes\Group('intl-data')]
 class CountriesTest extends ResourceBundleTestCase
 {
     // The below arrays document the state of the ICU data bundled with this package.
@@ -796,9 +794,7 @@ class CountriesTest extends ResourceBundleTestCase
         $this->assertSame(self::COUNTRIES, Countries::getCountryCodes());
     }
 
-    /**
-     * @dataProvider provideLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocales')]
     public function testGetNames($displayLocale)
     {
         if ('en' !== $displayLocale) {
@@ -821,9 +817,7 @@ class CountriesTest extends ResourceBundleTestCase
         $this->assertSame(Countries::getNames('de_AT'), Countries::getNames());
     }
 
-    /**
-     * @dataProvider provideLocaleAliases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocaleAliases')]
     public function testGetNamesSupportsAliases($alias, $ofLocale)
     {
         if ('en' !== $ofLocale) {
@@ -836,9 +830,7 @@ class CountriesTest extends ResourceBundleTestCase
         $this->assertEquals(Countries::getNames($ofLocale), Countries::getNames($alias));
     }
 
-    /**
-     * @dataProvider provideLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocales')]
     public function testGetName($displayLocale)
     {
         if ('en' !== $displayLocale) {
@@ -852,9 +844,7 @@ class CountriesTest extends ResourceBundleTestCase
         }
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testLocaleAliasesAreLoaded()
     {
         \Locale::setDefault('zh_TW');
@@ -911,9 +901,7 @@ class CountriesTest extends ResourceBundleTestCase
         $this->assertFalse(Countries::alpha3CodeExists('ZZZ'));
     }
 
-    /**
-     * @dataProvider provideLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocales')]
     public function testGetAlpha3Name($displayLocale)
     {
         if ('en' !== $displayLocale) {
@@ -935,9 +923,7 @@ class CountriesTest extends ResourceBundleTestCase
         Countries::getAlpha3Name('ZZZ');
     }
 
-    /**
-     * @dataProvider provideLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocales')]
     public function testGetAlpha3Names($displayLocale)
     {
         if ('en' !== $displayLocale) {
diff --git a/src/Symfony/Component/Intl/Tests/CurrenciesTest.php b/src/Symfony/Component/Intl/Tests/CurrenciesTest.php
index 0287f4f..b2069e7 100644
--- a/src/Symfony/Component/Intl/Tests/CurrenciesTest.php
+++ b/src/Symfony/Component/Intl/Tests/CurrenciesTest.php
@@ -15,9 +15,7 @@ use Symfony\Component\Intl\Currencies;
 use Symfony\Component\Intl\Exception\MissingResourceException;
 use Symfony\Component\Intl\Util\IntlTestHelper;
 
-/**
- * @group intl-data
- */
+#[\PHPUnit\Framework\Attributes\Group('intl-data')]
 class CurrenciesTest extends ResourceBundleTestCase
 {
     // The below arrays document the state of the ICU data bundled with this package.
@@ -598,9 +596,7 @@ class CurrenciesTest extends ResourceBundleTestCase
         $this->assertSame(self::CURRENCIES, Currencies::getCurrencyCodes());
     }
 
-    /**
-     * @dataProvider provideLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocales')]
     public function testGetNames($displayLocale)
     {
         if ('en' !== $displayLocale) {
@@ -632,9 +628,7 @@ class CurrenciesTest extends ResourceBundleTestCase
         $this->assertSame(Currencies::getNames('de_AT'), Currencies::getNames());
     }
 
-    /**
-     * @dataProvider provideLocaleAliases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocaleAliases')]
     public function testGetNamesSupportsAliases($alias, $ofLocale)
     {
         if ('en' !== $ofLocale) {
@@ -647,9 +641,7 @@ class CurrenciesTest extends ResourceBundleTestCase
         $this->assertEquals(Currencies::getNames($ofLocale), Currencies::getNames($alias));
     }
 
-    /**
-     * @dataProvider provideLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocales')]
     public function testGetName($displayLocale)
     {
         if ('en' !== $displayLocale) {
@@ -682,9 +674,7 @@ class CurrenciesTest extends ResourceBundleTestCase
         $this->assertSame($expected, $actual);
     }
 
-    /**
-     * @dataProvider provideLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocales')]
     public function testGetSymbol($displayLocale)
     {
         $currencies = Currencies::getCurrencyCodes();
@@ -702,9 +692,8 @@ class CurrenciesTest extends ResourceBundleTestCase
         );
     }
 
-    /**
-     * @dataProvider provideCurrencies
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCurrencies')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testGetFractionDigits($currency)
     {
         // ensure each currency code has a corresponding fraction digit
@@ -713,9 +702,7 @@ class CurrenciesTest extends ResourceBundleTestCase
         $this->addToAssertionCount(1);
     }
 
-    /**
-     * @dataProvider provideCurrencies
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCurrencies')]
     public function testGetRoundingIncrement($currency)
     {
         $this->assertIsNumeric(Currencies::getRoundingIncrement($currency));
@@ -729,9 +716,7 @@ class CurrenciesTest extends ResourceBundleTestCase
         );
     }
 
-    /**
-     * @dataProvider provideCurrenciesWithNumericEquivalent
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCurrenciesWithNumericEquivalent')]
     public function testGetNumericCode($currency)
     {
         $this->assertSame(self::ALPHA3_TO_NUMERIC[$currency], Currencies::getNumericCode($currency));
@@ -745,9 +730,7 @@ class CurrenciesTest extends ResourceBundleTestCase
         );
     }
 
-    /**
-     * @dataProvider provideCurrenciesWithoutNumericEquivalent
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCurrenciesWithoutNumericEquivalent')]
     public function testGetNumericCodeFailsIfNoNumericEquivalent($currency)
     {
         $this->expectException(MissingResourceException::class);
@@ -765,9 +748,7 @@ class CurrenciesTest extends ResourceBundleTestCase
         );
     }
 
-    /**
-     * @dataProvider provideValidNumericCodes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidNumericCodes')]
     public function testForNumericCode($numeric, $expected)
     {
         $actual = Currencies::forNumericCode($numeric);
@@ -790,9 +771,7 @@ class CurrenciesTest extends ResourceBundleTestCase
         );
     }
 
-    /**
-     * @dataProvider provideInvalidNumericCodes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidNumericCodes')]
     public function testForNumericCodeFailsIfInvalidNumericCode($currency)
     {
         $this->expectException(MissingResourceException::class);
diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php
index 75276d2..0746f9f 100644
--- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php
+++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php
@@ -194,9 +194,7 @@ class BundleEntryReaderTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideMergeableValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMergeableValues')]
     public function testMergeDataWithFallbackData($childData, $parentData, $result)
     {
         if (null === $childData || \is_array($childData)) {
@@ -224,9 +222,7 @@ class BundleEntryReaderTest extends TestCase
         $this->assertSame($result, $this->reader->readEntry(self::RES_DIR, 'en', [], true));
     }
 
-    /**
-     * @dataProvider provideMergeableValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMergeableValues')]
     public function testDontMergeDataIfFallbackDisabled($childData, $parentData, $result)
     {
         $this->readerImpl->expects($this->once())
@@ -237,9 +233,7 @@ class BundleEntryReaderTest extends TestCase
         $this->assertSame($childData, $this->reader->readEntry(self::RES_DIR, 'en_GB', [], false));
     }
 
-    /**
-     * @dataProvider provideMergeableValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMergeableValues')]
     public function testMergeExistingEntryWithExistingFallbackEntry($childData, $parentData, $result)
     {
         if (null === $childData || \is_array($childData)) {
@@ -267,9 +261,7 @@ class BundleEntryReaderTest extends TestCase
         $this->assertSame($result, $this->reader->readEntry(self::RES_DIR, 'en', ['Foo', 'Bar'], true));
     }
 
-    /**
-     * @dataProvider provideMergeableValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMergeableValues')]
     public function testMergeNonExistingEntryWithExistingFallbackEntry($childData, $parentData, $result)
     {
         $series = [
@@ -289,9 +281,7 @@ class BundleEntryReaderTest extends TestCase
         $this->assertSame($parentData, $this->reader->readEntry(self::RES_DIR, 'en_GB', ['Foo', 'Bar'], true));
     }
 
-    /**
-     * @dataProvider provideMergeableValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMergeableValues')]
     public function testMergeExistingEntryWithNonExistingFallbackEntry($childData, $parentData, $result)
     {
         if (null === $childData || \is_array($childData)) {
@@ -339,9 +329,7 @@ class BundleEntryReaderTest extends TestCase
         $this->reader->readEntry(self::RES_DIR, 'en_GB', ['Foo', 'Bar'], true);
     }
 
-    /**
-     * @dataProvider provideMergeableValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMergeableValues')]
     public function testMergeTraversables($childData, $parentData, $result)
     {
         $parentData = \is_array($parentData) ? new \ArrayObject($parentData) : $parentData;
@@ -371,9 +359,7 @@ class BundleEntryReaderTest extends TestCase
         $this->assertSame($result, $this->reader->readEntry(self::RES_DIR, 'en_GB', ['Foo', 'Bar'], true));
     }
 
-    /**
-     * @dataProvider provideMergeableValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMergeableValues')]
     public function testFollowLocaleAliases($childData, $parentData, $result)
     {
         $this->reader->setLocaleAliases(['mo' => 'ro_MD']);
diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php
index 42f5964..214bdc7 100644
--- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php
+++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php
@@ -18,9 +18,8 @@ use Symfony\Component\Intl\Exception\RuntimeException;
 
 /**
  * @author Bernhard Schussek <bschussek@gmail.com>
- *
- * @requires extension intl
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
 class IntlBundleReaderTest extends TestCase
 {
     private IntlBundleReader $reader;
diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php
index 9bd4121..17e006c 100644
--- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php
+++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php
@@ -56,9 +56,7 @@ class JsonBundleWriterTest extends TestCase
         $this->assertFileEquals(__DIR__.'/Fixtures/en.json', $this->directory.'/en.json');
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testWriteResourceBundle()
     {
         $bundle = new \ResourceBundle('rb', __DIR__.'/Fixtures', false);
diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php
index ebdc8b2..dcf2908 100644
--- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php
+++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php
@@ -56,9 +56,7 @@ class PhpBundleWriterTest extends TestCase
         $this->assertFileEquals(__DIR__.'/Fixtures/en.php', $this->directory.'/en.php');
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testWriteResourceBundle()
     {
         $bundle = new \ResourceBundle('rb', __DIR__.'/Fixtures', false);
diff --git a/src/Symfony/Component/Intl/Tests/IntlTest.php b/src/Symfony/Component/Intl/Tests/IntlTest.php
index cc5a3a93..c581697 100644
--- a/src/Symfony/Component/Intl/Tests/IntlTest.php
+++ b/src/Symfony/Component/Intl/Tests/IntlTest.php
@@ -32,9 +32,7 @@ class IntlTest extends TestCase
         \Locale::setDefault($this->defaultLocale);
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testIsExtensionLoadedChecksIfIntlExtensionIsLoaded()
     {
         $this->assertTrue(Intl::isExtensionLoaded());
diff --git a/src/Symfony/Component/Intl/Tests/LanguagesTest.php b/src/Symfony/Component/Intl/Tests/LanguagesTest.php
index 6934a04..1f3bb37 100644
--- a/src/Symfony/Component/Intl/Tests/LanguagesTest.php
+++ b/src/Symfony/Component/Intl/Tests/LanguagesTest.php
@@ -15,9 +15,7 @@ use Symfony\Component\Intl\Exception\MissingResourceException;
 use Symfony\Component\Intl\Languages;
 use Symfony\Component\Intl\Util\IntlTestHelper;
 
-/**
- * @group intl-data
- */
+#[\PHPUnit\Framework\Attributes\Group('intl-data')]
 class LanguagesTest extends ResourceBundleTestCase
 {
     // The below arrays document the state of the ICU data bundled with this package.
@@ -1701,9 +1699,7 @@ class LanguagesTest extends ResourceBundleTestCase
         $this->assertEquals(self::LANGUAGES, Languages::getLanguageCodes());
     }
 
-    /**
-     * @dataProvider provideLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocales')]
     public function testGetNames($displayLocale)
     {
         if ('en' !== $displayLocale) {
@@ -1734,9 +1730,7 @@ class LanguagesTest extends ResourceBundleTestCase
         $this->assertSame(Languages::getNames('de_AT'), Languages::getNames());
     }
 
-    /**
-     * @dataProvider provideLocaleAliases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocaleAliases')]
     public function testGetNamesSupportsAliases($alias, $ofLocale)
     {
         if ('en' !== $ofLocale) {
@@ -1749,9 +1743,7 @@ class LanguagesTest extends ResourceBundleTestCase
         $this->assertEquals(Languages::getNames($ofLocale), Languages::getNames($alias));
     }
 
-    /**
-     * @dataProvider provideLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocales')]
     public function testGetName($displayLocale)
     {
         if ('en' !== $displayLocale) {
@@ -1793,9 +1785,7 @@ class LanguagesTest extends ResourceBundleTestCase
         );
     }
 
-    /**
-     * @dataProvider provideLanguagesWithAlpha3Equivalent
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLanguagesWithAlpha3Equivalent')]
     public function testGetAlpha3Code($language)
     {
         $this->assertSame(self::ALPHA2_TO_ALPHA3[$language], Languages::getAlpha3Code($language));
@@ -1809,9 +1799,7 @@ class LanguagesTest extends ResourceBundleTestCase
         );
     }
 
-    /**
-     * @dataProvider provideLanguagesWithoutAlpha3Equivalent
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLanguagesWithoutAlpha3Equivalent')]
     public function testGetAlpha3CodeFailsIfNoAlpha3Equivalent($language)
     {
         $this->expectException(MissingResourceException::class);
@@ -1843,9 +1831,7 @@ class LanguagesTest extends ResourceBundleTestCase
         );
     }
 
-    /**
-     * @dataProvider provideLanguagesWithAlpha2Equivalent
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLanguagesWithAlpha2Equivalent')]
     public function testGetAlpha2Code($language)
     {
         $this->assertSame(self::ALPHA3_TO_ALPHA2[$language], Languages::getAlpha2Code($language));
@@ -1859,9 +1845,7 @@ class LanguagesTest extends ResourceBundleTestCase
         );
     }
 
-    /**
-     * @dataProvider provideLanguagesWithoutAlpha2Equivalent
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLanguagesWithoutAlpha2Equivalent')]
     public function testGetAlpha2CodeFailsIfNoAlpha2Equivalent($language)
     {
         $this->expectException(MissingResourceException::class);
@@ -1881,9 +1865,7 @@ class LanguagesTest extends ResourceBundleTestCase
         $this->assertFalse(Languages::alpha3CodeExists('zzz'));
     }
 
-    /**
-     * @dataProvider provideLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocales')]
     public function testGetAlpha3Name($displayLocale)
     {
         if ('en' !== $displayLocale) {
@@ -1904,9 +1886,7 @@ class LanguagesTest extends ResourceBundleTestCase
         Languages::getAlpha3Name('zzz');
     }
 
-    /**
-     * @dataProvider provideLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocales')]
     public function testGetAlpha3Names($displayLocale)
     {
         if ('en' !== $displayLocale) {
diff --git a/src/Symfony/Component/Intl/Tests/LocaleTest.php b/src/Symfony/Component/Intl/Tests/LocaleTest.php
index 35db0a9..97363ea 100644
--- a/src/Symfony/Component/Intl/Tests/LocaleTest.php
+++ b/src/Symfony/Component/Intl/Tests/LocaleTest.php
@@ -39,9 +39,7 @@ class LocaleTest extends TestCase
         return $tests;
     }
 
-    /**
-     * @dataProvider provideGetFallbackTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideGetFallbackTests')]
     public function testGetFallback($expected, $locale)
     {
         $this->assertSame($expected, Locale::getFallback($locale));
@@ -71,9 +69,7 @@ class LocaleTest extends TestCase
         Locale::setDefaultFallback($prev);
     }
 
-    /**
-     * @requires function locale_parse
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresFunction('locale_parse')]
     public function testLongLocaleFallback()
     {
         $locale = 'LC_TYPE=fr_FR.UTF-8;LC_NUMERIC=C;LC_TIME=fr_FR.UTF-8;LC_COLLATE=fr_FR.UTF-8;'.
diff --git a/src/Symfony/Component/Intl/Tests/LocalesTest.php b/src/Symfony/Component/Intl/Tests/LocalesTest.php
index f729eb5..cd9011b 100644
--- a/src/Symfony/Component/Intl/Tests/LocalesTest.php
+++ b/src/Symfony/Component/Intl/Tests/LocalesTest.php
@@ -15,9 +15,7 @@ use Symfony\Component\Intl\Exception\MissingResourceException;
 use Symfony\Component\Intl\Locales;
 use Symfony\Component\Intl\Util\IntlTestHelper;
 
-/**
- * @group intl-data
- */
+#[\PHPUnit\Framework\Attributes\Group('intl-data')]
 class LocalesTest extends ResourceBundleTestCase
 {
     public function testGetLocales()
@@ -30,9 +28,7 @@ class LocalesTest extends ResourceBundleTestCase
         $this->assertSame(static::getLocaleAliases(), Locales::getAliases());
     }
 
-    /**
-     * @dataProvider provideLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocales')]
     public function testGetNames($displayLocale)
     {
         if ('en' !== $displayLocale) {
@@ -58,9 +54,7 @@ class LocalesTest extends ResourceBundleTestCase
         $this->assertSame(Locales::getNames('de_AT'), Locales::getNames());
     }
 
-    /**
-     * @dataProvider provideLocaleAliases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocaleAliases')]
     public function testGetNamesSupportsAliases($alias, $ofLocale)
     {
         if ('en' !== $ofLocale) {
@@ -73,9 +67,7 @@ class LocalesTest extends ResourceBundleTestCase
         $this->assertEquals(Locales::getNames($ofLocale), Locales::getNames($alias));
     }
 
-    /**
-     * @dataProvider provideLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocales')]
     public function testGetName($displayLocale)
     {
         if ('en' !== $displayLocale) {
diff --git a/src/Symfony/Component/Intl/Tests/ScriptsTest.php b/src/Symfony/Component/Intl/Tests/ScriptsTest.php
index 43471a9..87cb1f9 100644
--- a/src/Symfony/Component/Intl/Tests/ScriptsTest.php
+++ b/src/Symfony/Component/Intl/Tests/ScriptsTest.php
@@ -15,9 +15,7 @@ use Symfony\Component\Intl\Exception\MissingResourceException;
 use Symfony\Component\Intl\Scripts;
 use Symfony\Component\Intl\Util\IntlTestHelper;
 
-/**
- * @group intl-data
- */
+#[\PHPUnit\Framework\Attributes\Group('intl-data')]
 class ScriptsTest extends ResourceBundleTestCase
 {
     // The below arrays document the state of the ICU data bundled with this package.
@@ -238,9 +236,7 @@ class ScriptsTest extends ResourceBundleTestCase
         $this->assertSame(self::$scripts, Scripts::getScriptCodes());
     }
 
-    /**
-     * @dataProvider provideLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocales')]
     public function testGetNames($displayLocale)
     {
         if ('en' !== $displayLocale) {
@@ -266,9 +262,7 @@ class ScriptsTest extends ResourceBundleTestCase
         $this->assertSame(Scripts::getNames('de_AT'), Scripts::getNames());
     }
 
-    /**
-     * @dataProvider provideLocaleAliases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocaleAliases')]
     public function testGetNamesSupportsAliases($alias, $ofLocale)
     {
         if ('en' !== $ofLocale) {
@@ -281,9 +275,7 @@ class ScriptsTest extends ResourceBundleTestCase
         $this->assertEquals(Scripts::getNames($ofLocale), Scripts::getNames($alias));
     }
 
-    /**
-     * @dataProvider provideLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocales')]
     public function testGetName($displayLocale)
     {
         if ('en' !== $displayLocale) {
diff --git a/src/Symfony/Component/Intl/Tests/TimezonesTest.php b/src/Symfony/Component/Intl/Tests/TimezonesTest.php
index aae65b8..1e48368 100644
--- a/src/Symfony/Component/Intl/Tests/TimezonesTest.php
+++ b/src/Symfony/Component/Intl/Tests/TimezonesTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Intl\Exception\MissingResourceException;
 use Symfony\Component\Intl\Timezones;
 use Symfony\Component\Intl\Util\IntlTestHelper;
 
-/**
- * @group intl-data
- */
+#[\PHPUnit\Framework\Attributes\Group('intl-data')]
 class TimezonesTest extends ResourceBundleTestCase
 {
     // The below arrays document the state of the ICU data bundled with this package.
@@ -478,9 +476,7 @@ class TimezonesTest extends ResourceBundleTestCase
         $this->assertEquals(self::ZONES, Timezones::getIds());
     }
 
-    /**
-     * @dataProvider provideLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocales')]
     public function testGetNames($displayLocale)
     {
         if ('en' !== $displayLocale) {
@@ -504,9 +500,7 @@ class TimezonesTest extends ResourceBundleTestCase
         $this->assertSame(Timezones::getNames('de_AT'), Timezones::getNames());
     }
 
-    /**
-     * @dataProvider provideLocaleAliases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocaleAliases')]
     public function testGetNamesSupportsAliases($alias, $ofLocale)
     {
         if ('en' !== $ofLocale) {
@@ -519,9 +513,7 @@ class TimezonesTest extends ResourceBundleTestCase
         $this->assertEquals(Timezones::getNames($ofLocale), Timezones::getNames($alias));
     }
 
-    /**
-     * @dataProvider provideLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocales')]
     public function testGetName($displayLocale)
     {
         if ('en' !== $displayLocale) {
@@ -629,9 +621,8 @@ class TimezonesTest extends ResourceBundleTestCase
         Timezones::getCountryCode('foobar');
     }
 
-    /**
-     * @dataProvider provideTimezones
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTimezones')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testGetGmtOffsetAvailability(string $timezone)
     {
         try {
@@ -647,9 +638,8 @@ class TimezonesTest extends ResourceBundleTestCase
         $this->addToAssertionCount(1);
     }
 
-    /**
-     * @dataProvider provideTimezones
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTimezones')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testGetCountryCodeAvailability(string $timezone)
     {
         try {
@@ -671,9 +661,8 @@ class TimezonesTest extends ResourceBundleTestCase
         return array_map(fn ($timezone) => [$timezone], self::ZONES);
     }
 
-    /**
-     * @dataProvider provideCountries
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCountries')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testForCountryCodeAvailability(string $country)
     {
         // ensure each country code has a list of timezone identifiers (possibly empty)
diff --git a/src/Symfony/Component/Intl/Tests/Transliterator/EmojiTransliteratorTest.php b/src/Symfony/Component/Intl/Tests/Transliterator/EmojiTransliteratorTest.php
index be618c6..e6c68db 100644
--- a/src/Symfony/Component/Intl/Tests/Transliterator/EmojiTransliteratorTest.php
+++ b/src/Symfony/Component/Intl/Tests/Transliterator/EmojiTransliteratorTest.php
@@ -15,14 +15,10 @@ use PHPUnit\Framework\TestCase;
 use Symfony\Component\Finder\Finder;
 use Symfony\Component\Intl\Transliterator\EmojiTransliterator;
 
-/**
- * @requires extension intl
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
 class EmojiTransliteratorTest extends TestCase
 {
-    /**
-     * @dataProvider provideTransliterateTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTransliterateTests')]
     public function testTransliterate(string $locale, string $input, string $expected)
     {
         $tr = EmojiTransliterator::create('emoji-'.$locale);
@@ -82,9 +78,7 @@ class EmojiTransliteratorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideLocaleTest
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocaleTest')]
     public function testAllTransliterator(string $locale)
     {
         $tr = EmojiTransliterator::create($locale);
diff --git a/src/Symfony/Component/Intl/Tests/Util/GitRepositoryTest.php b/src/Symfony/Component/Intl/Tests/Util/GitRepositoryTest.php
index ce87547..542c5bf 100644
--- a/src/Symfony/Component/Intl/Tests/Util/GitRepositoryTest.php
+++ b/src/Symfony/Component/Intl/Tests/Util/GitRepositoryTest.php
@@ -16,20 +16,15 @@ use Symfony\Component\Filesystem\Filesystem;
 use Symfony\Component\Intl\Exception\RuntimeException;
 use Symfony\Component\Intl\Util\GitRepository;
 
-/**
- * @group intl-data
- */
+#[\PHPUnit\Framework\Attributes\Group('intl-data')]
 class GitRepositoryTest extends TestCase
 {
     private ?string $targetDir = null;
 
     private const REPO_URL = 'https://github.com/symfony/intl.git';
 
-    /**
-     * @before
-     *
-     * @after
-     */
+    #[\PHPUnit\Framework\Attributes\Before]
+    #[\PHPUnit\Framework\Attributes\After]
     protected function cleanup()
     {
         $this->targetDir = sys_get_temp_dir().'/GitRepositoryTest/source';
diff --git a/src/Symfony/Component/Intl/Tests/Util/IcuVersionTest.php b/src/Symfony/Component/Intl/Tests/Util/IcuVersionTest.php
index 7027874..d960702 100644
--- a/src/Symfony/Component/Intl/Tests/Util/IcuVersionTest.php
+++ b/src/Symfony/Component/Intl/Tests/Util/IcuVersionTest.php
@@ -41,9 +41,7 @@ class IcuVersionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider normalizeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('normalizeProvider')]
     public function testNormalize($precision, $version, $result)
     {
         $this->assertSame($result, IcuVersion::normalize($version, $precision));
@@ -102,9 +100,7 @@ class IcuVersionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider compareProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('compareProvider')]
     public function testCompare($precision, $version1, $operator, $version2, $result)
     {
         $this->assertSame($result, IcuVersion::compare($version1, $version2, $operator, $precision));
diff --git a/src/Symfony/Component/Intl/Tests/Util/VersionTest.php b/src/Symfony/Component/Intl/Tests/Util/VersionTest.php
index b41edb0..52ee020 100644
--- a/src/Symfony/Component/Intl/Tests/Util/VersionTest.php
+++ b/src/Symfony/Component/Intl/Tests/Util/VersionTest.php
@@ -45,9 +45,7 @@ class VersionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider normalizeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('normalizeProvider')]
     public function testNormalize($precision, $version, $result)
     {
         $this->assertSame($result, Version::normalize($version, $precision));
@@ -78,9 +76,7 @@ class VersionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider compareProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('compareProvider')]
     public function testCompare($precision, $version1, $operator, $version2, $result)
     {
         $this->assertSame($result, Version::compare($version1, $version2, $operator, $precision));
diff --git a/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/AdapterTest.php b/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/AdapterTest.php
index e210b1b..9c5df0e 100644
--- a/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/AdapterTest.php
+++ b/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/AdapterTest.php
@@ -20,11 +20,8 @@ use Symfony\Component\Ldap\Exception\NotBoundException;
 use Symfony\Component\Ldap\LdapInterface;
 use Symfony\Component\Ldap\Tests\LdapTestCase;
 
-/**
- * @requires extension ldap
- *
- * @group integration
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('ldap')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class AdapterTest extends LdapTestCase
 {
     public function testLdapEscape()
@@ -34,9 +31,7 @@ class AdapterTest extends LdapTestCase
         $this->assertEquals('\20foo\3dbar\0d(baz)*\20', $ldap->escape(" foo=bar\r(baz)* ", '', LdapInterface::ESCAPE_DN));
     }
 
-    /**
-     * @group functional
-     */
+    #[\PHPUnit\Framework\Attributes\Group('functional')]
     public function testLdapQuery()
     {
         $ldap = new Adapter($this->getLdapConfig());
@@ -54,9 +49,7 @@ class AdapterTest extends LdapTestCase
         $this->assertEquals(['fabpot@symfony.com', 'fabien@potencier.com'], $entry->getAttribute('mail'));
     }
 
-    /**
-     * @group functional
-     */
+    #[\PHPUnit\Framework\Attributes\Group('functional')]
     public function testLdapQueryIterator()
     {
         $ldap = new Adapter($this->getLdapConfig());
@@ -72,9 +65,7 @@ class AdapterTest extends LdapTestCase
         $this->assertEquals(['fabpot@symfony.com', 'fabien@potencier.com'], $entry->getAttribute('mail'));
     }
 
-    /**
-     * @group functional
-     */
+    #[\PHPUnit\Framework\Attributes\Group('functional')]
     public function testLdapQueryWithoutBind()
     {
         $ldap = new Adapter($this->getLdapConfig());
@@ -83,9 +74,7 @@ class AdapterTest extends LdapTestCase
         $query->execute();
     }
 
-    /**
-     * @group network
-     */
+    #[\PHPUnit\Framework\Attributes\Group('network')]
     public function testLdapQueryScopeBase()
     {
         $ldap = new Adapter($this->getLdapConfig());
@@ -102,9 +91,7 @@ class AdapterTest extends LdapTestCase
         $this->assertEquals(['Fabien Potencier'], $entry->getAttribute('cn'));
     }
 
-    /**
-     * @group network
-     */
+    #[\PHPUnit\Framework\Attributes\Group('network')]
     public function testLdapQueryScopeOneLevel()
     {
         $ldap = new Adapter($this->getLdapConfig());
diff --git a/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/EntryManagerTest.php b/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/EntryManagerTest.php
index e473bc8..b0b15e6 100644
--- a/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/EntryManagerTest.php
+++ b/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/EntryManagerTest.php
@@ -47,9 +47,8 @@ class EntryManagerTest extends TestCase
 
     /**
      * @see https://tools.ietf.org/html/rfc4514#section-3
-     *
-     * @dataProvider moveWithRFC4514DistinguishedNameProvider
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('moveWithRFC4514DistinguishedNameProvider')]
     public function testMoveWithRFC4514DistinguishedName(string $dn, string $expectedRdn)
     {
         $connection = $this->createMock(Connection::class);
diff --git a/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php b/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php
index cd1b1c0..c7f44a6 100644
--- a/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php
+++ b/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php
@@ -20,11 +20,8 @@ use Symfony\Component\Ldap\Exception\NotBoundException;
 use Symfony\Component\Ldap\Exception\UpdateOperationException;
 use Symfony\Component\Ldap\Tests\LdapTestCase;
 
-/**
- * @requires extension ldap
- *
- * @group integration
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('ldap')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class LdapManagerTest extends LdapTestCase
 {
     private Adapter $adapter;
@@ -35,9 +32,7 @@ class LdapManagerTest extends LdapTestCase
         $this->adapter->getConnection()->bind('cn=admin,dc=symfony,dc=com', 'symfony');
     }
 
-    /**
-     * @group functional
-     */
+    #[\PHPUnit\Framework\Attributes\Group('functional')]
     public function testLdapAddAndRemove()
     {
         $this->executeSearchQuery(1);
@@ -58,9 +53,7 @@ class LdapManagerTest extends LdapTestCase
         $this->executeSearchQuery(1);
     }
 
-    /**
-     * @group functional
-     */
+    #[\PHPUnit\Framework\Attributes\Group('functional')]
     public function testLdapAddInvalidEntry()
     {
         $this->expectException(LdapException::class);
@@ -77,9 +70,7 @@ class LdapManagerTest extends LdapTestCase
         $em->add($entry);
     }
 
-    /**
-     * @group functional
-     */
+    #[\PHPUnit\Framework\Attributes\Group('functional')]
     public function testLdapAddDouble()
     {
         $this->expectException(LdapException::class);
@@ -101,9 +92,7 @@ class LdapManagerTest extends LdapTestCase
         }
     }
 
-    /**
-     * @group functional
-     */
+    #[\PHPUnit\Framework\Attributes\Group('functional')]
     public function testLdapUpdate()
     {
         $result = $this->executeSearchQuery(1);
@@ -127,9 +116,7 @@ class LdapManagerTest extends LdapTestCase
         $this->assertNull($entry->getAttribute('email'));
     }
 
-    /**
-     * @group functional
-     */
+    #[\PHPUnit\Framework\Attributes\Group('functional')]
     public function testLdapUnboundAdd()
     {
         $this->adapter = new Adapter($this->getLdapConfig());
@@ -138,9 +125,7 @@ class LdapManagerTest extends LdapTestCase
         $em->add(new Entry(''));
     }
 
-    /**
-     * @group functional
-     */
+    #[\PHPUnit\Framework\Attributes\Group('functional')]
     public function testLdapUnboundRemove()
     {
         $this->adapter = new Adapter($this->getLdapConfig());
@@ -149,9 +134,7 @@ class LdapManagerTest extends LdapTestCase
         $em->remove(new Entry(''));
     }
 
-    /**
-     * @group functional
-     */
+    #[\PHPUnit\Framework\Attributes\Group('functional')]
     public function testLdapUnboundUpdate()
     {
         $this->adapter = new Adapter($this->getLdapConfig());
@@ -173,9 +156,7 @@ class LdapManagerTest extends LdapTestCase
         return $results;
     }
 
-    /**
-     * @group functional
-     */
+    #[\PHPUnit\Framework\Attributes\Group('functional')]
     public function testLdapRename()
     {
         $result = $this->executeSearchQuery(1);
@@ -194,9 +175,7 @@ class LdapManagerTest extends LdapTestCase
         $this->executeSearchQuery(1);
     }
 
-    /**
-     * @group functional
-     */
+    #[\PHPUnit\Framework\Attributes\Group('functional')]
     public function testLdapRenameWithoutRemovingOldRdn()
     {
         $result = $this->executeSearchQuery(1);
@@ -383,9 +362,7 @@ class LdapManagerTest extends LdapTestCase
         $entryManager->applyOperations($entry->getDn(), $duplicateIterator);
     }
 
-    /**
-     * @group functional
-     */
+    #[\PHPUnit\Framework\Attributes\Group('functional')]
     public function testLdapMove()
     {
         $result = $this->executeSearchQuery(1);
diff --git a/src/Symfony/Component/Ldap/Tests/LdapTest.php b/src/Symfony/Component/Ldap/Tests/LdapTest.php
index 878ac0d..7a436a4 100644
--- a/src/Symfony/Component/Ldap/Tests/LdapTest.php
+++ b/src/Symfony/Component/Ldap/Tests/LdapTest.php
@@ -69,9 +69,7 @@ class LdapTest extends TestCase
         $this->ldap->query('foo', 'bar', ['baz']);
     }
 
-    /**
-     * @requires extension ldap
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('ldap')]
     public function testLdapCreate()
     {
         $ldap = Ldap::create('ext_ldap');
diff --git a/src/Symfony/Component/Ldap/Tests/Security/CheckLdapCredentialsListenerTest.php b/src/Symfony/Component/Ldap/Tests/Security/CheckLdapCredentialsListenerTest.php
index 6392c0d..1f6040e 100644
--- a/src/Symfony/Component/Ldap/Tests/Security/CheckLdapCredentialsListenerTest.php
+++ b/src/Symfony/Component/Ldap/Tests/Security/CheckLdapCredentialsListenerTest.php
@@ -45,9 +45,7 @@ class CheckLdapCredentialsListenerTest extends TestCase
         $this->ldap = $this->createMock(LdapInterface::class);
     }
 
-    /**
-     * @dataProvider provideShouldNotCheckPassport
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideShouldNotCheckPassport')]
     public function testShouldNotCheckPassport($authenticator, $passport)
     {
         $this->ldap->expects($this->never())->method('bind');
@@ -89,9 +87,7 @@ class CheckLdapCredentialsListenerTest extends TestCase
         $listener->onCheckPassport($this->createEvent('s3cr3t', new LdapBadge('not_existing_ldap_service')));
     }
 
-    /**
-     * @dataProvider provideWrongPassportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideWrongPassportData')]
     public function testWrongPassport($passport)
     {
         $this->expectException(\LogicException::class);
@@ -128,11 +124,8 @@ class CheckLdapCredentialsListenerTest extends TestCase
         $listener->onCheckPassport($this->createEvent());
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider queryForDnProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('queryForDnProvider')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyQueryForDn(string $dnString, string $queryString)
     {
         $collection = new class([new Entry('')]) extends \ArrayObject implements CollectionInterface {
diff --git a/src/Symfony/Component/Ldap/Tests/Security/LdapUserProviderTest.php b/src/Symfony/Component/Ldap/Tests/Security/LdapUserProviderTest.php
index 9095535..9230999 100644
--- a/src/Symfony/Component/Ldap/Tests/Security/LdapUserProviderTest.php
+++ b/src/Symfony/Component/Ldap/Tests/Security/LdapUserProviderTest.php
@@ -22,9 +22,7 @@ use Symfony\Component\Ldap\Security\LdapUserProvider;
 use Symfony\Component\Security\Core\Exception\InvalidArgumentException;
 use Symfony\Component\Security\Core\Exception\UserNotFoundException;
 
-/**
- * @requires extension ldap
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('ldap')]
 class LdapUserProviderTest extends TestCase
 {
     public function testLoadUserByIdentifierFailsIfCantConnectToLdap()
diff --git a/src/Symfony/Component/Lock/Tests/LockTest.php b/src/Symfony/Component/Lock/Tests/LockTest.php
index 0255430..698d73b 100644
--- a/src/Symfony/Component/Lock/Tests/LockTest.php
+++ b/src/Symfony/Component/Lock/Tests/LockTest.php
@@ -397,9 +397,7 @@ class LockTest extends TestCase
         $this->assertSame([['debug', 'Successfully released the "{resource}" lock.', ['resource' => $key]]], $logger->logs());
     }
 
-    /**
-     * @dataProvider provideExpiredDates
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideExpiredDates')]
     public function testExpiration($ttls, $expected)
     {
         $key = new Key(uniqid(__METHOD__, true));
@@ -416,9 +414,7 @@ class LockTest extends TestCase
         $this->assertSame($expected, $lock->isExpired());
     }
 
-    /**
-     * @dataProvider provideExpiredDates
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideExpiredDates')]
     public function testExpirationStoreInterface($ttls, $expected)
     {
         $key = new Key(uniqid(__METHOD__, true));
@@ -462,9 +458,7 @@ class LockTest extends TestCase
         $this->assertTrue($lock->acquireRead(false));
     }
 
-    /**
-     * @group time-sensitive
-     */
+    #[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
     public function testAcquireReadTwiceWithExpiration()
     {
         $key = new Key(uniqid(__METHOD__, true));
@@ -506,9 +500,7 @@ class LockTest extends TestCase
         $lock->release();
     }
 
-    /**
-     * @group time-sensitive
-     */
+    #[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
     public function testAcquireTwiceWithExpiration()
     {
         $key = new Key(uniqid(__METHOD__, true));
diff --git a/src/Symfony/Component/Lock/Tests/Store/AbstractStoreTestCase.php b/src/Symfony/Component/Lock/Tests/Store/AbstractStoreTestCase.php
index fdd3e39..f9edc1d 100644
--- a/src/Symfony/Component/Lock/Tests/Store/AbstractStoreTestCase.php
+++ b/src/Symfony/Component/Lock/Tests/Store/AbstractStoreTestCase.php
@@ -95,6 +95,7 @@ abstract class AbstractStoreTestCase extends TestCase
         $this->assertFalse($store->exists($key2));
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSaveTwice()
     {
         $store = $this->getStore();
diff --git a/src/Symfony/Component/Lock/Tests/Store/CombinedStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/CombinedStoreTest.php
index 3c99684..1246c51 100644
--- a/src/Symfony/Component/Lock/Tests/Store/CombinedStoreTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/CombinedStoreTest.php
@@ -24,9 +24,8 @@ use Symfony\Component\Lock\Strategy\UnanimousStrategy;
 
 /**
  * @author Jérémy Derussé <jeremy@derusse.com>
- *
- * @group integration
  */
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class CombinedStoreTest extends AbstractStoreTestCase
 {
     use ExpiringStoreTestTrait;
diff --git a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalPostgreSqlStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalPostgreSqlStoreTest.php
index c156d95..a462c08 100644
--- a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalPostgreSqlStoreTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalPostgreSqlStoreTest.php
@@ -26,10 +26,10 @@ use Symfony\Component\Lock\Store\DoctrineDbalPostgreSqlStore;
 /**
  * @author Jérémy Derussé <jeremy@derusse.com>
  *
- * @requires extension pdo_pgsql
  *
- * @group integration
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pdo_pgsql')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class DoctrineDbalPostgreSqlStoreTest extends AbstractStoreTestCase
 {
     use BlockingStoreTestTrait;
@@ -51,11 +51,8 @@ class DoctrineDbalPostgreSqlStoreTest extends AbstractStoreTestCase
         return new DoctrineDbalPostgreSqlStore($conn);
     }
 
-    /**
-     * @requires extension pdo_sqlite
-     *
-     * @dataProvider getInvalidDrivers
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pdo_sqlite')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidDrivers')]
     public function testInvalidDriver($connOrDsn)
     {
         $this->expectException(InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php
index 09c9d5e..a37e58f 100644
--- a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php
@@ -26,9 +26,8 @@ class_exists(\Doctrine\DBAL\Platforms\PostgreSqlPlatform::class);
 
 /**
  * @author Jérémy Derussé <jeremy@derusse.com>
- *
- * @requires extension pdo_sqlite
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pdo_sqlite')]
 class DoctrineDbalStoreTest extends AbstractStoreTestCase
 {
     use ExpiringStoreTestTrait;
@@ -68,14 +67,13 @@ class DoctrineDbalStoreTest extends AbstractStoreTestCase
         return new DoctrineDbalStore(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile], $config));
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testAbortAfterExpiration()
     {
         $this->markTestSkipped('Pdo expects a TTL greater than 1 sec. Simulating a slow network is too hard');
     }
 
-    /**
-     * @dataProvider provideDsnWithSQLite
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDsnWithSQLite')]
     public function testDsnWithSQLite(string $dsn, ?string $file = null)
     {
         $key = new Key(uniqid(__METHOD__, true));
@@ -100,11 +98,8 @@ class DoctrineDbalStoreTest extends AbstractStoreTestCase
         yield 'SQLite in memory' => ['sqlite://localhost/:memory:'];
     }
 
-    /**
-     * @requires extension pdo_pgsql
-     *
-     * @group integration
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pdo_pgsql')]
+    #[\PHPUnit\Framework\Attributes\Group('integration')]
     public function testDsnWithPostgreSQL()
     {
         if (!$host = getenv('POSTGRES_HOST')) {
@@ -124,9 +119,7 @@ class DoctrineDbalStoreTest extends AbstractStoreTestCase
         }
     }
 
-    /**
-     * @dataProvider providePlatforms
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePlatforms')]
     public function testCreatesTableInTransaction(string $platform)
     {
         $conn = $this->createMock(Connection::class);
diff --git a/src/Symfony/Component/Lock/Tests/Store/MemcachedStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/MemcachedStoreTest.php
index 48a35a7..b586db2 100644
--- a/src/Symfony/Component/Lock/Tests/Store/MemcachedStoreTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/MemcachedStoreTest.php
@@ -19,10 +19,10 @@ use Symfony\Component\Lock\Store\MemcachedStore;
 /**
  * @author Jérémy Derussé <jeremy@derusse.com>
  *
- * @requires extension memcached
  *
- * @group integration
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('memcached')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class MemcachedStoreTest extends AbstractStoreTestCase
 {
     use ExpiringStoreTestTrait;
@@ -56,6 +56,7 @@ class MemcachedStoreTest extends AbstractStoreTestCase
         return new MemcachedStore($memcached);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testAbortAfterExpiration()
     {
         $this->markTestSkipped('Memcached expects a TTL greater than 1 sec. Simulating a slow network is too hard');
diff --git a/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreFactoryTest.php b/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreFactoryTest.php
index aa13197..93a06da 100644
--- a/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreFactoryTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreFactoryTest.php
@@ -21,9 +21,8 @@ require_once __DIR__.'/stubs/mongodb.php';
 
 /**
  * @author Alexandre Daubois <alex.daubois@gmail.com>
- *
- * @requires extension mongodb
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('mongodb')]
 class MongoDbStoreFactoryTest extends TestCase
 {
     public function testCreateMongoDbCollectionStore()
diff --git a/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreTest.php
index 4f52e8e..80dd10c 100644
--- a/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/MongoDbStoreTest.php
@@ -27,10 +27,10 @@ require_once __DIR__.'/stubs/mongodb.php';
 /**
  * @author Joe Bennett <joe@assimtech.com>
  *
- * @requires extension mongodb
  *
- * @group integration
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('mongodb')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class MongoDbStoreTest extends AbstractStoreTestCase
 {
     use ExpiringStoreTestTrait;
@@ -79,9 +79,7 @@ class MongoDbStoreTest extends AbstractStoreTestCase
         $this->assertContains('expires_at_1', $indexes);
     }
 
-    /**
-     * @dataProvider provideConstructorArgs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstructorArgs')]
     public function testConstructionMethods($mongo, array $options)
     {
         $key = new Key(uniqid(__METHOD__, true));
@@ -157,9 +155,7 @@ class MongoDbStoreTest extends AbstractStoreTestCase
         $this->assertSame('lock_uri', $options['collection']);
     }
 
-    /**
-     * @dataProvider provideInvalidConstructorArgs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidConstructorArgs')]
     public function testInvalidConstructionMethods($mongo, array $options)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -178,9 +174,7 @@ class MongoDbStoreTest extends AbstractStoreTestCase
         yield ['mongodb://localhost/', []];
     }
 
-    /**
-     * @dataProvider provideUriCollectionStripArgs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUriCollectionStripArgs')]
     public function testUriCollectionStrip(string $uri, array $options, string $driverUri)
     {
         $store = new MongoDbStore($uri, $options);
diff --git a/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php
index 9425327..b14a466 100644
--- a/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php
@@ -18,9 +18,8 @@ use Symfony\Component\Lock\Store\PdoStore;
 
 /**
  * @author Jérémy Derussé <jeremy@derusse.com>
- *
- * @requires extension pdo_sqlite
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pdo_sqlite')]
 class PdoStoreTest extends AbstractStoreTestCase
 {
     use ExpiringStoreTestTrait;
@@ -50,6 +49,7 @@ class PdoStoreTest extends AbstractStoreTestCase
         return new PdoStore('sqlite:'.self::$dbFile);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testAbortAfterExpiration()
     {
         $this->markTestSkipped('Pdo expects a TTL greater than 1 sec. Simulating a slow network is too hard');
@@ -69,9 +69,7 @@ class PdoStoreTest extends AbstractStoreTestCase
         return new PdoStore('sqlite:'.self::$dbFile, [], 0.1, 0);
     }
 
-    /**
-     * @dataProvider provideDsnWithSQLite
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDsnWithSQLite')]
     public function testDsnWithSQLite(string $dsn, ?string $file = null)
     {
         $key = new Key(uniqid(__METHOD__, true));
@@ -95,11 +93,8 @@ class PdoStoreTest extends AbstractStoreTestCase
         yield 'SQLite in memory' => ['sqlite::memory:'];
     }
 
-    /**
-     * @requires extension pdo_pgsql
-     *
-     * @group integration
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pdo_pgsql')]
+    #[\PHPUnit\Framework\Attributes\Group('integration')]
     public function testDsnWithPostgreSQL()
     {
         if (!$host = getenv('POSTGRES_HOST')) {
diff --git a/src/Symfony/Component/Lock/Tests/Store/PostgreSqlStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/PostgreSqlStoreTest.php
index 3b54e20..89321c7 100644
--- a/src/Symfony/Component/Lock/Tests/Store/PostgreSqlStoreTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/PostgreSqlStoreTest.php
@@ -20,10 +20,10 @@ use Symfony\Component\Lock\Store\PostgreSqlStore;
 /**
  * @author Jérémy Derussé <jeremy@derusse.com>
  *
- * @requires extension pdo_pgsql
  *
- * @group integration
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pdo_pgsql')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class PostgreSqlStoreTest extends AbstractStoreTestCase
 {
     use BlockingStoreTestTrait;
@@ -45,9 +45,7 @@ class PostgreSqlStoreTest extends AbstractStoreTestCase
         return new PostgreSqlStore('pgsql:host='.$host, ['db_username' => 'postgres', 'db_password' => 'password']);
     }
 
-    /**
-     * @requires extension pdo_sqlite
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pdo_sqlite')]
     public function testInvalidDriver()
     {
         $store = new PostgreSqlStore('sqlite:/tmp/foo.db');
diff --git a/src/Symfony/Component/Lock/Tests/Store/PredisStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/PredisStoreTest.php
index 3569e3d..db18224 100644
--- a/src/Symfony/Component/Lock/Tests/Store/PredisStoreTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/PredisStoreTest.php
@@ -13,9 +13,8 @@ namespace Symfony\Component\Lock\Tests\Store;
 
 /**
  * @author Jérémy Derussé <jeremy@derusse.com>
- *
- * @group integration
  */
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class PredisStoreTest extends AbstractRedisStoreTestCase
 {
     public static function setUpBeforeClass(): void
diff --git a/src/Symfony/Component/Lock/Tests/Store/RedisArrayStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/RedisArrayStoreTest.php
index add9dbd..cf8767c 100644
--- a/src/Symfony/Component/Lock/Tests/Store/RedisArrayStoreTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/RedisArrayStoreTest.php
@@ -14,10 +14,10 @@ namespace Symfony\Component\Lock\Tests\Store;
 /**
  * @author Jérémy Derussé <jeremy@derusse.com>
  *
- * @requires extension redis
  *
- * @group integration
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('redis')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class RedisArrayStoreTest extends AbstractRedisStoreTestCase
 {
     public static function setUpBeforeClass(): void
diff --git a/src/Symfony/Component/Lock/Tests/Store/RedisClusterStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/RedisClusterStoreTest.php
index 1584f0d..391cf32 100644
--- a/src/Symfony/Component/Lock/Tests/Store/RedisClusterStoreTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/RedisClusterStoreTest.php
@@ -14,10 +14,10 @@ namespace Symfony\Component\Lock\Tests\Store;
 /**
  * @author Jérémy Derussé <jeremy@derusse.com>
  *
- * @requires extension redis
  *
- * @group integration
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('redis')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class RedisClusterStoreTest extends AbstractRedisStoreTestCase
 {
     public static function setUpBeforeClass(): void
diff --git a/src/Symfony/Component/Lock/Tests/Store/RedisProxyStoreFactoryTest.php b/src/Symfony/Component/Lock/Tests/Store/RedisProxyStoreFactoryTest.php
index e96c27e..60b8caa 100644
--- a/src/Symfony/Component/Lock/Tests/Store/RedisProxyStoreFactoryTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/RedisProxyStoreFactoryTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Cache\Traits\RedisProxy;
 use Symfony\Component\Lock\Store\RedisStore;
 use Symfony\Component\Lock\Store\StoreFactory;
 
-/**
- * @requires extension redis
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('redis')]
 class RedisProxyStoreFactoryTest extends TestCase
 {
     public function testCreateStore()
diff --git a/src/Symfony/Component/Lock/Tests/Store/RedisStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/RedisStoreTest.php
index e826f05..04e0007 100644
--- a/src/Symfony/Component/Lock/Tests/Store/RedisStoreTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/RedisStoreTest.php
@@ -17,10 +17,10 @@ use Symfony\Component\Lock\Store\RedisStore;
 /**
  * @author Jérémy Derussé <jeremy@derusse.com>
  *
- * @requires extension redis
  *
- * @group integration
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('redis')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class RedisStoreTest extends AbstractRedisStoreTestCase
 {
     use SharedLockStoreTestTrait;
diff --git a/src/Symfony/Component/Lock/Tests/Store/RelayStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/RelayStoreTest.php
index 3243367..8c12a15 100644
--- a/src/Symfony/Component/Lock/Tests/Store/RelayStoreTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/RelayStoreTest.php
@@ -15,11 +15,8 @@ use Relay\Relay;
 use Symfony\Component\Lock\Tests\Store\AbstractRedisStoreTestCase;
 use Symfony\Component\Lock\Tests\Store\SharedLockStoreTestTrait;
 
-/**
- * @requires extension relay
- *
- * @group integration
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('relay')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class RelayStoreTest extends AbstractRedisStoreTestCase
 {
     use SharedLockStoreTestTrait;
diff --git a/src/Symfony/Component/Lock/Tests/Store/SemaphoreStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/SemaphoreStoreTest.php
index c6106e4..c0f2758 100644
--- a/src/Symfony/Component/Lock/Tests/Store/SemaphoreStoreTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/SemaphoreStoreTest.php
@@ -17,9 +17,8 @@ use Symfony\Component\Lock\Store\SemaphoreStore;
 
 /**
  * @author Jérémy Derussé <jeremy@derusse.com>
- *
- * @requires extension sysvsem
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('sysvsem')]
 class SemaphoreStoreTest extends AbstractStoreTestCase
 {
     use BlockingStoreTestTrait;
diff --git a/src/Symfony/Component/Lock/Tests/Store/StoreFactoryTest.php b/src/Symfony/Component/Lock/Tests/Store/StoreFactoryTest.php
index 6d2319c..e7aead5 100644
--- a/src/Symfony/Component/Lock/Tests/Store/StoreFactoryTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/StoreFactoryTest.php
@@ -31,9 +31,7 @@ use Symfony\Component\Lock\Store\StoreFactory;
  */
 class StoreFactoryTest extends TestCase
 {
-    /**
-     * @dataProvider validConnections
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validConnections')]
     public function testCreateStore($connection, string $expectedStoreClass)
     {
         $store = StoreFactory::createStore($connection);
diff --git a/src/Symfony/Component/Lock/Tests/Store/ZookeeperStoreFactoryTest.php b/src/Symfony/Component/Lock/Tests/Store/ZookeeperStoreFactoryTest.php
index 97357b8..0c41594 100644
--- a/src/Symfony/Component/Lock/Tests/Store/ZookeeperStoreFactoryTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/ZookeeperStoreFactoryTest.php
@@ -17,9 +17,8 @@ use Symfony\Component\Lock\Store\ZookeeperStore;
 
 /**
  * @author Alexandre Daubois <alex.daubois@gmail.com>
- *
- * @requires extension zookeeper
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('zookeeper')]
 class ZookeeperStoreFactoryTest extends TestCase
 {
     public function testCreateZooKeeperStore()
diff --git a/src/Symfony/Component/Lock/Tests/Store/ZookeeperStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/ZookeeperStoreTest.php
index 4a5e681..f02b0a5 100644
--- a/src/Symfony/Component/Lock/Tests/Store/ZookeeperStoreTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/ZookeeperStoreTest.php
@@ -18,10 +18,10 @@ use Symfony\Component\Lock\Store\ZookeeperStore;
 /**
  * @author Ganesh Chandrasekaran <gchandrasekaran@wayfair.com>
  *
- * @requires extension zookeeper
  *
- * @group integration
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('zookeeper')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class ZookeeperStoreTest extends AbstractStoreTestCase
 {
     use UnserializableTestTrait;
@@ -35,9 +35,7 @@ class ZookeeperStoreTest extends AbstractStoreTestCase
         return StoreFactory::createStore($zookeeper);
     }
 
-    /**
-     * @dataProvider provideValidConnectionString
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidConnectionString')]
     public function testCreateConnection(string $connectionString)
     {
         $this->assertInstanceOf(\Zookeeper::class, ZookeeperStore::createConnection($connectionString));
diff --git a/src/Symfony/Component/Lock/Tests/Strategy/ConsensusStrategyTest.php b/src/Symfony/Component/Lock/Tests/Strategy/ConsensusStrategyTest.php
index 1f46510..e43cae3 100644
--- a/src/Symfony/Component/Lock/Tests/Strategy/ConsensusStrategyTest.php
+++ b/src/Symfony/Component/Lock/Tests/Strategy/ConsensusStrategyTest.php
@@ -70,17 +70,13 @@ class ConsensusStrategyTest extends TestCase
         yield [0, 0, 2, true];
     }
 
-    /**
-     * @dataProvider provideMetResults
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMetResults')]
     public function testMet($success, $failure, $total, $isMet)
     {
         $this->assertSame($isMet, $this->strategy->isMet($success, $total));
     }
 
-    /**
-     * @dataProvider provideIndeterminate
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIndeterminate')]
     public function testCanBeMet($success, $failure, $total, $isMet)
     {
         $this->assertSame($isMet, $this->strategy->canBeMet($failure, $total));
diff --git a/src/Symfony/Component/Lock/Tests/Strategy/UnanimousStrategyTest.php b/src/Symfony/Component/Lock/Tests/Strategy/UnanimousStrategyTest.php
index 3dc0023..f14265a 100644
--- a/src/Symfony/Component/Lock/Tests/Strategy/UnanimousStrategyTest.php
+++ b/src/Symfony/Component/Lock/Tests/Strategy/UnanimousStrategyTest.php
@@ -70,17 +70,13 @@ class UnanimousStrategyTest extends TestCase
         yield [0, 0, 2, true];
     }
 
-    /**
-     * @dataProvider provideMetResults
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMetResults')]
     public function testMet($success, $failure, $total, $isMet)
     {
         $this->assertSame($isMet, $this->strategy->isMet($success, $total));
     }
 
-    /**
-     * @dataProvider provideIndeterminate
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIndeterminate')]
     public function testCanBeMet($success, $failure, $total, $isMet)
     {
         $this->assertSame($isMet, $this->strategy->canBeMet($failure, $total));
diff --git a/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiAsyncAwsTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiAsyncAwsTransportTest.php
index 42fbf74..91f0fdf 100644
--- a/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiAsyncAwsTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiAsyncAwsTransportTest.php
@@ -26,9 +26,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
 
 class SesApiAsyncAwsTransportTest extends TestCase
 {
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(SesApiAsyncAwsTransport $transport, string $expected)
     {
         $this->assertSame($expected, (string) $transport);
diff --git a/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpAsyncAwsTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpAsyncAwsTransportTest.php
index e4cd8ca..11e0e37 100644
--- a/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpAsyncAwsTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpAsyncAwsTransportTest.php
@@ -26,9 +26,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
 
 class SesHttpAsyncAwsTransportTest extends TestCase
 {
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(SesHttpAsyncAwsTransport $transport, string $expected)
     {
         $this->assertSame($expected, (string) $transport);
diff --git a/src/Symfony/Component/Mailer/Bridge/Brevo/Tests/Transport/BrevoApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Brevo/Tests/Transport/BrevoApiTransportTest.php
index 0b76234..76fc6c4 100644
--- a/src/Symfony/Component/Mailer/Bridge/Brevo/Tests/Transport/BrevoApiTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Brevo/Tests/Transport/BrevoApiTransportTest.php
@@ -26,9 +26,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
 
 class BrevoApiTransportTest extends TestCase
 {
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(BrevoApiTransport $transport, string $expected)
     {
         $this->assertSame($expected, (string) $transport);
diff --git a/src/Symfony/Component/Mailer/Bridge/MailPace/Tests/Transport/MailPaceApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/MailPace/Tests/Transport/MailPaceApiTransportTest.php
index 25403ab..3bae054 100644
--- a/src/Symfony/Component/Mailer/Bridge/MailPace/Tests/Transport/MailPaceApiTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/MailPace/Tests/Transport/MailPaceApiTransportTest.php
@@ -25,9 +25,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
 
 final class MailPaceApiTransportTest extends TestCase
 {
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(MailPaceApiTransport $transport, string $expected)
     {
         $this->assertSame($expected, (string) $transport);
diff --git a/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillApiTransportTest.php
index b32d9e6..aeaa23f 100644
--- a/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillApiTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillApiTransportTest.php
@@ -25,9 +25,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
 
 class MandrillApiTransportTest extends TestCase
 {
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(MandrillApiTransport $transport, string $expected)
     {
         $this->assertSame($expected, (string) $transport);
diff --git a/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillHttpTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillHttpTransportTest.php
index 8a9d068..7e71ac6 100644
--- a/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillHttpTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillHttpTransportTest.php
@@ -24,9 +24,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
 
 class MandrillHttpTransportTest extends TestCase
 {
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(MandrillHttpTransport $transport, string $expected)
     {
         $this->assertSame($expected, (string) $transport);
diff --git a/src/Symfony/Component/Mailer/Bridge/MailerSend/Tests/Transport/MailerSendApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/MailerSend/Tests/Transport/MailerSendApiTransportTest.php
index a1aba49..d16a432 100644
--- a/src/Symfony/Component/Mailer/Bridge/MailerSend/Tests/Transport/MailerSendApiTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/MailerSend/Tests/Transport/MailerSendApiTransportTest.php
@@ -24,9 +24,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
 
 class MailerSendApiTransportTest extends TestCase
 {
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(MailerSendApiTransport $transport, string $expected)
     {
         $this->assertSame($expected, (string) $transport);
diff --git a/src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunApiTransportTest.php
index 0887978..807827b 100644
--- a/src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunApiTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunApiTransportTest.php
@@ -26,9 +26,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
 
 class MailgunApiTransportTest extends TestCase
 {
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(MailgunApiTransport $transport, string $expected)
     {
         $this->assertSame($expected, (string) $transport);
diff --git a/src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunHttpTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunHttpTransportTest.php
index 8144a7e..eb0ceb1 100644
--- a/src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunHttpTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunHttpTransportTest.php
@@ -24,9 +24,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
 
 class MailgunHttpTransportTest extends TestCase
 {
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(MailgunHttpTransport $transport, string $expected)
     {
         $this->assertSame($expected, (string) $transport);
diff --git a/src/Symfony/Component/Mailer/Bridge/Mailjet/Tests/Transport/MailjetApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Mailjet/Tests/Transport/MailjetApiTransportTest.php
index 424adcc..8e478e3 100644
--- a/src/Symfony/Component/Mailer/Bridge/Mailjet/Tests/Transport/MailjetApiTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Mailjet/Tests/Transport/MailjetApiTransportTest.php
@@ -26,9 +26,7 @@ class MailjetApiTransportTest extends TestCase
     protected const USER = 'u$er';
     protected const PASSWORD = 'pa$s';
 
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(MailjetApiTransport $transport, string $expected)
     {
         $this->assertSame($expected, (string) $transport);
@@ -237,9 +235,7 @@ class MailjetApiTransportTest extends TestCase
         $transport->send($email);
     }
 
-    /**
-     * @dataProvider getMalformedResponse
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getMalformedResponse')]
     public function testSendWithMalformedResponse(array $body)
     {
         $json = json_encode($body);
diff --git a/src/Symfony/Component/Mailer/Bridge/OhMySmtp/Tests/Transport/OhMySmtpApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/OhMySmtp/Tests/Transport/OhMySmtpApiTransportTest.php
index 61e151e..b427f52 100644
--- a/src/Symfony/Component/Mailer/Bridge/OhMySmtp/Tests/Transport/OhMySmtpApiTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/OhMySmtp/Tests/Transport/OhMySmtpApiTransportTest.php
@@ -22,14 +22,10 @@ use Symfony\Component\Mime\Address;
 use Symfony\Component\Mime\Email;
 use Symfony\Contracts\HttpClient\ResponseInterface;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 final class OhMySmtpApiTransportTest extends TestCase
 {
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(OhMySmtpApiTransport $transport, string $expected)
     {
         $this->assertSame($expected, (string) $transport);
diff --git a/src/Symfony/Component/Mailer/Bridge/OhMySmtp/Tests/Transport/OhMySmtpSmtpTransportTest.php b/src/Symfony/Component/Mailer/Bridge/OhMySmtp/Tests/Transport/OhMySmtpSmtpTransportTest.php
index edbd506..432f8f9 100644
--- a/src/Symfony/Component/Mailer/Bridge/OhMySmtp/Tests/Transport/OhMySmtpSmtpTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/OhMySmtp/Tests/Transport/OhMySmtpSmtpTransportTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Mailer\Bridge\OhMySmtp\Transport\OhMySmtpSmtpTransport;
 use Symfony\Component\Mailer\Header\TagHeader;
 use Symfony\Component\Mime\Email;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 final class OhMySmtpSmtpTransportTest extends TestCase
 {
     public function testCustomHeader()
diff --git a/src/Symfony/Component/Mailer/Bridge/OhMySmtp/Tests/Transport/OhMySmtpTransportFactoryTest.php b/src/Symfony/Component/Mailer/Bridge/OhMySmtp/Tests/Transport/OhMySmtpTransportFactoryTest.php
index 503f041..0ef0635 100644
--- a/src/Symfony/Component/Mailer/Bridge/OhMySmtp/Tests/Transport/OhMySmtpTransportFactoryTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/OhMySmtp/Tests/Transport/OhMySmtpTransportFactoryTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\Mailer\Test\TransportFactoryTestCase;
 use Symfony\Component\Mailer\Transport\Dsn;
 use Symfony\Component\Mailer\Transport\TransportFactoryInterface;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 final class OhMySmtpTransportFactoryTest extends TransportFactoryTestCase
 {
     public function getFactory(): TransportFactoryInterface
diff --git a/src/Symfony/Component/Mailer/Bridge/Postmark/Tests/Transport/PostmarkApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Postmark/Tests/Transport/PostmarkApiTransportTest.php
index 5135ac7..c99348f 100644
--- a/src/Symfony/Component/Mailer/Bridge/Postmark/Tests/Transport/PostmarkApiTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Postmark/Tests/Transport/PostmarkApiTransportTest.php
@@ -27,9 +27,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
 
 class PostmarkApiTransportTest extends TestCase
 {
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(PostmarkApiTransport $transport, string $expected)
     {
         $this->assertSame($expected, (string) $transport);
diff --git a/src/Symfony/Component/Mailer/Bridge/Scaleway/Tests/Transport/ScalewayApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Scaleway/Tests/Transport/ScalewayApiTransportTest.php
index f31e041..302261a 100644
--- a/src/Symfony/Component/Mailer/Bridge/Scaleway/Tests/Transport/ScalewayApiTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Scaleway/Tests/Transport/ScalewayApiTransportTest.php
@@ -23,9 +23,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
 
 class ScalewayApiTransportTest extends TestCase
 {
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(ScalewayApiTransport $transport, string $expected)
     {
         $this->assertSame($expected, (string) $transport);
diff --git a/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/RemoteEvent/SendgridPayloadConverterTest.php b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/RemoteEvent/SendgridPayloadConverterTest.php
index 1aac8e0..2c3cc9d 100644
--- a/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/RemoteEvent/SendgridPayloadConverterTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/RemoteEvent/SendgridPayloadConverterTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\RemoteEvent\Exception\ParseException;
 
 class SendgridPayloadConverterTest extends TestCase
 {
-    /**
-     * @dataProvider provideDeliveryEvents
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDeliveryEvents')]
     public function testMailDeliveryEvent(string $event, string $expectedEventName)
     {
         $converter = new SendgridPayloadConverter();
@@ -50,9 +48,7 @@ class SendgridPayloadConverterTest extends TestCase
         yield ['deferred', MailerDeliveryEvent::DEFERRED];
     }
 
-    /**
-     * @dataProvider provideEngagementEvents
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEngagementEvents')]
     public function testMailEngagementEvent(string $event, string $expectedEventName)
     {
         $converter = new SendgridPayloadConverter();
diff --git a/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Transport/SendgridApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Transport/SendgridApiTransportTest.php
index 4196d08..ca05e6b 100644
--- a/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Transport/SendgridApiTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Transport/SendgridApiTransportTest.php
@@ -24,9 +24,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
 
 class SendgridApiTransportTest extends TestCase
 {
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(SendgridApiTransport $transport, string $expected)
     {
         $this->assertSame($expected, (string) $transport);
diff --git a/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Webhook/SendgridSignedRequestParserTest.php b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Webhook/SendgridSignedRequestParserTest.php
index bc4ed7c..f871318 100644
--- a/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Webhook/SendgridSignedRequestParserTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Webhook/SendgridSignedRequestParserTest.php
@@ -19,9 +19,8 @@ use Symfony\Component\Webhook\Test\AbstractRequestParserTestCase;
 
 /**
  * @author WoutervanderLoop.nl <info@woutervanderloop.nl>
- *
- * @requires extension openssl
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('openssl')]
 class SendgridSignedRequestParserTest extends AbstractRequestParserTestCase
 {
     protected function createRequestParser(): RequestParserInterface
diff --git a/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Webhook/SendgridWrongSecretRequestParserTest.php b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Webhook/SendgridWrongSecretRequestParserTest.php
index 055bc84..df9fdef 100644
--- a/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Webhook/SendgridWrongSecretRequestParserTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Webhook/SendgridWrongSecretRequestParserTest.php
@@ -20,9 +20,8 @@ use Symfony\Component\Webhook\Test\AbstractRequestParserTestCase;
 
 /**
  * @author WoutervanderLoop.nl <info@woutervanderloop.nl>
- *
- * @requires extension openssl
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('openssl')]
 class SendgridWrongSecretRequestParserTest extends AbstractRequestParserTestCase
 {
     protected function createRequestParser(): RequestParserInterface
diff --git a/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Webhook/SendgridWrongSignatureRequestParserTest.php b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Webhook/SendgridWrongSignatureRequestParserTest.php
index 0b2cfe2..9953bc0 100644
--- a/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Webhook/SendgridWrongSignatureRequestParserTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Webhook/SendgridWrongSignatureRequestParserTest.php
@@ -20,9 +20,8 @@ use Symfony\Component\Webhook\Test\AbstractRequestParserTestCase;
 
 /**
  * @author WoutervanderLoop.nl <info@woutervanderloop.nl>
- *
- * @requires extension openssl
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('openssl')]
 class SendgridWrongSignatureRequestParserTest extends AbstractRequestParserTestCase
 {
     protected function createRequestParser(): RequestParserInterface
diff --git a/src/Symfony/Component/Mailer/Bridge/Sendinblue/Tests/Transport/SendinblueApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Sendinblue/Tests/Transport/SendinblueApiTransportTest.php
index 1adcab5..ac893cc 100644
--- a/src/Symfony/Component/Mailer/Bridge/Sendinblue/Tests/Transport/SendinblueApiTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Sendinblue/Tests/Transport/SendinblueApiTransportTest.php
@@ -24,14 +24,10 @@ use Symfony\Component\Mime\Email;
 use Symfony\Component\Mime\Part\DataPart;
 use Symfony\Contracts\HttpClient\ResponseInterface;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class SendinblueApiTransportTest extends TestCase
 {
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(SendinblueApiTransport $transport, string $expected)
     {
         $this->assertSame($expected, (string) $transport);
diff --git a/src/Symfony/Component/Mailer/Bridge/Sendinblue/Tests/Transport/SendinblueTransportFactoryTest.php b/src/Symfony/Component/Mailer/Bridge/Sendinblue/Tests/Transport/SendinblueTransportFactoryTest.php
index fbcc27c..637c531 100644
--- a/src/Symfony/Component/Mailer/Bridge/Sendinblue/Tests/Transport/SendinblueTransportFactoryTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Sendinblue/Tests/Transport/SendinblueTransportFactoryTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\Mailer\Test\TransportFactoryTestCase;
 use Symfony\Component\Mailer\Transport\Dsn;
 use Symfony\Component\Mailer\Transport\TransportFactoryInterface;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class SendinblueTransportFactoryTest extends TransportFactoryTestCase
 {
     public function getFactory(): TransportFactoryInterface
diff --git a/src/Symfony/Component/Mailer/Test/TransportFactoryTestCase.php b/src/Symfony/Component/Mailer/Test/TransportFactoryTestCase.php
index e698c4d..0d0af28 100644
--- a/src/Symfony/Component/Mailer/Test/TransportFactoryTestCase.php
+++ b/src/Symfony/Component/Mailer/Test/TransportFactoryTestCase.php
@@ -51,9 +51,7 @@ abstract class TransportFactoryTestCase extends TestCase
         return [];
     }
 
-    /**
-     * @dataProvider supportsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('supportsProvider')]
     public function testSupports(Dsn $dsn, bool $supports)
     {
         $factory = $this->getFactory();
@@ -61,9 +59,7 @@ abstract class TransportFactoryTestCase extends TestCase
         $this->assertSame($supports, $factory->supports($dsn));
     }
 
-    /**
-     * @dataProvider createProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('createProvider')]
     public function testCreate(Dsn $dsn, TransportInterface $transport)
     {
         $factory = $this->getFactory();
@@ -74,9 +70,7 @@ abstract class TransportFactoryTestCase extends TestCase
         }
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testUnsupportedSchemeException(Dsn $dsn, ?string $message = null)
     {
         $factory = $this->getFactory();
@@ -89,9 +83,7 @@ abstract class TransportFactoryTestCase extends TestCase
         $factory->create($dsn);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testIncompleteDsnException(Dsn $dsn)
     {
         $factory = $this->getFactory();
diff --git a/src/Symfony/Component/Mailer/Tests/EventListener/MessageListenerTest.php b/src/Symfony/Component/Mailer/Tests/EventListener/MessageListenerTest.php
index 5f5def7..caf0ba7 100644
--- a/src/Symfony/Component/Mailer/Tests/EventListener/MessageListenerTest.php
+++ b/src/Symfony/Component/Mailer/Tests/EventListener/MessageListenerTest.php
@@ -23,9 +23,7 @@ use Symfony\Component\Mime\Message;
 
 class MessageListenerTest extends TestCase
 {
-    /**
-     * @dataProvider provideHeaders
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideHeaders')]
     public function testHeaders(Headers $initialHeaders, Headers $defaultHeaders, Headers $expectedHeaders, array $rules = MessageListener::DEFAULT_RULES)
     {
         $message = new Message($initialHeaders);
diff --git a/src/Symfony/Component/Mailer/Tests/Exception/UnsupportedSchemeExceptionTest.php b/src/Symfony/Component/Mailer/Tests/Exception/UnsupportedSchemeExceptionTest.php
index c650183..867608c 100644
--- a/src/Symfony/Component/Mailer/Tests/Exception/UnsupportedSchemeExceptionTest.php
+++ b/src/Symfony/Component/Mailer/Tests/Exception/UnsupportedSchemeExceptionTest.php
@@ -30,9 +30,7 @@ use Symfony\Component\Mailer\Bridge\Sendinblue\Transport\SendinblueTransportFact
 use Symfony\Component\Mailer\Exception\UnsupportedSchemeException;
 use Symfony\Component\Mailer\Transport\Dsn;
 
-/**
- * @runTestsInSeparateProcesses
- */
+#[\PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses]
 final class UnsupportedSchemeExceptionTest extends TestCase
 {
     public static function setUpBeforeClass(): void
@@ -56,9 +54,7 @@ final class UnsupportedSchemeExceptionTest extends TestCase
         ]);
     }
 
-    /**
-     * @dataProvider messageWhereSchemeIsPartOfSchemeToPackageMapProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('messageWhereSchemeIsPartOfSchemeToPackageMapProvider')]
     public function testMessageWhereSchemeIsPartOfSchemeToPackageMap(string $scheme, string $package)
     {
         $dsn = new Dsn($scheme, 'localhost');
@@ -87,9 +83,7 @@ final class UnsupportedSchemeExceptionTest extends TestCase
         yield ['ses', 'symfony/amazon-mailer'];
     }
 
-    /**
-     * @dataProvider messageWhereSchemeIsNotPartOfSchemeToPackageMapProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('messageWhereSchemeIsNotPartOfSchemeToPackageMapProvider')]
     public function testMessageWhereSchemeIsNotPartOfSchemeToPackageMap(string $expected, Dsn $dsn, ?string $name, array $supported)
     {
         $this->assertSame(
diff --git a/src/Symfony/Component/Mailer/Tests/Transport/AbstractTransportTest.php b/src/Symfony/Component/Mailer/Tests/Transport/AbstractTransportTest.php
index 19d574f..5e0a500 100644
--- a/src/Symfony/Component/Mailer/Tests/Transport/AbstractTransportTest.php
+++ b/src/Symfony/Component/Mailer/Tests/Transport/AbstractTransportTest.php
@@ -28,9 +28,7 @@ use Symfony\Component\Mime\RawMessage;
 use Twig\Environment;
 use Twig\Loader\ArrayLoader;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class AbstractTransportTest extends TestCase
 {
     public function testThrottling()
diff --git a/src/Symfony/Component/Mailer/Tests/Transport/DsnTest.php b/src/Symfony/Component/Mailer/Tests/Transport/DsnTest.php
index f0c0a8f..8c51167 100644
--- a/src/Symfony/Component/Mailer/Tests/Transport/DsnTest.php
+++ b/src/Symfony/Component/Mailer/Tests/Transport/DsnTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Mailer\Transport\Dsn;
 
 class DsnTest extends TestCase
 {
-    /**
-     * @dataProvider fromStringProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('fromStringProvider')]
     public function testFromString(string $string, Dsn $dsn)
     {
         $this->assertEquals($dsn, Dsn::fromString($string));
@@ -35,9 +33,7 @@ class DsnTest extends TestCase
         $this->assertSame('default', $dsn->getOption('not_existent_property', 'default'));
     }
 
-    /**
-     * @dataProvider invalidDsnProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidDsnProvider')]
     public function testInvalidDsn(string $dsn, string $exceptionMessage)
     {
         $this->expectException(InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Mailer/Tests/Transport/FailoverTransportTest.php b/src/Symfony/Component/Mailer/Tests/Transport/FailoverTransportTest.php
index 37063a5..86150ba 100644
--- a/src/Symfony/Component/Mailer/Tests/Transport/FailoverTransportTest.php
+++ b/src/Symfony/Component/Mailer/Tests/Transport/FailoverTransportTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\Mailer\Transport\RoundRobinTransport;
 use Symfony\Component\Mailer\Transport\TransportInterface;
 use Symfony\Component\Mime\RawMessage;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class FailoverTransportTest extends TestCase
 {
     public function testSendNoTransports()
@@ -82,9 +80,7 @@ class FailoverTransportTest extends TestCase
         $this->assertTransports($t, 0, [$t1]);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testSendOneDeadAndRecoveryWithinRetryPeriod()
     {
         $t1 = $this->createMock(TransportInterface::class);
@@ -93,7 +89,7 @@ class FailoverTransportTest extends TestCase
         $t1->expects($t1Matcher)
             ->method('send')
             ->willReturnCallback(function () use ($t1Matcher) {
-                if (1 === $t1Matcher->getInvocationCount()) {
+                if (1 === $t1Matcher->numberOfInvocations()) {
                     throw new TransportException();
                 }
 
@@ -105,7 +101,7 @@ class FailoverTransportTest extends TestCase
         $t2->expects($t2Matcher)
             ->method('send')
             ->willReturnCallback(function () use ($t2Matcher) {
-                if (4 === $t2Matcher->getInvocationCount()) {
+                if (4 === $t2Matcher->numberOfInvocations()) {
                     throw new TransportException();
                 }
 
@@ -129,9 +125,7 @@ class FailoverTransportTest extends TestCase
         $this->assertTransports($t, 1, [$t2]);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testSendAllDeadWithinRetryPeriod()
     {
         $t1 = $this->createMock(TransportInterface::class);
@@ -142,7 +136,7 @@ class FailoverTransportTest extends TestCase
         $t2->expects($matcher)
             ->method('send')
             ->willReturnCallback(function () use ($matcher) {
-                if (3 === $matcher->getInvocationCount()) {
+                if (3 === $matcher->numberOfInvocations()) {
                     throw new TransportException();
                 }
 
@@ -158,15 +152,13 @@ class FailoverTransportTest extends TestCase
         $t->send(new RawMessage(''));
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testSendOneDeadButRecover()
     {
         $t1Matcher = $this->any();
         $t1 = $this->createMock(TransportInterface::class);
         $t1->expects($t1Matcher)->method('send')->willReturnCallback(function () use ($t1Matcher) {
-            if (1 === $t1Matcher->getInvocationCount()) {
+            if (1 === $t1Matcher->numberOfInvocations()) {
                 throw new TransportException();
             }
 
@@ -178,7 +170,7 @@ class FailoverTransportTest extends TestCase
         $t2->expects($matcher)
             ->method('send')
             ->willReturnCallback(function () use ($matcher) {
-                if (3 === $matcher->getInvocationCount()) {
+                if (3 === $matcher->numberOfInvocations()) {
                     throw new TransportException();
                 }
 
diff --git a/src/Symfony/Component/Mailer/Tests/Transport/NativeTransportFactoryTest.php b/src/Symfony/Component/Mailer/Tests/Transport/NativeTransportFactoryTest.php
index 28b3c2c..d7dabb7 100644
--- a/src/Symfony/Component/Mailer/Tests/Transport/NativeTransportFactoryTest.php
+++ b/src/Symfony/Component/Mailer/Tests/Transport/NativeTransportFactoryTest.php
@@ -73,9 +73,7 @@ EOT;
         yield ['native://default', '', '', '25'];
     }
 
-    /**
-     * @dataProvider provideCreateSendmailWithNoHostOrNoPort
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCreateSendmailWithNoHostOrNoPort')]
     public function testCreateSendmailWithNoHostOrNoPort(string $dsn, string $sendmaiPath, string $smtp, string $smtpPort)
     {
         if ('\\' !== \DIRECTORY_SEPARATOR) {
@@ -113,9 +111,7 @@ EOT;
         }
     }
 
-    /**
-     * @dataProvider provideCreate
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCreate')]
     public function testCreate(string $dsn, string $sendmailPath, string $smtp, string $smtpPort, TransportInterface $expectedTransport)
     {
         self::$fakeConfiguration = [
diff --git a/src/Symfony/Component/Mailer/Tests/Transport/RoundRobinTransportTest.php b/src/Symfony/Component/Mailer/Tests/Transport/RoundRobinTransportTest.php
index 070b4bf..41b5303 100644
--- a/src/Symfony/Component/Mailer/Tests/Transport/RoundRobinTransportTest.php
+++ b/src/Symfony/Component/Mailer/Tests/Transport/RoundRobinTransportTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\Mime\Header\Headers;
 use Symfony\Component\Mime\Message;
 use Symfony\Component\Mime\RawMessage;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class RoundRobinTransportTest extends TestCase
 {
     public function testSendNoTransports()
@@ -115,9 +113,7 @@ class RoundRobinTransportTest extends TestCase
         $this->assertTransports($t, 1, [$t2]);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testSendOneDeadAndRecoveryWithinRetryPeriod()
     {
         $t1 = $this->createMock(TransportInterface::class);
@@ -128,7 +124,7 @@ class RoundRobinTransportTest extends TestCase
         $t2->expects($matcher)
             ->method('send')
             ->willReturnCallback(function () use ($matcher) {
-                if (1 === $matcher->getInvocationCount()) {
+                if (1 === $matcher->numberOfInvocations()) {
                     throw new TransportException();
                 }
 
diff --git a/src/Symfony/Component/Mailer/Tests/Transport/Smtp/SmtpTransportTest.php b/src/Symfony/Component/Mailer/Tests/Transport/Smtp/SmtpTransportTest.php
index ad64349..46cae4c 100644
--- a/src/Symfony/Component/Mailer/Tests/Transport/Smtp/SmtpTransportTest.php
+++ b/src/Symfony/Component/Mailer/Tests/Transport/Smtp/SmtpTransportTest.php
@@ -28,9 +28,7 @@ use Symfony\Component\Mime\Part\File;
 use Symfony\Component\Mime\RawMessage;
 use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class SmtpTransportTest extends TestCase
 {
     public function testToString()
diff --git a/src/Symfony/Component/Mailer/Tests/Transport/Smtp/Stream/AbstractStreamTest.php b/src/Symfony/Component/Mailer/Tests/Transport/Smtp/Stream/AbstractStreamTest.php
index aeb2834..c3df479 100644
--- a/src/Symfony/Component/Mailer/Tests/Transport/Smtp/Stream/AbstractStreamTest.php
+++ b/src/Symfony/Component/Mailer/Tests/Transport/Smtp/Stream/AbstractStreamTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Mailer\Transport\Smtp\Stream\AbstractStream;
 
 class AbstractStreamTest extends TestCase
 {
-    /**
-     * @dataProvider provideReplace
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideReplace')]
     public function testReplace(string $expected, string $from, string $to, array $chunks)
     {
         $result = '';
diff --git a/src/Symfony/Component/Mailer/Tests/Transport/Smtp/Stream/SocketStreamTest.php b/src/Symfony/Component/Mailer/Tests/Transport/Smtp/Stream/SocketStreamTest.php
index 7fba79f..0eee923 100644
--- a/src/Symfony/Component/Mailer/Tests/Transport/Smtp/Stream/SocketStreamTest.php
+++ b/src/Symfony/Component/Mailer/Tests/Transport/Smtp/Stream/SocketStreamTest.php
@@ -27,9 +27,7 @@ class SocketStreamTest extends TestCase
         $s->initialize();
     }
 
-    /**
-     * @group network
-     */
+    #[\PHPUnit\Framework\Attributes\Group('network')]
     public function testSocketErrorBeforeConnectError()
     {
         $this->expectException(TransportException::class);
diff --git a/src/Symfony/Component/Mailer/Tests/TransportTest.php b/src/Symfony/Component/Mailer/Tests/TransportTest.php
index 9ba8377..1877b68 100644
--- a/src/Symfony/Component/Mailer/Tests/TransportTest.php
+++ b/src/Symfony/Component/Mailer/Tests/TransportTest.php
@@ -24,9 +24,7 @@ use Symfony\Component\Mime\RawMessage;
 
 class TransportTest extends TestCase
 {
-    /**
-     * @dataProvider fromStringProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('fromStringProvider')]
     public function testFromString(string $dsn, TransportInterface $transport)
     {
         $transportFactory = new Transport([new DummyTransportFactory()]);
@@ -60,9 +58,7 @@ class TransportTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider fromDsnProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('fromDsnProvider')]
     public function testFromDsn(string $dsn, TransportInterface $transport)
     {
         $this->assertEquals($transport, Transport::fromDsn($dsn));
@@ -76,9 +72,7 @@ class TransportTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider fromWrongStringProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('fromWrongStringProvider')]
     public function testFromWrongString(string $dsn, string $error)
     {
         $transportFactory = new Transport([new DummyTransportFactory()]);
diff --git a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/AmazonSqsIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/AmazonSqsIntegrationTest.php
index 189a4e5..eeb4a43 100644
--- a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/AmazonSqsIntegrationTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/AmazonSqsIntegrationTest.php
@@ -16,9 +16,7 @@ use PHPUnit\Framework\TestCase;
 use Symfony\Component\Messenger\Bridge\AmazonSqs\Tests\Fixtures\DummyMessage;
 use Symfony\Component\Messenger\Bridge\AmazonSqs\Transport\Connection;
 
-/**
- * @group integration
- */
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class AmazonSqsIntegrationTest extends TestCase
 {
     public function testConnectionSendToFifoQueueAndGet()
diff --git a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/ConnectionTest.php b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/ConnectionTest.php
index c37f097..c8e755e 100644
--- a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/ConnectionTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/ConnectionTest.php
@@ -282,9 +282,7 @@ class ConnectionTest extends TestCase
         $connection->get();
     }
 
-    /**
-     * @dataProvider provideQueueUrl
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideQueueUrl')]
     public function testInjectQueueUrl(string $dsn, string $queueUrl)
     {
         $connection = Connection::fromDsn($dsn);
@@ -302,9 +300,7 @@ class ConnectionTest extends TestCase
         yield ['https://sqs.us-east-2.amazonaws.com/123456/queue?auto_setup=1', 'https://sqs.us-east-2.amazonaws.com/123456/queue'];
     }
 
-    /**
-     * @dataProvider provideNotQueueUrl
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNotQueueUrl')]
     public function testNotInjectQueueUrl(string $dsn)
     {
         $connection = Connection::fromDsn($dsn);
diff --git a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpExtIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpExtIntegrationTest.php
index 2ccaa4c..e525ec0 100644
--- a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpExtIntegrationTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpExtIntegrationTest.php
@@ -31,11 +31,8 @@ use Symfony\Component\Serializer\Encoder\JsonEncoder;
 use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer;
 use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
 
-/**
- * @requires extension amqp
- *
- * @group integration
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('amqp')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class AmqpExtIntegrationTest extends TestCase
 {
     protected function setUp(): void
@@ -273,7 +270,7 @@ TXT
         if (method_exists($this, 'assertEqualsWithDelta')) {
             $this->assertEqualsWithDelta($expectedDuration, $actualDuration, .5, 'Duration was not within expected range');
         } else {
-            $this->assertEquals($expectedDuration, $actualDuration, 'Duration was not within expected range', .5);
+            $this->assertEqualsWithDelta($expectedDuration, $actualDuration, .5, 'Duration was not within expected range');
         }
     }
 
diff --git a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpReceivedStampTest.php b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpReceivedStampTest.php
index bbb3151..607b773 100644
--- a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpReceivedStampTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpReceivedStampTest.php
@@ -14,9 +14,7 @@ namespace Symfony\Component\Messenger\Bridge\Amqp\Tests\Transport;
 use PHPUnit\Framework\TestCase;
 use Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpReceivedStamp;
 
-/**
- * @requires extension amqp
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('amqp')]
 class AmqpReceivedStampTest extends TestCase
 {
     public function testStamp()
diff --git a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpReceiverTest.php b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpReceiverTest.php
index 9dd86dc..b0db4dd 100644
--- a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpReceiverTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpReceiverTest.php
@@ -24,9 +24,7 @@ use Symfony\Component\Serializer as SerializerComponent;
 use Symfony\Component\Serializer\Encoder\JsonEncoder;
 use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
 
-/**
- * @requires extension amqp
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('amqp')]
 class AmqpReceiverTest extends TestCase
 {
     public function testItReturnsTheDecodedMessageToTheHandler()
diff --git a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpSenderTest.php b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpSenderTest.php
index b1dda96..6862844 100644
--- a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpSenderTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpSenderTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\Messenger\Envelope;
 use Symfony\Component\Messenger\Exception\TransportException;
 use Symfony\Component\Messenger\Transport\Serialization\SerializerInterface;
 
-/**
- * @requires extension amqp
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('amqp')]
 class AmqpSenderTest extends TestCase
 {
     public function testItSendsTheEncodedMessage()
diff --git a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpStampTest.php b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpStampTest.php
index d523610..f6cfdd3 100644
--- a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpStampTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpStampTest.php
@@ -14,9 +14,7 @@ namespace Symfony\Component\Messenger\Bridge\Amqp\Tests\Transport;
 use PHPUnit\Framework\TestCase;
 use Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpStamp;
 
-/**
- * @requires extension amqp
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('amqp')]
 class AmqpStampTest extends TestCase
 {
     public function testRoutingKeyOnly()
diff --git a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpTransportFactoryTest.php b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpTransportFactoryTest.php
index 074d0ab..c4b5761 100644
--- a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpTransportFactoryTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpTransportFactoryTest.php
@@ -28,9 +28,7 @@ class AmqpTransportFactoryTest extends TestCase
         $this->assertFalse($factory->supports('invalid-dsn', []));
     }
 
-    /**
-     * @requires extension amqp
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('amqp')]
     public function testItCreatesTheTransport()
     {
         $factory = new AmqpTransportFactory();
diff --git a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpTransportTest.php b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpTransportTest.php
index 21857d4..efbd6a2 100644
--- a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpTransportTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpTransportTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\Messenger\Envelope;
 use Symfony\Component\Messenger\Transport\Serialization\SerializerInterface;
 use Symfony\Component\Messenger\Transport\TransportInterface;
 
-/**
- * @requires extension amqp
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('amqp')]
 class AmqpTransportTest extends TestCase
 {
     public function testItIsATransport()
diff --git a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/ConnectionTest.php b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/ConnectionTest.php
index db2ad89..809ca2a 100644
--- a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/ConnectionTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/ConnectionTest.php
@@ -18,11 +18,8 @@ use Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpStamp;
 use Symfony\Component\Messenger\Bridge\Amqp\Transport\Connection;
 use Symfony\Component\Messenger\Exception\InvalidArgumentException;
 
-/**
- * @requires extension amqp
- *
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('amqp')]
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class ConnectionTest extends TestCase
 {
     private const DEFAULT_EXCHANGE_NAME = 'messages';
@@ -216,9 +213,7 @@ class ConnectionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider invalidQueueArgumentsDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidQueueArgumentsDataProvider')]
     public function testFromDsnWithInvalidValueOnQueueArguments(string $dsn, array $options)
     {
         $this->expectException(InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php
index d5275c9..8328f8c 100644
--- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php
@@ -350,9 +350,7 @@ class ConnectionTest extends TestCase
         return $stmt;
     }
 
-    /**
-     * @dataProvider buildConfigurationProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('buildConfigurationProvider')]
     public function testBuildConfiguration(string $dsn, array $options, string $expectedConnection, string $expectedTableName, int $expectedRedeliverTimeout, string $expectedQueue, bool $expectedAutoSetup)
     {
         $config = Connection::buildConfiguration($dsn, $options);
@@ -536,9 +534,7 @@ class ConnectionTest extends TestCase
         $this->assertEquals(['type' => DummyMessage::class], $doctrineEnvelopes[1]['headers']);
     }
 
-    /**
-     * @dataProvider providePlatformSql
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePlatformSql')]
     public function testGeneratedSql(AbstractPlatform $platform, string $expectedSql)
     {
         $driverConnection = $this->createMock(DBALConnection::class);
@@ -635,9 +631,7 @@ class ConnectionTest extends TestCase
         $this->assertEmpty($table->getColumns(), 'The table was not overwritten');
     }
 
-    /**
-     * @dataProvider provideFindAllSqlGeneratedByPlatform
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFindAllSqlGeneratedByPlatform')]
     public function testFindAllSqlGenerated(AbstractPlatform $platform, string $expectedSql)
     {
         $driverConnection = $this->createMock(DBALConnection::class);
diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php
index b22a728..2388547 100644
--- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php
@@ -20,9 +20,7 @@ use PHPUnit\Framework\TestCase;
 use Symfony\Component\Messenger\Bridge\Doctrine\Tests\Fixtures\DummyMessage;
 use Symfony\Component\Messenger\Bridge\Doctrine\Transport\Connection;
 
-/**
- * @requires extension pdo_sqlite
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pdo_sqlite')]
 class DoctrineIntegrationTest extends TestCase
 {
     private \Doctrine\DBAL\Connection $driverConnection;
diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlFilterIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlFilterIntegrationTest.php
index 9a4738b..d4d4252 100644
--- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlFilterIntegrationTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlFilterIntegrationTest.php
@@ -26,10 +26,10 @@ use Symfony\Component\Messenger\Bridge\Doctrine\Transport\PostgreSqlConnection;
 /**
  * This test checks on a postgres connection whether the doctrine asset filter works as expected.
  *
- * @requires extension pdo_pgsql
  *
- * @group integration
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pdo_pgsql')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class DoctrinePostgreSqlFilterIntegrationTest extends TestCase
 {
     private Connection $driverConnection;
diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlIntegrationTest.php
index 89b9321..5f63656 100644
--- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlIntegrationTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlIntegrationTest.php
@@ -21,11 +21,8 @@ use PHPUnit\Framework\TestCase;
 use Symfony\Component\Messenger\Bridge\Doctrine\Tests\Fixtures\DummyMessage;
 use Symfony\Component\Messenger\Bridge\Doctrine\Transport\PostgreSqlConnection;
 
-/**
- * @requires extension pdo_pgsql
- *
- * @group integration
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pdo_pgsql')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class DoctrinePostgreSqlIntegrationTest extends TestCase
 {
     private Connection $driverConnection;
diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlPgbouncerIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlPgbouncerIntegrationTest.php
index 9d1b8a9..99bfec0 100644
--- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlPgbouncerIntegrationTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlPgbouncerIntegrationTest.php
@@ -24,10 +24,10 @@ use Symfony\Component\Messenger\Bridge\Doctrine\Transport\PostgreSqlConnection;
 /**
  * This tests using PostgreSqlConnection with PgBouncer between pgsql and the application.
  *
- * @requires extension pdo_pgsql
  *
- * @group integration
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pdo_pgsql')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class DoctrinePostgreSqlPgbouncerIntegrationTest extends TestCase
 {
     private Connection $driverConnection;
diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlRegularIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlRegularIntegrationTest.php
index f462d45..3b74b5d 100644
--- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlRegularIntegrationTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlRegularIntegrationTest.php
@@ -24,10 +24,10 @@ use Symfony\Component\Messenger\Bridge\Doctrine\Transport\Connection;
  * This tests a using Doctrine PostgreSql connection without using PostgreSqlConnection
  * that gets used when use_notify is enabled.
  *
- * @requires extension pdo_pgsql
  *
- * @group integration
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pdo_pgsql')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class DoctrinePostgreSqlRegularIntegrationTest extends TestCase
 {
     private \Doctrine\DBAL\Connection $driverConnection;
diff --git a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php
index d3b7c59..7c7d65b 100644
--- a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php
@@ -15,9 +15,7 @@ use PHPUnit\Framework\TestCase;
 use Symfony\Component\Messenger\Bridge\Redis\Transport\Connection;
 use Symfony\Component\Messenger\Exception\TransportException;
 
-/**
- * @requires extension redis
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('redis')]
 class ConnectionTest extends TestCase
 {
     public function testFromInvalidDsn()
@@ -130,9 +128,7 @@ class ConnectionTest extends TestCase
         $this->assertNotNull($connection->get());
     }
 
-    /**
-     * @dataProvider provideAuthDsn
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAuthDsn')]
     public function testAuth(string|array $expected, string $dsn)
     {
         $redis = $this->createRedisMock();
@@ -383,9 +379,7 @@ class ConnectionTest extends TestCase
         $this->assertSame('xack error', $e->getMessage());
     }
 
-    /**
-     * @dataProvider provideIdPatterns
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIdPatterns')]
     public function testAddReturnId(string $expected, int $delay, string $method, string $return)
     {
         $redis = $this->createRedisMock();
diff --git a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisExtIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisExtIntegrationTest.php
index 0cead19..300536e 100644
--- a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisExtIntegrationTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisExtIntegrationTest.php
@@ -20,12 +20,9 @@ use Symfony\Component\Messenger\Envelope;
 use Symfony\Component\Messenger\Exception\TransportException;
 use Symfony\Component\Messenger\Transport\Serialization\Serializer;
 
-/**
- * @requires extension redis
- *
- * @group time-sensitive
- * @group integration
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('redis')]
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class RedisExtIntegrationTest extends TestCase
 {
     private \Redis|Relay|null $redis = null;
@@ -344,9 +341,7 @@ class RedisExtIntegrationTest extends TestCase
         }
     }
 
-    /**
-     * @group transient-on-windows
-     */
+    #[\PHPUnit\Framework\Attributes\Group('transient-on-windows')]
     public function testGetNonBlocking()
     {
         $redis = $this->createRedisClient();
@@ -363,9 +358,7 @@ class RedisExtIntegrationTest extends TestCase
         }
     }
 
-    /**
-     * @group transient-on-windows
-     */
+    #[\PHPUnit\Framework\Attributes\Group('transient-on-windows')]
     public function testGetAfterReject()
     {
         $redis = $this->createRedisClient();
@@ -385,9 +378,7 @@ class RedisExtIntegrationTest extends TestCase
         }
     }
 
-    /**
-     * @group transient-on-windows
-     */
+    #[\PHPUnit\Framework\Attributes\Group('transient-on-windows')]
     public function testItProperlyHandlesEmptyMessages()
     {
         $redisReceiver = new RedisReceiver($this->connection, new Serializer());
diff --git a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisReceiverTest.php b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisReceiverTest.php
index 831b681..e350bd2 100644
--- a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisReceiverTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisReceiverTest.php
@@ -29,9 +29,7 @@ use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
 
 class RedisReceiverTest extends TestCase
 {
-    /**
-     * @dataProvider redisEnvelopeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('redisEnvelopeProvider')]
     public function testItReturnsTheDecodedMessageToTheHandler(array $redisEnvelope, $expectedMessage, SerializerInterface $serializer)
     {
         $connection = $this->createMock(Connection::class);
@@ -50,9 +48,7 @@ class RedisReceiverTest extends TestCase
         $this->assertSame($redisEnvelope['id'], $transportMessageIdStamp->getId());
     }
 
-    /**
-     * @dataProvider rejectedRedisEnvelopeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('rejectedRedisEnvelopeProvider')]
     public function testItRejectTheMessageIfThereIsAMessageDecodingFailedException(array $redisEnvelope)
     {
         $this->expectException(MessageDecodingFailedException::class);
diff --git a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisTransportFactoryTest.php b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisTransportFactoryTest.php
index 58c7cf0..2eeacab 100644
--- a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisTransportFactoryTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisTransportFactoryTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Messenger\Bridge\Redis\Transport\RedisTransport;
 use Symfony\Component\Messenger\Bridge\Redis\Transport\RedisTransportFactory;
 use Symfony\Component\Messenger\Transport\Serialization\SerializerInterface;
 
-/**
- * @requires extension redis
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('redis')]
 class RedisTransportFactoryTest extends TestCase
 {
     public function testSupportsOnlyRedisTransports()
@@ -33,11 +31,8 @@ class RedisTransportFactoryTest extends TestCase
         $this->assertFalse($factory->supports('invalid-dsn', []));
     }
 
-    /**
-     * @group integration
-     *
-     * @dataProvider createTransportProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('createTransportProvider')]
+    #[\PHPUnit\Framework\Attributes\Group('integration')]
     public function testCreateTransport(string $dsn, array $options = [])
     {
         $this->skipIfRedisUnavailable();
diff --git a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RelayExtIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RelayExtIntegrationTest.php
index c8e0cd2..2888004 100644
--- a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RelayExtIntegrationTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RelayExtIntegrationTest.php
@@ -13,12 +13,9 @@ namespace Symfony\Component\Messenger\Bridge\Redis\Tests\Transport;
 
 use Relay\Relay;
 
-/**
- * @requires extension relay
- *
- * @group time-sensitive
- * @group integration
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('relay')]
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class RelayExtIntegrationTest extends RedisExtIntegrationTest
 {
     protected function createRedisClient(): \Redis|Relay
@@ -26,36 +23,43 @@ class RelayExtIntegrationTest extends RedisExtIntegrationTest
         return new Relay();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testConnectionSendAndGetDelayed()
     {
         self::markTestSkipped('This test doesn\'t work with relay.');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testConnectionSendDelayedMessagesWithSameContent()
     {
         self::markTestSkipped('This test doesn\'t work with relay.');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLazy()
     {
         self::markTestSkipped('This test doesn\'t work with relay.');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDbIndex()
     {
         self::markTestSkipped('This test doesn\'t work with relay.');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testGetNonBlocking()
     {
         self::markTestSkipped('This test doesn\'t work with relay.');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testGetAfterReject()
     {
         self::markTestSkipped('This test doesn\'t work with relay.');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testJsonError()
     {
         self::markTestSkipped('This test doesn\'t work with relay.');
diff --git a/src/Symfony/Component/Messenger/Tests/Command/ConsumeMessagesCommandTest.php b/src/Symfony/Component/Messenger/Tests/Command/ConsumeMessagesCommandTest.php
index d9739b4..a42ace8 100644
--- a/src/Symfony/Component/Messenger/Tests/Command/ConsumeMessagesCommandTest.php
+++ b/src/Symfony/Component/Messenger/Tests/Command/ConsumeMessagesCommandTest.php
@@ -113,9 +113,7 @@ class ConsumeMessagesCommandTest extends TestCase
         yield [false];
     }
 
-    /**
-     * @dataProvider provideRunWithResetServicesOption
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRunWithResetServicesOption')]
     public function testRunWithResetServicesOption(bool $shouldReset)
     {
         $envelope = new Envelope(new \stdClass());
@@ -152,9 +150,7 @@ class ConsumeMessagesCommandTest extends TestCase
         $this->assertStringContainsString('[OK] Consuming messages from transport "dummy-receiver"', $tester->getDisplay());
     }
 
-    /**
-     * @dataProvider getInvalidOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidOptions')]
     public function testRunWithInvalidOption(string $option, string $value, string $expectedMessage)
     {
         $receiverLocator = $this->createMock(ContainerInterface::class);
@@ -260,9 +256,7 @@ class ConsumeMessagesCommandTest extends TestCase
         $this->assertSame(1572864, $logger->logs[1][2]['limit']);
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $bus = $this->createMock(RoutableMessageBus::class);
diff --git a/src/Symfony/Component/Messenger/Tests/Command/DebugCommandTest.php b/src/Symfony/Component/Messenger/Tests/Command/DebugCommandTest.php
index f74661d..4735b1a 100644
--- a/src/Symfony/Component/Messenger/Tests/Command/DebugCommandTest.php
+++ b/src/Symfony/Component/Messenger/Tests/Command/DebugCommandTest.php
@@ -169,9 +169,7 @@ TXT
         $tester->execute(['bus' => 'unknown_bus'], ['decorated' => false]);
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $command = new DebugCommand(['command_bus' => [], 'query_bus' => []]);
diff --git a/src/Symfony/Component/Messenger/Tests/Command/FailedMessagesShowCommandTest.php b/src/Symfony/Component/Messenger/Tests/Command/FailedMessagesShowCommandTest.php
index c67f85e..7b770f0 100644
--- a/src/Symfony/Component/Messenger/Tests/Command/FailedMessagesShowCommandTest.php
+++ b/src/Symfony/Component/Messenger/Tests/Command/FailedMessagesShowCommandTest.php
@@ -25,9 +25,7 @@ use Symfony\Component\Messenger\Stamp\TransportMessageIdStamp;
 use Symfony\Component\Messenger\Transport\Receiver\ListableReceiverInterface;
 use Symfony\Component\Messenger\Transport\Receiver\ReceiverInterface;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class FailedMessagesShowCommandTest extends TestCase
 {
     private string|false $colSize;
diff --git a/src/Symfony/Component/Messenger/Tests/Command/SetupTransportsCommandTest.php b/src/Symfony/Component/Messenger/Tests/Command/SetupTransportsCommandTest.php
index ab5f29b..90a67fa 100644
--- a/src/Symfony/Component/Messenger/Tests/Command/SetupTransportsCommandTest.php
+++ b/src/Symfony/Component/Messenger/Tests/Command/SetupTransportsCommandTest.php
@@ -114,9 +114,7 @@ class SetupTransportsCommandTest extends TestCase
         $tester->execute(['transport' => 'amqp']);
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $serviceLocator = $this->createMock(ServiceLocator::class);
diff --git a/src/Symfony/Component/Messenger/Tests/DependencyInjection/MessengerPassTest.php b/src/Symfony/Component/Messenger/Tests/DependencyInjection/MessengerPassTest.php
index 376462eb..6c32c98 100644
--- a/src/Symfony/Component/Messenger/Tests/DependencyInjection/MessengerPassTest.php
+++ b/src/Symfony/Component/Messenger/Tests/DependencyInjection/MessengerPassTest.php
@@ -324,9 +324,7 @@ class MessengerPassTest extends TestCase
         (new MessengerPass())->process($container);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGetClassesFromTheHandlerSubscriberInterface()
     {
         $container = $this->getContainerBuilder($busId = 'message_bus');
@@ -351,9 +349,7 @@ class MessengerPassTest extends TestCase
         $this->assertHandlerDescriptor($container, $handlersMapping, SecondMessage::class, [PrioritizedHandler::class, HandlerWithMultipleMessages::class], [['priority' => 10]]);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGetClassesAndMethodsAndPrioritiesFromTheSubscriber()
     {
         $container = $this->getContainerBuilder($busId = 'message_bus');
@@ -433,9 +429,7 @@ class MessengerPassTest extends TestCase
         (new MessengerPass())->process($container);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testThrowsExceptionIfTheHandlerMethodDoesNotExist()
     {
         $this->expectException(RuntimeException::class);
@@ -535,9 +529,7 @@ class MessengerPassTest extends TestCase
         );
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testItShouldNotThrowIfGeneratorIsReturnedInsteadOfArray()
     {
         $container = $this->getContainerBuilder($busId = 'message_bus');
@@ -565,9 +557,7 @@ class MessengerPassTest extends TestCase
         );
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testItRegistersHandlersOnDifferentBuses()
     {
         $container = $this->getContainerBuilder($eventsBusId = 'event_bus');
@@ -600,9 +590,7 @@ class MessengerPassTest extends TestCase
         );
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testItThrowsAnExceptionOnUnknownBus()
     {
         $this->expectException(RuntimeException::class);
@@ -629,9 +617,7 @@ class MessengerPassTest extends TestCase
         (new MessengerPass())->process($container);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testUndefinedMessageClassForHandlerImplementingMessageHandlerInterface()
     {
         $this->expectException(RuntimeException::class);
@@ -645,9 +631,7 @@ class MessengerPassTest extends TestCase
         (new MessengerPass())->process($container);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testUndefinedMessageClassForHandlerImplementingMessageSubscriberInterface()
     {
         $this->expectException(RuntimeException::class);
@@ -744,9 +728,7 @@ class MessengerPassTest extends TestCase
         (new MessengerPass())->process($container);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testNeedsToHandleAtLeastOneMessage()
     {
         $this->expectException(RuntimeException::class);
diff --git a/src/Symfony/Component/Messenger/Tests/EventListener/ResetServicesListenerTest.php b/src/Symfony/Component/Messenger/Tests/EventListener/ResetServicesListenerTest.php
index 0e1273d..a5e9eee 100644
--- a/src/Symfony/Component/Messenger/Tests/EventListener/ResetServicesListenerTest.php
+++ b/src/Symfony/Component/Messenger/Tests/EventListener/ResetServicesListenerTest.php
@@ -26,9 +26,7 @@ class ResetServicesListenerTest extends TestCase
         yield [false];
     }
 
-    /**
-     * @dataProvider provideResetServices
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideResetServices')]
     public function testResetServices(bool $shouldReset)
     {
         $servicesResetter = $this->createMock(ServicesResetter::class);
diff --git a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnCustomStopExceptionListenerTest.php b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnCustomStopExceptionListenerTest.php
index bc335c2..41b61fa 100644
--- a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnCustomStopExceptionListenerTest.php
+++ b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnCustomStopExceptionListenerTest.php
@@ -38,7 +38,7 @@ class StopWorkerOnCustomStopExceptionListenerTest extends TestCase
         yield 'it should stop with core exception wrapped (2)' => [new HandlerFailedException(new Envelope(new \stdClass()), [new \Exception(), $t]), true];
     }
 
-    /** @dataProvider provideTests */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTests')]
     public function test(\Throwable $throwable, bool $shouldStop)
     {
         $listener = new StopWorkerOnCustomStopExceptionListener();
diff --git a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnFailureLimitListenerTest.php b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnFailureLimitListenerTest.php
index 9d776a3..a8f6e52 100644
--- a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnFailureLimitListenerTest.php
+++ b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnFailureLimitListenerTest.php
@@ -22,9 +22,7 @@ use Symfony\Component\Messenger\Worker;
 
 class StopWorkerOnFailureLimitListenerTest extends TestCase
 {
-    /**
-     * @dataProvider countProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('countProvider')]
     public function testWorkerStopsWhenMaximumCountReached(int $max, bool $shouldStop)
     {
         $worker = $this->createMock(Worker::class);
diff --git a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnMemoryLimitListenerTest.php b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnMemoryLimitListenerTest.php
index 8ae5be4..4162354 100644
--- a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnMemoryLimitListenerTest.php
+++ b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnMemoryLimitListenerTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\Messenger\Worker;
 
 class StopWorkerOnMemoryLimitListenerTest extends TestCase
 {
-    /**
-     * @dataProvider memoryProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('memoryProvider')]
     public function testWorkerStopsWhenMemoryLimitExceeded(int $memoryUsage, int $memoryLimit, bool $shouldStop)
     {
         $memoryResolver = fn () => $memoryUsage;
diff --git a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnMessageLimitListenerTest.php b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnMessageLimitListenerTest.php
index 8ce9a19..2542838 100644
--- a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnMessageLimitListenerTest.php
+++ b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnMessageLimitListenerTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\Messenger\Worker;
 
 class StopWorkerOnMessageLimitListenerTest extends TestCase
 {
-    /**
-     * @dataProvider countProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('countProvider')]
     public function testWorkerStopsWhenMaximumCountExceeded(int $max, bool $shouldStop)
     {
         $worker = $this->createMock(Worker::class);
diff --git a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnRestartSignalListenerTest.php b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnRestartSignalListenerTest.php
index 3b83f04..cf58df7 100644
--- a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnRestartSignalListenerTest.php
+++ b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnRestartSignalListenerTest.php
@@ -18,14 +18,10 @@ use Symfony\Component\Messenger\Event\WorkerRunningEvent;
 use Symfony\Component\Messenger\EventListener\StopWorkerOnRestartSignalListener;
 use Symfony\Component\Messenger\Worker;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class StopWorkerOnRestartSignalListenerTest extends TestCase
 {
-    /**
-     * @dataProvider restartTimeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('restartTimeProvider')]
     public function testWorkerStopsWhenMemoryLimitExceeded(?int $lastRestartTimeOffset, bool $shouldStop)
     {
         $cachePool = $this->createMock(CacheItemPoolInterface::class);
diff --git a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnTimeLimitListenerTest.php b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnTimeLimitListenerTest.php
index 90f76da..27dff2b 100644
--- a/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnTimeLimitListenerTest.php
+++ b/src/Symfony/Component/Messenger/Tests/EventListener/StopWorkerOnTimeLimitListenerTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\Messenger\Worker;
 
 class StopWorkerOnTimeLimitListenerTest extends TestCase
 {
-    /**
-     * @group time-sensitive
-     */
+    #[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
     public function testWorkerStopsWhenTimeLimitIsReached()
     {
         $logger = $this->createMock(LoggerInterface::class);
diff --git a/src/Symfony/Component/Messenger/Tests/Handler/HandleDescriptorTest.php b/src/Symfony/Component/Messenger/Tests/Handler/HandleDescriptorTest.php
index 994c522..a35b5da 100644
--- a/src/Symfony/Component/Messenger/Tests/Handler/HandleDescriptorTest.php
+++ b/src/Symfony/Component/Messenger/Tests/Handler/HandleDescriptorTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Messenger\Tests\Fixtures\DummyCommandHandler;
 
 class HandleDescriptorTest extends TestCase
 {
-    /**
-     * @dataProvider provideHandlers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideHandlers')]
     public function testDescriptorNames(callable $handler, ?string $expectedHandlerString)
     {
         $descriptor = new HandlerDescriptor($handler);
diff --git a/src/Symfony/Component/Messenger/Tests/MessageBusTest.php b/src/Symfony/Component/Messenger/Tests/MessageBusTest.php
index 0d6f36d..c4c464c 100644
--- a/src/Symfony/Component/Messenger/Tests/MessageBusTest.php
+++ b/src/Symfony/Component/Messenger/Tests/MessageBusTest.php
@@ -151,7 +151,7 @@ class MessageBusTest extends TestCase
         })()];
     }
 
-    /** @dataProvider provideConstructorDataStucture */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstructorDataStucture')]
     public function testConstructDataStructure(iterable $dataStructure)
     {
         $bus = new MessageBus($dataStructure);
diff --git a/src/Symfony/Component/Messenger/Tests/Middleware/DispatchAfterCurrentBusMiddlewareTest.php b/src/Symfony/Component/Messenger/Tests/Middleware/DispatchAfterCurrentBusMiddlewareTest.php
index 63ce439..5f1a4f8 100644
--- a/src/Symfony/Component/Messenger/Tests/Middleware/DispatchAfterCurrentBusMiddlewareTest.php
+++ b/src/Symfony/Component/Messenger/Tests/Middleware/DispatchAfterCurrentBusMiddlewareTest.php
@@ -72,9 +72,7 @@ class DispatchAfterCurrentBusMiddlewareTest extends TestCase
         $messageBus->dispatch($message);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testThrowingEventsHandlingWontStopExecution()
     {
         $message = new DummyMessage('Hello');
@@ -115,7 +113,7 @@ class DispatchAfterCurrentBusMiddlewareTest extends TestCase
                 return $envelope->getMessage() === array_shift($series);
             }))
             ->willReturnCallback(function ($envelope, StackInterface $stack) use ($matcher) {
-                if (2 === $matcher->getInvocationCount()) {
+                if (2 === $matcher->numberOfInvocations()) {
                     throw new \RuntimeException('Some exception while handling first event');
                 }
 
@@ -128,9 +126,7 @@ class DispatchAfterCurrentBusMiddlewareTest extends TestCase
         $messageBus->dispatch($message);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testLongChainWithExceptions()
     {
         $command = new DummyMessage('Level 0');
@@ -187,7 +183,7 @@ class DispatchAfterCurrentBusMiddlewareTest extends TestCase
                 return $envelope->getMessage() === array_shift($series);
             }))
             ->willReturnCallback(function ($envelope, StackInterface $stack) use ($eventBus, $eventL2a, $eventL2b, $eventL3a, $eventL3b, $matcher) {
-                switch ($matcher->getInvocationCount()) {
+                switch ($matcher->numberOfInvocations()) {
                     case 1:
                     case 2:
                     case 4:
diff --git a/src/Symfony/Component/Messenger/Tests/Middleware/HandleMessageMiddlewareTest.php b/src/Symfony/Component/Messenger/Tests/Middleware/HandleMessageMiddlewareTest.php
index 86e9d85..e4bc636 100644
--- a/src/Symfony/Component/Messenger/Tests/Middleware/HandleMessageMiddlewareTest.php
+++ b/src/Symfony/Component/Messenger/Tests/Middleware/HandleMessageMiddlewareTest.php
@@ -77,9 +77,7 @@ class HandleMessageMiddlewareTest extends MiddlewareTestCase
         $this->fail('Exception not thrown.');
     }
 
-    /**
-     * @dataProvider itAddsHandledStampsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('itAddsHandledStampsProvider')]
     public function testItAddsHandledStamps(array $handlers, array $expectedStamps, bool $nextIsCalled)
     {
         $message = new DummyMessage('Hey');
diff --git a/src/Symfony/Component/Messenger/Tests/Middleware/SendMessageMiddlewareTest.php b/src/Symfony/Component/Messenger/Tests/Middleware/SendMessageMiddlewareTest.php
index 0be5259..69b1fbb 100644
--- a/src/Symfony/Component/Messenger/Tests/Middleware/SendMessageMiddlewareTest.php
+++ b/src/Symfony/Component/Messenger/Tests/Middleware/SendMessageMiddlewareTest.php
@@ -28,9 +28,7 @@ use Symfony\Component\Messenger\Transport\Sender\SendersLocator;
 
 class SendMessageMiddlewareTest extends MiddlewareTestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testItSendsTheMessageToAssignedSender()
     {
         $message = new DummyMessage('Hey');
diff --git a/src/Symfony/Component/Messenger/Tests/Retry/MultiplierRetryStrategyTest.php b/src/Symfony/Component/Messenger/Tests/Retry/MultiplierRetryStrategyTest.php
index 5c37aa6..d1f2ab6 100644
--- a/src/Symfony/Component/Messenger/Tests/Retry/MultiplierRetryStrategyTest.php
+++ b/src/Symfony/Component/Messenger/Tests/Retry/MultiplierRetryStrategyTest.php
@@ -49,9 +49,7 @@ class MultiplierRetryStrategyTest extends TestCase
         $this->assertTrue($strategy->isRetryable($envelope));
     }
 
-    /**
-     * @dataProvider getWaitTimeTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getWaitTimeTests')]
     public function testGetWaitTime(int $delay, float $multiplier, int $maxDelay, int $previousRetries, int $expectedDelay)
     {
         $strategy = new MultiplierRetryStrategy(10, $delay, $multiplier, $maxDelay);
diff --git a/src/Symfony/Component/Messenger/Tests/Transport/InMemory/InMemoryTransportFactoryTest.php b/src/Symfony/Component/Messenger/Tests/Transport/InMemory/InMemoryTransportFactoryTest.php
index d2e8323..fe1680d 100644
--- a/src/Symfony/Component/Messenger/Tests/Transport/InMemory/InMemoryTransportFactoryTest.php
+++ b/src/Symfony/Component/Messenger/Tests/Transport/InMemory/InMemoryTransportFactoryTest.php
@@ -31,9 +31,7 @@ class InMemoryTransportFactoryTest extends TestCase
         $this->factory = new InMemoryTransportFactory();
     }
 
-    /**
-     * @dataProvider provideDSN
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDSN')]
     public function testSupports(string $dsn, bool $expected = true)
     {
         $this->assertSame($expected, $this->factory->supports($dsn, []), 'InMemoryTransportFactory::supports returned unexpected result.');
diff --git a/src/Symfony/Component/Messenger/Tests/Transport/Serialization/Normalizer/FlattenExceptionNormalizerTest.php b/src/Symfony/Component/Messenger/Tests/Transport/Serialization/Normalizer/FlattenExceptionNormalizerTest.php
index 76fea64..151cab8 100644
--- a/src/Symfony/Component/Messenger/Tests/Transport/Serialization/Normalizer/FlattenExceptionNormalizerTest.php
+++ b/src/Symfony/Component/Messenger/Tests/Transport/Serialization/Normalizer/FlattenExceptionNormalizerTest.php
@@ -35,9 +35,7 @@ class FlattenExceptionNormalizerTest extends TestCase
         $this->assertFalse($this->normalizer->supportsNormalization(new \stdClass()));
     }
 
-    /**
-     * @dataProvider provideFlattenException
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFlattenException')]
     public function testNormalize(FlattenException $exception)
     {
         $normalized = $this->normalizer->normalize($exception, null, $this->getMessengerContext());
diff --git a/src/Symfony/Component/Messenger/Tests/Transport/Serialization/SerializerTest.php b/src/Symfony/Component/Messenger/Tests/Transport/Serialization/SerializerTest.php
index 97d9eb9..b74142a 100644
--- a/src/Symfony/Component/Messenger/Tests/Transport/Serialization/SerializerTest.php
+++ b/src/Symfony/Component/Messenger/Tests/Transport/Serialization/SerializerTest.php
@@ -183,9 +183,7 @@ class SerializerTest extends TestCase
         ]);
     }
 
-    /**
-     * @dataProvider getMissingKeyTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getMissingKeyTests')]
     public function testDecodingFailsWithMissingKeys(array $data, string $expectedMessage)
     {
         $this->expectException(MessageDecodingFailedException::class);
diff --git a/src/Symfony/Component/Messenger/Tests/WorkerTest.php b/src/Symfony/Component/Messenger/Tests/WorkerTest.php
index d5728bc..63f56fb 100644
--- a/src/Symfony/Component/Messenger/Tests/WorkerTest.php
+++ b/src/Symfony/Component/Messenger/Tests/WorkerTest.php
@@ -53,9 +53,7 @@ use Symfony\Component\RateLimiter\RateLimiterFactory;
 use Symfony\Component\RateLimiter\Reservation;
 use Symfony\Component\RateLimiter\Storage\InMemoryStorage;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class WorkerTest extends TestCase
 {
     public function testWorkerDispatchTheReceivedMessage()
@@ -388,7 +386,7 @@ class WorkerTest extends TestCase
             ->method('get')
         ;
 
-        $bus = $this->getMockBuilder(MessageBusInterface::class)->getMock();
+        $bus = $this->createMock(MessageBusInterface::class);
 
         $dispatcher = new EventDispatcher();
         $dispatcher->addSubscriber(new StopWorkerOnMessageLimitListener(1));
@@ -402,7 +400,7 @@ class WorkerTest extends TestCase
         $receiver1 = $this->createMock(QueueReceiverInterface::class);
         $receiver2 = $this->createMock(ReceiverInterface::class);
 
-        $bus = $this->getMockBuilder(MessageBusInterface::class)->getMock();
+        $bus = $this->createMock(MessageBusInterface::class);
 
         $worker = new Worker(['transport1' => $receiver1, 'transport2' => $receiver2], $bus, clock: new MockClock());
         $this->expectException(RuntimeException::class);
diff --git a/src/Symfony/Component/Mime/Tests/AddressTest.php b/src/Symfony/Component/Mime/Tests/AddressTest.php
index baef170..6344882 100644
--- a/src/Symfony/Component/Mime/Tests/AddressTest.php
+++ b/src/Symfony/Component/Mime/Tests/AddressTest.php
@@ -53,9 +53,7 @@ class AddressTest extends TestCase
         Address::create('<fabien@symfony');
     }
 
-    /**
-     * @dataProvider fromStringProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('fromStringProvider')]
     public function testCreateWithString($string, $displayName, $addrSpec)
     {
         $address = Address::create($string);
@@ -87,9 +85,7 @@ class AddressTest extends TestCase
         Address::createArray([new \stdClass()]);
     }
 
-    /**
-     * @dataProvider nameEmptyDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('nameEmptyDataProvider')]
     public function testNameEmpty(string $name)
     {
         $mail = 'mail@example.org';
diff --git a/src/Symfony/Component/Mime/Tests/Crypto/DkimSignerTest.php b/src/Symfony/Component/Mime/Tests/Crypto/DkimSignerTest.php
index 3cfd9d5..d9cf013 100644
--- a/src/Symfony/Component/Mime/Tests/Crypto/DkimSignerTest.php
+++ b/src/Symfony/Component/Mime/Tests/Crypto/DkimSignerTest.php
@@ -18,11 +18,8 @@ use Symfony\Component\Mime\Crypto\DkimSigner;
 use Symfony\Component\Mime\Email;
 use Symfony\Component\Mime\Message;
 
-/**
- * @group time-sensitive
- *
- * @requires extension openssl
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('openssl')]
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class DkimSignerTest extends TestCase
 {
     private static string $pk = <<<EOF
@@ -43,10 +40,8 @@ HIyrMg2pQ46h2ybEuB50Cs+xF19KwBuGafBtRjkvXdU=
 -----END RSA PRIVATE KEY-----
 EOF;
 
-    /**
-     * @dataProvider getSignData
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getSignData')]
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testSign(int $time, string $bodyCanon, string $headerCanon, string $header)
     {
         ClockMock::withClockMock($time);
@@ -108,9 +103,7 @@ EOF;
         $signer->sign($message, []);
     }
 
-    /**
-     * @dataProvider getCanonicalizeHeaderData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getCanonicalizeHeaderData')]
     public function testCanonicalizeHeader(string $bodyCanon, string $canonBody, string $body, int $maxLength)
     {
         $message = (new Email())
diff --git a/src/Symfony/Component/Mime/Tests/Crypto/SMimeEncrypterTest.php b/src/Symfony/Component/Mime/Tests/Crypto/SMimeEncrypterTest.php
index 70864c0..b271dc9 100644
--- a/src/Symfony/Component/Mime/Tests/Crypto/SMimeEncrypterTest.php
+++ b/src/Symfony/Component/Mime/Tests/Crypto/SMimeEncrypterTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Mime\Crypto\SMimeSigner;
 use Symfony\Component\Mime\Email;
 use Symfony\Component\Mime\Message;
 
-/**
- * @requires extension openssl
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('openssl')]
 class SMimeEncrypterTest extends SMimeTestCase
 {
     public function testEncryptMessage()
diff --git a/src/Symfony/Component/Mime/Tests/Crypto/SMimeSignerTest.php b/src/Symfony/Component/Mime/Tests/Crypto/SMimeSignerTest.php
index 1b8b978..7c4a4af 100644
--- a/src/Symfony/Component/Mime/Tests/Crypto/SMimeSignerTest.php
+++ b/src/Symfony/Component/Mime/Tests/Crypto/SMimeSignerTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\Mime\Message;
 use Symfony\Component\Mime\Part\DataPart;
 use Symfony\Component\Mime\Part\TextPart;
 
-/**
- * @requires extension openssl
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('openssl')]
 class SMimeSignerTest extends SMimeTestCase
 {
     public function testSignedMessage()
diff --git a/src/Symfony/Component/Mime/Tests/FileBinaryMimeTypeGuesserTest.php b/src/Symfony/Component/Mime/Tests/FileBinaryMimeTypeGuesserTest.php
index eae27fd..56821c5 100644
--- a/src/Symfony/Component/Mime/Tests/FileBinaryMimeTypeGuesserTest.php
+++ b/src/Symfony/Component/Mime/Tests/FileBinaryMimeTypeGuesserTest.php
@@ -21,6 +21,7 @@ class FileBinaryMimeTypeGuesserTest extends AbstractMimeTypeGuesserTestCase
         return new FileBinaryMimeTypeGuesser();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testGuessWithDuplicatedFileType()
     {
         $this->markTestSkipped('Result varies depending on the OS');
diff --git a/src/Symfony/Component/Mime/Tests/FileinfoMimeTypeGuesserTest.php b/src/Symfony/Component/Mime/Tests/FileinfoMimeTypeGuesserTest.php
index 0d7815c..4938ff7 100644
--- a/src/Symfony/Component/Mime/Tests/FileinfoMimeTypeGuesserTest.php
+++ b/src/Symfony/Component/Mime/Tests/FileinfoMimeTypeGuesserTest.php
@@ -14,9 +14,7 @@ namespace Symfony\Component\Mime\Tests;
 use Symfony\Component\Mime\FileinfoMimeTypeGuesser;
 use Symfony\Component\Mime\MimeTypeGuesserInterface;
 
-/**
- * @requires extension fileinfo
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('fileinfo')]
 class FileinfoMimeTypeGuesserTest extends AbstractMimeTypeGuesserTestCase
 {
     protected function getGuesser(): MimeTypeGuesserInterface
diff --git a/src/Symfony/Component/Mime/Tests/MessageTest.php b/src/Symfony/Component/Mime/Tests/MessageTest.php
index 678be96..412d3c5 100644
--- a/src/Symfony/Component/Mime/Tests/MessageTest.php
+++ b/src/Symfony/Component/Mime/Tests/MessageTest.php
@@ -287,9 +287,7 @@ EOF;
         $this->assertStringMatchesFormat($expectedJson, json_encode(json_decode($serialized), \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES));
     }
 
-    /**
-     * @dataProvider ensureValidityProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('ensureValidityProvider')]
     public function testEnsureValidity(array $headers, ?string $exceptionClass, ?string $exceptionMessage)
     {
         if ($exceptionClass) {
diff --git a/src/Symfony/Component/Mime/Tests/MimeTypesTest.php b/src/Symfony/Component/Mime/Tests/MimeTypesTest.php
index 6a00465..496bf39 100644
--- a/src/Symfony/Component/Mime/Tests/MimeTypesTest.php
+++ b/src/Symfony/Component/Mime/Tests/MimeTypesTest.php
@@ -15,9 +15,7 @@ use Symfony\Component\Mime\Exception\RuntimeException;
 use Symfony\Component\Mime\MimeTypeGuesserInterface;
 use Symfony\Component\Mime\MimeTypes;
 
-/**
- * @requires extension fileinfo
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('fileinfo')]
 class MimeTypesTest extends AbstractMimeTypeGuesserTestCase
 {
     protected function getGuesser(): MimeTypeGuesserInterface
diff --git a/src/Symfony/Component/Mime/Tests/Part/TextPartTest.php b/src/Symfony/Component/Mime/Tests/Part/TextPartTest.php
index 5dd2195..82f8875 100644
--- a/src/Symfony/Component/Mime/Tests/Part/TextPartTest.php
+++ b/src/Symfony/Component/Mime/Tests/Part/TextPartTest.php
@@ -56,9 +56,7 @@ class TextPartTest extends TestCase
         $this->assertSame('content', implode('', iterator_to_array($p->bodyToIterable())));
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testConstructorWithUnknownFile()
     {
         $p = new TextPart(new File(\dirname(__DIR__).'/Fixtures/unknown.txt'));
diff --git a/src/Symfony/Component/Mime/Tests/RawMessageTest.php b/src/Symfony/Component/Mime/Tests/RawMessageTest.php
index 965abca..f5a077e 100644
--- a/src/Symfony/Component/Mime/Tests/RawMessageTest.php
+++ b/src/Symfony/Component/Mime/Tests/RawMessageTest.php
@@ -19,9 +19,7 @@ class RawMessageTest extends TestCase
 {
     use ExpectDeprecationTrait;
 
-    /**
-     * @dataProvider provideMessages
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMessages')]
     public function testToString(mixed $messageParameter, bool $supportReuse)
     {
         $message = new RawMessage($messageParameter);
@@ -35,9 +33,7 @@ class RawMessageTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provideMessages
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMessages')]
     public function testSerialization(mixed $messageParameter, bool $supportReuse)
     {
         $message = new RawMessage($messageParameter);
@@ -49,9 +45,7 @@ class RawMessageTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provideMessages
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMessages')]
     public function testToIterable(mixed $messageParameter, bool $supportReuse)
     {
         $message = new RawMessage($messageParameter);
@@ -63,11 +57,8 @@ class RawMessageTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provideMessages
-     *
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMessages')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testToIterableLegacy(mixed $messageParameter, bool $supportReuse)
     {
         $message = new RawMessage($messageParameter);
diff --git a/src/Symfony/Component/Notifier/Bridge/Bandwidth/Tests/BandwidthTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Bandwidth/Tests/BandwidthTransportTest.php
index 0ab2d17..8c6a045 100644
--- a/src/Symfony/Component/Notifier/Bridge/Bandwidth/Tests/BandwidthTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Bandwidth/Tests/BandwidthTransportTest.php
@@ -41,9 +41,7 @@ final class BandwidthTransportTest extends TransportTestCase
         yield [new SmsMessage('0611223344', 'Hello!', 'from', new BandwidthOptions(['from' => 'from']))];
     }
 
-    /**
-     * @dataProvider invalidFromProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidFromProvider')]
     public function testInvalidArgumentExceptionIsThrownIfFromIsInvalid(string $from)
     {
         $transport = $this->createTransport(null, $from);
@@ -54,9 +52,7 @@ final class BandwidthTransportTest extends TransportTestCase
         $transport->send(new SmsMessage('+33612345678', 'Hello!'));
     }
 
-    /**
-     * @dataProvider validFromProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validFromProvider')]
     public function testNoInvalidArgumentExceptionIsThrownIfFromIsValid(string $from)
     {
         $message = new SmsMessage('+33612345678', 'Hello!');
diff --git a/src/Symfony/Component/Notifier/Bridge/ClickSend/Tests/ClickSendTransportTest.php b/src/Symfony/Component/Notifier/Bridge/ClickSend/Tests/ClickSendTransportTest.php
index 532c5ac..07f47c0 100644
--- a/src/Symfony/Component/Notifier/Bridge/ClickSend/Tests/ClickSendTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/ClickSend/Tests/ClickSendTransportTest.php
@@ -41,9 +41,7 @@ final class ClickSendTransportTest extends TransportTestCase
         yield [new SmsMessage('0611223344', 'Hello!', 'from', new ClickSendOptions(['custom_string' => 'test_custom_string']))];
     }
 
-    /**
-     * @dataProvider invalidFromProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidFromProvider')]
     public function testInvalidArgumentExceptionIsThrownIfFromIsInvalid(string $from)
     {
         $transport = $this->createTransport(null, $from);
@@ -54,9 +52,7 @@ final class ClickSendTransportTest extends TransportTestCase
         $transport->send(new SmsMessage('+33612345678', 'Hello!'));
     }
 
-    /**
-     * @dataProvider validFromProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validFromProvider')]
     public function testNoInvalidArgumentExceptionIsThrownIfFromIsValid(string $from)
     {
         $message = new SmsMessage('+33612345678', 'Hello!');
diff --git a/src/Symfony/Component/Notifier/Bridge/Firebase/Tests/FirebaseTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Firebase/Tests/FirebaseTransportTest.php
index 704e9b9..60cf505 100644
--- a/src/Symfony/Component/Notifier/Bridge/Firebase/Tests/FirebaseTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Firebase/Tests/FirebaseTransportTest.php
@@ -49,9 +49,7 @@ final class FirebaseTransportTest extends TransportTestCase
         yield [new DummyMessage()];
     }
 
-    /**
-     * @dataProvider sendWithErrorThrowsExceptionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('sendWithErrorThrowsExceptionProvider')]
     public function testSendWithErrorThrowsTransportException(ResponseInterface $response)
     {
         $this->expectException(TransportException::class);
diff --git a/src/Symfony/Component/Notifier/Bridge/FortySixElks/Tests/FortySixElksTransportTest.php b/src/Symfony/Component/Notifier/Bridge/FortySixElks/Tests/FortySixElksTransportTest.php
index 4a757a8..e4b6366 100644
--- a/src/Symfony/Component/Notifier/Bridge/FortySixElks/Tests/FortySixElksTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/FortySixElks/Tests/FortySixElksTransportTest.php
@@ -58,9 +58,7 @@ class FortySixElksTransportTest extends TransportTestCase
         $this->assertSame('s0231d6d7d6bc14a7e7734e466785c4ce', $sentMessage->getMessageId());
     }
 
-    /**
-     * @dataProvider errorProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('errorProvider')]
     public function testExceptionIsThrownWhenSendFailed(int $statusCode, string $content, string $expectedExceptionMessage)
     {
         $response = $this->createMock(ResponseInterface::class);
diff --git a/src/Symfony/Component/Notifier/Bridge/GoIp/Tests/GoIpTransportTest.php b/src/Symfony/Component/Notifier/Bridge/GoIp/Tests/GoIpTransportTest.php
index e198675..070904e 100644
--- a/src/Symfony/Component/Notifier/Bridge/GoIp/Tests/GoIpTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/GoIp/Tests/GoIpTransportTest.php
@@ -68,10 +68,9 @@ final class GoIpTransportTest extends TransportTestCase
     }
 
     /**
-     * @dataProvider goipErrorsProvider
-     *
      * @throws TransportExceptionInterface
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('goipErrorsProvider')]
     public function testSendMessageWithUnsuccessfulReplyFromGoipThrows(string $goipError)
     {
         $this->expectException(TransportException::class);
diff --git a/src/Symfony/Component/Notifier/Bridge/GoogleChat/Tests/GoogleChatOptionsTest.php b/src/Symfony/Component/Notifier/Bridge/GoogleChat/Tests/GoogleChatOptionsTest.php
index 00984a6..08f4b05 100644
--- a/src/Symfony/Component/Notifier/Bridge/GoogleChat/Tests/GoogleChatOptionsTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/GoogleChat/Tests/GoogleChatOptionsTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Notifier\Bridge\GoogleChat\GoogleChatOptions;
 
 final class GoogleChatOptionsTest extends TestCase
 {
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testToArray()
     {
         $options = new GoogleChatOptions();
diff --git a/src/Symfony/Component/Notifier/Bridge/Isendpro/Tests/IsendproTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Isendpro/Tests/IsendproTransportFactoryTest.php
index 482e4f4..fc7d56f 100644
--- a/src/Symfony/Component/Notifier/Bridge/Isendpro/Tests/IsendproTransportFactoryTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Isendpro/Tests/IsendproTransportFactoryTest.php
@@ -75,9 +75,8 @@ final class IsendproTransportFactoryTest extends TransportFactoryTestCase
         yield ['somethingElse://account_key_id@default'];
     }
 
-    /**
-     * @dataProvider missingRequiredOptionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('missingRequiredOptionProvider')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testMissingRequiredOptionException(string $dsn, ?string $message = null)
     {
         $this->markTestIncomplete('The only required option is account key id, matched by incompleteDsnProvider');
diff --git a/src/Symfony/Component/Notifier/Bridge/KazInfoTeh/Tests/KazInfoTehTransportTest.php b/src/Symfony/Component/Notifier/Bridge/KazInfoTeh/Tests/KazInfoTehTransportTest.php
index 6aad9d0..85c29d0 100644
--- a/src/Symfony/Component/Notifier/Bridge/KazInfoTeh/Tests/KazInfoTehTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/KazInfoTeh/Tests/KazInfoTehTransportTest.php
@@ -68,9 +68,7 @@ final class KazInfoTehTransportTest extends TransportTestCase
         }
     }
 
-    /**
-     * @dataProvider responseProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('responseProvider')]
     public function testThrowExceptionWhenMessageWasNotSent(int $statusCode, string $content, string $errorMessage)
     {
         $client = $this->createClient($statusCode, $content);
diff --git a/src/Symfony/Component/Notifier/Bridge/Mercure/Tests/MercureTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Mercure/Tests/MercureTransportTest.php
index bfe9190..d9b5553 100644
--- a/src/Symfony/Component/Notifier/Bridge/Mercure/Tests/MercureTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Mercure/Tests/MercureTransportTest.php
@@ -59,16 +59,19 @@ final class MercureTransportTest extends TransportTestCase
         yield [new DummyMessage()];
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCanSetCustomPort()
     {
         $this->markTestSkipped("Mercure transport doesn't use a regular HTTP Dsn");
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCanSetCustomHost()
     {
         $this->markTestSkipped("Mercure transport doesn't use a regular HTTP Dsn");
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCanSetCustomHostAndPort()
     {
         $this->markTestSkipped("Mercure transport doesn't use a regular HTTP Dsn");
diff --git a/src/Symfony/Component/Notifier/Bridge/MessageMedia/Tests/MessageMediaTransportTest.php b/src/Symfony/Component/Notifier/Bridge/MessageMedia/Tests/MessageMediaTransportTest.php
index 3dfdaf2..351131b 100644
--- a/src/Symfony/Component/Notifier/Bridge/MessageMedia/Tests/MessageMediaTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/MessageMedia/Tests/MessageMediaTransportTest.php
@@ -49,10 +49,9 @@ final class MessageMediaTransportTest extends TransportTestCase
     }
 
     /**
-     * @dataProvider exceptionIsThrownWhenHttpSendFailedProvider
-     *
      * @throws TransportExceptionInterface
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('exceptionIsThrownWhenHttpSendFailedProvider')]
     public function testExceptionIsThrownWhenHttpSendFailed(int $statusCode, string $content, string $expectedExceptionMessage)
     {
         $response = $this->createMock(ResponseInterface::class);
diff --git a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/ActionCardTest.php b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/ActionCardTest.php
index 4fcc9c5..55aff96 100644
--- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/ActionCardTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/ActionCardTest.php
@@ -31,9 +31,7 @@ final class ActionCardTest extends TestCase
         $this->assertSame($value, $action->toArray()['name']);
     }
 
-    /**
-     * @dataProvider availableInputs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('availableInputs')]
     public function testInput(array $expected, InputInterface $input)
     {
         $action = (new ActionCard())
@@ -50,9 +48,7 @@ final class ActionCardTest extends TestCase
         yield [[['@type' => 'MultichoiceInput']], new MultiChoiceInput()];
     }
 
-    /**
-     * @dataProvider compatibleActions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('compatibleActions')]
     public function testAction(array $expected, ActionCardCompatibleActionInterface $action)
     {
         $section = (new ActionCard())
diff --git a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/Input/MultiChoiceInputTest.php b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/Input/MultiChoiceInputTest.php
index 26558fa..6bae0a3 100644
--- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/Input/MultiChoiceInputTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/Input/MultiChoiceInputTest.php
@@ -51,9 +51,7 @@ final class MultiChoiceInputTest extends AbstractInputTestCase
         $this->assertFalse($input->toArray()['isMultiSelect']);
     }
 
-    /**
-     * @dataProvider styles
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('styles')]
     public function testStyle(string $value)
     {
         $input = $this->createInput()
@@ -71,9 +69,7 @@ final class MultiChoiceInputTest extends AbstractInputTestCase
         yield 'style-normal' => ['normal'];
     }
 
-    /**
-     * @dataProvider styles
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('styles')]
     public function testStyleThrowsWithUnknownStyle()
     {
         $this->expectException(InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/OpenUriActionTest.php b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/OpenUriActionTest.php
index 63c2e45..75c9346 100644
--- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/OpenUriActionTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/OpenUriActionTest.php
@@ -38,9 +38,7 @@ final class OpenUriActionTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider operatingSystems
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('operatingSystems')]
     public function testTarget(string $os)
     {
         $action = (new OpenUriAction())
diff --git a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/MicrosoftTeamsOptionsTest.php b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/MicrosoftTeamsOptionsTest.php
index b91586b..a4cf237 100644
--- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/MicrosoftTeamsOptionsTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/MicrosoftTeamsOptionsTest.php
@@ -123,9 +123,7 @@ final class MicrosoftTeamsOptionsTest extends TestCase
         $this->assertSame($text, $options->toArray()['text']);
     }
 
-    /**
-     * @dataProvider validThemeColors
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validThemeColors')]
     public function testThemeColorViaConstructor(string $themeColor)
     {
         $options = new MicrosoftTeamsOptions([
@@ -135,9 +133,7 @@ final class MicrosoftTeamsOptionsTest extends TestCase
         $this->assertSame($themeColor, $options->toArray()['themeColor']);
     }
 
-    /**
-     * @dataProvider validThemeColors
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validThemeColors')]
     public function testThemeColorViaSetter(string $themeColor)
     {
         $options = (new MicrosoftTeamsOptions())
@@ -156,9 +152,7 @@ final class MicrosoftTeamsOptionsTest extends TestCase
         yield ['#FF0000'];
     }
 
-    /**
-     * @dataProvider invalidThemeColors
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidThemeColors')]
     public function testThemeColorViaConstructorThrowsInvalidArgumentException(string $themeColor)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -169,9 +163,7 @@ final class MicrosoftTeamsOptionsTest extends TestCase
         ]);
     }
 
-    /**
-     * @dataProvider invalidThemeColors
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidThemeColors')]
     public function testThemeColorViaSetterThrowsInvalidArgumentException(string $themeColor)
     {
         $this->expectException(InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Section/SectionTest.php b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Section/SectionTest.php
index fde246a..2eb7e9d 100644
--- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Section/SectionTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Section/SectionTest.php
@@ -40,9 +40,7 @@ final class SectionTest extends TestCase
         $this->assertSame($value, $section->toArray()['text']);
     }
 
-    /**
-     * @dataProvider allowedActions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('allowedActions')]
     public function testAction(array $expected, ActionInterface $action)
     {
         $section = (new Section())
diff --git a/src/Symfony/Component/Notifier/Bridge/Mobyt/Tests/MobytOptionsTest.php b/src/Symfony/Component/Notifier/Bridge/Mobyt/Tests/MobytOptionsTest.php
index 2d52b06..cf948fb 100644
--- a/src/Symfony/Component/Notifier/Bridge/Mobyt/Tests/MobytOptionsTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Mobyt/Tests/MobytOptionsTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\Notifier\Notification\Notification;
 
 final class MobytOptionsTest extends TestCase
 {
-    /**
-     * @dataProvider fromNotificationDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('fromNotificationDataProvider')]
     public function testFromNotification(string $importance, string $expectedMessageType)
     {
         $notification = (new Notification('Foo'))->importance($importance);
@@ -50,9 +48,7 @@ final class MobytOptionsTest extends TestCase
         $this->assertSame(MobytOptions::MESSAGE_TYPE_QUALITY_HIGH, $options['message_type']);
     }
 
-    /**
-     * @dataProvider validMessageTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validMessageTypes')]
     public function testMessageType(string $type)
     {
         $mobytOptions = new MobytOptions();
diff --git a/src/Symfony/Component/Notifier/Bridge/Novu/Tests/NovuOptionsTest.php b/src/Symfony/Component/Notifier/Bridge/Novu/Tests/NovuOptionsTest.php
index 8ad8dc3..812633d 100644
--- a/src/Symfony/Component/Notifier/Bridge/Novu/Tests/NovuOptionsTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Novu/Tests/NovuOptionsTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Notifier\Bridge\Novu\NovuOptions;
 
 class NovuOptionsTest extends TestCase
 {
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testToArray()
     {
         $options = new NovuOptions(
diff --git a/src/Symfony/Component/Notifier/Bridge/OvhCloud/Tests/OvhCloudTransportTest.php b/src/Symfony/Component/Notifier/Bridge/OvhCloud/Tests/OvhCloudTransportTest.php
index 2d904e5..7e8a3db 100644
--- a/src/Symfony/Component/Notifier/Bridge/OvhCloud/Tests/OvhCloudTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/OvhCloud/Tests/OvhCloudTransportTest.php
@@ -52,11 +52,8 @@ final class OvhCloudTransportTest extends TransportTestCase
         yield 'including a slash' => ['hel/lo'];
     }
 
-    /**
-     * @group time-sensitive
-     *
-     * @dataProvider validMessagesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validMessagesProvider')]
+    #[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
     public function testValidSignature(string $message)
     {
         $smsMessage = new SmsMessage('0611223344', $message);
diff --git a/src/Symfony/Component/Notifier/Bridge/Plivo/Tests/PlivoTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Plivo/Tests/PlivoTransportTest.php
index 50ef343..cfd594b 100644
--- a/src/Symfony/Component/Notifier/Bridge/Plivo/Tests/PlivoTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Plivo/Tests/PlivoTransportTest.php
@@ -43,9 +43,7 @@ final class PlivoTransportTest extends TransportTestCase
         yield [new SmsMessage('0611223344', 'Hello!', 'from', new PlivoOptions(['src' => 'foo']))];
     }
 
-    /**
-     * @dataProvider invalidFromProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidFromProvider')]
     public function testInvalidArgumentExceptionIsThrownIfFromIsInvalid(string $from)
     {
         $transport = $this->createTransport(null, $from);
@@ -56,9 +54,7 @@ final class PlivoTransportTest extends TransportTestCase
         $transport->send(new SmsMessage('+33612345678', 'Hello!'));
     }
 
-    /**
-     * @dataProvider validFromProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validFromProvider')]
     public function testNoInvalidArgumentExceptionIsThrownIfFromIsValid(string $from)
     {
         $message = new SmsMessage('+33612345678', 'Hello!');
diff --git a/src/Symfony/Component/Notifier/Bridge/RingCentral/Tests/RingCentralTransportTest.php b/src/Symfony/Component/Notifier/Bridge/RingCentral/Tests/RingCentralTransportTest.php
index 6275dd9..5bcf214 100644
--- a/src/Symfony/Component/Notifier/Bridge/RingCentral/Tests/RingCentralTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/RingCentral/Tests/RingCentralTransportTest.php
@@ -41,9 +41,7 @@ final class RingCentralTransportTest extends TransportTestCase
         yield [new SmsMessage('0611223344', 'Hello!', 'from', new RingCentralOptions(['from' => 'foo']))];
     }
 
-    /**
-     * @dataProvider invalidFromProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidFromProvider')]
     public function testInvalidArgumentExceptionIsThrownIfFromIsInvalid(string $from)
     {
         $transport = $this->createTransport(null, $from);
@@ -54,9 +52,7 @@ final class RingCentralTransportTest extends TransportTestCase
         $transport->send(new SmsMessage('+33612345678', 'Hello!'));
     }
 
-    /**
-     * @dataProvider validFromProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validFromProvider')]
     public function testNoInvalidArgumentExceptionIsThrownIfFromIsValid(string $from)
     {
         $message = new SmsMessage('+33612345678', 'Hello!');
diff --git a/src/Symfony/Component/Notifier/Bridge/Sendinblue/Tests/SendinblueTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Sendinblue/Tests/SendinblueTransportFactoryTest.php
index 88e2025..b1a6e34 100644
--- a/src/Symfony/Component/Notifier/Bridge/Sendinblue/Tests/SendinblueTransportFactoryTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Sendinblue/Tests/SendinblueTransportFactoryTest.php
@@ -14,9 +14,7 @@ namespace Symfony\Component\Notifier\Bridge\Sendinblue\Tests;
 use Symfony\Component\Notifier\Bridge\Sendinblue\SendinblueTransportFactory;
 use Symfony\Component\Notifier\Test\TransportFactoryTestCase;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 final class SendinblueTransportFactoryTest extends TransportFactoryTestCase
 {
     public function createFactory(): SendinblueTransportFactory
diff --git a/src/Symfony/Component/Notifier/Bridge/Sendinblue/Tests/SendinblueTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Sendinblue/Tests/SendinblueTransportTest.php
index eca1daf..1c0e67a 100644
--- a/src/Symfony/Component/Notifier/Bridge/Sendinblue/Tests/SendinblueTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Sendinblue/Tests/SendinblueTransportTest.php
@@ -21,9 +21,7 @@ use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
 use Symfony\Contracts\HttpClient\HttpClientInterface;
 use Symfony\Contracts\HttpClient\ResponseInterface;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 final class SendinblueTransportTest extends TransportTestCase
 {
     public static function createTransport(?HttpClientInterface $client = null): SendinblueTransport
diff --git a/src/Symfony/Component/Notifier/Bridge/SimpleTextin/Tests/SimpleTextinTransportTest.php b/src/Symfony/Component/Notifier/Bridge/SimpleTextin/Tests/SimpleTextinTransportTest.php
index e7275c6..555f06f 100644
--- a/src/Symfony/Component/Notifier/Bridge/SimpleTextin/Tests/SimpleTextinTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/SimpleTextin/Tests/SimpleTextinTransportTest.php
@@ -39,9 +39,7 @@ final class SimpleTextinTransportTest extends TransportTestCase
         yield [new SmsMessage('0611223344', 'Hello!')];
     }
 
-    /**
-     * @dataProvider invalidFromProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidFromProvider')]
     public function testInvalidArgumentExceptionIsThrownIfFromIsInvalid(string $from)
     {
         $transport = $this->createTransport(null, $from);
@@ -52,9 +50,7 @@ final class SimpleTextinTransportTest extends TransportTestCase
         $transport->send(new SmsMessage('+33612345678', 'Hello!'));
     }
 
-    /**
-     * @dataProvider validFromProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validFromProvider')]
     public function testNoInvalidArgumentExceptionIsThrownIfFromIsValid(string $from)
     {
         $message = new SmsMessage('+33612345678', 'Hello!');
diff --git a/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackOptionsTest.php b/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackOptionsTest.php
index 748b7f2..82c1221 100644
--- a/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackOptionsTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackOptionsTest.php
@@ -23,10 +23,8 @@ use Symfony\Component\Notifier\Notification\Notification;
  */
 final class SlackOptionsTest extends TestCase
 {
-    /**
-     * @dataProvider toArrayProvider
-     * @dataProvider toArraySimpleOptionsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('toArrayProvider')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('toArraySimpleOptionsProvider')]
     public function testToArray(array $options, ?array $expected = null)
     {
         $this->assertSame($expected ?? $options, (new SlackOptions($options))->toArray());
@@ -72,9 +70,7 @@ final class SlackOptionsTest extends TestCase
         yield [['thread_ts' => '1503435956.000247']];
     }
 
-    /**
-     * @dataProvider getRecipientIdProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRecipientIdProvider')]
     public function testGetRecipientId(?string $expected, SlackOptions $options)
     {
         $this->assertSame($expected, $options->getRecipientId());
@@ -89,10 +85,9 @@ final class SlackOptionsTest extends TestCase
     }
 
     /**
-     * @dataProvider setProvider
-     *
      * @param mixed $value
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('setProvider')]
     public function testSet(string $method, string $optionsKey, $value)
     {
         $options = (new SlackOptions())->$method($value);
@@ -121,9 +116,7 @@ final class SlackOptionsTest extends TestCase
         $this->assertSame([['type' => 'divider']], $options->toArray()['blocks']);
     }
 
-    /**
-     * @dataProvider fromNotificationProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('fromNotificationProvider')]
     public function testFromNotification(array $expected, Notification $notification)
     {
         $options = SlackOptions::fromNotification($notification);
diff --git a/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackTransportTest.php
index b0a54d5..ca7e35a 100644
--- a/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackTransportTest.php
@@ -167,10 +167,8 @@ final class SlackTransportTest extends TransportTestCase
         $this->assertSame('1503435956.000247', $sentMessage->getMessageId());
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
     public function testSendWithBooleanOptionValue(bool $value)
     {
         $channel = 'testChannel';
diff --git a/src/Symfony/Component/Notifier/Bridge/SmsBiuras/Tests/SmsBiurasTransportTest.php b/src/Symfony/Component/Notifier/Bridge/SmsBiuras/Tests/SmsBiurasTransportTest.php
index 6ebc4d3..64de1ea 100644
--- a/src/Symfony/Component/Notifier/Bridge/SmsBiuras/Tests/SmsBiurasTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/SmsBiuras/Tests/SmsBiurasTransportTest.php
@@ -43,9 +43,7 @@ final class SmsBiurasTransportTest extends TransportTestCase
         yield [new DummyMessage()];
     }
 
-    /**
-     * @dataProvider provideTestMode()
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTestMode')]
     public function testTestMode(int $expected, bool $testMode)
     {
         $message = new SmsMessage('0037012345678', 'Hello World');
diff --git a/src/Symfony/Component/Notifier/Bridge/Smsapi/Tests/SmsapiTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Smsapi/Tests/SmsapiTransportTest.php
index c7cd0e7..19348c3 100644
--- a/src/Symfony/Component/Notifier/Bridge/Smsapi/Tests/SmsapiTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Smsapi/Tests/SmsapiTransportTest.php
@@ -72,9 +72,7 @@ final class SmsapiTransportTest extends TransportTestCase
         }
     }
 
-    /**
-     * @dataProvider responseProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('responseProvider')]
     public function testThrowExceptionWhenMessageWasNotSent(int $statusCode, string $content, string $errorMessage)
     {
         $client = $this->createClient($statusCode, $content);
diff --git a/src/Symfony/Component/Notifier/Bridge/Smsmode/Tests/SmsmodeTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Smsmode/Tests/SmsmodeTransportTest.php
index 534e670..3570458 100644
--- a/src/Symfony/Component/Notifier/Bridge/Smsmode/Tests/SmsmodeTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Smsmode/Tests/SmsmodeTransportTest.php
@@ -40,9 +40,7 @@ final class SmsmodeTransportTest extends TransportTestCase
         yield [new SmsMessage('0611223344', 'Hello!', 'from', new SmsmodeOptions(['ref_client' => 'test_ref_client']))];
     }
 
-    /**
-     * @dataProvider invalidFromProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidFromProvider')]
     public function testInvalidArgumentExceptionIsThrownIfFromIsInvalid(string $from)
     {
         $transport = $this->createTransport(null, $from);
@@ -53,9 +51,7 @@ final class SmsmodeTransportTest extends TransportTestCase
         $transport->send(new SmsMessage('+33612345678', 'Hello!'));
     }
 
-    /**
-     * @dataProvider validFromProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validFromProvider')]
     public function testNoInvalidArgumentExceptionIsThrownIfFromIsValid(string $from)
     {
         $message = new SmsMessage('+33612345678', 'Hello!');
diff --git a/src/Symfony/Component/Notifier/Bridge/SpotHit/Tests/SpotHitTransportTest.php b/src/Symfony/Component/Notifier/Bridge/SpotHit/Tests/SpotHitTransportTest.php
index e512ce9..7d98350 100644
--- a/src/Symfony/Component/Notifier/Bridge/SpotHit/Tests/SpotHitTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/SpotHit/Tests/SpotHitTransportTest.php
@@ -91,9 +91,8 @@ final class SpotHitTransportTest extends TransportTestCase
         ];
     }
 
-    /**
-     * @dataProvider argumentsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('argumentsProvider')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testShouldForwardArgumentToRequest($setupTransport, $assertions)
     {
         $expectedRequest = [
diff --git a/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramOptionsTest.php b/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramOptionsTest.php
index 002d6dd..748bb61 100644
--- a/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramOptionsTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramOptionsTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Notifier\Bridge\Telegram\TelegramOptions;
 
 final class TelegramOptionsTest extends TestCase
 {
-    /**
-     * @dataProvider validCacheTimeDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validCacheTimeDataProvider')]
     public function testAnswerCallbackQueryWithCacheTime(int $cacheTime)
     {
         $options = new TelegramOptions();
@@ -43,9 +41,7 @@ final class TelegramOptionsTest extends TestCase
         yield 'cache time equals 10' => [10];
     }
 
-    /**
-     * @dataProvider invalidCacheTimeDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidCacheTimeDataProvider')]
     public function testAnswerCallbackQuery(int $cacheTime)
     {
         $options = new TelegramOptions();
diff --git a/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportTest.php
index 5b798e5..1edf6cc 100644
--- a/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportTest.php
@@ -430,9 +430,7 @@ final class TelegramTransportTest extends TransportTestCase
         ];
     }
 
-    /**
-     * @dataProvider sendFileByHttpUrlProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('sendFileByHttpUrlProvider')]
     public function testSendFileByHttpUrlWithOptions(
         TelegramOptions $messageOptions,
         string $endpoint,
@@ -578,9 +576,7 @@ final class TelegramTransportTest extends TransportTestCase
         ];
     }
 
-    /**
-     * @dataProvider sendFileByFileIdProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('sendFileByFileIdProvider')]
     public function testSendFileByFileIdWithOptions(
         TelegramOptions $messageOptions,
         string $endpoint,
@@ -779,11 +775,8 @@ final class TelegramTransportTest extends TransportTestCase
         ];
     }
 
-    /**
-     * @dataProvider sendFileByUploadProvider
-     *
-     * @requires extension fileinfo
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('fileinfo')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('sendFileByUploadProvider')]
     public function testSendFileByUploadWithOptions(
         TelegramOptions $messageOptions,
         string $endpoint,
@@ -1076,9 +1069,7 @@ V_CARD;
         ];
     }
 
-    /**
-     * @dataProvider exclusiveOptionsDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('exclusiveOptionsDataProvider')]
     public function testUsingMultipleExclusiveOptionsWillProvideExceptions(TelegramOptions $messageOptions)
     {
         $client = new MockHttpClient(function (string $method, string $url, array $options = []): ResponseInterface {
diff --git a/src/Symfony/Component/Notifier/Bridge/Termii/Tests/TermiiTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Termii/Tests/TermiiTransportTest.php
index 75c20b9..e88d2c0 100644
--- a/src/Symfony/Component/Notifier/Bridge/Termii/Tests/TermiiTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Termii/Tests/TermiiTransportTest.php
@@ -43,9 +43,7 @@ final class TermiiTransportTest extends TransportTestCase
         yield [new SmsMessage('0611223344', 'Hello!', 'from', new TermiiOptions(['from' => 'foo']))];
     }
 
-    /**
-     * @dataProvider invalidFromProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidFromProvider')]
     public function testInvalidArgumentExceptionIsThrownIfFromIsInvalid(string $from)
     {
         $transport = $this->createTransport(null, $from);
@@ -56,9 +54,7 @@ final class TermiiTransportTest extends TransportTestCase
         $transport->send(new SmsMessage('+33612345678', 'Hello!'));
     }
 
-    /**
-     * @dataProvider validFromProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validFromProvider')]
     public function testNoInvalidArgumentExceptionIsThrownIfFromIsValid(string $from)
     {
         $message = new SmsMessage('+33612345678', 'Hello!');
diff --git a/src/Symfony/Component/Notifier/Bridge/Twilio/Tests/TwilioTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Twilio/Tests/TwilioTransportTest.php
index e6002f1..5b0330f 100644
--- a/src/Symfony/Component/Notifier/Bridge/Twilio/Tests/TwilioTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Twilio/Tests/TwilioTransportTest.php
@@ -44,9 +44,7 @@ final class TwilioTransportTest extends TransportTestCase
         yield [new DummyMessage()];
     }
 
-    /**
-     * @dataProvider invalidFromProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidFromProvider')]
     public function testInvalidArgumentExceptionIsThrownIfFromIsInvalid(string $from)
     {
         $transport = self::createTransport(null, $from);
@@ -57,9 +55,7 @@ final class TwilioTransportTest extends TransportTestCase
         $transport->send(new SmsMessage('+33612345678', 'Hello!'));
     }
 
-    /**
-     * @dataProvider invalidFromProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidFromProvider')]
     public function testInvalidArgumentExceptionIsThrownIfSmsMessageFromIsInvalid(string $from)
     {
         $transport = $this->createTransport();
@@ -81,9 +77,7 @@ final class TwilioTransportTest extends TransportTestCase
         yield 'phone number to short' => ['+1'];
     }
 
-    /**
-     * @dataProvider validFromProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validFromProvider')]
     public function testNoInvalidArgumentExceptionIsThrownIfFromIsValid(string $from)
     {
         $message = new SmsMessage('+33612345678', 'Hello!');
diff --git a/src/Symfony/Component/Notifier/Test/TransportFactoryTestCase.php b/src/Symfony/Component/Notifier/Test/TransportFactoryTestCase.php
index 2d5ce57..eac397e 100644
--- a/src/Symfony/Component/Notifier/Test/TransportFactoryTestCase.php
+++ b/src/Symfony/Component/Notifier/Test/TransportFactoryTestCase.php
@@ -62,9 +62,7 @@ abstract class TransportFactoryTestCase extends TestCase
         return [];
     }
 
-    /**
-     * @dataProvider supportsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('supportsProvider')]
     public function testSupports(bool $expected, string $dsn)
     {
         $factory = $this->createFactory();
@@ -72,9 +70,7 @@ abstract class TransportFactoryTestCase extends TestCase
         $this->assertSame($expected, $factory->supports(new Dsn($dsn)));
     }
 
-    /**
-     * @dataProvider createProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('createProvider')]
     public function testCreate(string $expected, string $dsn)
     {
         $factory = $this->createFactory();
@@ -83,9 +79,7 @@ abstract class TransportFactoryTestCase extends TestCase
         $this->assertSame($expected, (string) $transport);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testUnsupportedSchemeException(string $dsn, ?string $message = null)
     {
         $factory = $this->createFactory();
@@ -100,9 +94,7 @@ abstract class TransportFactoryTestCase extends TestCase
         $factory->create($dsn);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testIncompleteDsnException(string $dsn, ?string $message = null)
     {
         $factory = $this->createFactory();
@@ -117,9 +109,7 @@ abstract class TransportFactoryTestCase extends TestCase
         $factory->create($dsn);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testMissingRequiredOptionException(string $dsn, ?string $message = null)
     {
         $factory = $this->createFactory();
diff --git a/src/Symfony/Component/Notifier/Test/TransportTestCase.php b/src/Symfony/Component/Notifier/Test/TransportTestCase.php
index d616575..555e8bc 100644
--- a/src/Symfony/Component/Notifier/Test/TransportTestCase.php
+++ b/src/Symfony/Component/Notifier/Test/TransportTestCase.php
@@ -44,17 +44,13 @@ abstract class TransportTestCase extends TestCase
      */
     abstract public static function unsupportedMessagesProvider(): iterable;
 
-    /**
-     * @dataProvider toStringProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('toStringProvider')]
     public function testToString(string $expected, TransportInterface $transport)
     {
         $this->assertSame($expected, (string) $transport);
     }
 
-    /**
-     * @dataProvider supportedMessagesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('supportedMessagesProvider')]
     public function testSupportedMessages(MessageInterface $message, ?TransportInterface $transport = null)
     {
         $transport ??= $this->createTransport();
@@ -62,9 +58,7 @@ abstract class TransportTestCase extends TestCase
         $this->assertTrue($transport->supports($message));
     }
 
-    /**
-     * @dataProvider unsupportedMessagesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('unsupportedMessagesProvider')]
     public function testUnsupportedMessages(MessageInterface $message, ?TransportInterface $transport = null)
     {
         $transport ??= $this->createTransport();
@@ -72,9 +66,7 @@ abstract class TransportTestCase extends TestCase
         $this->assertFalse($transport->supports($message));
     }
 
-    /**
-     * @dataProvider unsupportedMessagesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('unsupportedMessagesProvider')]
     public function testUnsupportedMessagesTrowUnsupportedMessageTypeExceptionWhenSend(MessageInterface $message, ?TransportInterface $transport = null)
     {
         $transport ??= $this->createTransport();
diff --git a/src/Symfony/Component/Notifier/Tests/Channel/BrowserChannelTest.php b/src/Symfony/Component/Notifier/Tests/Channel/BrowserChannelTest.php
index 33ea45c..ae8bb4e 100644
--- a/src/Symfony/Component/Notifier/Tests/Channel/BrowserChannelTest.php
+++ b/src/Symfony/Component/Notifier/Tests/Channel/BrowserChannelTest.php
@@ -29,9 +29,7 @@ use Symfony\Component\Notifier\Recipient\Recipient;
  */
 class BrowserChannelTest extends TestCase
 {
-    /**
-     * @dataProvider defaultFlashMessageImportanceDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('defaultFlashMessageImportanceDataProvider')]
     public function testImportanceLevelIsReflectedInFlashMessageType(
         FlashMessageImportanceMapperInterface $mapper,
         string $importance,
diff --git a/src/Symfony/Component/Notifier/Tests/Channel/ChannelPolicyTest.php b/src/Symfony/Component/Notifier/Tests/Channel/ChannelPolicyTest.php
index e448368..c140e87 100644
--- a/src/Symfony/Component/Notifier/Tests/Channel/ChannelPolicyTest.php
+++ b/src/Symfony/Component/Notifier/Tests/Channel/ChannelPolicyTest.php
@@ -28,9 +28,7 @@ class ChannelPolicyTest extends TestCase
         $channelPolicy->getChannels('low');
     }
 
-    /**
-     * @dataProvider provideValidPolicies
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidPolicies')]
     public function testCanRetrieveChannels(array $policy, string $importance, array $expectedChannels)
     {
         $channelPolicy = new ChannelPolicy($policy);
diff --git a/src/Symfony/Component/Notifier/Tests/Event/FailedMessageEventTest.php b/src/Symfony/Component/Notifier/Tests/Event/FailedMessageEventTest.php
index a2446a1..7bfd3cd 100644
--- a/src/Symfony/Component/Notifier/Tests/Event/FailedMessageEventTest.php
+++ b/src/Symfony/Component/Notifier/Tests/Event/FailedMessageEventTest.php
@@ -26,25 +26,19 @@ use Symfony\Contracts\HttpClient\HttpClientInterface;
 
 class FailedMessageEventTest extends TestCase
 {
-    /**
-     * @dataProvider messagesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('messagesProvider')]
     public function testConstruct(MessageInterface $message, \Throwable $error, FailedMessageEvent $event)
     {
         $this->assertEquals($event, new FailedMessageEvent($message, $error));
     }
 
-    /**
-     * @dataProvider messagesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('messagesProvider')]
     public function testGetMessage(MessageInterface $message, \Throwable $error, FailedMessageEvent $event)
     {
         $this->assertSame($message, $event->getMessage());
     }
 
-    /**
-     * @dataProvider messagesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('messagesProvider')]
     public function testGetError(MessageInterface $message, \Throwable $error, FailedMessageEvent $event)
     {
         $this->assertSame($error, $event->getError());
diff --git a/src/Symfony/Component/Notifier/Tests/Event/SentMessageEventTest.php b/src/Symfony/Component/Notifier/Tests/Event/SentMessageEventTest.php
index b768865..b5e9449 100644
--- a/src/Symfony/Component/Notifier/Tests/Event/SentMessageEventTest.php
+++ b/src/Symfony/Component/Notifier/Tests/Event/SentMessageEventTest.php
@@ -19,17 +19,13 @@ use Symfony\Component\Notifier\Message\SmsMessage;
 
 final class SentMessageEventTest extends TestCase
 {
-    /**
-     * @dataProvider messagesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('messagesProvider')]
     public function testConstruct(SentMessage $message, SentMessageEvent $event)
     {
         $this->assertEquals($event, new SentMessageEvent($message));
     }
 
-    /**
-     * @dataProvider messagesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('messagesProvider')]
     public function testGetMessage(SentMessage $message, SentMessageEvent $event)
     {
         $this->assertSame($message, $event->getMessage());
diff --git a/src/Symfony/Component/Notifier/Tests/Exception/UnsupportedSchemeExceptionTest.php b/src/Symfony/Component/Notifier/Tests/Exception/UnsupportedSchemeExceptionTest.php
index 2898d48..abcbb13 100644
--- a/src/Symfony/Component/Notifier/Tests/Exception/UnsupportedSchemeExceptionTest.php
+++ b/src/Symfony/Component/Notifier/Tests/Exception/UnsupportedSchemeExceptionTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Notifier\Bridge;
 use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
 use Symfony\Component\Notifier\Transport\Dsn;
 
-/**
- * @runTestsInSeparateProcesses
- */
+#[\PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses]
 final class UnsupportedSchemeExceptionTest extends TestCase
 {
     public static function setUpBeforeClass(): void
@@ -99,9 +97,7 @@ final class UnsupportedSchemeExceptionTest extends TestCase
         ]);
     }
 
-    /**
-     * @dataProvider messageWhereSchemeIsPartOfSchemeToPackageMapProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('messageWhereSchemeIsPartOfSchemeToPackageMapProvider')]
     public function testMessageWhereSchemeIsPartOfSchemeToPackageMap(string $scheme, string $package)
     {
         $dsn = new Dsn(\sprintf('%s://localhost', $scheme));
@@ -186,9 +182,7 @@ final class UnsupportedSchemeExceptionTest extends TestCase
         yield ['goip', 'symfony/go-ip-notifier'];
     }
 
-    /**
-     * @dataProvider messageWhereSchemeIsNotPartOfSchemeToPackageMapProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('messageWhereSchemeIsNotPartOfSchemeToPackageMapProvider')]
     public function testMessageWhereSchemeIsNotPartOfSchemeToPackageMap(string $expected, Dsn $dsn, ?string $name, array $supported)
     {
         $this->assertSame(
diff --git a/src/Symfony/Component/Notifier/Tests/Message/NullMessageTest.php b/src/Symfony/Component/Notifier/Tests/Message/NullMessageTest.php
index 1fcb00a..9df2249 100644
--- a/src/Symfony/Component/Notifier/Tests/Message/NullMessageTest.php
+++ b/src/Symfony/Component/Notifier/Tests/Message/NullMessageTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\Notifier\Message\NullMessage;
  */
 class NullMessageTest extends TestCase
 {
-    /**
-     * @dataProvider messageDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('messageDataProvider')]
     public function testCanBeConstructed(MessageInterface $message)
     {
         $nullMessage = new NullMessage($message);
diff --git a/src/Symfony/Component/Notifier/Tests/Recipient/RecipientTest.php b/src/Symfony/Component/Notifier/Tests/Recipient/RecipientTest.php
index a1dce43..94b577a 100644
--- a/src/Symfony/Component/Notifier/Tests/Recipient/RecipientTest.php
+++ b/src/Symfony/Component/Notifier/Tests/Recipient/RecipientTest.php
@@ -27,9 +27,7 @@ class RecipientTest extends TestCase
         new Recipient('', '');
     }
 
-    /**
-     * @dataProvider provideValidEmailAndPhone
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidEmailAndPhone')]
     public function testCanBeConstructed(string $email, string $phone)
     {
         $recipient = new Recipient($email, $phone);
diff --git a/src/Symfony/Component/Notifier/Tests/Transport/DsnTest.php b/src/Symfony/Component/Notifier/Tests/Transport/DsnTest.php
index 1d4e4d9..a13f52b 100644
--- a/src/Symfony/Component/Notifier/Tests/Transport/DsnTest.php
+++ b/src/Symfony/Component/Notifier/Tests/Transport/DsnTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\Notifier\Transport\Dsn;
 
 final class DsnTest extends TestCase
 {
-    /**
-     * @dataProvider constructProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('constructProvider')]
     public function testConstruct(string $dsnString, string $scheme, string $host, ?string $user = null, ?string $password = null, ?int $port = null, array $options = [], ?string $path = null)
     {
         $dsn = new Dsn($dsnString);
@@ -140,9 +138,7 @@ final class DsnTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider invalidDsnProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidDsnProvider')]
     public function testInvalidDsn(string $dsnString, string $exceptionMessage)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -169,9 +165,7 @@ final class DsnTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getOptionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getOptionProvider')]
     public function testGetOption($expected, string $dsnString, string $option, ?string $default = null)
     {
         $dsn = new Dsn($dsnString);
@@ -207,9 +201,7 @@ final class DsnTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getRequiredOptionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRequiredOptionProvider')]
     public function testGetRequiredOption(string $expectedValue, string $options, string $option)
     {
         $dsn = new Dsn(\sprintf('scheme://localhost?%s', $options));
@@ -232,9 +224,7 @@ final class DsnTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getRequiredOptionThrowsMissingRequiredOptionExceptionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRequiredOptionThrowsMissingRequiredOptionExceptionProvider')]
     public function testGetRequiredOptionThrowsMissingRequiredOptionException(string $expectedExceptionMessage, string $options, string $option)
     {
         $dsn = new Dsn(\sprintf('scheme://localhost?%s', $options));
diff --git a/src/Symfony/Component/Notifier/Tests/Transport/FailoverTransportTest.php b/src/Symfony/Component/Notifier/Tests/Transport/FailoverTransportTest.php
index d6c34d4..a5115c3 100644
--- a/src/Symfony/Component/Notifier/Tests/Transport/FailoverTransportTest.php
+++ b/src/Symfony/Component/Notifier/Tests/Transport/FailoverTransportTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\Notifier\Message\SentMessage;
 use Symfony\Component\Notifier\Transport\FailoverTransport;
 use Symfony\Component\Notifier\Transport\TransportInterface;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class FailoverTransportTest extends TestCase
 {
     public function testSendNoTransports()
@@ -111,9 +109,7 @@ class FailoverTransportTest extends TestCase
         $t->send($message);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testSendAllDeadWithinRetryPeriod()
     {
         $message = new DummyMessage();
@@ -129,7 +125,7 @@ class FailoverTransportTest extends TestCase
         $t2->expects($matcher)
             ->method('send')
             ->willReturnCallback(function () use ($matcher, $message) {
-                if (3 === $matcher->getInvocationCount()) {
+                if (3 === $matcher->numberOfInvocations()) {
                     throw $this->createMock(TransportExceptionInterface::class);
                 }
 
@@ -147,9 +143,7 @@ class FailoverTransportTest extends TestCase
         $t->send($message);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testSendOneDeadButRecover()
     {
         $message = new DummyMessage();
@@ -160,7 +154,7 @@ class FailoverTransportTest extends TestCase
         $t1Matcher = $this->exactly(2);
         $t1->expects($t1Matcher)->method('send')
             ->willReturnCallback(function () use ($t1Matcher, $message) {
-                if (1 === $t1Matcher->getInvocationCount()) {
+                if (1 === $t1Matcher->numberOfInvocations()) {
                     throw $this->createMock(TransportExceptionInterface::class);
                 }
 
@@ -171,7 +165,7 @@ class FailoverTransportTest extends TestCase
 
         $t2Matcher = $this->exactly(2);
         $t2->expects($t2Matcher)->method('send')->willReturnCallback(function () use ($t2Matcher, $message) {
-            if (1 === $t2Matcher->getInvocationCount()) {
+            if (1 === $t2Matcher->numberOfInvocations()) {
                 return new SentMessage($message, 't1');
             }
 
diff --git a/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php b/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php
index a9f3aaf..63cf424 100644
--- a/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php
+++ b/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php
@@ -33,9 +33,7 @@ class OptionsResolverTest extends TestCase
         $this->resolver = new OptionsResolver();
     }
 
-    /**
-     * @dataProvider provideResolveWithIgnoreUndefined
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideResolveWithIgnoreUndefined')]
     public function testResolveWithIgnoreUndefined(array $defaults, array $options, array $expected)
     {
         $this->resolver
@@ -541,9 +539,7 @@ class OptionsResolverTest extends TestCase
         $this->assertFalse($this->resolver->isDeprecated('foo'));
     }
 
-    /**
-     * @dataProvider provideDeprecationData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDeprecationData')]
     public function testDeprecationMessages(\Closure $configureOptions, array $options, ?array $expectedError, int $expectedCount)
     {
         $count = 0;
@@ -848,9 +844,7 @@ class OptionsResolverTest extends TestCase
         ]);
     }
 
-    /**
-     * @dataProvider provideInvalidTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidTypes')]
     public function testResolveFailsIfInvalidType($actualType, $allowedType, $exceptionMessage)
     {
         $this->resolver->setDefined('option');
diff --git a/src/Symfony/Component/PasswordHasher/Tests/Command/UserPasswordHashCommandTest.php b/src/Symfony/Component/PasswordHasher/Tests/Command/UserPasswordHashCommandTest.php
index 253403d..33bd260 100644
--- a/src/Symfony/Component/PasswordHasher/Tests/Command/UserPasswordHashCommandTest.php
+++ b/src/Symfony/Component/PasswordHasher/Tests/Command/UserPasswordHashCommandTest.php
@@ -280,15 +280,13 @@ EOTXT
         $this->expectException(\RuntimeException::class);
         $this->expectExceptionMessage('There are no configured password hashers for the "security" extension.');
 
-        $tester = new CommandTester(new UserPasswordHashCommand($this->getMockBuilder(PasswordHasherFactoryInterface::class)->getMock(), []));
+        $tester = new CommandTester(new UserPasswordHashCommand($this->createMock(PasswordHasherFactoryInterface::class), []));
         $tester->execute([
             'password' => 'password',
         ], ['interactive' => false]);
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testCompletionSuggestions(array $input, array $expectedSuggestions)
     {
         $command = new UserPasswordHashCommand($this->createMock(PasswordHasherFactoryInterface::class), ['App\Entity\User']);
diff --git a/src/Symfony/Component/PasswordHasher/Tests/Hasher/NativePasswordHasherTest.php b/src/Symfony/Component/PasswordHasher/Tests/Hasher/NativePasswordHasherTest.php
index 324e1dc..b909f43 100644
--- a/src/Symfony/Component/PasswordHasher/Tests/Hasher/NativePasswordHasherTest.php
+++ b/src/Symfony/Component/PasswordHasher/Tests/Hasher/NativePasswordHasherTest.php
@@ -31,9 +31,7 @@ class NativePasswordHasherTest extends TestCase
         new NativePasswordHasher(null, null, 32);
     }
 
-    /**
-     * @dataProvider validRangeData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validRangeData')]
     public function testCostInRange($cost)
     {
         $this->assertInstanceOf(NativePasswordHasher::class, new NativePasswordHasher(null, null, $cost));
@@ -98,9 +96,7 @@ class NativePasswordHasherTest extends TestCase
         $this->assertTrue($hasher->verify($hasher->hash($plainPassword), $plainPassword));
     }
 
-    /**
-     * @requires PHP < 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.4')]
     public function testBcryptWithNulByteWithNativePasswordHash()
     {
         $hasher = new NativePasswordHasher(null, null, 4, \PASSWORD_BCRYPT);
diff --git a/src/Symfony/Component/PasswordHasher/Tests/Hasher/SodiumPasswordHasherTest.php b/src/Symfony/Component/PasswordHasher/Tests/Hasher/SodiumPasswordHasherTest.php
index ed04b5e..ec21a48 100644
--- a/src/Symfony/Component/PasswordHasher/Tests/Hasher/SodiumPasswordHasherTest.php
+++ b/src/Symfony/Component/PasswordHasher/Tests/Hasher/SodiumPasswordHasherTest.php
@@ -73,9 +73,7 @@ class SodiumPasswordHasherTest extends TestCase
         $this->assertTrue($hasher->verify((new NativePasswordHasher(null, null, 4, \PASSWORD_BCRYPT))->hash($plainPassword), $plainPassword));
     }
 
-    /**
-     * @requires PHP < 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.4')]
     public function testBcryptWithNulByteWithNativePasswordHash()
     {
         $hasher = new SodiumPasswordHasher(null, null);
diff --git a/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php b/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php
index 3dc621c..fd8aede 100644
--- a/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php
+++ b/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php
@@ -85,9 +85,7 @@ class ExecutableFinderTest extends TestCase
         $this->assertSamePath(\PHP_BINARY, $result);
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testFindWithOpenBaseDir()
     {
         if ('\\' === \DIRECTORY_SEPARATOR) {
@@ -111,9 +109,7 @@ class ExecutableFinderTest extends TestCase
         }
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testFindBatchExecutableOnWindows()
     {
         if (\ini_get('open_basedir')) {
@@ -144,9 +140,7 @@ class ExecutableFinderTest extends TestCase
         $this->assertSamePath($target.'.BAT', $result);
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testEmptyDirInPath()
     {
         putenv(\sprintf('PATH=%s%s', \dirname(\PHP_BINARY), \PATH_SEPARATOR));
diff --git a/src/Symfony/Component/Process/Tests/PhpSubprocessTest.php b/src/Symfony/Component/Process/Tests/PhpSubprocessTest.php
index 3406e64..11a41ed 100644
--- a/src/Symfony/Component/Process/Tests/PhpSubprocessTest.php
+++ b/src/Symfony/Component/Process/Tests/PhpSubprocessTest.php
@@ -25,9 +25,7 @@ class PhpSubprocessTest extends TestCase
         self::$phpBin = getenv('SYMFONY_PROCESS_PHP_TEST_BINARY') ?: ('phpdbg' === \PHP_SAPI ? 'php' : $phpBin->find());
     }
 
-    /**
-     * @dataProvider subprocessProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('subprocessProvider')]
     public function testSubprocess(string $processClass, string $memoryLimit, string $expectedMemoryLimit)
     {
         $process = new Process([self::$phpBin,
diff --git a/src/Symfony/Component/Process/Tests/ProcessTest.php b/src/Symfony/Component/Process/Tests/ProcessTest.php
index 8a1d27b..424deff 100644
--- a/src/Symfony/Component/Process/Tests/ProcessTest.php
+++ b/src/Symfony/Component/Process/Tests/ProcessTest.php
@@ -66,10 +66,8 @@ class ProcessTest extends TestCase
         $cmd->run();
     }
 
-    /**
-     * @group nophpunit11
-     * @group transient-on-windows
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
+    #[\PHPUnit\Framework\Attributes\Group('transient-on-windows')]
     public function testThatProcessDoesNotThrowWarningDuringRun()
     {
         @trigger_error('Test Error', \E_USER_NOTICE);
@@ -107,9 +105,7 @@ class ProcessTest extends TestCase
         $this->assertNull($p->getTimeout());
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testStopWithTimeoutIsActuallyWorking()
     {
         $p = $this->getProcess([self::$phpBin, __DIR__.'/NonStopableProcess.php', 30]);
@@ -131,9 +127,7 @@ class ProcessTest extends TestCase
         $this->assertLessThan(15, microtime(true) - $start);
     }
 
-    /**
-     * @group transient-on-windows
-     */
+    #[\PHPUnit\Framework\Attributes\Group('transient-on-windows')]
     public function testWaitUntilSpecificOutput()
     {
         $p = $this->getProcess([self::$phpBin, __DIR__.'/KillableProcessWithOutput.php']);
@@ -217,9 +211,8 @@ class ProcessTest extends TestCase
 
     /**
      * tests results from sub processes.
-     *
-     * @dataProvider responsesCodeProvider
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('responsesCodeProvider')]
     public function testProcessResponses($expected, $getter, $code)
     {
         $p = $this->getProcessForCode($code);
@@ -230,9 +223,8 @@ class ProcessTest extends TestCase
 
     /**
      * tests results from sub processes.
-     *
-     * @dataProvider pipesCodeProvider
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('pipesCodeProvider')]
     public function testProcessPipes($code, $size)
     {
         $expected = str_repeat(str_repeat('*', 1024), $size).'!';
@@ -246,9 +238,7 @@ class ProcessTest extends TestCase
         $this->assertEquals($expectedLength, \strlen($p->getErrorOutput()));
     }
 
-    /**
-     * @dataProvider pipesCodeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('pipesCodeProvider')]
     public function testSetStreamAsInput($code, $size)
     {
         $expected = str_repeat(str_repeat('*', 1024), $size).'!';
@@ -303,9 +293,7 @@ class ProcessTest extends TestCase
         throw $e;
     }
 
-    /**
-     * @dataProvider provideInvalidInputValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidInputValues')]
     public function testInvalidInput($value)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -322,9 +310,7 @@ class ProcessTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideInputValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInputValues')]
     public function testValidInput($expected, $value)
     {
         $process = $this->getProcess('foo');
@@ -355,9 +341,7 @@ class ProcessTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider chainedCommandsOutputProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('chainedCommandsOutputProvider')]
     public function testChainedCommandsOutput($expected, $operator, $input)
     {
         $process = $this->getProcess(\sprintf('echo %s %s echo %s', $input, $operator, $input));
@@ -407,9 +391,7 @@ class ProcessTest extends TestCase
         $this->assertEmpty($p->getErrorOutput());
     }
 
-    /**
-     * @dataProvider provideIncrementalOutput
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIncrementalOutput')]
     public function testIncrementalOutput($getOutput, $getIncrementalOutput, $uri)
     {
         $lock = tempnam(sys_get_temp_dir(), __FUNCTION__);
@@ -486,9 +468,7 @@ class ProcessTest extends TestCase
         $this->assertGreaterThan(0, $process->getExitCode());
     }
 
-    /**
-     * @group tty
-     */
+    #[\PHPUnit\Framework\Attributes\Group('tty')]
     public function testTTYCommand()
     {
         if ('\\' === \DIRECTORY_SEPARATOR) {
@@ -508,9 +488,7 @@ class ProcessTest extends TestCase
         $this->assertSame(Process::STATUS_TERMINATED, $process->getStatus());
     }
 
-    /**
-     * @group tty
-     */
+    #[\PHPUnit\Framework\Attributes\Group('tty')]
     public function testTTYCommandExitCode()
     {
         if ('\\' === \DIRECTORY_SEPARATOR) {
@@ -528,9 +506,7 @@ class ProcessTest extends TestCase
         $this->assertTrue($process->isSuccessful());
     }
 
-    /**
-     * @group tty
-     */
+    #[\PHPUnit\Framework\Attributes\Group('tty')]
     public function testTTYInWindowsEnvironment()
     {
         $this->expectException(RuntimeException::class);
@@ -938,9 +914,7 @@ class ProcessTest extends TestCase
         $this->assertNull($process->getPid());
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testSignal()
     {
         $process = $this->getProcess([self::$phpBin, __DIR__.'/SignalListener.php']);
@@ -955,9 +929,7 @@ class ProcessTest extends TestCase
         $this->assertEquals('Caught SIGUSR1', $process->getOutput());
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testExitCodeIsAvailableAfterSignal()
     {
         $process = $this->getProcess('sleep 4');
@@ -982,9 +954,7 @@ class ProcessTest extends TestCase
         $process->signal(1); // SIGHUP
     }
 
-    /**
-     * @dataProvider provideMethodsThatNeedARunningProcess
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMethodsThatNeedARunningProcess')]
     public function testMethodsThatNeedARunningProcess($method)
     {
         $process = $this->getProcess('foo');
@@ -1006,9 +976,7 @@ class ProcessTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideMethodsThatNeedATerminatedProcess
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMethodsThatNeedATerminatedProcess')]
     public function testMethodsThatNeedATerminatedProcess($method)
     {
         $this->expectException(LogicException::class);
@@ -1118,9 +1086,7 @@ class ProcessTest extends TestCase
         $this->assertSame($process, $process->setIdleTimeout(null));
     }
 
-    /**
-     * @dataProvider provideOutputFetchingMethods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideOutputFetchingMethods')]
     public function testGetOutputWhileDisabled($fetchMethod)
     {
         $this->expectException(LogicException::class);
@@ -1202,9 +1168,7 @@ class ProcessTest extends TestCase
         return $codes;
     }
 
-    /**
-     * @dataProvider provideVariousIncrementals
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideVariousIncrementals')]
     public function testIncrementalOutputDoesNotRequireAnotherCall($stream, $method)
     {
         $process = $this->getProcessForCode('$n = 0; while ($n < 3) { file_put_contents(\''.$stream.'\', $n, 1); $n++; usleep(1000); }', null, null, null, null);
@@ -1472,9 +1436,7 @@ class ProcessTest extends TestCase
         $this->assertSame($expected, $p->getCommandLine());
     }
 
-    /**
-     * @dataProvider provideEscapeArgument
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEscapeArgument')]
     public function testEscapeArgument($arg)
     {
         $p = new Process([self::$phpBin, '-r', 'echo $argv[1];', $arg]);
@@ -1610,9 +1572,7 @@ class ProcessTest extends TestCase
         $this->assertSame(123, $process->getExitCode());
     }
 
-    /**
-     * @group slow
-     */
+    #[\PHPUnit\Framework\Attributes\Group('slow')]
     public function testLongRunningProcessWithMultipleCallsToProcGetStatus()
     {
         $process = $this->getProcess('sleep 1 && echo "done" && php -r "exit(0);"');
@@ -1625,9 +1585,7 @@ class ProcessTest extends TestCase
         $this->assertSame(0, $process->getExitCode());
     }
 
-    /**
-     * @group slow
-     */
+    #[\PHPUnit\Framework\Attributes\Group('slow')]
     public function testLongRunningProcessWithMultipleCallsToProcGetStatusError()
     {
         $process = $this->getProcess('sleep 1 && echo "failure" && php -r "exit(123);"');
@@ -1640,9 +1598,7 @@ class ProcessTest extends TestCase
         $this->assertSame(123, $process->getExitCode());
     }
 
-    /**
-     * @group transient-on-windows
-     */
+    #[\PHPUnit\Framework\Attributes\Group('transient-on-windows')]
     public function testNotTerminableInputPipe()
     {
         $process = $this->getProcess('echo foo');
diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTestCase.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTestCase.php
index 90d9318..06d195f 100644
--- a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTestCase.php
+++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTestCase.php
@@ -43,9 +43,7 @@ abstract class PropertyAccessorArrayAccessTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidPropertyPaths
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidPropertyPaths')]
     public function testGetValue($collection, $path, $value)
     {
         $this->assertSame($value, $this->propertyAccessor->getValue($collection, $path));
@@ -63,9 +61,7 @@ abstract class PropertyAccessorArrayAccessTestCase extends TestCase
         $this->propertyAccessor->getValue($object, '[lastName]');
     }
 
-    /**
-     * @dataProvider getValidPropertyPaths
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidPropertyPaths')]
     public function testSetValue($collection, $path)
     {
         $this->propertyAccessor->setValue($collection, $path, 'Updated');
@@ -73,25 +69,19 @@ abstract class PropertyAccessorArrayAccessTestCase extends TestCase
         $this->assertSame('Updated', $this->propertyAccessor->getValue($collection, $path));
     }
 
-    /**
-     * @dataProvider getValidPropertyPaths
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidPropertyPaths')]
     public function testIsReadable($collection, $path)
     {
         $this->assertTrue($this->propertyAccessor->isReadable($collection, $path));
     }
 
-    /**
-     * @dataProvider getValidPropertyPaths
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidPropertyPaths')]
     public function testIsWritable($collection, $path)
     {
         $this->assertTrue($this->propertyAccessor->isWritable($collection, $path));
     }
 
-    /**
-     * @dataProvider getInvalidPropertyPaths
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidPropertyPaths')]
     public function testIsNotWritable($collection, $path)
     {
         $this->assertFalse($this->propertyAccessor->isWritable($collection, $path));
diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTestCase.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTestCase.php
index 416f869..27825d5 100644
--- a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTestCase.php
+++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTestCase.php
@@ -154,9 +154,7 @@ abstract class PropertyAccessorCollectionTestCase extends PropertyAccessorArrayA
         $this->propertyAccessor->setValue($car, 'structure.axes', $axesAfter);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testSetValueFailsIfNoAdderNorRemoverFound()
     {
         $this->expectException(NoSuchPropertyException::class);
diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
index a0caa1e..0279dd8 100644
--- a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
+++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
@@ -83,26 +83,20 @@ class PropertyAccessorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidReadPropertyPaths
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidReadPropertyPaths')]
     public function testGetValue($objectOrArray, $path, $value)
     {
         $this->assertSame($value, $this->propertyAccessor->getValue($objectOrArray, $path));
     }
 
-    /**
-     * @dataProvider getPathsWithMissingProperty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingProperty')]
     public function testGetValueThrowsExceptionIfPropertyNotFound($objectOrArray, $path)
     {
         $this->expectException(NoSuchPropertyException::class);
         $this->propertyAccessor->getValue($objectOrArray, $path);
     }
 
-    /**
-     * @dataProvider getPathsWithMissingProperty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingProperty')]
     public function testGetValueReturnsNullIfPropertyNotFoundAndExceptionIsDisabled($objectOrArray, $path)
     {
         $this->propertyAccessor = new PropertyAccessor(PropertyAccessor::MAGIC_GET | PropertyAccessor::MAGIC_SET, PropertyAccessor::DO_NOT_THROW);
@@ -110,17 +104,13 @@ class PropertyAccessorTest extends TestCase
         $this->assertNull($this->propertyAccessor->getValue($objectOrArray, $path), $path);
     }
 
-    /**
-     * @dataProvider getPathsWithMissingIndex
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingIndex')]
     public function testGetValueThrowsNoExceptionIfIndexNotFound($objectOrArray, $path)
     {
         $this->assertNull($this->propertyAccessor->getValue($objectOrArray, $path));
     }
 
-    /**
-     * @dataProvider getPathsWithMissingIndex
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingIndex')]
     public function testGetValueThrowsExceptionIfIndexNotFoundAndIndexExceptionsEnabled($objectOrArray, $path)
     {
         $this->expectException(NoSuchIndexException::class);
@@ -313,9 +303,7 @@ class PropertyAccessorTest extends TestCase
         $this->assertSame('constant value', $this->propertyAccessor->getValue(new TestClassMagicCall('Bernhard'), 'constantMagicCallProperty'));
     }
 
-    /**
-     * @dataProvider getValidWritePropertyPaths
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidWritePropertyPaths')]
     public function testSetValue($objectOrArray, $path)
     {
         $this->propertyAccessor->setValue($objectOrArray, $path, 'Updated');
@@ -323,18 +311,14 @@ class PropertyAccessorTest extends TestCase
         $this->assertSame('Updated', $this->propertyAccessor->getValue($objectOrArray, $path));
     }
 
-    /**
-     * @dataProvider getPathsWithMissingProperty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingProperty')]
     public function testSetValueThrowsExceptionIfPropertyNotFound($objectOrArray, $path)
     {
         $this->expectException(NoSuchPropertyException::class);
         $this->propertyAccessor->setValue($objectOrArray, $path, 'Updated');
     }
 
-    /**
-     * @dataProvider getPathsWithMissingIndex
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingIndex')]
     public function testSetValueThrowsNoExceptionIfIndexNotFound($objectOrArray, $path)
     {
         $this->propertyAccessor->setValue($objectOrArray, $path, 'Updated');
@@ -342,9 +326,7 @@ class PropertyAccessorTest extends TestCase
         $this->assertSame('Updated', $this->propertyAccessor->getValue($objectOrArray, $path));
     }
 
-    /**
-     * @dataProvider getPathsWithMissingIndex
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingIndex')]
     public function testSetValueThrowsNoExceptionIfIndexNotFoundAndIndexExceptionsEnabled($objectOrArray, $path)
     {
         $this->propertyAccessor = new PropertyAccessor(PropertyAccessor::DISALLOW_MAGIC_METHODS, PropertyAccessor::THROW_ON_INVALID_INDEX | PropertyAccessor::THROW_ON_INVALID_PROPERTY_PATH);
@@ -413,34 +395,26 @@ class PropertyAccessorTest extends TestCase
         $this->assertNull($this->propertyAccessor->getValue(['index' => ['nullable' => null]], '[index][nullable]'));
     }
 
-    /**
-     * @dataProvider getValidReadPropertyPaths
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidReadPropertyPaths')]
     public function testIsReadable($objectOrArray, $path)
     {
         $this->assertTrue($this->propertyAccessor->isReadable($objectOrArray, $path));
     }
 
-    /**
-     * @dataProvider getPathsWithMissingProperty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingProperty')]
     public function testIsReadableReturnsFalseIfPropertyNotFound($objectOrArray, $path)
     {
         $this->assertFalse($this->propertyAccessor->isReadable($objectOrArray, $path));
     }
 
-    /**
-     * @dataProvider getPathsWithMissingIndex
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingIndex')]
     public function testIsReadableReturnsTrueIfIndexNotFound($objectOrArray, $path)
     {
         // Non-existing indices can be read. In this case, null is returned
         $this->assertTrue($this->propertyAccessor->isReadable($objectOrArray, $path));
     }
 
-    /**
-     * @dataProvider getPathsWithMissingIndex
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingIndex')]
     public function testIsReadableReturnsFalseIfIndexNotFoundAndIndexExceptionsEnabled($objectOrArray, $path)
     {
         $this->propertyAccessor = new PropertyAccessor(PropertyAccessor::DISALLOW_MAGIC_METHODS, PropertyAccessor::THROW_ON_INVALID_INDEX | PropertyAccessor::THROW_ON_INVALID_PROPERTY_PATH);
@@ -466,34 +440,26 @@ class PropertyAccessorTest extends TestCase
         $this->assertTrue($this->propertyAccessor->isReadable(new TestClassMagicCall('Bernhard'), 'magicCallProperty'));
     }
 
-    /**
-     * @dataProvider getValidWritePropertyPaths
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidWritePropertyPaths')]
     public function testIsWritable($objectOrArray, $path)
     {
         $this->assertTrue($this->propertyAccessor->isWritable($objectOrArray, $path));
     }
 
-    /**
-     * @dataProvider getPathsWithMissingProperty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingProperty')]
     public function testIsWritableReturnsFalseIfPropertyNotFound($objectOrArray, $path)
     {
         $this->assertFalse($this->propertyAccessor->isWritable($objectOrArray, $path));
     }
 
-    /**
-     * @dataProvider getPathsWithMissingIndex
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingIndex')]
     public function testIsWritableReturnsTrueIfIndexNotFound($objectOrArray, $path)
     {
         // Non-existing indices can be written. Arrays are created on-demand.
         $this->assertTrue($this->propertyAccessor->isWritable($objectOrArray, $path));
     }
 
-    /**
-     * @dataProvider getPathsWithMissingIndex
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingIndex')]
     public function testIsWritableReturnsTrueIfIndexNotFoundAndIndexExceptionsEnabled($objectOrArray, $path)
     {
         $this->propertyAccessor = new PropertyAccessor(PropertyAccessor::DISALLOW_MAGIC_METHODS, PropertyAccessor::THROW_ON_INVALID_INDEX | PropertyAccessor::THROW_ON_INVALID_PROPERTY_PATH);
@@ -590,9 +556,7 @@ class PropertyAccessorTest extends TestCase
         yield [['foo' => ['firstName' => 'Bernhard']], '[foo][bar?][baz?]', null];
     }
 
-    /**
-     * @dataProvider getNullSafeIndexPaths
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNullSafeIndexPaths')]
     public function testNullSafeIndexWithThrowOnInvalidIndex($objectOrArray, $path, $value)
     {
         $this->propertyAccessor = new PropertyAccessor(PropertyAccessor::DISALLOW_MAGIC_METHODS, PropertyAccessor::THROW_ON_INVALID_INDEX | PropertyAccessor::THROW_ON_INVALID_PROPERTY_PATH);
@@ -628,9 +592,7 @@ class PropertyAccessorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getReferenceChainObjectsForSetValue
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getReferenceChainObjectsForSetValue')]
     public function testSetValueForReferenceChainIssue($object, $path, $value)
     {
         $this->propertyAccessor->setValue($object, $path, $value);
@@ -647,9 +609,7 @@ class PropertyAccessorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getReferenceChainObjectsForIsWritable
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getReferenceChainObjectsForIsWritable')]
     public function testIsWritableForReferenceChainIssue($object, $path, $value)
     {
         $this->assertEquals($value, $this->propertyAccessor->isWritable($object, $path));
@@ -1029,9 +989,7 @@ class PropertyAccessorTest extends TestCase
         return (new \ReflectionClass(UninitializedObjectProperty::class))->newLazyGhost(fn () => null);
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testIsWritableWithAsymmetricVisibility()
     {
         $object = new AsymmetricVisibility();
@@ -1043,9 +1001,7 @@ class PropertyAccessorTest extends TestCase
         $this->assertFalse($this->propertyAccessor->isWritable($object, 'virtualNoSetHook'));
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testIsReadableWithAsymmetricVisibility()
     {
         $object = new AsymmetricVisibility();
@@ -1057,11 +1013,8 @@ class PropertyAccessorTest extends TestCase
         $this->assertTrue($this->propertyAccessor->isReadable($object, 'virtualNoSetHook'));
     }
 
-    /**
-     * @requires PHP 8.4
-     *
-     * @dataProvider setValueWithAsymmetricVisibilityDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('setValueWithAsymmetricVisibilityDataProvider')]
     public function testSetValueWithAsymmetricVisibility(string $propertyPath, ?string $expectedException)
     {
         $object = new AsymmetricVisibility();
diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php
index 948ca06..93523de 100644
--- a/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php
+++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php
@@ -182,9 +182,7 @@ class PropertyPathBuilderTest extends TestCase
         $this->assertEquals($path, $this->builder->getPropertyPath());
     }
 
-    /**
-     * @dataProvider provideInvalidOffsets
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidOffsets')]
     public function testReplaceDoesNotAllowInvalidOffsets($offset)
     {
         $this->expectException(\OutOfBoundsException::class);
diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php
index 40a9346..2b4cf91 100644
--- a/src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php
+++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php
@@ -49,9 +49,7 @@ class PropertyPathTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider providePathsContainingUnexpectedCharacters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePathsContainingUnexpectedCharacters')]
     public function testUnexpectedCharacters($path)
     {
         $this->expectException(InvalidPropertyPathException::class);
diff --git a/src/Symfony/Component/PropertyInfo/Tests/DependencyInjection/PropertyInfoPassTest.php b/src/Symfony/Component/PropertyInfo/Tests/DependencyInjection/PropertyInfoPassTest.php
index a1db482..9766bfc 100644
--- a/src/Symfony/Component/PropertyInfo/Tests/DependencyInjection/PropertyInfoPassTest.php
+++ b/src/Symfony/Component/PropertyInfo/Tests/DependencyInjection/PropertyInfoPassTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\PropertyInfo\DependencyInjection\PropertyInfoPass;
 
 class PropertyInfoPassTest extends TestCase
 {
-    /**
-     * @dataProvider provideTags
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTags')]
     public function testServicesAreOrderedAccordingToPriority($index, $tag)
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php
index 5aa2cd6..8353fca 100644
--- a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php
+++ b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php
@@ -34,9 +34,7 @@ class PhpDocExtractorTest extends TestCase
         $this->extractor = new PhpDocExtractor();
     }
 
-    /**
-     * @dataProvider typesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('typesProvider')]
     public function testExtract($property, ?array $type, $shortDescription, $longDescription)
     {
         $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property));
@@ -58,9 +56,7 @@ class PhpDocExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider invalidTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidTypesProvider')]
     public function testInvalid($property, $shortDescription, $longDescription)
     {
         $this->assertNull($this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\InvalidDummy', $property));
@@ -68,9 +64,7 @@ class PhpDocExtractorTest extends TestCase
         $this->assertSame($longDescription, $this->extractor->getLongDescription('Symfony\Component\PropertyInfo\Tests\Fixtures\InvalidDummy', $property));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testEmptyParamAnnotation()
     {
         $this->assertNull($this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\InvalidDummy', 'foo'));
@@ -78,9 +72,7 @@ class PhpDocExtractorTest extends TestCase
         $this->assertNull($this->extractor->getLongDescription('Symfony\Component\PropertyInfo\Tests\Fixtures\InvalidDummy', 'foo'));
     }
 
-    /**
-     * @dataProvider typesWithNoPrefixesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('typesWithNoPrefixesProvider')]
     public function testExtractTypesWithNoPrefixes($property, ?array $type = null)
     {
         $noPrefixExtractor = new PhpDocExtractor(null, [], [], []);
@@ -139,9 +131,7 @@ class PhpDocExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideCollectionTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCollectionTypes')]
     public function testExtractCollection($property, ?array $type, $shortDescription, $longDescription)
     {
         $this->testExtract($property, $type, $shortDescription, $longDescription);
@@ -201,9 +191,7 @@ class PhpDocExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider typesWithCustomPrefixesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('typesWithCustomPrefixesProvider')]
     public function testExtractTypesWithCustomPrefixes($property, ?array $type = null)
     {
         $customExtractor = new PhpDocExtractor(null, ['add', 'remove'], ['is', 'can']);
@@ -315,17 +303,13 @@ class PhpDocExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider dockBlockFallbackTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dockBlockFallbackTypesProvider')]
     public function testDocBlockFallback($property, $types)
     {
         $this->assertEquals($types, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\DockBlockFallback', $property));
     }
 
-    /**
-     * @dataProvider propertiesDefinedByTraitsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('propertiesDefinedByTraitsProvider')]
     public function testPropertiesDefinedByTraits(string $property, Type $type)
     {
         $this->assertEquals([$type], $this->extractor->getTypes(DummyUsingTrait::class, $property));
@@ -343,9 +327,7 @@ class PhpDocExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider methodsDefinedByTraitsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('methodsDefinedByTraitsProvider')]
     public function testMethodsDefinedByTraits(string $property, Type $type)
     {
         $this->assertEquals([$type], $this->extractor->getTypes(DummyUsingTrait::class, $property));
@@ -363,9 +345,7 @@ class PhpDocExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider propertiesStaticTypeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('propertiesStaticTypeProvider')]
     public function testPropertiesStaticType(string $class, string $property, Type $type)
     {
         $this->assertEquals([$type], $this->extractor->getTypes($class, $property));
@@ -379,9 +359,7 @@ class PhpDocExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider propertiesParentTypeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('propertiesParentTypeProvider')]
     public function testPropertiesParentType(string $class, string $property, ?array $types)
     {
         $this->assertEquals($types, $this->extractor->getTypes($class, $property));
@@ -405,9 +383,7 @@ class PhpDocExtractorTest extends TestCase
         $this->assertNull($this->extractor->getTypes(Dummy::class, 'genericInterface'));
     }
 
-    /**
-     * @dataProvider constructorTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('constructorTypesProvider')]
     public function testExtractConstructorTypes($property, ?array $type = null)
     {
         $this->assertEquals($type, $this->extractor->getTypesFromConstructor('Symfony\Component\PropertyInfo\Tests\Fixtures\ConstructorDummy', $property));
@@ -425,9 +401,7 @@ class PhpDocExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider pseudoTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('pseudoTypesProvider')]
     public function testPseudoTypes($property, array $type)
     {
         $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\PseudoTypesDummy', $property));
@@ -448,9 +422,7 @@ class PhpDocExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider promotedPropertyProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('promotedPropertyProvider')]
     public function testExtractPromotedProperty(string $property, ?array $types)
     {
         $this->assertEquals($types, $this->extractor->getTypes(Php80Dummy::class, $property));
diff --git a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php
index b798766..ed1dc66 100644
--- a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php
+++ b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php
@@ -46,9 +46,7 @@ class PhpStanExtractorTest extends TestCase
         $this->phpDocExtractor = new PhpDocExtractor();
     }
 
-    /**
-     * @dataProvider typesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('typesProvider')]
     public function testExtract($property, ?array $type = null)
     {
         $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property));
@@ -69,17 +67,13 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider invalidTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidTypesProvider')]
     public function testInvalid($property)
     {
         $this->assertNull($this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\InvalidDummy', $property));
     }
 
-    /**
-     * @dataProvider typesWithNoPrefixesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('typesWithNoPrefixesProvider')]
     public function testExtractTypesWithNoPrefixes($property, ?array $type = null)
     {
         $noPrefixExtractor = new PhpStanExtractor([], [], []);
@@ -133,9 +127,7 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideCollectionTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCollectionTypes')]
     public function testExtractCollection($property, ?array $type = null)
     {
         $this->testExtract($property, $type);
@@ -189,9 +181,7 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider typesWithCustomPrefixesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('typesWithCustomPrefixesProvider')]
     public function testExtractTypesWithCustomPrefixes($property, ?array $type = null)
     {
         $customExtractor = new PhpStanExtractor(['add', 'remove'], ['is', 'can']);
@@ -290,17 +280,13 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider dockBlockFallbackTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dockBlockFallbackTypesProvider')]
     public function testDocBlockFallback($property, $types)
     {
         $this->assertEquals($types, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\DockBlockFallback', $property));
     }
 
-    /**
-     * @dataProvider propertiesDefinedByTraitsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('propertiesDefinedByTraitsProvider')]
     public function testPropertiesDefinedByTraits(string $property, Type $type)
     {
         $this->assertEquals([$type], $this->extractor->getTypes(DummyUsingTrait::class, $property));
@@ -316,9 +302,7 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider propertiesStaticTypeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('propertiesStaticTypeProvider')]
     public function testPropertiesStaticType(string $class, string $property, Type $type)
     {
         $this->assertEquals([$type], $this->extractor->getTypes($class, $property));
@@ -332,9 +316,7 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider propertiesParentTypeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('propertiesParentTypeProvider')]
     public function testPropertiesParentType(string $class, string $property, ?array $types)
     {
         $this->assertEquals($types, $this->extractor->getTypes($class, $property));
@@ -348,17 +330,13 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider constructorTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('constructorTypesProvider')]
     public function testExtractConstructorTypes($property, ?array $type = null)
     {
         $this->assertEquals($type, $this->extractor->getTypesFromConstructor('Symfony\Component\PropertyInfo\Tests\Fixtures\ConstructorDummy', $property));
     }
 
-    /**
-     * @dataProvider constructorTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('constructorTypesProvider')]
     public function testExtractConstructorTypesReturnNullOnEmptyDocBlock($property)
     {
         $this->assertNull($this->extractor->getTypesFromConstructor(ConstructorDummyWithoutDocBlock::class, $property));
@@ -375,9 +353,7 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider unionTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('unionTypesProvider')]
     public function testExtractorUnionTypes(string $property, ?array $types)
     {
         $this->assertEquals($types, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\DummyUnionType', $property));
@@ -396,9 +372,7 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider pseudoTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('pseudoTypesProvider')]
     public function testPseudoTypes($property, array $type)
     {
         $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\PhpStanPseudoTypesDummy', $property));
@@ -446,9 +420,7 @@ class PhpStanExtractorTest extends TestCase
         $this->assertEquals($phpDocTypes[0]->getClassName(), $phpStanTypes[0]->getClassName());
     }
 
-    /**
-     * @dataProvider intRangeTypeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('intRangeTypeProvider')]
     public function testExtractorIntRangeType(string $property, ?array $types)
     {
         $this->assertEquals($types, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\IntRangeDummy', $property));
@@ -463,9 +435,7 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider php80TypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('php80TypesProvider')]
     public function testExtractPhp80Type(string $class, $property, ?array $type = null)
     {
         $this->assertEquals($type, $this->extractor->getTypes($class, $property, []));
@@ -501,8 +471,8 @@ class PhpStanExtractorTest extends TestCase
 
     /**
      * @param list<Type> $expectedTypes
-     * @dataProvider genericsProvider
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('genericsProvider')]
     public function testGenericsLegacy(string $property, array $expectedTypes)
     {
         $this->assertEquals($expectedTypes, $this->extractor->getTypes(DummyGeneric::class, $property));
diff --git a/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php
index a1acfc5..43edc15 100644
--- a/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php
+++ b/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php
@@ -208,9 +208,7 @@ class ReflectionExtractorTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider typesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('typesProvider')]
     public function testExtractors($property, ?array $type = null)
     {
         $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property, []));
@@ -235,9 +233,7 @@ class ReflectionExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider php7TypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('php7TypesProvider')]
     public function testExtractPhp7Type(string $class, string $property, ?array $type = null)
     {
         $this->assertEquals($type, $this->extractor->getTypes($class, $property, []));
@@ -256,9 +252,7 @@ class ReflectionExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider php71TypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('php71TypesProvider')]
     public function testExtractPhp71Type($property, ?array $type = null)
     {
         $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Php71Dummy', $property, []));
@@ -275,9 +269,7 @@ class ReflectionExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider php80TypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('php80TypesProvider')]
     public function testExtractPhp80Type($property, ?array $type = null)
     {
         $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Php80Dummy', $property, []));
@@ -297,9 +289,7 @@ class ReflectionExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider php81TypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('php81TypesProvider')]
     public function testExtractPhp81Type($property, ?array $type = null)
     {
         $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Php81Dummy', $property, []));
@@ -318,11 +308,8 @@ class ReflectionExtractorTest extends TestCase
         $this->assertFalse($this->extractor->isWritable(Php81Dummy::class, 'foo'));
     }
 
-    /**
-     * @dataProvider php82TypesProvider
-     *
-     * @requires PHP 8.2
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.2')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('php82TypesProvider')]
     public function testExtractPhp82Type($property, ?array $type = null)
     {
         $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Php82Dummy', $property, []));
@@ -339,9 +326,7 @@ class ReflectionExtractorTest extends TestCase
         yield ['someCollection', null];
     }
 
-    /**
-     * @dataProvider defaultValueProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('defaultValueProvider')]
     public function testExtractWithDefaultValue($property, $type)
     {
         $this->assertEquals($type, $this->extractor->getTypes(DefaultValue::class, $property, []));
@@ -358,9 +343,7 @@ class ReflectionExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getReadableProperties
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getReadableProperties')]
     public function testIsReadable($property, $expected)
     {
         $this->assertSame(
@@ -389,9 +372,7 @@ class ReflectionExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getWritableProperties
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getWritableProperties')]
     public function testIsWritable($property, $expected)
     {
         $this->assertSame(
@@ -460,9 +441,7 @@ class ReflectionExtractorTest extends TestCase
         $this->assertTrue($protectedExtractor->isReadable(Dummy::class, 'baz'));
     }
 
-    /**
-     * @dataProvider getInitializableProperties
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInitializableProperties')]
     public function testIsInitializable(string $class, string $property, bool $expected)
     {
         $this->assertSame($expected, $this->extractor->isInitializable($class, $property));
@@ -480,9 +459,7 @@ class ReflectionExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider constructorTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('constructorTypesProvider')]
     public function testExtractTypeConstructor(string $class, string $property, ?array $type = null)
     {
         /* Check that constructor extractions works by default, and if passed in via context.
@@ -528,9 +505,7 @@ class ReflectionExtractorTest extends TestCase
         $this->assertEquals([new Type(Type::BUILTIN_TYPE_ARRAY, true, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, Dummy::class))], $this->extractor->getTypes(Php74Dummy::class, 'nullableTypedCollection'));
     }
 
-    /**
-     * @dataProvider readAccessorProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('readAccessorProvider')]
     public function testGetReadAccessor($class, $property, $found, $type, $name, $visibility, $static)
     {
         $extractor = new ReflectionExtractor(null, null, null, true, ReflectionExtractor::ALLOW_PUBLIC | ReflectionExtractor::ALLOW_PROTECTED | ReflectionExtractor::ALLOW_PRIVATE);
@@ -563,9 +538,7 @@ class ReflectionExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider writeMutatorProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('writeMutatorProvider')]
     public function testGetWriteMutator($class, $property, $allowConstruct, $found, $type, $name, $addName, $removeName, $visibility, $static)
     {
         $extractor = new ReflectionExtractor(null, null, null, true, ReflectionExtractor::ALLOW_PUBLIC | ReflectionExtractor::ALLOW_PROTECTED | ReflectionExtractor::ALLOW_PRIVATE);
@@ -651,9 +624,7 @@ class ReflectionExtractorTest extends TestCase
         $this->assertSame(PropertyWriteInfo::TYPE_NONE, $writeMutatorWithoutConstructor->getType());
     }
 
-    /**
-     * @dataProvider extractConstructorTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('extractConstructorTypesProvider')]
     public function testExtractConstructorTypes(string $property, ?array $type = null)
     {
         $this->assertEquals($type, $this->extractor->getTypesFromConstructor('Symfony\Component\PropertyInfo\Tests\Fixtures\ConstructorDummy', $property));
@@ -670,9 +641,7 @@ class ReflectionExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testAsymmetricVisibility()
     {
         $this->assertTrue($this->extractor->isReadable(AsymmetricVisibility::class, 'publicPrivate'));
@@ -683,9 +652,7 @@ class ReflectionExtractorTest extends TestCase
         $this->assertFalse($this->extractor->isWritable(AsymmetricVisibility::class, 'protectedPrivate'));
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testAsymmetricVisibilityAllowPublicOnly()
     {
         $extractor = new ReflectionExtractor(null, null, null, true, ReflectionExtractor::ALLOW_PUBLIC);
@@ -698,9 +665,7 @@ class ReflectionExtractorTest extends TestCase
         $this->assertFalse($extractor->isWritable(AsymmetricVisibility::class, 'protectedPrivate'));
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testAsymmetricVisibilityAllowProtectedOnly()
     {
         $extractor = new ReflectionExtractor(null, null, null, true, ReflectionExtractor::ALLOW_PROTECTED);
@@ -713,9 +678,7 @@ class ReflectionExtractorTest extends TestCase
         $this->assertFalse($extractor->isWritable(AsymmetricVisibility::class, 'protectedPrivate'));
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testAsymmetricVisibilityAllowPrivateOnly()
     {
         $extractor = new ReflectionExtractor(null, null, null, true, ReflectionExtractor::ALLOW_PRIVATE);
@@ -728,9 +691,7 @@ class ReflectionExtractorTest extends TestCase
         $this->assertTrue($extractor->isWritable(AsymmetricVisibility::class, 'protectedPrivate'));
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testVirtualProperties()
     {
         $this->assertTrue($this->extractor->isReadable(VirtualProperties::class, 'virtualNoSetHook'));
@@ -741,11 +702,8 @@ class ReflectionExtractorTest extends TestCase
         $this->assertTrue($this->extractor->isWritable(VirtualProperties::class, 'virtualHook'));
     }
 
-    /**
-     * @dataProvider provideAsymmetricVisibilityMutator
-     *
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAsymmetricVisibilityMutator')]
     public function testAsymmetricVisibilityMutator(string $property, string $readVisibility, string $writeVisibility)
     {
         $extractor = new ReflectionExtractor(null, null, null, true, ReflectionExtractor::ALLOW_PUBLIC | ReflectionExtractor::ALLOW_PROTECTED | ReflectionExtractor::ALLOW_PRIVATE);
@@ -767,11 +725,8 @@ class ReflectionExtractorTest extends TestCase
         yield ['protectedPrivate', PropertyReadInfo::VISIBILITY_PROTECTED, PropertyWriteInfo::VISIBILITY_PRIVATE];
     }
 
-    /**
-     * @dataProvider provideVirtualPropertiesMutator
-     *
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideVirtualPropertiesMutator')]
     public function testVirtualPropertiesMutator(string $property, string $readVisibility, string $writeVisibility)
     {
         $extractor = new ReflectionExtractor(null, null, null, true, ReflectionExtractor::ALLOW_PUBLIC | ReflectionExtractor::ALLOW_PROTECTED | ReflectionExtractor::ALLOW_PRIVATE);
diff --git a/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoCacheExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoCacheExtractorTest.php
index 5a5de47..56cdfdd 100644
--- a/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoCacheExtractorTest.php
+++ b/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoCacheExtractorTest.php
@@ -26,42 +26,49 @@ class PropertyInfoCacheExtractorTest extends AbstractPropertyInfoExtractorTest
         $this->propertyInfo = new PropertyInfoCacheExtractor($this->propertyInfo, new ArrayAdapter());
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testGetShortDescription()
     {
         parent::testGetShortDescription();
         parent::testGetShortDescription();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testGetLongDescription()
     {
         parent::testGetLongDescription();
         parent::testGetLongDescription();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testGetTypes()
     {
         parent::testGetTypes();
         parent::testGetTypes();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testIsReadable()
     {
         parent::testIsReadable();
         parent::testIsReadable();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testIsWritable()
     {
         parent::testIsWritable();
         parent::testIsWritable();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testGetProperties()
     {
         parent::testGetProperties();
         parent::testGetProperties();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testIsInitializable()
     {
         parent::testIsInitializable();
diff --git a/src/Symfony/Component/RateLimiter/Tests/CompoundLimiterTest.php b/src/Symfony/Component/RateLimiter/Tests/CompoundLimiterTest.php
index 4cffe34..d0803ad 100644
--- a/src/Symfony/Component/RateLimiter/Tests/CompoundLimiterTest.php
+++ b/src/Symfony/Component/RateLimiter/Tests/CompoundLimiterTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\RateLimiter\Exception\ReserveNotSupportedException;
 use Symfony\Component\RateLimiter\Policy\FixedWindowLimiter;
 use Symfony\Component\RateLimiter\Storage\InMemoryStorage;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class CompoundLimiterTest extends TestCase
 {
     private InMemoryStorage $storage;
diff --git a/src/Symfony/Component/RateLimiter/Tests/Policy/FixedWindowLimiterTest.php b/src/Symfony/Component/RateLimiter/Tests/Policy/FixedWindowLimiterTest.php
index 86e5d04..9982e49 100644
--- a/src/Symfony/Component/RateLimiter/Tests/Policy/FixedWindowLimiterTest.php
+++ b/src/Symfony/Component/RateLimiter/Tests/Policy/FixedWindowLimiterTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\RateLimiter\Storage\InMemoryStorage;
 use Symfony\Component\RateLimiter\Tests\Resources\DummyWindow;
 use Symfony\Component\RateLimiter\Util\TimeUtil;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class FixedWindowLimiterTest extends TestCase
 {
     private InMemoryStorage $storage;
@@ -57,9 +55,7 @@ class FixedWindowLimiterTest extends TestCase
         $this->assertEquals($retryAfter, $rateLimit->getRetryAfter());
     }
 
-    /**
-     * @dataProvider provideConsumeOutsideInterval
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConsumeOutsideInterval')]
     public function testConsumeOutsideInterval(string $dateIntervalString)
     {
         $limiter = $this->createLimiter($dateIntervalString);
diff --git a/src/Symfony/Component/RateLimiter/Tests/Policy/RateTest.php b/src/Symfony/Component/RateLimiter/Tests/Policy/RateTest.php
index f5dc600..e52c1e9 100644
--- a/src/Symfony/Component/RateLimiter/Tests/Policy/RateTest.php
+++ b/src/Symfony/Component/RateLimiter/Tests/Policy/RateTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\RateLimiter\Policy\Rate;
 
 class RateTest extends TestCase
 {
-    /**
-     * @dataProvider provideRate
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRate')]
     public function testFromString(Rate $rate)
     {
         $this->assertEquals($rate, Rate::fromString((string) $rate));
diff --git a/src/Symfony/Component/RateLimiter/Tests/Policy/SlidingWindowLimiterTest.php b/src/Symfony/Component/RateLimiter/Tests/Policy/SlidingWindowLimiterTest.php
index 835c6cc..2be2043 100644
--- a/src/Symfony/Component/RateLimiter/Tests/Policy/SlidingWindowLimiterTest.php
+++ b/src/Symfony/Component/RateLimiter/Tests/Policy/SlidingWindowLimiterTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\RateLimiter\Policy\SlidingWindowLimiter;
 use Symfony\Component\RateLimiter\RateLimit;
 use Symfony\Component\RateLimiter\Storage\InMemoryStorage;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class SlidingWindowLimiterTest extends TestCase
 {
     private InMemoryStorage $storage;
diff --git a/src/Symfony/Component/RateLimiter/Tests/Policy/SlidingWindowTest.php b/src/Symfony/Component/RateLimiter/Tests/Policy/SlidingWindowTest.php
index 737c556..d6c7c49 100644
--- a/src/Symfony/Component/RateLimiter/Tests/Policy/SlidingWindowTest.php
+++ b/src/Symfony/Component/RateLimiter/Tests/Policy/SlidingWindowTest.php
@@ -16,9 +16,7 @@ use Symfony\Bridge\PhpUnit\ClockMock;
 use Symfony\Component\RateLimiter\Exception\InvalidIntervalException;
 use Symfony\Component\RateLimiter\Policy\SlidingWindow;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class SlidingWindowTest extends TestCase
 {
     public function testGetExpirationTime()
diff --git a/src/Symfony/Component/RateLimiter/Tests/Policy/TokenBucketLimiterTest.php b/src/Symfony/Component/RateLimiter/Tests/Policy/TokenBucketLimiterTest.php
index bd72dc5..bbfef97 100644
--- a/src/Symfony/Component/RateLimiter/Tests/Policy/TokenBucketLimiterTest.php
+++ b/src/Symfony/Component/RateLimiter/Tests/Policy/TokenBucketLimiterTest.php
@@ -21,9 +21,7 @@ use Symfony\Component\RateLimiter\RateLimit;
 use Symfony\Component\RateLimiter\Storage\InMemoryStorage;
 use Symfony\Component\RateLimiter\Tests\Resources\DummyWindow;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class TokenBucketLimiterTest extends TestCase
 {
     private InMemoryStorage $storage;
diff --git a/src/Symfony/Component/RateLimiter/Tests/RateLimitTest.php b/src/Symfony/Component/RateLimiter/Tests/RateLimitTest.php
index 57bfadf..edf71f5 100644
--- a/src/Symfony/Component/RateLimiter/Tests/RateLimitTest.php
+++ b/src/Symfony/Component/RateLimiter/Tests/RateLimitTest.php
@@ -16,9 +16,7 @@ use Symfony\Bridge\PhpUnit\ClockMock;
 use Symfony\Component\RateLimiter\Exception\RateLimitExceededException;
 use Symfony\Component\RateLimiter\RateLimit;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class RateLimitTest extends TestCase
 {
     public function testEnsureAcceptedDoesNotThrowExceptionIfAccepted()
diff --git a/src/Symfony/Component/RateLimiter/Tests/RateLimiterFactoryTest.php b/src/Symfony/Component/RateLimiter/Tests/RateLimiterFactoryTest.php
index 3856a11..01554ee 100644
--- a/src/Symfony/Component/RateLimiter/Tests/RateLimiterFactoryTest.php
+++ b/src/Symfony/Component/RateLimiter/Tests/RateLimiterFactoryTest.php
@@ -23,9 +23,7 @@ use Symfony\Component\RateLimiter\Storage\InMemoryStorage;
 
 class RateLimiterFactoryTest extends TestCase
 {
-    /**
-     * @dataProvider validConfigProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validConfigProvider')]
     public function testValidConfig(string $expectedClass, array $config)
     {
         $factory = new RateLimiterFactory($config, new InMemoryStorage());
@@ -61,9 +59,7 @@ class RateLimiterFactoryTest extends TestCase
         ]];
     }
 
-    /**
-     * @dataProvider invalidConfigProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidConfigProvider')]
     public function testInvalidConfig(string $exceptionClass, array $config)
     {
         $this->expectException($exceptionClass);
@@ -78,9 +74,7 @@ class RateLimiterFactoryTest extends TestCase
         ]];
     }
 
-    /**
-     * @group time-sensitive
-     */
+    #[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
     public function testExpirationTimeCalculationWhenUsingDefaultTimezoneRomeWithIntervalAfterCETChange()
     {
         $originalTimezone = date_default_timezone_get();
diff --git a/src/Symfony/Component/Routing/Tests/Attribute/RouteTest.php b/src/Symfony/Component/Routing/Tests/Attribute/RouteTest.php
index a603e05..d00eec6 100644
--- a/src/Symfony/Component/Routing/Tests/Attribute/RouteTest.php
+++ b/src/Symfony/Component/Routing/Tests/Attribute/RouteTest.php
@@ -39,18 +39,14 @@ class RouteTest extends TestCase
         return $route;
     }
 
-    /**
-     * @dataProvider getValidParameters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidParameters')]
     public function testLoadFromAttribute(string $methodName, string $getter, $expectedReturn)
     {
         $route = $this->getMethodAnnotation($methodName, true);
         $this->assertEquals($route->$getter(), $expectedReturn);
     }
 
-    /**
-     * @dataProvider getValidParameters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidParameters')]
     public function testLoadFromDoctrineAnnotation(string $methodName, string $getter, $expectedReturn)
     {
         $route = $this->getMethodAnnotation($methodName, false);
diff --git a/src/Symfony/Component/Routing/Tests/Generator/Dumper/CompiledUrlGeneratorDumperTest.php b/src/Symfony/Component/Routing/Tests/Generator/Dumper/CompiledUrlGeneratorDumperTest.php
index acd3b59..4ef8db4 100644
--- a/src/Symfony/Component/Routing/Tests/Generator/Dumper/CompiledUrlGeneratorDumperTest.php
+++ b/src/Symfony/Component/Routing/Tests/Generator/Dumper/CompiledUrlGeneratorDumperTest.php
@@ -342,9 +342,8 @@ class CompiledUrlGeneratorDumperTest extends TestCase
         $this->generatorDumper->dump();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDeprecatedAlias()
     {
         $this->expectDeprecation('Since foo/bar 1.0.0: The "b" route alias is deprecated. You should stop using it, as it will be removed in the future.');
@@ -360,9 +359,8 @@ class CompiledUrlGeneratorDumperTest extends TestCase
         $compiledUrlGenerator->generate('b');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDeprecatedAliasWithCustomMessage()
     {
         $this->expectDeprecation('Since foo/bar 1.0.0: foo b.');
@@ -378,9 +376,8 @@ class CompiledUrlGeneratorDumperTest extends TestCase
         $compiledUrlGenerator->generate('b');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testTargettingADeprecatedAliasShouldTriggerDeprecation()
     {
         $this->expectDeprecation('Since foo/bar 1.0.0: foo b.');
diff --git a/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php b/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php
index 733239d..2f7f394 100644
--- a/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php
+++ b/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php
@@ -108,9 +108,7 @@ class UrlGeneratorTest extends TestCase
         $this->assertSame('/app.php/', $this->getGenerator($routes)->generate('test'));
     }
 
-    /**
-     * @dataProvider valuesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('valuesProvider')]
     public function testRelativeUrlWithExtraParameters(string $expectedQueryString, string $parameter, $value)
     {
         $routes = $this->getRoutes('test', new Route('/testing'));
@@ -119,9 +117,7 @@ class UrlGeneratorTest extends TestCase
         $this->assertSame('/app.php/testing'.$expectedQueryString, $url);
     }
 
-    /**
-     * @dataProvider valuesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('valuesProvider')]
     public function testAbsoluteUrlWithExtraParameters(string $expectedQueryString, string $parameter, $value)
     {
         $routes = $this->getRoutes('test', new Route('/testing'));
@@ -321,9 +317,7 @@ class UrlGeneratorTest extends TestCase
         $generator->generate($name);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyThrowingMissingMandatoryParameters()
     {
         $this->expectDeprecation('Since symfony/routing 6.1: Construction of "Symfony\Component\Routing\Exception\MissingMandatoryParametersException" with an exception message is deprecated, provide the route name and an array of missing parameters instead.');
@@ -332,9 +326,7 @@ class UrlGeneratorTest extends TestCase
         $this->assertSame('expected legacy message', $exception->getMessage());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyThrowingMissingMandatoryParametersWithAllParameters()
     {
         $this->expectDeprecation('Since symfony/routing 6.1: Construction of "Symfony\Component\Routing\Exception\MissingMandatoryParametersException" with an exception message is deprecated, provide the route name and an array of missing parameters instead.');
@@ -802,9 +794,8 @@ class UrlGeneratorTest extends TestCase
         $this->getGenerator($routes)->generate('d');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDeprecatedAlias()
     {
         $this->expectDeprecation('Since foo/bar 1.0.0: The "b" route alias is deprecated. You should stop using it, as it will be removed in the future.');
@@ -817,9 +808,8 @@ class UrlGeneratorTest extends TestCase
         $this->getGenerator($routes)->generate('b');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDeprecatedAliasWithCustomMessage()
     {
         $this->expectDeprecation('Since foo/bar 1.0.0: foo b.');
@@ -832,9 +822,8 @@ class UrlGeneratorTest extends TestCase
         $this->getGenerator($routes)->generate('b');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testTargettingADeprecatedAliasShouldTriggerDeprecation()
     {
         $this->expectDeprecation('Since foo/bar 1.0.0: foo b.');
@@ -886,9 +875,7 @@ class UrlGeneratorTest extends TestCase
         $this->getGenerator($routes)->generate('a');
     }
 
-    /**
-     * @dataProvider provideRelativePaths
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRelativePaths')]
     public function testGetRelativePath($sourcePath, $targetPath, $expectedPath)
     {
         $this->assertSame($expectedPath, UrlGenerator::getRelativePath($sourcePath, $targetPath));
@@ -1027,9 +1014,7 @@ class UrlGeneratorTest extends TestCase
         $this->assertEquals('/app.php/testing#fragment', $url);
     }
 
-    /**
-     * @dataProvider provideLookAroundRequirementsInPath
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLookAroundRequirementsInPath')]
     public function testLookRoundRequirementsInPath($expected, $path, $requirement)
     {
         $routes = $this->getRoutes('test', new Route($path, [], ['foo' => $requirement, 'baz' => '.+?']));
diff --git a/src/Symfony/Component/Routing/Tests/Loader/AttributeClassLoaderTestCase.php b/src/Symfony/Component/Routing/Tests/Loader/AttributeClassLoaderTestCase.php
index 726d1e8..df2a541 100644
--- a/src/Symfony/Component/Routing/Tests/Loader/AttributeClassLoaderTestCase.php
+++ b/src/Symfony/Component/Routing/Tests/Loader/AttributeClassLoaderTestCase.php
@@ -25,9 +25,7 @@ abstract class AttributeClassLoaderTestCase extends TestCase
 
     protected AttributeClassLoader $loader;
 
-    /**
-     * @dataProvider provideTestSupportsChecksResource
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTestSupportsChecksResource')]
     public function testSupportsChecksResource($resource, $expectedSupports)
     {
         $this->assertSame($expectedSupports, $this->loader->supports($resource), '->supports() returns true if the resource is loadable');
@@ -52,9 +50,7 @@ abstract class AttributeClassLoaderTestCase extends TestCase
         $this->assertFalse($this->loader->supports('class', 'foo'), '->supports() checks the resource type if specified');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testSupportsAnnotations()
     {
         $this->expectDeprecation('Since symfony/routing 6.4: The "annotation" route type is deprecated, use the "attribute" route type instead.');
diff --git a/src/Symfony/Component/Routing/Tests/Loader/AttributeClassLoaderWithAnnotationsTest.php b/src/Symfony/Component/Routing/Tests/Loader/AttributeClassLoaderWithAnnotationsTest.php
index 450c865..e8a6fda 100644
--- a/src/Symfony/Component/Routing/Tests/Loader/AttributeClassLoaderWithAnnotationsTest.php
+++ b/src/Symfony/Component/Routing/Tests/Loader/AttributeClassLoaderWithAnnotationsTest.php
@@ -14,9 +14,7 @@ namespace Symfony\Component\Routing\Tests\Loader;
 use Doctrine\Common\Annotations\AnnotationReader;
 use Symfony\Component\Routing\Tests\Fixtures\TraceableAttributeClassLoader;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class AttributeClassLoaderWithAnnotationsTest extends AttributeClassLoaderTestCase
 {
     protected function setUp(?string $env = null): void
diff --git a/src/Symfony/Component/Routing/Tests/Loader/AttributeDirectoryLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/AttributeDirectoryLoaderTest.php
index 22a00a2..0e3f7b0 100644
--- a/src/Symfony/Component/Routing/Tests/Loader/AttributeDirectoryLoaderTest.php
+++ b/src/Symfony/Component/Routing/Tests/Loader/AttributeDirectoryLoaderTest.php
@@ -59,9 +59,7 @@ class AttributeDirectoryLoaderTest extends TestCase
         $this->assertFalse($this->loader->supports($fixturesDir, 'foo'), '->supports() checks the resource type if specified');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testSupportsAnnotations()
     {
         $fixturesDir = __DIR__.'/../Fixtures';
diff --git a/src/Symfony/Component/Routing/Tests/Loader/AttributeFileLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/AttributeFileLoaderTest.php
index 33626b1..8566fbd 100644
--- a/src/Symfony/Component/Routing/Tests/Loader/AttributeFileLoaderTest.php
+++ b/src/Symfony/Component/Routing/Tests/Loader/AttributeFileLoaderTest.php
@@ -68,9 +68,7 @@ class AttributeFileLoaderTest extends TestCase
         self::assertSame([VariadicClass::class], $this->classLoader->foundClasses);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLoadAnonymousClass()
     {
         $this->classLoader = new TraceableAttributeClassLoader(new AnnotationReader());
@@ -97,9 +95,7 @@ class AttributeFileLoaderTest extends TestCase
         $this->assertFalse($this->loader->supports($fixture, 'foo'), '->supports() checks the resource type if specified');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testSupportsAnnotations()
     {
         $fixture = __DIR__.'/../Fixtures/annotated.php';
diff --git a/src/Symfony/Component/Routing/Tests/Loader/ContainerLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/ContainerLoaderTest.php
index e4f9923..59584be 100644
--- a/src/Symfony/Component/Routing/Tests/Loader/ContainerLoaderTest.php
+++ b/src/Symfony/Component/Routing/Tests/Loader/ContainerLoaderTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Routing\Loader\ContainerLoader;
 
 class ContainerLoaderTest extends TestCase
 {
-    /**
-     * @dataProvider supportsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('supportsProvider')]
     public function testSupports(bool $expected, ?string $type = null)
     {
         $this->assertSame($expected, (new ContainerLoader(new Container()))->supports('foo', $type));
diff --git a/src/Symfony/Component/Routing/Tests/Loader/DirectoryLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/DirectoryLoaderTest.php
index 2b70d9d..0c8202c 100644
--- a/src/Symfony/Component/Routing/Tests/Loader/DirectoryLoaderTest.php
+++ b/src/Symfony/Component/Routing/Tests/Loader/DirectoryLoaderTest.php
@@ -38,12 +38,14 @@ class DirectoryLoaderTest extends TestCase
         $this->loader->setResolver($resolver);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadDirectory()
     {
         $collection = $this->loader->load(__DIR__.'/../Fixtures/directory', 'directory');
         $this->verifyCollection($collection);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testImportDirectory()
     {
         $collection = $this->loader->load(__DIR__.'/../Fixtures/directory_import', 'directory');
diff --git a/src/Symfony/Component/Routing/Tests/Loader/ObjectLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/ObjectLoaderTest.php
index cd40077..f51e214 100644
--- a/src/Symfony/Component/Routing/Tests/Loader/ObjectLoaderTest.php
+++ b/src/Symfony/Component/Routing/Tests/Loader/ObjectLoaderTest.php
@@ -40,9 +40,7 @@ class ObjectLoaderTest extends TestCase
         $this->assertNotEmpty($actualRoutes->getResources());
     }
 
-    /**
-     * @dataProvider getBadResourceStrings
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getBadResourceStrings')]
     public function testExceptionWithoutSyntax(string $resourceString)
     {
         $this->expectException(\InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php
index 9623f36..7ed2fcf 100644
--- a/src/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php
+++ b/src/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php
@@ -337,9 +337,7 @@ class PhpFileLoaderTest extends TestCase
         $this->assertEquals($expectedRoutes('php'), $routes);
     }
 
-    /**
-     * @dataProvider providePsr4ConfigFiles
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePsr4ConfigFiles')]
     public function testImportAttributesWithPsr4Prefix(string $configFile)
     {
         $locator = new FileLocator(\dirname(__DIR__).'/Fixtures');
diff --git a/src/Symfony/Component/Routing/Tests/Loader/Psr4DirectoryLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/Psr4DirectoryLoaderTest.php
index a007d4c..0c2a733 100644
--- a/src/Symfony/Component/Routing/Tests/Loader/Psr4DirectoryLoaderTest.php
+++ b/src/Symfony/Component/Routing/Tests/Loader/Psr4DirectoryLoaderTest.php
@@ -65,9 +65,7 @@ class Psr4DirectoryLoaderTest extends TestCase
         $this->assertSame(MyChildController::class.'::someAction', $route->getDefault('_controller'));
     }
 
-    /**
-     * @dataProvider provideNamespacesThatNeedTrimming
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNamespacesThatNeedTrimming')]
     public function testPsr4NamespaceTrim(string $namespace)
     {
         $route = $this->getLoader()
diff --git a/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php
index 32fd4de..afc5ace 100644
--- a/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php
+++ b/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php
@@ -214,9 +214,7 @@ class XmlFileLoaderTest extends TestCase
         $this->assertSame('en', $routeCollection->get('imported.en')->getRequirement('_locale'));
     }
 
-    /**
-     * @dataProvider getPathsToInvalidFiles
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsToInvalidFiles')]
     public function testLoadThrowsExceptionWithInvalidFile($filePath)
     {
         $this->expectException(\InvalidArgumentException::class);
@@ -224,9 +222,7 @@ class XmlFileLoaderTest extends TestCase
         $loader->load($filePath);
     }
 
-    /**
-     * @dataProvider getPathsToInvalidFiles
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsToInvalidFiles')]
     public function testLoadThrowsExceptionWithInvalidFileEvenWithoutSchemaValidation($filePath)
     {
         $this->expectException(\InvalidArgumentException::class);
@@ -464,9 +460,7 @@ class XmlFileLoaderTest extends TestCase
         $loader->load('override_defaults.xml');
     }
 
-    /**
-     * @dataProvider provideFilesImportingRoutesWithControllers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFilesImportingRoutesWithControllers')]
     public function testImportRouteWithController($file)
     {
         $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller']));
@@ -607,9 +601,7 @@ class XmlFileLoaderTest extends TestCase
         $this->assertEquals($expectedRoutes('xml'), $routes);
     }
 
-    /**
-     * @dataProvider providePsr4ConfigFiles
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePsr4ConfigFiles')]
     public function testImportAttributesWithPsr4Prefix(string $configFile)
     {
         $locator = new FileLocator(\dirname(__DIR__).'/Fixtures');
diff --git a/src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php
index 84ca12b..7607e59 100644
--- a/src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php
+++ b/src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php
@@ -46,9 +46,7 @@ class YamlFileLoaderTest extends TestCase
         $this->assertEquals([new FileResource(realpath(__DIR__.'/../Fixtures/empty.yml'))], $collection->getResources());
     }
 
-    /**
-     * @dataProvider getPathsToInvalidFiles
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsToInvalidFiles')]
     public function testLoadThrowsExceptionWithInvalidFile($filePath)
     {
         $this->expectException(\InvalidArgumentException::class);
@@ -157,9 +155,7 @@ class YamlFileLoaderTest extends TestCase
         $loader->load('override_defaults.yml');
     }
 
-    /**
-     * @dataProvider provideFilesImportingRoutesWithControllers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFilesImportingRoutesWithControllers')]
     public function testImportRouteWithController($file)
     {
         $loader = new YamlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller']));
@@ -515,9 +511,7 @@ class YamlFileLoaderTest extends TestCase
         $this->assertSame(1, $routes->getPriority('also_important'));
     }
 
-    /**
-     * @dataProvider providePsr4ConfigFiles
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePsr4ConfigFiles')]
     public function testImportAttributesWithPsr4Prefix(string $configFile)
     {
         $locator = new FileLocator(\dirname(__DIR__).'/Fixtures');
diff --git a/src/Symfony/Component/Routing/Tests/Matcher/Dumper/CompiledUrlMatcherDumperTest.php b/src/Symfony/Component/Routing/Tests/Matcher/Dumper/CompiledUrlMatcherDumperTest.php
index 644c908..73fc264 100644
--- a/src/Symfony/Component/Routing/Tests/Matcher/Dumper/CompiledUrlMatcherDumperTest.php
+++ b/src/Symfony/Component/Routing/Tests/Matcher/Dumper/CompiledUrlMatcherDumperTest.php
@@ -51,9 +51,7 @@ class CompiledUrlMatcherDumperTest extends TestCase
         $matcher->match('/foo%3Abar');
     }
 
-    /**
-     * @dataProvider getRouteCollections
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRouteCollections')]
     public function testDump(RouteCollection $collection, $fixture)
     {
         $basePath = __DIR__.'/../../Fixtures/dumper/';
diff --git a/src/Symfony/Component/Routing/Tests/Matcher/Dumper/StaticPrefixCollectionTest.php b/src/Symfony/Component/Routing/Tests/Matcher/Dumper/StaticPrefixCollectionTest.php
index 9935ced..127d735 100644
--- a/src/Symfony/Component/Routing/Tests/Matcher/Dumper/StaticPrefixCollectionTest.php
+++ b/src/Symfony/Component/Routing/Tests/Matcher/Dumper/StaticPrefixCollectionTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Routing\Route;
 
 class StaticPrefixCollectionTest extends TestCase
 {
-    /**
-     * @dataProvider routeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('routeProvider')]
     public function testGrouping(array $routes, $expected)
     {
         $collection = new StaticPrefixCollection('/');
diff --git a/src/Symfony/Component/Routing/Tests/Matcher/ExpressionLanguageProviderTest.php b/src/Symfony/Component/Routing/Tests/Matcher/ExpressionLanguageProviderTest.php
index 7128025..5fb2d61 100644
--- a/src/Symfony/Component/Routing/Tests/Matcher/ExpressionLanguageProviderTest.php
+++ b/src/Symfony/Component/Routing/Tests/Matcher/ExpressionLanguageProviderTest.php
@@ -40,9 +40,7 @@ class ExpressionLanguageProviderTest extends TestCase
         $this->expressionLanguage->registerProvider(new ExpressionLanguageProvider($functionProvider));
     }
 
-    /**
-     * @dataProvider compileProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('compileProvider')]
     public function testCompile(string $expression, string $expected)
     {
         $this->assertSame($expected, $this->expressionLanguage->compile($expression));
@@ -57,9 +55,7 @@ class ExpressionLanguageProviderTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider evaluateProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('evaluateProvider')]
     public function testEvaluate(string $expression, $expected)
     {
         $this->assertSame($expected, $this->expressionLanguage->evaluate($expression, ['context' => $this->context]));
diff --git a/src/Symfony/Component/Routing/Tests/Requirement/EnumRequirementTest.php b/src/Symfony/Component/Routing/Tests/Requirement/EnumRequirementTest.php
index 68b32ea..79a8d80 100644
--- a/src/Symfony/Component/Routing/Tests/Requirement/EnumRequirementTest.php
+++ b/src/Symfony/Component/Routing/Tests/Requirement/EnumRequirementTest.php
@@ -46,9 +46,7 @@ class EnumRequirementTest extends TestCase
         new EnumRequirement([TestStringBackedEnum::Diamonds, TestStringBackedEnum2::Spades]);
     }
 
-    /**
-     * @dataProvider provideToString
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideToString')]
     public function testToString(string $expected, string|array $cases = [])
     {
         $this->assertSame($expected, (string) new EnumRequirement($cases));
diff --git a/src/Symfony/Component/Routing/Tests/Requirement/RequirementTest.php b/src/Symfony/Component/Routing/Tests/Requirement/RequirementTest.php
index 47cde85..b9a4c9d 100644
--- a/src/Symfony/Component/Routing/Tests/Requirement/RequirementTest.php
+++ b/src/Symfony/Component/Routing/Tests/Requirement/RequirementTest.php
@@ -17,15 +17,13 @@ use Symfony\Component\Routing\Route;
 
 class RequirementTest extends TestCase
 {
-    /**
-     * @testWith    ["FOO"]
-     *              ["foo"]
-     *              ["1987"]
-     *              ["42-42"]
-     *              ["fo2o-bar"]
-     *              ["foo-bA198r-Ccc"]
-     *              ["fo10O-bar-CCc-fooba187rccc"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['FOO'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['1987'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['42-42'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['fo2o-bar'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo-bA198r-Ccc'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['fo10O-bar-CCc-fooba187rccc'])]
     public function testAsciiSlugOK(string $slug)
     {
         $this->assertMatchesRegularExpression(
@@ -34,16 +32,14 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    [""]
-     *              ["-"]
-     *              ["fôo"]
-     *              ["-FOO"]
-     *              ["foo-"]
-     *              ["-foo-"]
-     *              ["-foo-bar-"]
-     *              ["foo--bar"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([''])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['-'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['fôo'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['-FOO'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo-'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['-foo-'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['-foo-bar-'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo--bar'])]
     public function testAsciiSlugKO(string $slug)
     {
         $this->assertDoesNotMatchRegularExpression(
@@ -52,11 +48,9 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    ["foo"]
-     *              ["foo/bar/ccc"]
-     *              ["///"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo/bar/ccc'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['///'])]
     public function testCatchAllOK(string $path)
     {
         $this->assertMatchesRegularExpression(
@@ -65,9 +59,7 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    [""]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([''])]
     public function testCatchAllKO(string $path)
     {
         $this->assertDoesNotMatchRegularExpression(
@@ -76,13 +68,11 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    ["0000-01-01"]
-     *              ["9999-12-31"]
-     *              ["2022-04-15"]
-     *              ["2024-02-29"]
-     *              ["1243-04-31"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['0000-01-01'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['9999-12-31'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['2022-04-15'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['2024-02-29'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['1243-04-31'])]
     public function testDateYmdOK(string $date)
     {
         $this->assertMatchesRegularExpression(
@@ -91,14 +81,12 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    [""]
-     *              ["foo"]
-     *              ["0000-01-00"]
-     *              ["9999-00-31"]
-     *              ["2022-02-30"]
-     *              ["2022-02-31"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([''])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['0000-01-00'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['9999-00-31'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['2022-02-30'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['2022-02-31'])]
     public function testDateYmdKO(string $date)
     {
         $this->assertDoesNotMatchRegularExpression(
@@ -107,14 +95,12 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    ["0"]
-     *              ["012"]
-     *              ["1"]
-     *              ["42"]
-     *              ["42198"]
-     *              ["999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['0'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['012'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['1'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['42'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['42198'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'])]
     public function testDigitsOK(string $digits)
     {
         $this->assertMatchesRegularExpression(
@@ -123,12 +109,10 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    [""]
-     *              ["foo"]
-     *              ["-1"]
-     *              ["3.14"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([''])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['-1'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['3.14'])]
     public function testDigitsKO(string $digits)
     {
         $this->assertDoesNotMatchRegularExpression(
@@ -137,12 +121,10 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    ["1"]
-     *              ["42"]
-     *              ["42198"]
-     *              ["999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['1'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['42'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['42198'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'])]
     public function testPositiveIntOK(string $digits)
     {
         $this->assertMatchesRegularExpression(
@@ -151,14 +133,12 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    [""]
-     *              ["0"]
-     *              ["045"]
-     *              ["foo"]
-     *              ["-1"]
-     *              ["3.14"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([''])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['0'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['045'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['-1'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['3.14'])]
     public function testPositiveIntKO(string $digits)
     {
         $this->assertDoesNotMatchRegularExpression(
@@ -167,12 +147,10 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    ["00000000000000000000000000"]
-     *              ["ZZZZZZZZZZZZZZZZZZZZZZZZZZ"]
-     *              ["01G0P4XH09KW3RCF7G4Q57ESN0"]
-     *              ["05CSACM1MS9RB9H5F61BYA146Q"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['00000000000000000000000000'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['ZZZZZZZZZZZZZZZZZZZZZZZZZZ'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['01G0P4XH09KW3RCF7G4Q57ESN0'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['05CSACM1MS9RB9H5F61BYA146Q'])]
     public function testUidBase32OK(string $uid)
     {
         $this->assertMatchesRegularExpression(
@@ -181,12 +159,10 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    [""]
-     *              ["foo"]
-     *              ["01G0P4XH09KW3RCF7G4Q57ESN"]
-     *              ["01G0P4XH09KW3RCF7G4Q57ESNU"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([''])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['01G0P4XH09KW3RCF7G4Q57ESN'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['01G0P4XH09KW3RCF7G4Q57ESNU'])]
     public function testUidBase32KO(string $uid)
     {
         $this->assertDoesNotMatchRegularExpression(
@@ -195,12 +171,10 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    ["1111111111111111111111"]
-     *              ["zzzzzzzzzzzzzzzzzzzzzz"]
-     *              ["1BkPBX6T19U8TUAjBTtgwH"]
-     *              ["1fg491dt8eQpf2TU42o2bY"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['1111111111111111111111'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['zzzzzzzzzzzzzzzzzzzzzz'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['1BkPBX6T19U8TUAjBTtgwH'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['1fg491dt8eQpf2TU42o2bY'])]
     public function testUidBase58OK(string $uid)
     {
         $this->assertMatchesRegularExpression(
@@ -209,12 +183,10 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    [""]
-     *              ["foo"]
-     *              ["1BkPBX6T19U8TUAjBTtgw"]
-     *              ["1BkPBX6T19U8TUAjBTtgwI"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([''])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['1BkPBX6T19U8TUAjBTtgw'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['1BkPBX6T19U8TUAjBTtgwI'])]
     public function testUidBase58KO(string $uid)
     {
         $this->assertDoesNotMatchRegularExpression(
@@ -223,12 +195,10 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    ["00000000-0000-0000-0000-000000000000"]
-     *              ["ffffffff-ffff-ffff-ffff-ffffffffffff"]
-     *              ["01802c4e-c409-9f07-863c-f025ca7766a0"]
-     *              ["056654ca-0699-4e16-9895-e60afca090d7"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['00000000-0000-0000-0000-000000000000'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['ffffffff-ffff-ffff-ffff-ffffffffffff'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['01802c4e-c409-9f07-863c-f025ca7766a0'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['056654ca-0699-4e16-9895-e60afca090d7'])]
     public function testUidRfc4122OK(string $uid)
     {
         $this->assertMatchesRegularExpression(
@@ -237,13 +207,11 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    [""]
-     *              ["foo"]
-     *              ["01802c4e-c409-9f07-863c-f025ca7766a"]
-     *              ["01802c4e-c409-9f07-863c-f025ca7766ag"]
-     *              ["01802c4ec4099f07863cf025ca7766a0"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([''])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['01802c4e-c409-9f07-863c-f025ca7766a'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['01802c4e-c409-9f07-863c-f025ca7766ag'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['01802c4ec4099f07863cf025ca7766a0'])]
     public function testUidRfc4122KO(string $uid)
     {
         $this->assertDoesNotMatchRegularExpression(
@@ -252,11 +220,9 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    ["00000000000000000000000000"]
-     *              ["7ZZZZZZZZZZZZZZZZZZZZZZZZZ"]
-     *              ["01G0P4ZPM69QTD4MM4ENAEA4EW"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['00000000000000000000000000'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['7ZZZZZZZZZZZZZZZZZZZZZZZZZ'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['01G0P4ZPM69QTD4MM4ENAEA4EW'])]
     public function testUlidOK(string $ulid)
     {
         $this->assertMatchesRegularExpression(
@@ -265,12 +231,10 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    [""]
-     *              ["foo"]
-     *              ["8ZZZZZZZZZZZZZZZZZZZZZZZZZ"]
-     *              ["01G0P4ZPM69QTD4MM4ENAEA4E"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([''])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['8ZZZZZZZZZZZZZZZZZZZZZZZZZ'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['01G0P4ZPM69QTD4MM4ENAEA4E'])]
     public function testUlidKO(string $ulid)
     {
         $this->assertDoesNotMatchRegularExpression(
@@ -279,15 +243,13 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    ["00000000-0000-1000-8000-000000000000"]
-     *              ["ffffffff-ffff-6fff-bfff-ffffffffffff"]
-     *              ["8c670a1c-bc95-11ec-8422-0242ac120002"]
-     *              ["61c86569-e477-3ed9-9e3b-1562edb03277"]
-     *              ["e55a29be-ba25-46e0-a5e5-85b78a6f9a11"]
-     *              ["bad98960-f1a1-530e-9a82-07d0b6c4e62f"]
-     *              ["1ecbc9a8-432d-6b14-af93-715adc3b830c"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['00000000-0000-1000-8000-000000000000'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['ffffffff-ffff-6fff-bfff-ffffffffffff'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['8c670a1c-bc95-11ec-8422-0242ac120002'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['61c86569-e477-3ed9-9e3b-1562edb03277'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['e55a29be-ba25-46e0-a5e5-85b78a6f9a11'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['bad98960-f1a1-530e-9a82-07d0b6c4e62f'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['1ecbc9a8-432d-6b14-af93-715adc3b830c'])]
     public function testUuidOK(string $uuid)
     {
         $this->assertMatchesRegularExpression(
@@ -296,15 +258,13 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    [""]
-     *              ["foo"]
-     *              ["01802c74-d78c-b085-0cdf-7cbad87c70a3"]
-     *              ["e55a29be-ba25-46e0-a5e5-85b78a6f9a1"]
-     *              ["e55a29bh-ba25-46e0-a5e5-85b78a6f9a11"]
-     *              ["e55a29beba2546e0a5e585b78a6f9a11"]
-     *              ["21902510-bc96-21ec-8422-0242ac120002"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([''])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['01802c74-d78c-b085-0cdf-7cbad87c70a3'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['e55a29be-ba25-46e0-a5e5-85b78a6f9a1'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['e55a29bh-ba25-46e0-a5e5-85b78a6f9a11'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['e55a29beba2546e0a5e585b78a6f9a11'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['21902510-bc96-21ec-8422-0242ac120002'])]
     public function testUuidKO(string $uuid)
     {
         $this->assertDoesNotMatchRegularExpression(
@@ -313,13 +273,11 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    ["00000000-0000-1000-8000-000000000000"]
-     *              ["ffffffff-ffff-1fff-bfff-ffffffffffff"]
-     *              ["21902510-bc96-11ec-8422-0242ac120002"]
-     *              ["a8ff8f60-088e-1099-a09d-53afc49918d1"]
-     *              ["b0ac612c-9117-17a1-901f-53afc49918d1"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['00000000-0000-1000-8000-000000000000'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['ffffffff-ffff-1fff-bfff-ffffffffffff'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['21902510-bc96-11ec-8422-0242ac120002'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['a8ff8f60-088e-1099-a09d-53afc49918d1'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['b0ac612c-9117-17a1-901f-53afc49918d1'])]
     public function testUuidV1OK(string $uuid)
     {
         $this->assertMatchesRegularExpression(
@@ -328,14 +286,12 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    [""]
-     *              ["foo"]
-     *              ["a3674b89-0170-3e30-8689-52939013e39c"]
-     *              ["e0040090-3cb0-4bf9-a868-407770c964f9"]
-     *              ["2e2b41d9-e08c-53d2-b435-818b9c323942"]
-     *              ["2a37b67a-5eaa-6424-b5d6-ffc9ba0f2a13"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([''])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['a3674b89-0170-3e30-8689-52939013e39c'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['e0040090-3cb0-4bf9-a868-407770c964f9'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['2e2b41d9-e08c-53d2-b435-818b9c323942'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['2a37b67a-5eaa-6424-b5d6-ffc9ba0f2a13'])]
     public function testUuidV1KO(string $uuid)
     {
         $this->assertDoesNotMatchRegularExpression(
@@ -344,12 +300,10 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    ["00000000-0000-3000-8000-000000000000"]
-     *              ["ffffffff-ffff-3fff-bfff-ffffffffffff"]
-     *              ["2b3f1427-33b2-30a9-8759-07355007c204"]
-     *              ["c38e7b09-07f7-3901-843d-970b0186b873"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['00000000-0000-3000-8000-000000000000'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['ffffffff-ffff-3fff-bfff-ffffffffffff'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['2b3f1427-33b2-30a9-8759-07355007c204'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['c38e7b09-07f7-3901-843d-970b0186b873'])]
     public function testUuidV3OK(string $uuid)
     {
         $this->assertMatchesRegularExpression(
@@ -358,14 +312,12 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    [""]
-     *              ["foo"]
-     *              ["e24d9c0e-bc98-11ec-9924-53afc49918d1"]
-     *              ["1c240248-7d0b-41a4-9d20-61ad2915a58c"]
-     *              ["4816b668-385b-5a65-808d-bca410f45090"]
-     *              ["1d2f3104-dff6-64c6-92ff-0f74b1d0e2af"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([''])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['e24d9c0e-bc98-11ec-9924-53afc49918d1'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['1c240248-7d0b-41a4-9d20-61ad2915a58c'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['4816b668-385b-5a65-808d-bca410f45090'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['1d2f3104-dff6-64c6-92ff-0f74b1d0e2af'])]
     public function testUuidV3KO(string $uuid)
     {
         $this->assertDoesNotMatchRegularExpression(
@@ -374,12 +326,10 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    ["00000000-0000-4000-8000-000000000000"]
-     *              ["ffffffff-ffff-4fff-bfff-ffffffffffff"]
-     *              ["b8f15bf4-46e2-4757-bbce-11ae83f7a6ea"]
-     *              ["eaf51230-1ce2-40f1-ab18-649212b26198"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['00000000-0000-4000-8000-000000000000'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['ffffffff-ffff-4fff-bfff-ffffffffffff'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['b8f15bf4-46e2-4757-bbce-11ae83f7a6ea'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['eaf51230-1ce2-40f1-ab18-649212b26198'])]
     public function testUuidV4OK(string $uuid)
     {
         $this->assertMatchesRegularExpression(
@@ -388,14 +338,12 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    [""]
-     *              ["foo"]
-     *              ["15baaab2-f310-11d2-9ecf-53afc49918d1"]
-     *              ["acd44dc8-d2cc-326c-9e3a-80a3305a25e8"]
-     *              ["7fc2705f-a8a4-5b31-99a8-890686d64189"]
-     *              ["1ecbc991-3552-6920-998e-efad54178a98"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([''])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['15baaab2-f310-11d2-9ecf-53afc49918d1'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['acd44dc8-d2cc-326c-9e3a-80a3305a25e8'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['7fc2705f-a8a4-5b31-99a8-890686d64189'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['1ecbc991-3552-6920-998e-efad54178a98'])]
     public function testUuidV4KO(string $uuid)
     {
         $this->assertDoesNotMatchRegularExpression(
@@ -404,12 +352,10 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    ["00000000-0000-5000-8000-000000000000"]
-     *              ["ffffffff-ffff-5fff-bfff-ffffffffffff"]
-     *              ["49f4d32c-28b3-5802-8717-a2896180efbd"]
-     *              ["58b3c62e-a7df-5a82-93a6-fbe5fda681c1"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['00000000-0000-5000-8000-000000000000'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['ffffffff-ffff-5fff-bfff-ffffffffffff'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['49f4d32c-28b3-5802-8717-a2896180efbd'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['58b3c62e-a7df-5a82-93a6-fbe5fda681c1'])]
     public function testUuidV5OK(string $uuid)
     {
         $this->assertMatchesRegularExpression(
@@ -418,14 +364,12 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    [""]
-     *              ["foo"]
-     *              ["b99ad578-fdd3-1135-9d3b-53afc49918d1"]
-     *              ["b3ee3071-7a2b-3e17-afdf-6b6aec3acf85"]
-     *              ["2ab4f5a7-6412-46c1-b3ab-1fe1ed391e27"]
-     *              ["135fdd3d-e193-653e-865d-67e88cf12e44"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([''])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['b99ad578-fdd3-1135-9d3b-53afc49918d1'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['b3ee3071-7a2b-3e17-afdf-6b6aec3acf85'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['2ab4f5a7-6412-46c1-b3ab-1fe1ed391e27'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['135fdd3d-e193-653e-865d-67e88cf12e44'])]
     public function testUuidV5KO(string $uuid)
     {
         $this->assertDoesNotMatchRegularExpression(
@@ -434,13 +378,11 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    ["00000000-0000-6000-8000-000000000000"]
-     *              ["ffffffff-ffff-6fff-bfff-ffffffffffff"]
-     *              ["2c51caad-c72f-66b2-b6d7-8766d36c73df"]
-     *              ["17941ebb-48fa-6bfe-9bbd-43929f8784f5"]
-     *              ["1ecbc993-f6c2-67f2-8fbe-295ed594b344"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['00000000-0000-6000-8000-000000000000'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['ffffffff-ffff-6fff-bfff-ffffffffffff'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['2c51caad-c72f-66b2-b6d7-8766d36c73df'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['17941ebb-48fa-6bfe-9bbd-43929f8784f5'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['1ecbc993-f6c2-67f2-8fbe-295ed594b344'])]
     public function testUuidV6OK(string $uuid)
     {
         $this->assertMatchesRegularExpression(
@@ -449,14 +391,12 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    [""]
-     *              ["foo"]
-     *              ["821040f4-7b67-12a3-9770-53afc49918d1"]
-     *              ["802dc245-aaaa-3649-98c6-31c549b0df86"]
-     *              ["92d2e5ad-bc4e-4947-a8d9-77706172ca83"]
-     *              ["6e124559-d260-511e-afdc-e57c7025fed0"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([''])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['foo'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['821040f4-7b67-12a3-9770-53afc49918d1'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['802dc245-aaaa-3649-98c6-31c549b0df86'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['92d2e5ad-bc4e-4947-a8d9-77706172ca83'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['6e124559-d260-511e-afdc-e57c7025fed0'])]
     public function testUuidV6KO(string $uuid)
     {
         $this->assertDoesNotMatchRegularExpression(
diff --git a/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php b/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php
index 32902f6..415c52b 100644
--- a/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php
+++ b/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Routing\RouteCompiler;
 
 class RouteCompilerTest extends TestCase
 {
-    /**
-     * @dataProvider provideCompileData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompileData')]
     public function testCompile($name, $arguments, $prefix, $regex, $variables, $tokens)
     {
         $r = new \ReflectionClass(Route::class);
@@ -183,9 +181,7 @@ class RouteCompilerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideCompileImplicitUtf8Data
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompileImplicitUtf8Data')]
     public function testCompileImplicitUtf8Data($name, $arguments, $prefix, $regex, $variables, $tokens, $deprecationType)
     {
         $this->expectException(\LogicException::class);
@@ -274,9 +270,7 @@ class RouteCompilerTest extends TestCase
         $route->compile();
     }
 
-    /**
-     * @dataProvider getVariableNamesStartingWithADigit
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getVariableNamesStartingWithADigit')]
     public function testRouteWithVariableNameStartingWithADigit($name)
     {
         $this->expectException(\DomainException::class);
@@ -293,9 +287,7 @@ class RouteCompilerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideCompileWithHostData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompileWithHostData')]
     public function testCompileWithHost($name, $arguments, $prefix, $regex, $variables, $pathVariables, $tokens, $hostRegex, $hostVariables, $hostTokens)
     {
         $r = new \ReflectionClass(Route::class);
@@ -371,9 +363,7 @@ class RouteCompilerTest extends TestCase
         $route->compile();
     }
 
-    /**
-     * @dataProvider provideRemoveCapturingGroup
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRemoveCapturingGroup')]
     public function testRemoveCapturingGroup($regex, $requirement)
     {
         $route = new Route('/{foo}', [], ['foo' => $requirement]);
diff --git a/src/Symfony/Component/Routing/Tests/RouteTest.php b/src/Symfony/Component/Routing/Tests/RouteTest.php
index da64d6c..adde458 100644
--- a/src/Symfony/Component/Routing/Tests/RouteTest.php
+++ b/src/Symfony/Component/Routing/Tests/RouteTest.php
@@ -141,9 +141,7 @@ class RouteTest extends TestCase
         $this->assertTrue($route->hasRequirement('foo'));
     }
 
-    /**
-     * @dataProvider getInvalidRequirements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidRequirements')]
     public function testSetInvalidRequirement($req)
     {
         $this->expectException(\InvalidArgumentException::class);
@@ -310,9 +308,7 @@ class RouteTest extends TestCase
         $this->assertNotSame($route, $unserialized);
     }
 
-    /**
-     * @dataProvider provideNonLocalizedRoutes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNonLocalizedRoutes')]
     public function testLocaleDefaultWithNonLocalizedRoutes(Route $route)
     {
         $this->assertNotSame('fr', $route->getDefault('_locale'));
@@ -320,9 +316,7 @@ class RouteTest extends TestCase
         $this->assertSame('fr', $route->getDefault('_locale'));
     }
 
-    /**
-     * @dataProvider provideLocalizedRoutes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocalizedRoutes')]
     public function testLocaleDefaultWithLocalizedRoutes(Route $route)
     {
         $expected = $route->getDefault('_locale');
@@ -332,9 +326,7 @@ class RouteTest extends TestCase
         $this->assertSame($expected, $route->getDefault('_locale'));
     }
 
-    /**
-     * @dataProvider provideNonLocalizedRoutes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNonLocalizedRoutes')]
     public function testLocaleRequirementWithNonLocalizedRoutes(Route $route)
     {
         $this->assertNotSame('fr', $route->getRequirement('_locale'));
@@ -342,9 +334,7 @@ class RouteTest extends TestCase
         $this->assertSame('fr', $route->getRequirement('_locale'));
     }
 
-    /**
-     * @dataProvider provideLocalizedRoutes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocalizedRoutes')]
     public function testLocaleRequirementWithLocalizedRoutes(Route $route)
     {
         $expected = $route->getRequirement('_locale');
diff --git a/src/Symfony/Component/Scheduler/Tests/Generator/MessageGeneratorTest.php b/src/Symfony/Component/Scheduler/Tests/Generator/MessageGeneratorTest.php
index 9f13210..df0c9e6 100644
--- a/src/Symfony/Component/Scheduler/Tests/Generator/MessageGeneratorTest.php
+++ b/src/Symfony/Component/Scheduler/Tests/Generator/MessageGeneratorTest.php
@@ -24,9 +24,7 @@ use Symfony\Component\Scheduler\Trigger\TriggerInterface;
 
 class MessageGeneratorTest extends TestCase
 {
-    /**
-     * @dataProvider messagesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('messagesProvider')]
     public function testGetMessagesFromSchedule(string $startTime, array $runs, array $schedule)
     {
         $clock = new MockClock(self::makeDateTime($startTime));
@@ -50,9 +48,7 @@ class MessageGeneratorTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider messagesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('messagesProvider')]
     public function testGetMessagesFromScheduleProvider(string $startTime, array $runs, array $schedule)
     {
         $clock = new MockClock(self::makeDateTime($startTime));
diff --git a/src/Symfony/Component/Scheduler/Tests/Trigger/CronExpressionTriggerTest.php b/src/Symfony/Component/Scheduler/Tests/Trigger/CronExpressionTriggerTest.php
index cf12a7c..a137794 100644
--- a/src/Symfony/Component/Scheduler/Tests/Trigger/CronExpressionTriggerTest.php
+++ b/src/Symfony/Component/Scheduler/Tests/Trigger/CronExpressionTriggerTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Scheduler\Trigger\CronExpressionTrigger;
 
 class CronExpressionTriggerTest extends TestCase
 {
-    /**
-     * @dataProvider hashedExpressionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('hashedExpressionProvider')]
     public function testHashedExpressionParsing(string $input, string $expected)
     {
         $triggerA = CronExpressionTrigger::fromSpec($input, 'my task');
diff --git a/src/Symfony/Component/Scheduler/Tests/Trigger/PeriodicalTriggerTest.php b/src/Symfony/Component/Scheduler/Tests/Trigger/PeriodicalTriggerTest.php
index 8f1ce90..6da6c6f 100644
--- a/src/Symfony/Component/Scheduler/Tests/Trigger/PeriodicalTriggerTest.php
+++ b/src/Symfony/Component/Scheduler/Tests/Trigger/PeriodicalTriggerTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\Scheduler\Trigger\TriggerInterface;
 
 class PeriodicalTriggerTest extends TestCase
 {
-    /**
-     * @dataProvider provideForConstructor
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideForConstructor')]
     public function testConstructor(PeriodicalTrigger $trigger, bool $optimizable = true)
     {
         $run = new \DateTimeImmutable('2922-02-22 12:34:00+00:00');
@@ -57,9 +55,7 @@ class PeriodicalTriggerTest extends TestCase
         yield [new PeriodicalTrigger(new \DateInterval('P1D'), $now), false];
     }
 
-    /**
-     * @dataProvider getInvalidIntervals
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidIntervals')]
     public function testInvalidInterval($interval, $expectedExceptionMessage)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -78,9 +74,7 @@ class PeriodicalTriggerTest extends TestCase
         yield [0, 'The "$interval" argument must be greater than zero.'];
     }
 
-    /**
-     * @dataProvider provideForToString
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideForToString')]
     public function testToString(string $expected, PeriodicalTrigger $trigger)
     {
         $this->assertSame($expected, (string) $trigger);
@@ -105,9 +99,7 @@ class PeriodicalTriggerTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider providerGetNextRunDates
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerGetNextRunDates')]
     public function testGetNextRunDates(\DateTimeImmutable $from, TriggerInterface $trigger, array $expected, int $count)
     {
         $this->assertEquals($expected, $this->getNextRunDates($from, $trigger, $count));
@@ -158,9 +150,7 @@ class PeriodicalTriggerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider providerGetNextRunDateAgain
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerGetNextRunDateAgain')]
     public function testGetNextRunDateAgain(PeriodicalTrigger $trigger, \DateTimeImmutable $lastRun, ?\DateTimeImmutable $expected)
     {
         $this->assertEquals($expected, $trigger->getNextRunDate($lastRun));
diff --git a/src/Symfony/Component/Security/Core/Test/AccessDecisionStrategyTestCase.php b/src/Symfony/Component/Security/Core/Test/AccessDecisionStrategyTestCase.php
index bf2a2b9..b3670bd 100644
--- a/src/Symfony/Component/Security/Core/Test/AccessDecisionStrategyTestCase.php
+++ b/src/Symfony/Component/Security/Core/Test/AccessDecisionStrategyTestCase.php
@@ -25,10 +25,9 @@ use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
 abstract class AccessDecisionStrategyTestCase extends TestCase
 {
     /**
-     * @dataProvider provideStrategyTests
-     *
      * @param VoterInterface[] $voters
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideStrategyTests')]
     final public function testDecide(AccessDecisionStrategyInterface $strategy, array $voters, bool $expected)
     {
         $token = $this->createMock(TokenInterface::class);
diff --git a/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php b/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php
index cc1357a..1f3b117 100644
--- a/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\Security\Core\User\UserInterface;
 
 class AbstractTokenTest extends TestCase
 {
-    /**
-     * @dataProvider provideUsers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUsers')]
     public function testGetUserIdentifier($user, string $username)
     {
         $token = new ConcreteToken(['ROLE_FOO']);
@@ -83,9 +81,7 @@ class AbstractTokenTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provideUsers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUsers')]
     public function testSetUser($user)
     {
         $token = new ConcreteToken();
diff --git a/src/Symfony/Component/Security/Core/Tests/Authentication/Token/Storage/TokenStorageTest.php b/src/Symfony/Component/Security/Core/Tests/Authentication/Token/Storage/TokenStorageTest.php
index 5b260b5..fe19a18 100644
--- a/src/Symfony/Component/Security/Core/Tests/Authentication/Token/Storage/TokenStorageTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Authentication/Token/Storage/TokenStorageTest.php
@@ -21,9 +21,7 @@ class TokenStorageTest extends TestCase
 {
     use ExpectDeprecationTrait;
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGetSetTokenLegacy()
     {
         $tokenStorage = new TokenStorage();
diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php
index 36b048c..1d4909a 100644
--- a/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php
@@ -43,9 +43,7 @@ class AuthorizationCheckerTest extends TestCase
         $authorizationChecker->isGranted('ROLE_FOO');
     }
 
-    /**
-     * @dataProvider isGrantedProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('isGrantedProvider')]
     public function testIsGranted($decide)
     {
         $token = new UsernamePasswordToken(new InMemoryUser('username', 'password', ['ROLE_USER']), 'provider', ['ROLE_USER']);
diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php
index 8cc4810..27c0f75 100644
--- a/src/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php
@@ -25,9 +25,7 @@ use Symfony\Component\Security\Core\User\InMemoryUser;
 
 class ExpressionLanguageTest extends TestCase
 {
-    /**
-     * @dataProvider provider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provider')]
     public function testIsAuthenticated($token, $expression, $result)
     {
         $expressionLanguage = new ExpressionLanguage();
diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/TraceableAccessDecisionManagerTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/TraceableAccessDecisionManagerTest.php
index 468a89f..6900552 100644
--- a/src/Symfony/Component/Security/Core/Tests/Authorization/TraceableAccessDecisionManagerTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Authorization/TraceableAccessDecisionManagerTest.php
@@ -21,9 +21,7 @@ use Symfony\Component\Security\Core\Tests\Fixtures\DummyVoter;
 
 class TraceableAccessDecisionManagerTest extends TestCase
 {
-    /**
-     * @dataProvider provideObjectsAndLogs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideObjectsAndLogs')]
     public function testDecideLog(array $expectedLog, array $attributes, $object, array $voterVotes, bool $result)
     {
         $token = $this->createMock(TokenInterface::class);
diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php
index 732b890..b812a45 100644
--- a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php
@@ -23,9 +23,7 @@ use Symfony\Component\Security\Core\User\InMemoryUser;
 
 class AuthenticatedVoterTest extends TestCase
 {
-    /**
-     * @dataProvider getVoteTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getVoteTests')]
     public function testVote($authenticated, $attributes, $expected)
     {
         $voter = new AuthenticatedVoter(new AuthenticationTrustResolver());
@@ -53,9 +51,7 @@ class AuthenticatedVoterTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideAttributes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAttributes')]
     public function testSupportsAttribute(string $attribute, bool $expected)
     {
         $voter = new AuthenticatedVoter(new AuthenticationTrustResolver());
@@ -105,7 +101,7 @@ class AuthenticatedVoterTest extends TestCase
         }
 
         if ('impersonated' === $authenticated) {
-            return $this->getMockBuilder(SwitchUserToken::class)->disableOriginalConstructor()->getMock();
+            return $this->createMock(SwitchUserToken::class);
         }
 
         return new NullToken();
diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/ExpressionVoterTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/ExpressionVoterTest.php
index 369b17f..86844b5 100644
--- a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/ExpressionVoterTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/ExpressionVoterTest.php
@@ -22,9 +22,7 @@ use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
 
 class ExpressionVoterTest extends TestCase
 {
-    /**
-     * @dataProvider getVoteTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getVoteTests')]
     public function testVoteWithTokenThatReturnsRoleNames($roles, $attributes, $expected, $tokenExpectsGetRoles = true, $expressionLanguageExpectsEvaluate = true)
     {
         $voter = new ExpressionVoter($this->createExpressionLanguage($expressionLanguageExpectsEvaluate), $this->createTrustResolver(), $this->createAuthorizationChecker());
diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php
index b811bd7..f5a6d24 100644
--- a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Security\Core\Role\RoleHierarchy;
 
 class RoleHierarchyVoterTest extends RoleVoterTest
 {
-    /**
-     * @dataProvider getVoteTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getVoteTests')]
     public function testVoteUsingTokenThatReturnsRoleNames($roles, $attributes, $expected)
     {
         $voter = new RoleHierarchyVoter(new RoleHierarchy(['ROLE_FOO' => ['ROLE_FOOBAR']]));
@@ -34,9 +32,7 @@ class RoleHierarchyVoterTest extends RoleVoterTest
         ]);
     }
 
-    /**
-     * @dataProvider getVoteWithEmptyHierarchyTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getVoteWithEmptyHierarchyTests')]
     public function testVoteWithEmptyHierarchyUsingTokenThatReturnsRoleNames($roles, $attributes, $expected)
     {
         $voter = new RoleHierarchyVoter(new RoleHierarchy([]));
diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleVoterTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleVoterTest.php
index dfa0555..f84e446 100644
--- a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleVoterTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleVoterTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
 
 class RoleVoterTest extends TestCase
 {
-    /**
-     * @dataProvider getVoteTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getVoteTests')]
     public function testVoteUsingTokenThatReturnsRoleNames($roles, $attributes, $expected)
     {
         $voter = new RoleVoter();
@@ -46,9 +44,7 @@ class RoleVoterTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideAttributes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAttributes')]
     public function testSupportsAttribute(string $prefix, string $attribute, bool $expected)
     {
         $voter = new RoleVoter($prefix);
diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/VoterTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/VoterTest.php
index 05292f6..3fcf0ce 100644
--- a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/VoterTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/VoterTest.php
@@ -55,9 +55,7 @@ class VoterTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTests')]
     public function testVote(VoterInterface $voter, array $attributes, $expectedVote, $object, $message)
     {
         $this->assertEquals($expectedVote, $voter->vote($this->token, $object, $attributes), $message);
diff --git a/src/Symfony/Component/Security/Core/Tests/Resources/TranslationFilesTest.php b/src/Symfony/Component/Security/Core/Tests/Resources/TranslationFilesTest.php
index 695cdd9..3737a43 100644
--- a/src/Symfony/Component/Security/Core/Tests/Resources/TranslationFilesTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Resources/TranslationFilesTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Translation\Util\XliffUtils;
 
 class TranslationFilesTest extends TestCase
 {
-    /**
-     * @dataProvider provideTranslationFiles
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTranslationFiles')]
     public function testTranslationFileIsValid($filePath)
     {
         $document = new \DOMDocument();
@@ -29,9 +27,7 @@ class TranslationFilesTest extends TestCase
         $this->assertCount(0, $errors, \sprintf('"%s" is invalid:%s', $filePath, \PHP_EOL.implode(\PHP_EOL, array_column($errors, 'message'))));
     }
 
-    /**
-     * @dataProvider provideTranslationFiles
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTranslationFiles')]
     public function testTranslationFileIsValidWithoutEntityLoader($filePath)
     {
         $document = new \DOMDocument();
diff --git a/src/Symfony/Component/Security/Core/Tests/SecurityTest.php b/src/Symfony/Component/Security/Core/Tests/SecurityTest.php
index 0043689..0554283 100644
--- a/src/Symfony/Component/Security/Core/Tests/SecurityTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/SecurityTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
 use Symfony\Component\Security\Core\Security;
 use Symfony\Component\Security\Core\User\InMemoryUser;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class SecurityTest extends TestCase
 {
     public function testGetToken()
@@ -40,9 +38,7 @@ class SecurityTest extends TestCase
         $this->assertSame($token, $security->getToken());
     }
 
-    /**
-     * @dataProvider getUserTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getUserTests')]
     public function testGetUser($userInToken, $expectedUser)
     {
         $token = $this->createMock(TokenInterface::class);
diff --git a/src/Symfony/Component/Security/Core/Tests/User/InMemoryUserTest.php b/src/Symfony/Component/Security/Core/Tests/User/InMemoryUserTest.php
index 0e64bce..81ea3ba 100644
--- a/src/Symfony/Component/Security/Core/Tests/User/InMemoryUserTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/User/InMemoryUserTest.php
@@ -67,12 +67,12 @@ class InMemoryUserTest extends TestCase
     }
 
     /**
-     * @dataProvider isEqualToData
      *
      * @param bool          $expectation
      * @param UserInterface $a
      * @param UserInterface $b
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('isEqualToData')]
     public function testIsEqualTo($expectation, $a, $b)
     {
         $this->assertSame($expectation, $a->isEqualTo($b));
diff --git a/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordTest.php b/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordTest.php
index 3c42c9b..f14e69d 100644
--- a/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordTest.php
@@ -25,9 +25,7 @@ class UserPasswordTest extends TestCase
         self::assertSame('security.validator.user_password', $constraint->validatedBy());
     }
 
-    /**
-     * @dataProvider provideServiceValidatedConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideServiceValidatedConstraints')]
     public function testValidatedByService(UserPassword $constraint)
     {
         self::assertSame('my_service', $constraint->validatedBy());
diff --git a/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTestCase.php b/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTestCase.php
index ccf556a..ee89cf1 100644
--- a/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTestCase.php
+++ b/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTestCase.php
@@ -48,9 +48,7 @@ abstract class UserPasswordValidatorTestCase extends ConstraintValidatorTestCase
         parent::setUp();
     }
 
-    /**
-     * @dataProvider provideConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstraints')]
     public function testPasswordIsValid(UserPassword $constraint)
     {
         $this->hasher->expects($this->once())
@@ -63,9 +61,7 @@ abstract class UserPasswordValidatorTestCase extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider provideConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstraints')]
     public function testPasswordIsNotValid(UserPassword $constraint)
     {
         $this->hasher->expects($this->once())
@@ -87,9 +83,7 @@ abstract class UserPasswordValidatorTestCase extends ConstraintValidatorTestCase
         yield 'named arguments' => [new UserPassword(message: 'myMessage')];
     }
 
-    /**
-     * @dataProvider emptyPasswordData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('emptyPasswordData')]
     public function testEmptyPasswordsAreNotValid($password)
     {
         $constraint = new UserPassword([
diff --git a/src/Symfony/Component/Security/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php b/src/Symfony/Component/Security/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php
index 3ef3fce..25e175d 100644
--- a/src/Symfony/Component/Security/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php
+++ b/src/Symfony/Component/Security/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php
@@ -46,9 +46,7 @@ class UriSafeTokenGeneratorTest extends TestCase
         $this->assertDoesNotMatchRegularExpression('#.+([+/=]).+#', $token, 'is URI safe');
     }
 
-    /**
-     * @dataProvider validDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validDataProvider')]
     public function testValidLength(int $entropy, int $length)
     {
         $generator = new UriSafeTokenGenerator($entropy);
diff --git a/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php b/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php
index 3c70c3c..3073eed 100644
--- a/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php
+++ b/src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php
@@ -18,10 +18,10 @@ use Symfony\Component\Security\Csrf\TokenStorage\NativeSessionTokenStorage;
 /**
  * @author Bernhard Schussek <bschussek@gmail.com>
  *
- * @runTestsInSeparateProcesses
  *
- * @preserveGlobalState disabled
  */
+#[\PHPUnit\Framework\Attributes\PreserveGlobalState(false)]
+#[\PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses]
 class NativeSessionTokenStorageTest extends TestCase
 {
     private const SESSION_NAMESPACE = 'foobar';
@@ -63,9 +63,7 @@ class NativeSessionTokenStorageTest extends TestCase
         $this->assertSame([self::SESSION_NAMESPACE => ['token_id' => 'TOKEN']], $_SESSION);
     }
 
-    /**
-     * @depends testStoreTokenInClosedSession
-     */
+    #[\PHPUnit\Framework\Attributes\Depends('testStoreTokenInClosedSession')]
     public function testCheckToken()
     {
         $this->assertFalse($this->storage->hasToken('token_id'));
@@ -75,9 +73,7 @@ class NativeSessionTokenStorageTest extends TestCase
         $this->assertTrue($this->storage->hasToken('token_id'));
     }
 
-    /**
-     * @depends testStoreTokenInClosedSession
-     */
+    #[\PHPUnit\Framework\Attributes\Depends('testStoreTokenInClosedSession')]
     public function testGetExistingToken()
     {
         $this->storage->setToken('token_id', 'TOKEN');
@@ -91,18 +87,14 @@ class NativeSessionTokenStorageTest extends TestCase
         $this->storage->getToken('token_id');
     }
 
-    /**
-     * @depends testCheckToken
-     */
+    #[\PHPUnit\Framework\Attributes\Depends('testCheckToken')]
     public function testRemoveNonExistingToken()
     {
         $this->assertNull($this->storage->removeToken('token_id'));
         $this->assertFalse($this->storage->hasToken('token_id'));
     }
 
-    /**
-     * @depends testCheckToken
-     */
+    #[\PHPUnit\Framework\Attributes\Depends('testCheckToken')]
     public function testRemoveExistingToken()
     {
         $this->storage->setToken('token_id', 'TOKEN');
diff --git a/src/Symfony/Component/Security/Http/Tests/AccessToken/Oidc/OidcTokenHandlerTest.php b/src/Symfony/Component/Security/Http/Tests/AccessToken/Oidc/OidcTokenHandlerTest.php
index 42dc45f..f3b6d8a 100644
--- a/src/Symfony/Component/Security/Http/Tests/AccessToken/Oidc/OidcTokenHandlerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/AccessToken/Oidc/OidcTokenHandlerTest.php
@@ -24,17 +24,13 @@ use Symfony\Component\Security\Http\AccessToken\Oidc\OidcTokenHandler;
 use Symfony\Component\Security\Http\Authenticator\FallbackUserLoader;
 use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
 
-/**
- * @requires extension openssl
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('openssl')]
 class OidcTokenHandlerTest extends TestCase
 {
     private const AUDIENCE = 'Symfony OIDC';
 
-    /**
-     * @dataProvider getClaims
-     * @group jwt
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getClaims')]
+    #[\PHPUnit\Framework\Attributes\Group('jwt')]
     public function testGetsUserIdentifierFromSignedToken(string $claim, string $expected)
     {
         $time = time();
@@ -76,9 +72,7 @@ class OidcTokenHandlerTest extends TestCase
         yield ['email', 'foo@example.com'];
     }
 
-    /**
-     * @group jwt
-     */
+    #[\PHPUnit\Framework\Attributes\Group('jwt')]
     public function testThrowsAnErrorIfTokenIsInvalid(string $token)
     {
         $this->expectException(BadCredentialsException::class);
@@ -127,9 +121,7 @@ class OidcTokenHandlerTest extends TestCase
         ];
     }
 
-    /**
-     * @group jwt
-     */
+    #[\PHPUnit\Framework\Attributes\Group('jwt')]
     public function testThrowsAnErrorIfUserPropertyIsMissing()
     {
         $this->expectException(BadCredentialsException::class);
diff --git a/src/Symfony/Component/Security/Http/Tests/AccessToken/Oidc/OidcUserInfoTokenHandlerTest.php b/src/Symfony/Component/Security/Http/Tests/AccessToken/Oidc/OidcUserInfoTokenHandlerTest.php
index 2e71bda..f520f04 100644
--- a/src/Symfony/Component/Security/Http/Tests/AccessToken/Oidc/OidcUserInfoTokenHandlerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/AccessToken/Oidc/OidcUserInfoTokenHandlerTest.php
@@ -23,9 +23,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
 
 class OidcUserInfoTokenHandlerTest extends TestCase
 {
-    /**
-     * @dataProvider getClaims
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getClaims')]
     public function testGetsUserIdentifierFromOidcServerResponse(string $claim, string $expected)
     {
         $accessToken = 'a-secret-token';
diff --git a/src/Symfony/Component/Security/Http/Tests/Authentication/AuthenticatorManagerTest.php b/src/Symfony/Component/Security/Http/Tests/Authentication/AuthenticatorManagerTest.php
index 25462f3..3c29257 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authentication/AuthenticatorManagerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authentication/AuthenticatorManagerTest.php
@@ -56,9 +56,7 @@ class AuthenticatorManagerTest extends TestCase
         $this->response = $this->createMock(Response::class);
     }
 
-    /**
-     * @dataProvider provideSupportsData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSupportsData')]
     public function testSupports($authenticators, $result)
     {
         $manager = $this->createManager($authenticators);
@@ -103,9 +101,7 @@ class AuthenticatorManagerTest extends TestCase
         $manager->authenticateRequest($this->request);
     }
 
-    /**
-     * @dataProvider provideMatchingAuthenticatorIndex
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMatchingAuthenticatorIndex')]
     public function testAuthenticateRequest($matchingAuthenticatorIndex)
     {
         $authenticators = [$this->createAuthenticator(0 === $matchingAuthenticatorIndex), $this->createAuthenticator(1 === $matchingAuthenticatorIndex)];
@@ -181,9 +177,7 @@ class AuthenticatorManagerTest extends TestCase
         $manager->authenticateRequest($this->request);
     }
 
-    /**
-     * @dataProvider provideEraseCredentialsData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEraseCredentialsData')]
     public function testEraseCredentials($eraseCredentials)
     {
         $authenticator = $this->createAuthenticator();
@@ -322,9 +316,7 @@ class AuthenticatorManagerTest extends TestCase
         $this->assertSame($this->response, $response);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testLogsUseTheDecoratedAuthenticatorWhenItIsTraceable()
     {
         $authenticator = $this->createMock(TestInteractiveAuthenticator::class);
diff --git a/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php b/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php
index a975022..294b784 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php
@@ -22,9 +22,7 @@ use Symfony\Component\Security\Http\HttpUtils;
 
 class DefaultAuthenticationSuccessHandlerTest extends TestCase
 {
-    /**
-     * @dataProvider getRequestRedirections
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRequestRedirections')]
     public function testRequestRedirections(Request $request, $options, $redirectedUrl)
     {
         $urlGenerator = $this->createMock(UrlGeneratorInterface::class);
diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/AbstractLoginFormAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/AbstractLoginFormAuthenticatorTest.php
index c155ed9..3adfef6 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authenticator/AbstractLoginFormAuthenticatorTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/AbstractLoginFormAuthenticatorTest.php
@@ -22,9 +22,7 @@ use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPasspor
 
 class AbstractLoginFormAuthenticatorTest extends TestCase
 {
-    /**
-     * @dataProvider provideSupportsData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSupportsData')]
     public function testSupports(string $loginUrl, Request $request, bool $expected)
     {
         $authenticator = new ConcreteFormAuthenticator($loginUrl);
diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/ChainedAccessTokenExtractorsTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/ChainedAccessTokenExtractorsTest.php
index 1507e42..16dd945 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/ChainedAccessTokenExtractorsTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/ChainedAccessTokenExtractorsTest.php
@@ -38,9 +38,7 @@ class ChainedAccessTokenExtractorsTest extends TestCase
         $this->accessTokenHandler = new InMemoryAccessTokenHandler();
     }
 
-    /**
-     * @dataProvider provideSupportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSupportData')]
     public function testSupport($request)
     {
         $this->setUpAuthenticator();
@@ -64,9 +62,7 @@ class ChainedAccessTokenExtractorsTest extends TestCase
         $this->assertInstanceOf(SelfValidatingPassport::class, $passport);
     }
 
-    /**
-     * @dataProvider provideInvalidAuthenticateData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidAuthenticateData')]
     public function testAuthenticateInvalid($request, $errorMessage, $exceptionType = BadRequestHttpException::class)
     {
         $this->expectException($exceptionType);
diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/FormEncodedBodyAccessTokenAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/FormEncodedBodyAccessTokenAuthenticatorTest.php
index 3299f01..c2a0714 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/FormEncodedBodyAccessTokenAuthenticatorTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/FormEncodedBodyAccessTokenAuthenticatorTest.php
@@ -79,9 +79,7 @@ class FormEncodedBodyAccessTokenAuthenticatorTest extends TestCase
         $this->assertInstanceOf(SelfValidatingPassport::class, $passport);
     }
 
-    /**
-     * @dataProvider provideInvalidAuthenticateData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidAuthenticateData')]
     public function testAuthenticateInvalid($request, $errorMessage, $exceptionType = BadRequestHttpException::class)
     {
         $this->expectException($exceptionType);
diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/HeaderAccessTokenAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/HeaderAccessTokenAuthenticatorTest.php
index de85e66..f39a49f 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/HeaderAccessTokenAuthenticatorTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/HeaderAccessTokenAuthenticatorTest.php
@@ -35,9 +35,7 @@ class HeaderAccessTokenAuthenticatorTest extends TestCase
         $this->accessTokenHandler = new InMemoryAccessTokenHandler();
     }
 
-    /**
-     * @dataProvider provideSupportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSupportData')]
     public function testSupport($request)
     {
         $this->setUpAuthenticator();
@@ -51,9 +49,7 @@ class HeaderAccessTokenAuthenticatorTest extends TestCase
         yield [new Request([], [], [], [], [], ['HTTP_AUTHORIZATION' => 'Bearer INVALID_ACCESS_TOKEN'])];
     }
 
-    /**
-     * @dataProvider provideSupportsWithCustomTokenTypeData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSupportsWithCustomTokenTypeData')]
     public function testSupportsWithCustomTokenType($request, $result)
     {
         $this->setUpAuthenticator('Authorization', 'JWT');
@@ -69,9 +65,7 @@ class HeaderAccessTokenAuthenticatorTest extends TestCase
         yield [new Request([], [], [], [], [], ['HTTP_AUTHORIZATION' => 'Bearer INVALID_ACCESS_TOKEN']), false];
     }
 
-    /**
-     * @dataProvider provideSupportsWithCustomHeaderParameter
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSupportsWithCustomHeaderParameter')]
     public function testSupportsWithCustomHeaderParameter($request, $result)
     {
         $this->setUpAuthenticator('X-FOO');
@@ -107,9 +101,7 @@ class HeaderAccessTokenAuthenticatorTest extends TestCase
         $this->assertInstanceOf(SelfValidatingPassport::class, $passport);
     }
 
-    /**
-     * @dataProvider provideInvalidAuthenticateData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidAuthenticateData')]
     public function testAuthenticateInvalid($request, $errorMessage, $exceptionType = BadRequestHttpException::class)
     {
         $this->expectException($exceptionType);
diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/QueryAccessTokenAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/QueryAccessTokenAuthenticatorTest.php
index 428b1fd..1338bf8 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/QueryAccessTokenAuthenticatorTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/QueryAccessTokenAuthenticatorTest.php
@@ -75,9 +75,7 @@ class QueryAccessTokenAuthenticatorTest extends TestCase
         $this->assertInstanceOf(SelfValidatingPassport::class, $passport);
     }
 
-    /**
-     * @dataProvider provideInvalidAuthenticateData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidAuthenticateData')]
     public function testAuthenticateInvalid($request, $errorMessage, $exceptionType = BadRequestHttpException::class)
     {
         $this->expectException($exceptionType);
diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessTokenAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessTokenAuthenticatorTest.php
index f539635..e7cba88 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessTokenAuthenticatorTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessTokenAuthenticatorTest.php
@@ -161,9 +161,7 @@ class AccessTokenAuthenticatorTest extends TestCase
         $this->assertEquals('test', $passport->getUser()->getUserIdentifier());
     }
 
-    /**
-     * @dataProvider provideAccessTokenHeaderRegex
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAccessTokenHeaderRegex')]
     public function testAccessTokenHeaderRegex(string $input, ?string $expectedToken)
     {
         // Given
diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php
index 7f4fd8d..582cc54 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php
@@ -42,9 +42,7 @@ class FormLoginAuthenticatorTest extends TestCase
         $this->failureHandler = $this->createMock(AuthenticationFailureHandlerInterface::class);
     }
 
-    /**
-     * @dataProvider provideUsernamesForLength
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUsernamesForLength')]
     public function testHandleWhenUsernameLength($username, $ok)
     {
         if ($ok) {
@@ -67,9 +65,7 @@ class FormLoginAuthenticatorTest extends TestCase
         yield [str_repeat('x', UserBadge::MAX_USERNAME_LENGTH - 1), true];
     }
 
-    /**
-     * @dataProvider postOnlyDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('postOnlyDataProvider')]
     public function testHandleNonStringUsernameWithArray($postOnly)
     {
         $this->expectException(BadRequestHttpException::class);
@@ -82,9 +78,7 @@ class FormLoginAuthenticatorTest extends TestCase
         $this->authenticator->authenticate($request);
     }
 
-    /**
-     * @dataProvider postOnlyDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('postOnlyDataProvider')]
     public function testHandleNonStringUsernameWithInt($postOnly)
     {
         $this->expectException(BadRequestHttpException::class);
@@ -97,9 +91,7 @@ class FormLoginAuthenticatorTest extends TestCase
         $this->authenticator->authenticate($request);
     }
 
-    /**
-     * @dataProvider postOnlyDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('postOnlyDataProvider')]
     public function testHandleNonStringUsernameWithObject($postOnly)
     {
         $this->expectException(BadRequestHttpException::class);
@@ -112,9 +104,7 @@ class FormLoginAuthenticatorTest extends TestCase
         $this->authenticator->authenticate($request);
     }
 
-    /**
-     * @dataProvider postOnlyDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('postOnlyDataProvider')]
     public function testHandleNonStringUsernameWithToString($postOnly)
     {
         $usernameObject = $this->createMock(DummyUserClass::class);
@@ -127,9 +117,7 @@ class FormLoginAuthenticatorTest extends TestCase
         $this->authenticator->authenticate($request);
     }
 
-    /**
-     * @dataProvider postOnlyDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('postOnlyDataProvider')]
     public function testHandleNonStringPasswordWithArray(bool $postOnly)
     {
         $this->expectException(BadRequestHttpException::class);
@@ -142,9 +130,7 @@ class FormLoginAuthenticatorTest extends TestCase
         $this->authenticator->authenticate($request);
     }
 
-    /**
-     * @dataProvider postOnlyDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('postOnlyDataProvider')]
     public function testHandleNonStringPasswordWithToString(bool $postOnly)
     {
         $passwordObject = new class {
@@ -165,9 +151,7 @@ class FormLoginAuthenticatorTest extends TestCase
         $this->assertSame('s$cr$t', $credentialsBadge->getPassword());
     }
 
-    /**
-     * @dataProvider postOnlyDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('postOnlyDataProvider')]
     public function testHandleNonStringCsrfTokenWithArray($postOnly)
     {
         $request = Request::create('/login_check', 'POST', ['_username' => 'foo', '_password' => 'bar', '_csrf_token' => []]);
@@ -181,9 +165,7 @@ class FormLoginAuthenticatorTest extends TestCase
         $this->authenticator->authenticate($request);
     }
 
-    /**
-     * @dataProvider postOnlyDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('postOnlyDataProvider')]
     public function testHandleNonStringCsrfTokenWithInt($postOnly)
     {
         $request = Request::create('/login_check', 'POST', ['_username' => 'foo', '_password' => 'bar', '_csrf_token' => 42]);
@@ -197,9 +179,7 @@ class FormLoginAuthenticatorTest extends TestCase
         $this->authenticator->authenticate($request);
     }
 
-    /**
-     * @dataProvider postOnlyDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('postOnlyDataProvider')]
     public function testHandleNonStringCsrfTokenWithObject($postOnly)
     {
         $request = Request::create('/login_check', 'POST', ['_username' => 'foo', '_password' => 'bar', '_csrf_token' => new \stdClass()]);
@@ -243,9 +223,7 @@ class FormLoginAuthenticatorTest extends TestCase
         $this->assertEquals('s$cr$t', $badge->getAndErasePlaintextPassword());
     }
 
-    /**
-     * @dataProvider provideContentTypes()
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideContentTypes')]
     public function testSupportsFormOnly(string $contentType, bool $shouldSupport)
     {
         $request = new Request();
diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/HttpBasicAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/HttpBasicAuthenticatorTest.php
index 67e1964..a718a43 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authenticator/HttpBasicAuthenticatorTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/HttpBasicAuthenticatorTest.php
@@ -56,9 +56,7 @@ class HttpBasicAuthenticatorTest extends TestCase
         $this->assertTrue($user->isEqualTo($passport->getUser()));
     }
 
-    /**
-     * @dataProvider provideMissingHttpBasicServerParameters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMissingHttpBasicServerParameters')]
     public function testHttpBasicServerParametersMissing(array $serverParameters)
     {
         $request = new Request([], [], [], [], [], $serverParameters);
diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/JsonLoginAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/JsonLoginAuthenticatorTest.php
index 4545e55..62a1e84 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authenticator/JsonLoginAuthenticatorTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/JsonLoginAuthenticatorTest.php
@@ -37,9 +37,7 @@ class JsonLoginAuthenticatorTest extends TestCase
         $this->userProvider = new InMemoryUserProvider();
     }
 
-    /**
-     * @dataProvider provideSupportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSupportData')]
     public function testSupport($request)
     {
         $this->setUpAuthenticator();
@@ -56,9 +54,7 @@ class JsonLoginAuthenticatorTest extends TestCase
         yield [$request];
     }
 
-    /**
-     * @dataProvider provideSupportsWithCheckPathData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSupportsWithCheckPathData')]
     public function testSupportsWithCheckPath($request, $result)
     {
         $this->setUpAuthenticator(['check_path' => '/api/login']);
@@ -93,9 +89,7 @@ class JsonLoginAuthenticatorTest extends TestCase
         $this->assertEquals('foo', $passport->getBadge(PasswordCredentials::class)->getPassword());
     }
 
-    /**
-     * @dataProvider provideInvalidAuthenticateData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidAuthenticateData')]
     public function testAuthenticateInvalid($request, $errorMessage, $exceptionType = BadRequestHttpException::class)
     {
         $this->expectException($exceptionType);
@@ -128,11 +122,9 @@ class JsonLoginAuthenticatorTest extends TestCase
         yield [$request, 'Username too long.', BadCredentialsException::class];
     }
 
-    /**
-     * @dataProvider provideEmptyAuthenticateData
-     *
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEmptyAuthenticateData')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testAuthenticationForEmptyCredentialDeprecation($request)
     {
         $this->expectDeprecation('Since symfony/security 6.2: Passing an empty string as username or password parameter is deprecated.');
diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/LoginLinkAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/LoginLinkAuthenticatorTest.php
index 5d8088f..8cf8f29 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authenticator/LoginLinkAuthenticatorTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/LoginLinkAuthenticatorTest.php
@@ -40,9 +40,7 @@ class LoginLinkAuthenticatorTest extends TestCase
         $this->failureHandler = $this->createMock(AuthenticationFailureHandlerInterface::class);
     }
 
-    /**
-     * @dataProvider provideSupportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSupportData')]
     public function testSupport(array $options, $request, bool $supported)
     {
         $this->setUpAuthenticator($options);
diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/RememberMeAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/RememberMeAuthenticatorTest.php
index 52bb1a6..4def388 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authenticator/RememberMeAuthenticatorTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/RememberMeAuthenticatorTest.php
@@ -44,9 +44,7 @@ class RememberMeAuthenticatorTest extends TestCase
         $this->assertFalse($this->authenticator->supports(Request::create('/')));
     }
 
-    /**
-     * @dataProvider provideSupportsData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSupportsData')]
     public function testSupports($request, $support)
     {
         $this->assertSame($support, $this->authenticator->supports($request));
diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/RemoteUserAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/RemoteUserAuthenticatorTest.php
index b94f908..30103dc 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authenticator/RemoteUserAuthenticatorTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/RemoteUserAuthenticatorTest.php
@@ -21,9 +21,7 @@ use Symfony\Component\Security\Http\Authenticator\RemoteUserAuthenticator;
 
 class RemoteUserAuthenticatorTest extends TestCase
 {
-    /**
-     * @dataProvider provideAuthenticators
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAuthenticators')]
     public function testSupport(InMemoryUserProvider $userProvider, RemoteUserAuthenticator $authenticator, $parameterName)
     {
         $request = $this->createRequest([$parameterName => 'TheUsername']);
@@ -50,9 +48,7 @@ class RemoteUserAuthenticatorTest extends TestCase
         $this->assertTrue($authenticator->supports($this->createRequest(['REMOTE_USER' => 'another_username'])));
     }
 
-    /**
-     * @dataProvider provideAuthenticators
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAuthenticators')]
     public function testAuthenticate(InMemoryUserProvider $userProvider, RemoteUserAuthenticator $authenticator, $parameterName)
     {
         $request = $this->createRequest([$parameterName => 'TheUsername']);
diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/X509AuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/X509AuthenticatorTest.php
index afc6335..ce9f238 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authenticator/X509AuthenticatorTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/X509AuthenticatorTest.php
@@ -29,9 +29,7 @@ class X509AuthenticatorTest extends TestCase
         $this->authenticator = new X509Authenticator($this->userProvider, new TokenStorage(), 'main');
     }
 
-    /**
-     * @dataProvider provideServerVars
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideServerVars')]
     public function testAuthentication($username, $credentials)
     {
         $serverVars = [];
@@ -57,9 +55,7 @@ class X509AuthenticatorTest extends TestCase
         yield ['TheUser', ''];
     }
 
-    /**
-     * @dataProvider provideServerVarsNoUser
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideServerVarsNoUser')]
     public function testAuthenticationNoUser($emailAddress, $credentials)
     {
         $request = $this->createRequest(['SSL_CLIENT_S_DN' => $credentials]);
@@ -120,9 +116,7 @@ class X509AuthenticatorTest extends TestCase
         $this->assertEquals('cert@example.com', $passport->getUser()->getUserIdentifier());
     }
 
-    /**
-     * @dataProvider provideServerVarsUserIdentifier
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideServerVarsUserIdentifier')]
     public function testAuthenticationCustomCredentialsUserIdentifier($username, $credentials)
     {
         $authenticator = new X509Authenticator($this->userProvider, new TokenStorage(), 'main', 'SSL_CLIENT_S_DN_Email', 'SSL_CLIENT_S_DN', null, 'CN');
diff --git a/src/Symfony/Component/Security/Http/Tests/Controller/UserValueResolverTest.php b/src/Symfony/Component/Security/Http/Tests/Controller/UserValueResolverTest.php
index 3357aa1..17c5a4d 100644
--- a/src/Symfony/Component/Security/Http/Tests/Controller/UserValueResolverTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Controller/UserValueResolverTest.php
@@ -29,9 +29,8 @@ class UserValueResolverTest extends TestCase
 {
     /**
      * In Symfony 7, keep this test case but remove the call to supports().
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testSupportsFailsWithNoType()
     {
         $tokenStorage = new TokenStorage();
@@ -44,9 +43,8 @@ class UserValueResolverTest extends TestCase
 
     /**
      * In Symfony 7, keep this test case but remove the call to supports().
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testSupportsFailsWhenDefaultValAndNoUser()
     {
         $tokenStorage = new TokenStorage();
@@ -123,9 +121,7 @@ class UserValueResolverTest extends TestCase
         $this->assertSame([$user], $resolver->resolve(Request::create('/'), $metadata));
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testResolveThrowsAccessDeniedWithWrongUserClass()
     {
         $user = $this->createMock(UserInterface::class);
diff --git a/src/Symfony/Component/Security/Http/Tests/EventListener/CheckCredentialsListenerTest.php b/src/Symfony/Component/Security/Http/Tests/EventListener/CheckCredentialsListenerTest.php
index 85a9b8b..e8be211 100644
--- a/src/Symfony/Component/Security/Http/Tests/EventListener/CheckCredentialsListenerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/EventListener/CheckCredentialsListenerTest.php
@@ -40,9 +40,7 @@ class CheckCredentialsListenerTest extends TestCase
         $this->user = new InMemoryUser('wouter', 'password-hash');
     }
 
-    /**
-     * @dataProvider providePasswords
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePasswords')]
     public function testPasswordAuthenticated($password, $passwordValid, $result)
     {
         $hasher = $this->createMock(PasswordHasherInterface::class);
@@ -80,9 +78,7 @@ class CheckCredentialsListenerTest extends TestCase
         $this->listener->checkPassport($event);
     }
 
-    /**
-     * @dataProvider provideCustomAuthenticatedResults
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCustomAuthenticatedResults')]
     public function testCustomAuthenticated($result)
     {
         $this->hasherFactory->expects($this->never())->method('getPasswordHasher');
diff --git a/src/Symfony/Component/Security/Http/Tests/EventListener/CheckRememberMeConditionsListenerTest.php b/src/Symfony/Component/Security/Http/Tests/EventListener/CheckRememberMeConditionsListenerTest.php
index 218d09c..3eab040 100644
--- a/src/Symfony/Component/Security/Http/Tests/EventListener/CheckRememberMeConditionsListenerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/EventListener/CheckRememberMeConditionsListenerTest.php
@@ -89,9 +89,7 @@ class CheckRememberMeConditionsListenerTest extends TestCase
         $this->assertTrue($passport->getBadge(RememberMeBadge::class)->isEnabled());
     }
 
-    /**
-     * @dataProvider provideRememberMeOptInValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRememberMeOptInValues')]
     public function testSuccessfulHttpLoginWithOptInRequestParameter($optInValue)
     {
         $this->createHttpRequest();
@@ -104,9 +102,7 @@ class CheckRememberMeConditionsListenerTest extends TestCase
         $this->assertTrue($passport->getBadge(RememberMeBadge::class)->isEnabled());
     }
 
-    /**
-     * @dataProvider provideRememberMeOptInValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRememberMeOptInValues')]
     public function testSuccessfulJsonLoginWithOptInRequestParameter($optInValue)
     {
         $this->createJsonRequest(['_remember_me' => $optInValue]);
diff --git a/src/Symfony/Component/Security/Http/Tests/EventListener/ClearSiteDataLogoutListenerTest.php b/src/Symfony/Component/Security/Http/Tests/EventListener/ClearSiteDataLogoutListenerTest.php
index c295502..df18abc 100644
--- a/src/Symfony/Component/Security/Http/Tests/EventListener/ClearSiteDataLogoutListenerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/EventListener/ClearSiteDataLogoutListenerTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\Security\Http\EventListener\ClearSiteDataLogoutListener;
 
 class ClearSiteDataLogoutListenerTest extends TestCase
 {
-    /**
-     * @dataProvider provideClearSiteDataConfig
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideClearSiteDataConfig')]
     public function testLogout(array $clearSiteDataConfig, string $expectedHeader)
     {
         $response = new Response();
diff --git a/src/Symfony/Component/Security/Http/Tests/EventListener/CsrfTokenClearingLogoutListenerTest.php b/src/Symfony/Component/Security/Http/Tests/EventListener/CsrfTokenClearingLogoutListenerTest.php
index 405c7ae..7511281 100644
--- a/src/Symfony/Component/Security/Http/Tests/EventListener/CsrfTokenClearingLogoutListenerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/EventListener/CsrfTokenClearingLogoutListenerTest.php
@@ -21,6 +21,7 @@ use Symfony\Component\Security\Http\EventListener\CsrfTokenClearingLogoutListene
 
 class CsrfTokenClearingLogoutListenerTest extends TestCase
 {
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSkipsClearingSessionTokenStorageOnStatelessRequest()
     {
         try {
diff --git a/src/Symfony/Component/Security/Http/Tests/EventListener/IsGrantedAttributeListenerTest.php b/src/Symfony/Component/Security/Http/Tests/EventListener/IsGrantedAttributeListenerTest.php
index 3f5f2ff..da0bdb0 100644
--- a/src/Symfony/Component/Security/Http/Tests/EventListener/IsGrantedAttributeListenerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/EventListener/IsGrantedAttributeListenerTest.php
@@ -207,9 +207,7 @@ class IsGrantedAttributeListenerTest extends TestCase
         $listener->onKernelControllerArguments($event);
     }
 
-    /**
-     * @dataProvider getAccessDeniedMessageTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAccessDeniedMessageTests')]
     public function testAccessDeniedMessages(string|Expression $attribute, string|array|null $subject, string $method, int $numOfArguments, string $expectedMessage)
     {
         $authChecker = $this->createMock(AuthorizationCheckerInterface::class);
diff --git a/src/Symfony/Component/Security/Http/Tests/EventListener/PasswordMigratingListenerTest.php b/src/Symfony/Component/Security/Http/Tests/EventListener/PasswordMigratingListenerTest.php
index ffa5e82..b280045 100644
--- a/src/Symfony/Component/Security/Http/Tests/EventListener/PasswordMigratingListenerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/EventListener/PasswordMigratingListenerTest.php
@@ -48,9 +48,7 @@ class PasswordMigratingListenerTest extends TestCase
         $this->listener = new PasswordMigratingListener($this->hasherFactory);
     }
 
-    /**
-     * @dataProvider provideUnsupportedEvents
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUnsupportedEvents')]
     public function testUnsupportedEvents($event)
     {
         $this->hasherFactory->expects($this->never())->method('getPasswordHasher');
diff --git a/src/Symfony/Component/Security/Http/Tests/EventListener/UserProviderListenerTest.php b/src/Symfony/Component/Security/Http/Tests/EventListener/UserProviderListenerTest.php
index 63bf554..d7b393f 100644
--- a/src/Symfony/Component/Security/Http/Tests/EventListener/UserProviderListenerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/EventListener/UserProviderListenerTest.php
@@ -42,9 +42,7 @@ class UserProviderListenerTest extends TestCase
         $this->assertTrue($user->isEqualTo($passport->getUser()));
     }
 
-    /**
-     * @dataProvider provideCompletePassports
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletePassports')]
     public function testNotOverrideUserLoader($passport)
     {
         $badgeBefore = $passport->hasBadge(UserBadge::class) ? $passport->getBadge(UserBadge::class) : null;
diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php
index 8dcf96e..3953218 100644
--- a/src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php
@@ -158,9 +158,7 @@ class ContextListenerTest extends TestCase
         $this->assertFalse($session->isStarted());
     }
 
-    /**
-     * @dataProvider provideInvalidToken
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidToken')]
     public function testInvalidTokenInSession($token)
     {
         $tokenStorage = $this->createMock(TokenStorageInterface::class);
diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php
index 4add9a8..5c06746 100644
--- a/src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php
@@ -31,9 +31,7 @@ use Symfony\Component\Security\Http\HttpUtils;
 
 class ExceptionListenerTest extends TestCase
 {
-    /**
-     * @dataProvider getAuthenticationExceptionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAuthenticationExceptionProvider')]
     public function testAuthenticationExceptionWithoutEntryPoint(\Exception $exception, \Exception $eventException)
     {
         $event = $this->createEvent($exception);
@@ -45,9 +43,7 @@ class ExceptionListenerTest extends TestCase
         $this->assertEquals($eventException, $event->getThrowable());
     }
 
-    /**
-     * @dataProvider getAuthenticationExceptionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAuthenticationExceptionProvider')]
     public function testAuthenticationExceptionWithEntryPoint(\Exception $exception)
     {
         $event = $this->createEvent($exception);
@@ -77,9 +73,8 @@ class ExceptionListenerTest extends TestCase
 
     /**
      * This test should be removed in Symfony 7.0 when adding native return types to AuthenticationEntryPointInterface::start().
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExceptionWhenEntryPointReturnsBadValue()
     {
         if ((new \ReflectionMethod(AuthenticationEntryPointInterface::class, 'start'))->hasReturnType()) {
@@ -98,9 +93,7 @@ class ExceptionListenerTest extends TestCase
         $this->assertStringEndsWith('start()" method must return a Response object ("string" returned).', $event->getThrowable()->getMessage());
     }
 
-    /**
-     * @dataProvider getAccessDeniedExceptionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAccessDeniedExceptionProvider')]
     public function testAccessDeniedExceptionFullFledgedAndWithoutAccessDeniedHandlerAndWithoutErrorPage(\Exception $exception, ?\Exception $eventException = null)
     {
         $event = $this->createEvent($exception);
@@ -112,9 +105,7 @@ class ExceptionListenerTest extends TestCase
         $this->assertSame($eventException ?? $exception, $event->getThrowable()->getPrevious());
     }
 
-    /**
-     * @dataProvider getAccessDeniedExceptionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAccessDeniedExceptionProvider')]
     public function testAccessDeniedExceptionFullFledgedAndWithoutAccessDeniedHandlerAndWithErrorPage(\Exception $exception, ?\Exception $eventException = null)
     {
         $kernel = $this->createMock(HttpKernelInterface::class);
@@ -135,9 +126,7 @@ class ExceptionListenerTest extends TestCase
         $this->assertSame($eventException ?? $exception, $event->getThrowable()->getPrevious());
     }
 
-    /**
-     * @dataProvider getAccessDeniedExceptionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAccessDeniedExceptionProvider')]
     public function testAccessDeniedExceptionFullFledgedAndWithAccessDeniedHandlerAndWithoutErrorPage(\Exception $exception, ?\Exception $eventException = null)
     {
         $event = $this->createEvent($exception);
@@ -152,9 +141,7 @@ class ExceptionListenerTest extends TestCase
         $this->assertSame($eventException ?? $exception, $event->getThrowable()->getPrevious());
     }
 
-    /**
-     * @dataProvider getAccessDeniedExceptionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAccessDeniedExceptionProvider')]
     public function testAccessDeniedExceptionNotFullFledged(\Exception $exception, ?\Exception $eventException = null)
     {
         $event = $this->createEvent($exception);
diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php
index 06139bc..0dfa1db 100644
--- a/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php
@@ -136,9 +136,7 @@ class LogoutListenerTest extends TestCase
         $listener(new RequestEvent($this->createMock(HttpKernelInterface::class), $request, HttpKernelInterface::MAIN_REQUEST));
     }
 
-    /**
-     * @dataProvider provideInvalidCsrfTokens
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidCsrfTokens')]
     public function testCsrfValidationFails($invalidToken)
     {
         $this->expectException(LogoutException::class);
diff --git a/src/Symfony/Component/Security/Http/Tests/HttpUtilsTest.php b/src/Symfony/Component/Security/Http/Tests/HttpUtilsTest.php
index e165a4d..c620b20 100644
--- a/src/Symfony/Component/Security/Http/Tests/HttpUtilsTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/HttpUtilsTest.php
@@ -58,9 +58,7 @@ class HttpUtilsTest extends TestCase
         $this->assertTrue($response->isRedirect('http://localhost/blog'));
     }
 
-    /**
-     * @dataProvider validRequestDomainUrls
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validRequestDomainUrls')]
     public function testCreateRedirectResponse(?string $domainRegexp, string $path, string $expectedRedirectUri)
     {
         $utils = new HttpUtils($this->getUrlGenerator(), null, $domainRegexp);
@@ -106,9 +104,7 @@ class HttpUtilsTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider badRequestDomainUrls
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('badRequestDomainUrls')]
     public function testCreateRedirectResponseWithBadRequestsDomain($url)
     {
         $utils = new HttpUtils($this->getUrlGenerator(), null, '#^https?://%s$#i');
@@ -210,9 +206,7 @@ class HttpUtilsTest extends TestCase
         $this->assertSame($session, $subRequest->getSession());
     }
 
-    /**
-     * @dataProvider provideSecurityRequestAttributes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSecurityRequestAttributes')]
     public function testCreateRequestPassesSecurityRequestAttributesToTheNewRequest($attribute)
     {
         $request = $this->getRequest();
diff --git a/src/Symfony/Component/Security/Http/Tests/LoginLink/LoginLinkHandlerTest.php b/src/Symfony/Component/Security/Http/Tests/LoginLink/LoginLinkHandlerTest.php
index 8935ed7..b2073fe 100644
--- a/src/Symfony/Component/Security/Http/Tests/LoginLink/LoginLinkHandlerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/LoginLink/LoginLinkHandlerTest.php
@@ -47,11 +47,8 @@ class LoginLinkHandlerTest extends TestCase
         $this->expiredLinkStorage = new ExpiredSignatureStorage($this->expiredLinkCache, 360);
     }
 
-    /**
-     * @group time-sensitive
-     *
-     * @dataProvider provideCreateLoginLinkData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCreateLoginLinkData')]
+    #[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
     public function testCreateLoginLink($user, array $extraProperties, ?Request $request = null)
     {
         $this->router->expects($this->once())
diff --git a/src/Symfony/Component/Security/Http/Tests/RememberMe/SignatureRememberMeHandlerTest.php b/src/Symfony/Component/Security/Http/Tests/RememberMe/SignatureRememberMeHandlerTest.php
index 5a61d3a..316a0ee 100644
--- a/src/Symfony/Component/Security/Http/Tests/RememberMe/SignatureRememberMeHandlerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/RememberMe/SignatureRememberMeHandlerTest.php
@@ -42,9 +42,7 @@ class SignatureRememberMeHandlerTest extends TestCase
         $this->handler = new SignatureRememberMeHandler($this->signatureHasher, $this->userProvider, $this->requestStack, []);
     }
 
-    /**
-     * @group time-sensitive
-     */
+    #[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
     public function testCreateRememberMeCookie()
     {
         $user = new InMemoryUser('wouter', null);
diff --git a/src/Symfony/Component/Semaphore/Tests/SemaphoreTest.php b/src/Symfony/Component/Semaphore/Tests/SemaphoreTest.php
index e669791..73f922a 100644
--- a/src/Symfony/Component/Semaphore/Tests/SemaphoreTest.php
+++ b/src/Symfony/Component/Semaphore/Tests/SemaphoreTest.php
@@ -252,9 +252,7 @@ class SemaphoreTest extends TestCase
         $this->assertTrue($semaphore->isExpired());
     }
 
-    /**
-     * @group time-sensitive
-     */
+    #[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
     public function testExpirationResetAfter()
     {
         $store = $this->createMock(PersistingStoreInterface::class);
diff --git a/src/Symfony/Component/Semaphore/Tests/Store/AbstractStoreTestCase.php b/src/Symfony/Component/Semaphore/Tests/Store/AbstractStoreTestCase.php
index 4cd8945..a16a9b0 100644
--- a/src/Symfony/Component/Semaphore/Tests/Store/AbstractStoreTestCase.php
+++ b/src/Symfony/Component/Semaphore/Tests/Store/AbstractStoreTestCase.php
@@ -185,6 +185,7 @@ abstract class AbstractStoreTestCase extends TestCase
         $store->delete($key3);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testPutOffExpiration()
     {
         $store = $this->getStore();
@@ -209,6 +210,7 @@ abstract class AbstractStoreTestCase extends TestCase
         $store->putOffExpiration($key1, 20);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSaveTwice()
     {
         $store = $this->getStore();
diff --git a/src/Symfony/Component/Semaphore/Tests/Store/RedisArrayStoreTest.php b/src/Symfony/Component/Semaphore/Tests/Store/RedisArrayStoreTest.php
index 9780bb4..6908ab9 100644
--- a/src/Symfony/Component/Semaphore/Tests/Store/RedisArrayStoreTest.php
+++ b/src/Symfony/Component/Semaphore/Tests/Store/RedisArrayStoreTest.php
@@ -13,9 +13,8 @@ namespace Symfony\Component\Semaphore\Tests\Store;
 
 /**
  * @author Jérémy Derussé <jeremy@derusse.com>
- *
- * @requires extension redis
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('redis')]
 class RedisArrayStoreTest extends AbstractRedisStoreTestCase
 {
     public static function setUpBeforeClass(): void
diff --git a/src/Symfony/Component/Semaphore/Tests/Store/RedisClusterStoreTest.php b/src/Symfony/Component/Semaphore/Tests/Store/RedisClusterStoreTest.php
index 46180ea..c6ae1ec 100644
--- a/src/Symfony/Component/Semaphore/Tests/Store/RedisClusterStoreTest.php
+++ b/src/Symfony/Component/Semaphore/Tests/Store/RedisClusterStoreTest.php
@@ -13,9 +13,8 @@ namespace Symfony\Component\Semaphore\Tests\Store;
 
 /**
  * @author Jérémy Derussé <jeremy@derusse.com>
- *
- * @requires extension redis
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('redis')]
 class RedisClusterStoreTest extends AbstractRedisStoreTestCase
 {
     public static function setUpBeforeClass(): void
diff --git a/src/Symfony/Component/Semaphore/Tests/Store/RedisStoreTest.php b/src/Symfony/Component/Semaphore/Tests/Store/RedisStoreTest.php
index a27b5af..b764b2b2 100644
--- a/src/Symfony/Component/Semaphore/Tests/Store/RedisStoreTest.php
+++ b/src/Symfony/Component/Semaphore/Tests/Store/RedisStoreTest.php
@@ -13,9 +13,8 @@ namespace Symfony\Component\Semaphore\Tests\Store;
 
 /**
  * @author Jérémy Derussé <jeremy@derusse.com>
- *
- * @requires extension redis
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('redis')]
 class RedisStoreTest extends AbstractRedisStoreTestCase
 {
     protected function setUp(): void
diff --git a/src/Symfony/Component/Semaphore/Tests/Store/RelayStoreTest.php b/src/Symfony/Component/Semaphore/Tests/Store/RelayStoreTest.php
index aeaf8c3..40bd1f7 100644
--- a/src/Symfony/Component/Semaphore/Tests/Store/RelayStoreTest.php
+++ b/src/Symfony/Component/Semaphore/Tests/Store/RelayStoreTest.php
@@ -13,9 +13,7 @@ namespace Symfony\Component\Semaphore\Tests\Store;
 
 use Relay\Relay;
 
-/**
- * @requires extension relay
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('relay')]
 class RelayStoreTest extends AbstractRedisStoreTestCase
 {
     protected function setUp(): void
diff --git a/src/Symfony/Component/Semaphore/Tests/Store/StoreFactoryTest.php b/src/Symfony/Component/Semaphore/Tests/Store/StoreFactoryTest.php
index f69e716..f76a69a 100644
--- a/src/Symfony/Component/Semaphore/Tests/Store/StoreFactoryTest.php
+++ b/src/Symfony/Component/Semaphore/Tests/Store/StoreFactoryTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\Semaphore\Store\StoreFactory;
  */
 class StoreFactoryTest extends TestCase
 {
-    /**
-     * @dataProvider validConnections
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validConnections')]
     public function testCreateStore($connection, string $expectedStoreClass)
     {
         $store = StoreFactory::createStore($connection);
diff --git a/src/Symfony/Component/Serializer/Tests/Annotation/ContextTest.php b/src/Symfony/Component/Serializer/Tests/Annotation/ContextTest.php
index 366a74d..90dcb2e 100644
--- a/src/Symfony/Component/Serializer/Tests/Annotation/ContextTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Annotation/ContextTest.php
@@ -65,9 +65,7 @@ class ContextTest extends TestCase
         self::assertEmpty($context->getGroups());
     }
 
-    /**
-     * @dataProvider provideValidInputs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidInputs')]
     public function testValidInputs(callable $factory, string $expectedDump)
     {
         $this->assertDumpEquals($expectedDump, $factory());
diff --git a/src/Symfony/Component/Serializer/Tests/Annotation/MaxDepthTest.php b/src/Symfony/Component/Serializer/Tests/Annotation/MaxDepthTest.php
index f2ff35c..f9adcc3 100644
--- a/src/Symfony/Component/Serializer/Tests/Annotation/MaxDepthTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Annotation/MaxDepthTest.php
@@ -20,10 +20,8 @@ use Symfony\Component\Serializer\Exception\InvalidArgumentException;
  */
 class MaxDepthTest extends TestCase
 {
-    /**
-     * @testWith    [-4]
-     *              [0]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([-4])]
+    #[\PHPUnit\Framework\Attributes\TestWith([0])]
     public function testNotAnIntMaxDepthParameter(int $value)
     {
         $this->expectException(InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Serializer/Tests/Context/Encoder/CsvEncoderContextBuilderTest.php b/src/Symfony/Component/Serializer/Tests/Context/Encoder/CsvEncoderContextBuilderTest.php
index c71d41b..aaff414 100644
--- a/src/Symfony/Component/Serializer/Tests/Context/Encoder/CsvEncoderContextBuilderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Context/Encoder/CsvEncoderContextBuilderTest.php
@@ -29,10 +29,9 @@ class CsvEncoderContextBuilderTest extends TestCase
     }
 
     /**
-     * @dataProvider withersDataProvider
-     *
      * @param array<string, mixed> $values
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('withersDataProvider')]
     public function testWithers(array $values)
     {
         $context = $this->contextBuilder
diff --git a/src/Symfony/Component/Serializer/Tests/Context/Encoder/JsonEncoderContextBuilderTest.php b/src/Symfony/Component/Serializer/Tests/Context/Encoder/JsonEncoderContextBuilderTest.php
index 9cabbf1..3462dfa 100644
--- a/src/Symfony/Component/Serializer/Tests/Context/Encoder/JsonEncoderContextBuilderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Context/Encoder/JsonEncoderContextBuilderTest.php
@@ -29,10 +29,9 @@ class JsonEncoderContextBuilderTest extends TestCase
     }
 
     /**
-     * @dataProvider withersDataProvider
-     *
      * @param array<string, mixed> $values
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('withersDataProvider')]
     public function testWithers(array $values)
     {
         $context = $this->contextBuilder
diff --git a/src/Symfony/Component/Serializer/Tests/Context/Encoder/XmlEncoderContextBuilderTest.php b/src/Symfony/Component/Serializer/Tests/Context/Encoder/XmlEncoderContextBuilderTest.php
index d1ea307..2d7683c 100644
--- a/src/Symfony/Component/Serializer/Tests/Context/Encoder/XmlEncoderContextBuilderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Context/Encoder/XmlEncoderContextBuilderTest.php
@@ -27,9 +27,7 @@ class XmlEncoderContextBuilderTest extends TestCase
         $this->contextBuilder = new XmlEncoderContextBuilder();
     }
 
-    /**
-     * @dataProvider withersDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('withersDataProvider')]
     public function testWithers(array $values)
     {
         $context = $this->contextBuilder
diff --git a/src/Symfony/Component/Serializer/Tests/Context/Encoder/YamlEncoderContextBuilderTest.php b/src/Symfony/Component/Serializer/Tests/Context/Encoder/YamlEncoderContextBuilderTest.php
index 86371bf..7a88a19 100644
--- a/src/Symfony/Component/Serializer/Tests/Context/Encoder/YamlEncoderContextBuilderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Context/Encoder/YamlEncoderContextBuilderTest.php
@@ -28,10 +28,9 @@ class YamlEncoderContextBuilderTest extends TestCase
     }
 
     /**
-     * @dataProvider withersDataProvider
-     *
      * @param array<string, mixed> $values
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('withersDataProvider')]
     public function testWithers(array $values)
     {
         $context = $this->contextBuilder
diff --git a/src/Symfony/Component/Serializer/Tests/Context/Normalizer/AbstractNormalizerContextBuilderTest.php b/src/Symfony/Component/Serializer/Tests/Context/Normalizer/AbstractNormalizerContextBuilderTest.php
index 4e92c54..091ba42 100644
--- a/src/Symfony/Component/Serializer/Tests/Context/Normalizer/AbstractNormalizerContextBuilderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Context/Normalizer/AbstractNormalizerContextBuilderTest.php
@@ -29,10 +29,9 @@ class AbstractNormalizerContextBuilderTest extends TestCase
     }
 
     /**
-     * @dataProvider withersDataProvider
-     *
      * @param array<string, mixed> $values
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('withersDataProvider')]
     public function testWithers(array $values)
     {
         $context = $this->contextBuilder
diff --git a/src/Symfony/Component/Serializer/Tests/Context/Normalizer/AbstractObjectNormalizerContextBuilderTest.php b/src/Symfony/Component/Serializer/Tests/Context/Normalizer/AbstractObjectNormalizerContextBuilderTest.php
index c137601..1f50439 100644
--- a/src/Symfony/Component/Serializer/Tests/Context/Normalizer/AbstractObjectNormalizerContextBuilderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Context/Normalizer/AbstractObjectNormalizerContextBuilderTest.php
@@ -29,10 +29,9 @@ class AbstractObjectNormalizerContextBuilderTest extends TestCase
     }
 
     /**
-     * @dataProvider withersDataProvider
-     *
      * @param array<string, mixed> $values
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('withersDataProvider')]
     public function testWithers(array $values)
     {
         $context = $this->contextBuilder
@@ -80,9 +79,7 @@ class AbstractObjectNormalizerContextBuilderTest extends TestCase
         ]];
     }
 
-    /**
-     * @dataProvider validateDepthKeyPatternDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validateDepthKeyPatternDataProvider')]
     public function testValidateDepthKeyPattern(string $pattern, bool $expectException)
     {
         $exception = null;
diff --git a/src/Symfony/Component/Serializer/Tests/Context/Normalizer/ConstraintViolationListNormalizerContextBuilderTest.php b/src/Symfony/Component/Serializer/Tests/Context/Normalizer/ConstraintViolationListNormalizerContextBuilderTest.php
index df1a0ce..5cd12a0 100644
--- a/src/Symfony/Component/Serializer/Tests/Context/Normalizer/ConstraintViolationListNormalizerContextBuilderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Context/Normalizer/ConstraintViolationListNormalizerContextBuilderTest.php
@@ -28,10 +28,9 @@ class ConstraintViolationListNormalizerContextBuilderTest extends TestCase
     }
 
     /**
-     * @dataProvider withersDataProvider
-     *
      * @param array<string, mixed> $values
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('withersDataProvider')]
     public function testWithers(array $values)
     {
         $context = $this->contextBuilder
diff --git a/src/Symfony/Component/Serializer/Tests/Context/Normalizer/DateIntervalNormalizerContextBuilderTest.php b/src/Symfony/Component/Serializer/Tests/Context/Normalizer/DateIntervalNormalizerContextBuilderTest.php
index 018d34a..66f3d72 100644
--- a/src/Symfony/Component/Serializer/Tests/Context/Normalizer/DateIntervalNormalizerContextBuilderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Context/Normalizer/DateIntervalNormalizerContextBuilderTest.php
@@ -28,10 +28,9 @@ class DateIntervalNormalizerContextBuilderTest extends TestCase
     }
 
     /**
-     * @dataProvider withersDataProvider
-     *
      * @param array<string, mixed> $values
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('withersDataProvider')]
     public function testWithers(array $values)
     {
         $context = $this->contextBuilder
diff --git a/src/Symfony/Component/Serializer/Tests/Context/Normalizer/DateTimeNormalizerContextBuilderTest.php b/src/Symfony/Component/Serializer/Tests/Context/Normalizer/DateTimeNormalizerContextBuilderTest.php
index 8ab41f9..4aceed6 100644
--- a/src/Symfony/Component/Serializer/Tests/Context/Normalizer/DateTimeNormalizerContextBuilderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Context/Normalizer/DateTimeNormalizerContextBuilderTest.php
@@ -29,10 +29,9 @@ class DateTimeNormalizerContextBuilderTest extends TestCase
     }
 
     /**
-     * @dataProvider withersDataProvider
-     *
      * @param array<string, mixed> $values
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('withersDataProvider')]
     public function testWithers(array $values)
     {
         $context = $this->contextBuilder
diff --git a/src/Symfony/Component/Serializer/Tests/Context/Normalizer/FormErrorNormalizerContextBuilderTest.php b/src/Symfony/Component/Serializer/Tests/Context/Normalizer/FormErrorNormalizerContextBuilderTest.php
index 0557c25..da70d91 100644
--- a/src/Symfony/Component/Serializer/Tests/Context/Normalizer/FormErrorNormalizerContextBuilderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Context/Normalizer/FormErrorNormalizerContextBuilderTest.php
@@ -28,10 +28,9 @@ class FormErrorNormalizerContextBuilderTest extends TestCase
     }
 
     /**
-     * @dataProvider withersDataProvider
-     *
      * @param array<string, mixed> $values
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('withersDataProvider')]
     public function testWithers(array $values)
     {
         $context = $this->contextBuilder
diff --git a/src/Symfony/Component/Serializer/Tests/Context/Normalizer/ProblemNormalizerContextBuilderTest.php b/src/Symfony/Component/Serializer/Tests/Context/Normalizer/ProblemNormalizerContextBuilderTest.php
index 3e9821d..1a14123 100644
--- a/src/Symfony/Component/Serializer/Tests/Context/Normalizer/ProblemNormalizerContextBuilderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Context/Normalizer/ProblemNormalizerContextBuilderTest.php
@@ -28,10 +28,9 @@ class ProblemNormalizerContextBuilderTest extends TestCase
     }
 
     /**
-     * @dataProvider withersDataProvider
-     *
      * @param array<string, mixed> $values
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('withersDataProvider')]
     public function testWithers(array $values)
     {
         $context = $this->contextBuilder
diff --git a/src/Symfony/Component/Serializer/Tests/Context/Normalizer/UidNormalizerContextBuilderTest.php b/src/Symfony/Component/Serializer/Tests/Context/Normalizer/UidNormalizerContextBuilderTest.php
index 6a38557..2803d05 100644
--- a/src/Symfony/Component/Serializer/Tests/Context/Normalizer/UidNormalizerContextBuilderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Context/Normalizer/UidNormalizerContextBuilderTest.php
@@ -29,10 +29,9 @@ class UidNormalizerContextBuilderTest extends TestCase
     }
 
     /**
-     * @dataProvider withersDataProvider
-     *
      * @param array<string, mixed> $values
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('withersDataProvider')]
     public function testWithers(array $values)
     {
         $context = $this->contextBuilder
diff --git a/src/Symfony/Component/Serializer/Tests/Context/Normalizer/UnwrappingDenormalizerContextBuilderTest.php b/src/Symfony/Component/Serializer/Tests/Context/Normalizer/UnwrappingDenormalizerContextBuilderTest.php
index 5307618..42f2d14 100644
--- a/src/Symfony/Component/Serializer/Tests/Context/Normalizer/UnwrappingDenormalizerContextBuilderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Context/Normalizer/UnwrappingDenormalizerContextBuilderTest.php
@@ -29,10 +29,9 @@ class UnwrappingDenormalizerContextBuilderTest extends TestCase
     }
 
     /**
-     * @dataProvider withersDataProvider
-     *
      * @param array<string, mixed> $values
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('withersDataProvider')]
     public function testWithers(array $values)
     {
         $context = $this->contextBuilder
diff --git a/src/Symfony/Component/Serializer/Tests/Context/SerializerContextBuilderTest.php b/src/Symfony/Component/Serializer/Tests/Context/SerializerContextBuilderTest.php
index a417869..598e327 100644
--- a/src/Symfony/Component/Serializer/Tests/Context/SerializerContextBuilderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Context/SerializerContextBuilderTest.php
@@ -29,10 +29,9 @@ class SerializerContextBuilderTest extends TestCase
     }
 
     /**
-     * @dataProvider withersDataProvider
-     *
      * @param array<string, mixed> $values
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('withersDataProvider')]
     public function testWithers(array $values)
     {
         $context = $this->contextBuilder
diff --git a/src/Symfony/Component/Serializer/Tests/DeserializeNestedArrayOfObjectsTest.php b/src/Symfony/Component/Serializer/Tests/DeserializeNestedArrayOfObjectsTest.php
index 57f2b56..5dabf6e 100644
--- a/src/Symfony/Component/Serializer/Tests/DeserializeNestedArrayOfObjectsTest.php
+++ b/src/Symfony/Component/Serializer/Tests/DeserializeNestedArrayOfObjectsTest.php
@@ -30,9 +30,7 @@ class DeserializeNestedArrayOfObjectsTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provider')]
     public function testPropertyPhpDoc($class)
     {
         $json = <<<EOF
diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php
index cde6d33..eb8ab09 100644
--- a/src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php
@@ -711,7 +711,7 @@ CSV;
         $this->assertSame("foo,bar\r\nhello,test\r\n", $encoder->encode($value, 'csv'));
     }
 
-    /** @dataProvider provideIterable */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIterable')]
     public function testIterable(mixed $data)
     {
         $this->assertEquals(<<<'CSV'
diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php
index 66cd101..483e208 100644
--- a/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php
@@ -31,9 +31,7 @@ class JsonDecodeTest extends TestCase
         $this->assertFalse($this->decode->supportsDecoding('foobar'));
     }
 
-    /**
-     * @dataProvider decodeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('decodeProvider')]
     public function testDecode($toDecode, $expected, $context)
     {
         $this->assertEquals(
@@ -55,9 +53,7 @@ class JsonDecodeTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider decodeProviderException
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('decodeProviderException')]
     public function testDecodeWithException(string $value, string $expectedExceptionMessage, array $context)
     {
         $this->expectException(UnexpectedValueException::class);
diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php
index e5e6534..449c395 100644
--- a/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncodeTest.php
@@ -31,9 +31,7 @@ class JsonEncodeTest extends TestCase
         $this->assertFalse($this->encode->supportsEncoding('foobar'));
     }
 
-    /**
-     * @dataProvider encodeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('encodeProvider')]
     public function testEncode($toEncode, $expected, $context)
     {
         $this->assertEquals(
diff --git a/src/Symfony/Component/Serializer/Tests/Mapping/Factory/CompiledClassMetadataFactoryTest.php b/src/Symfony/Component/Serializer/Tests/Mapping/Factory/CompiledClassMetadataFactoryTest.php
index 683f445..4c59cea 100644
--- a/src/Symfony/Component/Serializer/Tests/Mapping/Factory/CompiledClassMetadataFactoryTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Mapping/Factory/CompiledClassMetadataFactoryTest.php
@@ -50,9 +50,7 @@ final class CompiledClassMetadataFactoryTest extends TestCase
         new CompiledClassMetadataFactory(__DIR__.'/../../Fixtures/object-metadata.php', $classMetadataFactory);
     }
 
-    /**
-     * @dataProvider valueProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('valueProvider')]
     public function testItReturnsTheCompiledMetadata($value)
     {
         $classMetadataFactory = $this->createMock(ClassMetadataFactoryInterface::class);
@@ -97,9 +95,7 @@ final class CompiledClassMetadataFactoryTest extends TestCase
         $this->assertSame($compiledClassMetadataFactory->getMetadataFor(Dummy::class), $compiledClassMetadataFactory->getMetadataFor(Dummy::class));
     }
 
-    /**
-     * @dataProvider valueProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('valueProvider')]
     public function testItHasMetadataFor($value)
     {
         $classMetadataFactory = $this->createMock(ClassMetadataFactoryInterface::class);
diff --git a/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderWithDoctrineAnnotationsTest.php b/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderWithDoctrineAnnotationsTest.php
index 9d786bd..bdb7a60 100644
--- a/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderWithDoctrineAnnotationsTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AnnotationLoaderWithDoctrineAnnotationsTest.php
@@ -16,9 +16,7 @@ use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
 use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
 use Symfony\Component\Serializer\Mapping\Loader\AttributeLoader;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class AnnotationLoaderWithDoctrineAnnotationsTest extends AttributeLoaderTestCase
 {
     use ExpectDeprecationTrait;
@@ -30,6 +28,7 @@ class AnnotationLoaderWithDoctrineAnnotationsTest extends AttributeLoaderTestCas
         parent::setUp();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadClassMetadataReturnsTrueIfSuccessful()
     {
         $this->expectDeprecation('Since symfony/serializer 6.4: Property "Symfony\Component\Serializer\Tests\Fixtures\Annotations\GroupDummy::$foo" uses Doctrine Annotations to configure serialization, which is deprecated. Use PHP attributes instead.');
@@ -42,6 +41,7 @@ class AnnotationLoaderWithDoctrineAnnotationsTest extends AttributeLoaderTestCas
         parent::testLoadClassMetadataReturnsTrueIfSuccessful();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadGroups()
     {
         $this->expectDeprecation('Since symfony/serializer 6.4: Property "Symfony\Component\Serializer\Tests\Fixtures\Annotations\GroupDummy::$foo" uses Doctrine Annotations to configure serialization, which is deprecated. Use PHP attributes instead.');
@@ -54,6 +54,7 @@ class AnnotationLoaderWithDoctrineAnnotationsTest extends AttributeLoaderTestCas
         parent::testLoadGroups();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadDiscriminatorMap()
     {
         $this->expectDeprecation('Since symfony/serializer 6.4: Class "Symfony\Component\Serializer\Tests\Fixtures\Annotations\AbstractDummy" uses Doctrine Annotations to configure serialization, which is deprecated. Use PHP attributes instead.');
@@ -61,6 +62,7 @@ class AnnotationLoaderWithDoctrineAnnotationsTest extends AttributeLoaderTestCas
         parent::testLoadDiscriminatorMap();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadMaxDepth()
     {
         $this->expectDeprecation('Since symfony/serializer 6.4: Property "Symfony\Component\Serializer\Tests\Fixtures\Annotations\MaxDepthDummy::$foo" uses Doctrine Annotations to configure serialization, which is deprecated. Use PHP attributes instead.');
@@ -69,6 +71,7 @@ class AnnotationLoaderWithDoctrineAnnotationsTest extends AttributeLoaderTestCas
         parent::testLoadMaxDepth();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadSerializedName()
     {
         $this->expectDeprecation('Since symfony/serializer 6.4: Property "Symfony\Component\Serializer\Tests\Fixtures\Annotations\SerializedNameDummy::$foo" uses Doctrine Annotations to configure serialization, which is deprecated. Use PHP attributes instead.');
@@ -77,6 +80,7 @@ class AnnotationLoaderWithDoctrineAnnotationsTest extends AttributeLoaderTestCas
         parent::testLoadSerializedName();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadSerializedPath()
     {
         $this->expectDeprecation('Since symfony/serializer 6.4: Property "Symfony\Component\Serializer\Tests\Fixtures\Annotations\SerializedPathDummy::$three" uses Doctrine Annotations to configure serialization, which is deprecated. Use PHP attributes instead.');
@@ -85,6 +89,7 @@ class AnnotationLoaderWithDoctrineAnnotationsTest extends AttributeLoaderTestCas
         parent::testLoadSerializedPath();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadSerializedPathInConstructor()
     {
         $this->expectDeprecation('Since symfony/serializer 6.4: Property "Symfony\Component\Serializer\Tests\Fixtures\Annotations\SerializedPathInConstructorDummy::$three" uses Doctrine Annotations to configure serialization, which is deprecated. Use PHP attributes instead.');
@@ -92,6 +97,7 @@ class AnnotationLoaderWithDoctrineAnnotationsTest extends AttributeLoaderTestCas
         parent::testLoadSerializedPathInConstructor();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadClassMetadataAndMerge()
     {
         $this->expectDeprecation('Since symfony/serializer 6.4: Property "Symfony\Component\Serializer\Tests\Fixtures\Annotations\GroupDummyParent::$kevin" uses Doctrine Annotations to configure serialization, which is deprecated. Use PHP attributes instead.');
@@ -106,6 +112,7 @@ class AnnotationLoaderWithDoctrineAnnotationsTest extends AttributeLoaderTestCas
         parent::testLoadClassMetadataAndMerge();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadIgnore()
     {
         $this->expectDeprecation('Since symfony/serializer 6.4: Property "Symfony\Component\Serializer\Tests\Fixtures\Annotations\IgnoreDummy::$ignored1" uses Doctrine Annotations to configure serialization, which is deprecated. Use PHP attributes instead.');
@@ -114,6 +121,7 @@ class AnnotationLoaderWithDoctrineAnnotationsTest extends AttributeLoaderTestCas
         parent::testLoadIgnore();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadContexts()
     {
         $this->expectDeprecation('Since symfony/serializer 6.4: Property "Symfony\Component\Serializer\Tests\Fixtures\Annotations\ContextDummyParent::$parentProperty" uses Doctrine Annotations to configure serialization, which is deprecated. Use PHP attributes instead.');
@@ -126,6 +134,7 @@ class AnnotationLoaderWithDoctrineAnnotationsTest extends AttributeLoaderTestCas
         parent::testLoadContexts();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadContextsPropertiesPromoted()
     {
         $this->expectDeprecation('Since symfony/serializer 6.4: Property "Symfony\Component\Serializer\Tests\Fixtures\Annotations\ContextDummyParent::$parentProperty" uses Doctrine Annotations to configure serialization, which is deprecated. Use PHP attributes instead.');
@@ -138,6 +147,7 @@ class AnnotationLoaderWithDoctrineAnnotationsTest extends AttributeLoaderTestCas
         parent::testLoadContextsPropertiesPromoted();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testThrowsOnContextOnInvalidMethod()
     {
         $this->expectDeprecation('Since symfony/serializer 6.4: Method "Symfony\Component\Serializer\Tests\Fixtures\Annotations\BadMethodContextDummy::badMethod()" uses Doctrine Annotations to configure serialization, which is deprecated. Use PHP attributes instead.');
@@ -145,6 +155,7 @@ class AnnotationLoaderWithDoctrineAnnotationsTest extends AttributeLoaderTestCas
         parent::testThrowsOnContextOnInvalidMethod();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCanHandleUnrelatedIgnoredMethods()
     {
         $this->expectDeprecation('Since symfony/serializer 6.4: Method "Symfony\Component\Serializer\Tests\Fixtures\Annotations\Entity45016::badIgnore()" uses Doctrine Annotations to configure serialization, which is deprecated. Use PHP attributes instead.');
@@ -152,6 +163,7 @@ class AnnotationLoaderWithDoctrineAnnotationsTest extends AttributeLoaderTestCas
         parent::testCanHandleUnrelatedIgnoredMethods();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testIgnoreGetterWithRequiredParameterIfIgnoreAnnotationIsUsed()
     {
         $this->expectDeprecation('Since symfony/serializer 6.4: Method "Symfony\Component\Serializer\Tests\Fixtures\Annotations\IgnoreDummyAdditionalGetter::getMyValue()" uses Doctrine Annotations to configure serialization, which is deprecated. Use PHP attributes instead.');
diff --git a/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AttributeLoaderTestCase.php b/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AttributeLoaderTestCase.php
index 92c26c4..4a5ce42 100644
--- a/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AttributeLoaderTestCase.php
+++ b/src/Symfony/Component/Serializer/Tests/Mapping/Loader/AttributeLoaderTestCase.php
@@ -229,9 +229,8 @@ abstract class AttributeLoaderTestCase extends TestCase
         self::assertArrayNotHasKey('h', $attributesMetadata);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testExpectedDeprecationOnLoadAnnotationsCall()
     {
         $this->expectDeprecation('Since symfony/serializer 6.4: Method "Symfony\Component\Serializer\Mapping\Loader\AttributeLoader::loadAnnotations()" is deprecated without replacement.');
diff --git a/src/Symfony/Component/Serializer/Tests/NameConverter/CamelCaseToSnakeCaseNameConverterTest.php b/src/Symfony/Component/Serializer/Tests/NameConverter/CamelCaseToSnakeCaseNameConverterTest.php
index e4d419e..f46d672 100644
--- a/src/Symfony/Component/Serializer/Tests/NameConverter/CamelCaseToSnakeCaseNameConverterTest.php
+++ b/src/Symfony/Component/Serializer/Tests/NameConverter/CamelCaseToSnakeCaseNameConverterTest.php
@@ -26,18 +26,14 @@ class CamelCaseToSnakeCaseNameConverterTest extends TestCase
         $this->assertInstanceOf(NameConverterInterface::class, $attributeMetadata);
     }
 
-    /**
-     * @dataProvider attributeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('attributeProvider')]
     public function testNormalize($underscored, $camelCased, $useLowerCamelCase)
     {
         $nameConverter = new CamelCaseToSnakeCaseNameConverter(null, $useLowerCamelCase);
         $this->assertEquals($nameConverter->normalize($camelCased), $underscored);
     }
 
-    /**
-     * @dataProvider attributeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('attributeProvider')]
     public function testDenormalize($underscored, $camelCased, $useLowerCamelCase)
     {
         $nameConverter = new CamelCaseToSnakeCaseNameConverter(null, $useLowerCamelCase);
diff --git a/src/Symfony/Component/Serializer/Tests/NameConverter/MetadataAwareNameConverterTest.php b/src/Symfony/Component/Serializer/Tests/NameConverter/MetadataAwareNameConverterTest.php
index c6ccd26..b689dc3 100644
--- a/src/Symfony/Component/Serializer/Tests/NameConverter/MetadataAwareNameConverterTest.php
+++ b/src/Symfony/Component/Serializer/Tests/NameConverter/MetadataAwareNameConverterTest.php
@@ -35,9 +35,7 @@ final class MetadataAwareNameConverterTest extends TestCase
         $this->assertInstanceOf(NameConverterInterface::class, $nameConverter);
     }
 
-    /**
-     * @dataProvider attributeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('attributeProvider')]
     public function testNormalize(string|int $propertyName, string|int $expected)
     {
         $classMetadataFactory = new ClassMetadataFactory(new AttributeLoader());
@@ -47,9 +45,7 @@ final class MetadataAwareNameConverterTest extends TestCase
         $this->assertEquals($expected, $nameConverter->normalize($propertyName, SerializedNameDummy::class));
     }
 
-    /**
-     * @dataProvider fallbackAttributeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('fallbackAttributeProvider')]
     public function testNormalizeWithFallback(string|int $propertyName, string|int $expected)
     {
         $classMetadataFactory = new ClassMetadataFactory(new AttributeLoader());
@@ -65,9 +61,7 @@ final class MetadataAwareNameConverterTest extends TestCase
         $this->assertEquals($expected, $nameConverter->normalize($propertyName, SerializedNameDummy::class));
     }
 
-    /**
-     * @dataProvider attributeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('attributeProvider')]
     public function testDenormalize(string|int $expected, string|int $propertyName)
     {
         $classMetadataFactory = new ClassMetadataFactory(new AttributeLoader());
@@ -77,9 +71,7 @@ final class MetadataAwareNameConverterTest extends TestCase
         $this->assertEquals($expected, $nameConverter->denormalize($propertyName, SerializedNameDummy::class));
     }
 
-    /**
-     * @dataProvider fallbackAttributeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('fallbackAttributeProvider')]
     public function testDenormalizeWithFallback(string|int $expected, string|int $propertyName)
     {
         $classMetadataFactory = new ClassMetadataFactory(new AttributeLoader());
@@ -115,9 +107,7 @@ final class MetadataAwareNameConverterTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider attributeAndContextProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('attributeAndContextProvider')]
     public function testNormalizeWithGroups(string $propertyName, string $expected, array $context = [])
     {
         $classMetadataFactory = new ClassMetadataFactory(new AttributeLoader());
@@ -127,9 +117,7 @@ final class MetadataAwareNameConverterTest extends TestCase
         $this->assertEquals($expected, $nameConverter->normalize($propertyName, OtherSerializedNameDummy::class, null, $context));
     }
 
-    /**
-     * @dataProvider attributeAndContextProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('attributeAndContextProvider')]
     public function testDenormalizeWithGroups(string $expected, string $propertyName, array $context = [])
     {
         $classMetadataFactory = new ClassMetadataFactory(new AttributeLoader());
diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php
index 6f58a8a..61017d7 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php
@@ -173,10 +173,8 @@ class AbstractNormalizerTest extends TestCase
         $normalizer->denormalize([], NullableConstructorArgumentDummy::class, null, [AbstractNormalizer::REQUIRE_ALL_PROPERTIES => true]);
     }
 
-    /**
-     * @dataProvider getNormalizer
-     * @dataProvider getNormalizerWithCustomNameConverter
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNormalizer')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNormalizerWithCustomNameConverter')]
     public function testObjectWithVariadicConstructorTypedArguments(AbstractNormalizer $normalizer)
     {
         $d1 = new Dummy();
@@ -209,9 +207,7 @@ class AbstractNormalizerTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider getNormalizer
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNormalizer')]
     public function testVariadicSerializationWithPreservingKeys(AbstractNormalizer $normalizer)
     {
         $d1 = new Dummy();
@@ -303,9 +299,7 @@ class AbstractNormalizerTest extends TestCase
         $this->assertSame([], $normalizer->normalize($dummy));
     }
 
-    /**
-     * @requires PHP 8.1.2
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.1.2')]
     public function testDenormalizeWhenObjectNotInstantiable()
     {
         $this->expectException(NotNormalizableValueException::class);
diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php
index 2a6261e..cd7e4f4 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php
@@ -1071,9 +1071,7 @@ class AbstractObjectNormalizerTest extends TestCase
         $this->assertSame(['string' => 'yes'], $normalized);
     }
 
-    /**
-     * @dataProvider provideBooleanTypesData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBooleanTypesData')]
     public function testDenormalizeBooleanTypesWithNotMatchingData(array $data, string $type)
     {
         $normalizer = new AbstractObjectNormalizerWithMetadataAndPropertyTypeExtractors();
diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/ConstraintViolationListNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/ConstraintViolationListNormalizerTest.php
index 1d0afb3..18cafea 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/ConstraintViolationListNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/ConstraintViolationListNormalizerTest.php
@@ -113,9 +113,7 @@ error',
         $this->assertEquals($expected, $normalizer->normalize($list));
     }
 
-    /**
-     * @dataProvider payloadFieldsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('payloadFieldsProvider')]
     public function testNormalizePayloadFields($fields, ?array $expected = null)
     {
         $constraint = new NotNull();
diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/DataUriNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/DataUriNormalizerTest.php
index 92e173f..06be869 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/DataUriNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/DataUriNormalizerTest.php
@@ -46,9 +46,7 @@ class DataUriNormalizerTest extends TestCase
         $this->assertTrue($this->normalizer->supportsNormalization(new \SplFileObject('data:,Hello%2C%20World!')));
     }
 
-    /**
-     * @requires extension fileinfo
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('fileinfo')]
     public function testNormalizeHttpFoundationFile()
     {
         $file = new File(__DIR__.'/../Fixtures/test.gif');
@@ -56,9 +54,7 @@ class DataUriNormalizerTest extends TestCase
         $this->assertSame(self::TEST_GIF_DATA, $this->normalizer->normalize($file));
     }
 
-    /**
-     * @requires extension fileinfo
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('fileinfo')]
     public function testNormalizeSplFileInfo()
     {
         $file = new \SplFileInfo(__DIR__.'/../Fixtures/test.gif');
@@ -66,9 +62,7 @@ class DataUriNormalizerTest extends TestCase
         $this->assertSame(self::TEST_GIF_DATA, $this->normalizer->normalize($file));
     }
 
-    /**
-     * @requires extension fileinfo
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('fileinfo')]
     public function testNormalizeText()
     {
         $file = new \SplFileObject(__DIR__.'/../Fixtures/test.txt');
@@ -118,9 +112,7 @@ class DataUriNormalizerTest extends TestCase
         $this->normalizer->denormalize('/etc/shadow', 'SplFileObject');
     }
 
-    /**
-     * @dataProvider invalidUriProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidUriProvider')]
     public function testInvalidData($uri)
     {
         $this->expectException(UnexpectedValueException::class);
@@ -145,9 +137,7 @@ class DataUriNormalizerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider validUriProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validUriProvider')]
     public function testValidData($uri)
     {
         $this->assertInstanceOf(\SplFileObject::class, $this->normalizer->denormalize($uri, 'SplFileObject'));
diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/DateIntervalNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/DateIntervalNormalizerTest.php
index 5a7f50d..b1be1ff 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/DateIntervalNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/DateIntervalNormalizerTest.php
@@ -56,17 +56,13 @@ class DateIntervalNormalizerTest extends TestCase
         $this->assertEquals('P0Y0M0DT0H0M0S', $this->normalizer->normalize(new \DateInterval('PT0S')));
     }
 
-    /**
-     * @dataProvider dataProviderISO
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderISO')]
     public function testNormalizeUsingFormatPassedInContext($format, $output, $input)
     {
         $this->assertEquals($output, $this->normalizer->normalize($this->getInterval($input), null, [DateIntervalNormalizer::FORMAT_KEY => $format]));
     }
 
-    /**
-     * @dataProvider dataProviderISO
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderISO')]
     public function testNormalizeUsingFormatPassedInConstructor($format, $output, $input)
     {
         $normalizer = new DateIntervalNormalizer([DateIntervalNormalizer::FORMAT_KEY => $format]);
@@ -91,17 +87,13 @@ class DateIntervalNormalizerTest extends TestCase
         $this->assertDateIntervalEquals(new \DateInterval('P00Y00M00DT00H00M00S'), $this->normalizer->denormalize('P00Y00M00DT00H00M00S', \DateInterval::class));
     }
 
-    /**
-     * @dataProvider dataProviderISO
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderISO')]
     public function testDenormalizeUsingFormatPassedInContext($format, $input, $output)
     {
         $this->assertDateIntervalEquals($this->getInterval($output), $this->normalizer->denormalize($input, \DateInterval::class, null, [DateIntervalNormalizer::FORMAT_KEY => $format]));
     }
 
-    /**
-     * @dataProvider dataProviderISO
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dataProviderISO')]
     public function testDenormalizeUsingFormatPassedInConstructor($format, $input, $output)
     {
         $normalizer = new DateIntervalNormalizer([DateIntervalNormalizer::FORMAT_KEY => $format]);
diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php
index 6a5ce43..9dd5b64 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/DateTimeNormalizerTest.php
@@ -60,9 +60,7 @@ class DateTimeNormalizerTest extends TestCase
         $this->assertSame('2016-12-01T09:00:00+09:00', $normalizer->normalize(new \DateTimeImmutable('2016/12/01', new \DateTimeZone('UTC'))));
     }
 
-    /**
-     * @dataProvider normalizeUsingTimeZonePassedInContextProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('normalizeUsingTimeZonePassedInContextProvider')]
     public function testNormalizeUsingTimeZonePassedInContext($expected, $input, $timezone)
     {
         $this->assertSame($expected, $this->normalizer->normalize($input, null, [
@@ -78,9 +76,7 @@ class DateTimeNormalizerTest extends TestCase
         yield ['2016-12-01T09:00:00+09:00', new \DateTime('2016/12/01', new \DateTimeZone('UTC')), new \DateTimeZone('Asia/Tokyo')];
     }
 
-    /**
-     * @dataProvider normalizeUsingTimeZonePassedInContextAndExpectedFormatWithMicrosecondsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('normalizeUsingTimeZonePassedInContextAndExpectedFormatWithMicrosecondsProvider')]
     public function testNormalizeUsingTimeZonePassedInContextAndFormattedWithMicroseconds($expected, $expectedFormat, $input, $timezone)
     {
         $this->assertSame(
@@ -197,9 +193,7 @@ class DateTimeNormalizerTest extends TestCase
         $this->assertEquals(new \DateTime('2016/01/01'), $this->normalizer->denormalize('2016.01.01', \DateTime::class, null, [DateTimeNormalizer::FORMAT_KEY => 'Y.m.d|']));
     }
 
-    /**
-     * @dataProvider denormalizeUsingTimezonePassedInContextProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('denormalizeUsingTimezonePassedInContextProvider')]
     public function testDenormalizeUsingTimezonePassedInContext($input, $expected, $timezone, $format = null)
     {
         $actual = $this->normalizer->denormalize($input, \DateTimeInterface::class, null, [
diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php
index 4398fbd..e493afa 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php
@@ -350,6 +350,7 @@ class GetSetMethodNormalizerTest extends TestCase
         return $normalizer;
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testRejectInvalidKey()
     {
         $this->markTestSkipped('This test makes no sense with the GetSetMethodNormalizer');
@@ -430,9 +431,8 @@ class GetSetMethodNormalizerTest extends TestCase
 
     /**
      * @param class-string $class
-     *
-     * @dataProvider provideNotIgnoredMethodSupport
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNotIgnoredMethodSupport')]
     public function testNotIgnoredMethodSupport(string $class)
     {
         $this->assertFalse($this->normalizer->supportsNormalization(new $class()));
@@ -552,10 +552,8 @@ class GetSetMethodNormalizerTest extends TestCase
         $this->assertSame('foo', $obj->getFoo());
     }
 
-    /**
-     * @testWith [{"foo":"foo"}, "getFoo", "foo"]
-     *           [{"bar":"bar"}, "getBar", "bar"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([['foo' => 'foo'], 'getFoo', 'foo'])]
+    #[\PHPUnit\Framework\Attributes\TestWith([['bar' => 'bar'], 'getBar', 'bar'])]
     public function testSupportsAndDenormalizeWithOptionalSetterArgument(array $data, string $method, string $expected)
     {
         $this->assertTrue($this->normalizer->supportsDenormalization($data, GetSetDummyWithOptionalAndMultipleSetterArgs::class));
diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php
index 6273b50..70970db 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php
@@ -743,9 +743,7 @@ class ObjectNormalizerTest extends TestCase
         })::class)->foo);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractAttributesRespectsFormat()
     {
         $normalizer = new FormatAndContextAwareNormalizer();
diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php
index 4ff8236..aa1b6eb 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php
@@ -176,9 +176,7 @@ class PropertyNormalizerTest extends TestCase
         $this->assertEquals('bar', $obj->getBar());
     }
 
-    /**
-     * @requires PHP 8.2
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.2')]
     public function testDenormalizeWithReadOnlyClass()
     {
         /** @var ChildClassDummy $object */
@@ -192,9 +190,7 @@ class PropertyNormalizerTest extends TestCase
         $this->assertSame('childProp', $object->childProp);
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testDenormalizeWithAsymmetricPropertyVisibility()
     {
         /** @var SpecialBookDummy $object */
@@ -382,6 +378,7 @@ class PropertyNormalizerTest extends TestCase
         return $normalizer;
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testIgnoredAttributesContextDenormalizeInherit()
     {
         $this->markTestSkipped('This has not been tested previously - did not manage to make the test work');
diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/UidNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/UidNormalizerTest.php
index 49e199b..ac91d81 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/UidNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/UidNormalizerTest.php
@@ -107,9 +107,7 @@ class UidNormalizerTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider normalizeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('normalizeProvider')]
     public function testNormalize(string $expected, AbstractUid $uid, ?string $uidFormat)
     {
         $this->assertSame($expected, $this->normalizer->normalize($uid, null, null !== $uidFormat ? [
@@ -130,9 +128,7 @@ class UidNormalizerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider dataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dataProvider')]
     public function testSupportsDenormalization($uuidString, $class)
     {
         $this->assertTrue($this->normalizer->supportsDenormalization($uuidString, $class));
@@ -143,9 +139,7 @@ class UidNormalizerTest extends TestCase
         $this->assertFalse($this->normalizer->supportsDenormalization('foo', \stdClass::class));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testSupportOurAbstractUid()
     {
         $this->expectDeprecation('Since symfony/serializer 6.1: Supporting denormalization for the "Symfony\Component\Uid\AbstractUid" type in "Symfony\Component\Serializer\Normalizer\UidNormalizer" is deprecated, use one of "Symfony\Component\Uid\AbstractUid" child class instead.');
@@ -158,17 +152,13 @@ class UidNormalizerTest extends TestCase
         $this->assertTrue($this->normalizer->supportsDenormalization('ccc', TestAbstractCustomUid::class));
     }
 
-    /**
-     * @dataProvider dataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dataProvider')]
     public function testDenormalize($uuidString, $class)
     {
         $this->assertEquals($class::fromString($uuidString), $this->normalizer->denormalize($uuidString, $class));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testDenormalizeOurAbstractUid()
     {
         $this->expectDeprecation('Since symfony/serializer 6.1: Denormalizing to an abstract class in "Symfony\Component\Serializer\Normalizer\UidNormalizer" is deprecated.');
@@ -176,9 +166,7 @@ class UidNormalizerTest extends TestCase
         $this->assertEquals(Uuid::fromString($uuidString = '1ea6ecef-eb9a-66fe-b62b-957b45f17e43'), $this->normalizer->denormalize($uuidString, AbstractUid::class));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testDenormalizeCustomAbstractUid()
     {
         $this->expectDeprecation('Since symfony/serializer 6.1: Denormalizing to an abstract class in "Symfony\Component\Serializer\Normalizer\UidNormalizer" is deprecated.');
diff --git a/src/Symfony/Component/Serializer/Tests/SerializerTest.php b/src/Symfony/Component/Serializer/Tests/SerializerTest.php
index d131e51..42fdfb3 100644
--- a/src/Symfony/Component/Serializer/Tests/SerializerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/SerializerTest.php
@@ -618,14 +618,14 @@ class SerializerTest extends TestCase
         yield [$serializer, $data];
     }
 
-    /** @dataProvider provideObjectOrCollectionTests */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideObjectOrCollectionTests')]
     public function testNormalizeWithCollection(Serializer $serializer, array $data)
     {
         $expected = '{"a1":[],"a2":{"k":"v"},"b1":[],"b2":{"k":"v"},"c1":{"nested":[]},"c2":{"nested":{"k":"v"}},"d1":{"nested":[]},"d2":{"nested":{"k":"v"}},"e1":{"map":[]},"e2":{"map":{"k":"v"}},"f1":{"map":[]},"f2":{"map":{"k":"v"}},"g1":{"list":[],"settings":[]},"g2":{"list":["greg"],"settings":[]}}';
         $this->assertSame($expected, $serializer->serialize($data, 'json'));
     }
 
-    /** @dataProvider provideObjectOrCollectionTests */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideObjectOrCollectionTests')]
     public function testNormalizePreserveEmptyArrayObject(Serializer $serializer, array $data)
     {
         $expected = '{"a1":{},"a2":{"k":"v"},"b1":[],"b2":{"k":"v"},"c1":{"nested":{}},"c2":{"nested":{"k":"v"}},"d1":{"nested":[]},"d2":{"nested":{"k":"v"}},"e1":{"map":[]},"e2":{"map":{"k":"v"}},"f1":{"map":{}},"f2":{"map":{"k":"v"}},"g1":{"list":{},"settings":[]},"g2":{"list":["greg"],"settings":[]}}';
@@ -634,7 +634,7 @@ class SerializerTest extends TestCase
         ]));
     }
 
-    /** @dataProvider provideObjectOrCollectionTests */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideObjectOrCollectionTests')]
     public function testNormalizeEmptyArrayAsObject(Serializer $serializer, array $data)
     {
         $expected = '{"a1":[],"a2":{"k":"v"},"b1":{},"b2":{"k":"v"},"c1":{"nested":[]},"c2":{"nested":{"k":"v"}},"d1":{"nested":{}},"d2":{"nested":{"k":"v"}},"e1":{"map":{}},"e2":{"map":{"k":"v"}},"f1":{"map":[]},"f2":{"map":{"k":"v"}},"g1":{"list":[],"settings":{}},"g2":{"list":["greg"],"settings":{}}}';
@@ -643,7 +643,7 @@ class SerializerTest extends TestCase
         ]));
     }
 
-    /** @dataProvider provideObjectOrCollectionTests */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideObjectOrCollectionTests')]
     public function testNormalizeEmptyArrayAsObjectAndPreserveEmptyArrayObject(Serializer $serializer, array $data)
     {
         $expected = '{"a1":{},"a2":{"k":"v"},"b1":{},"b2":{"k":"v"},"c1":{"nested":{}},"c2":{"nested":{"k":"v"}},"d1":{"nested":{}},"d2":{"nested":{"k":"v"}},"e1":{"map":{}},"e2":{"map":{"k":"v"}},"f1":{"map":{}},"f2":{"map":{"k":"v"}},"g1":{"list":{},"settings":{}},"g2":{"list":["greg"],"settings":{}}}';
@@ -832,9 +832,7 @@ class SerializerTest extends TestCase
         ]);
     }
 
-    /**
-     * @requires PHP 8.2
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.2')]
     public function testFalseBuiltInTypes()
     {
         $extractor = new PropertyInfoExtractor([], [new ReflectionExtractor()]);
@@ -845,9 +843,7 @@ class SerializerTest extends TestCase
         $this->assertEquals(new FalseBuiltInDummy(), $actual);
     }
 
-    /**
-     * @requires PHP 8.2
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.2')]
     public function testTrueBuiltInTypes()
     {
         $extractor = new PropertyInfoExtractor([], [new ReflectionExtractor()]);
@@ -887,9 +883,7 @@ class SerializerTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideCollectDenormalizationErrors
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCollectDenormalizationErrors')]
     public function testCollectDenormalizationErrors(?ClassMetadataFactory $classMetadataFactory)
     {
         $json = '
@@ -1126,9 +1120,7 @@ class SerializerTest extends TestCase
         $this->assertSame($expected, $exceptionsAsArray);
     }
 
-    /**
-     * @dataProvider provideCollectDenormalizationErrors
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCollectDenormalizationErrors')]
     public function testCollectDenormalizationErrors2(?ClassMetadataFactory $classMetadataFactory)
     {
         $json = '
@@ -1261,9 +1253,7 @@ class SerializerTest extends TestCase
         $this->assertSame($expected, $exceptionsAsArray);
     }
 
-    /**
-     * @dataProvider provideCollectDenormalizationErrors
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCollectDenormalizationErrors')]
     public function testCollectDenormalizationErrorsWithConstructor(?ClassMetadataFactory $classMetadataFactory)
     {
         $json = '{"bool": "bool"}';
diff --git a/src/Symfony/Component/Stopwatch/Tests/StopwatchEventTest.php b/src/Symfony/Component/Stopwatch/Tests/StopwatchEventTest.php
index 3183ce3..05e0e03 100644
--- a/src/Symfony/Component/Stopwatch/Tests/StopwatchEventTest.php
+++ b/src/Symfony/Component/Stopwatch/Tests/StopwatchEventTest.php
@@ -18,9 +18,8 @@ use Symfony\Component\Stopwatch\StopwatchEvent;
  * StopwatchEventTest.
  *
  * @author Fabien Potencier <fabien@symfony.com>
- *
- * @group time-sensitive
  */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class StopwatchEventTest extends TestCase
 {
     private const DELTA = 37;
diff --git a/src/Symfony/Component/Stopwatch/Tests/StopwatchPeriodTest.php b/src/Symfony/Component/Stopwatch/Tests/StopwatchPeriodTest.php
index 37417ae..6db33dd 100644
--- a/src/Symfony/Component/Stopwatch/Tests/StopwatchPeriodTest.php
+++ b/src/Symfony/Component/Stopwatch/Tests/StopwatchPeriodTest.php
@@ -16,27 +16,21 @@ use Symfony\Component\Stopwatch\StopwatchPeriod;
 
 class StopwatchPeriodTest extends TestCase
 {
-    /**
-     * @dataProvider provideTimeValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTimeValues')]
     public function testGetStartTime($start, $useMorePrecision, $expected)
     {
         $period = new StopwatchPeriod($start, $start, $useMorePrecision);
         $this->assertSame($expected, $period->getStartTime());
     }
 
-    /**
-     * @dataProvider provideTimeValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTimeValues')]
     public function testGetEndTime($end, $useMorePrecision, $expected)
     {
         $period = new StopwatchPeriod($end, $end, $useMorePrecision);
         $this->assertSame($expected, $period->getEndTime());
     }
 
-    /**
-     * @dataProvider provideDurationValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDurationValues')]
     public function testGetDuration($start, $end, $useMorePrecision, $duration)
     {
         $period = new StopwatchPeriod($start, $end, $useMorePrecision);
diff --git a/src/Symfony/Component/Stopwatch/Tests/StopwatchTest.php b/src/Symfony/Component/Stopwatch/Tests/StopwatchTest.php
index 6be89b8..6a3965d 100644
--- a/src/Symfony/Component/Stopwatch/Tests/StopwatchTest.php
+++ b/src/Symfony/Component/Stopwatch/Tests/StopwatchTest.php
@@ -20,9 +20,8 @@ use Symfony\Component\Stopwatch\StopwatchEvent;
  * StopwatchTest.
  *
  * @author Fabien Potencier <fabien@symfony.com>
- *
- * @group time-sensitive
  */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class StopwatchTest extends TestCase
 {
     private const DELTA = 20;
diff --git a/src/Symfony/Component/String/Tests/AbstractAsciiTestCase.php b/src/Symfony/Component/String/Tests/AbstractAsciiTestCase.php
index 3e3d970..cc33fe3 100644
--- a/src/Symfony/Component/String/Tests/AbstractAsciiTestCase.php
+++ b/src/Symfony/Component/String/Tests/AbstractAsciiTestCase.php
@@ -43,9 +43,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         $this->assertTrue($instance->isEmpty());
     }
 
-    /**
-     * @dataProvider provideBytesAt
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBytesAt')]
     public function testBytesAt(array $expected, string $string, int $offset, ?int $form = null)
     {
         if (2 !== grapheme_strlen('च्छे') && 'नमस्ते' === $string) {
@@ -68,9 +66,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideIndexOf
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIndexOf')]
     public function testContainsAny(?int $result, string $string, $needle)
     {
         $instance = static::createFromString($string);
@@ -78,9 +74,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         $this->assertSame(null !== $instance->indexOf($needle), $instance->containsAny($needle));
     }
 
-    /**
-     * @dataProvider provideIndexOfIgnoreCase
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIndexOfIgnoreCase')]
     public function testContainsAnyIgnoreCase(?int $result, string $string, $needle)
     {
         $instance = static::createFromString($string);
@@ -99,9 +93,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         $this->assertEquals($expected, $actual);
     }
 
-    /**
-     * @dataProvider wordwrapProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('wordwrapProvider')]
     public function testWordwrap($expected, $actual, $length, $break, $cut = false)
     {
         $instance = static::createFromString($actual);
@@ -143,9 +135,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideWrap
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideWrap')]
     public function testWrap(array $expected, array $values)
     {
         $s = static::createFromString('');
@@ -168,9 +158,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideLength
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLength')]
     public function testLength(int $length, string $string)
     {
         if (2 !== grapheme_strlen('च्छे') && 'अनुच्छेद' === $string) {
@@ -195,9 +183,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideIndexOf
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIndexOf')]
     public function testIndexOf(?int $result, string $string, $needle, int $offset)
     {
         $instance = static::createFromString($string);
@@ -226,9 +212,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideIndexOfIgnoreCase
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIndexOfIgnoreCase')]
     public function testIndexOfIgnoreCase(?int $result, string $string, $needle, int $offset)
     {
         $instance = static::createFromString($string);
@@ -258,9 +242,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideIndexOfLast
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIndexOfLast')]
     public function testIndexOfLast(?int $result, string $string, $needle, int $offset)
     {
         $instance = static::createFromString($string);
@@ -285,9 +267,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideIndexOfLastIgnoreCase
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIndexOfLastIgnoreCase')]
     public function testIndexOfLastIgnoreCase(?int $result, string $string, string $needle, int $offset)
     {
         $instance = static::createFromString($string);
@@ -316,9 +296,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideSplit
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSplit')]
     public function testSplit(string $string, string $delimiter, array $chunks, ?int $limit, ?int $flags = null)
     {
         $this->assertEquals($chunks, static::createFromString($string)->split($delimiter, $limit, $flags));
@@ -427,9 +405,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideInvalidChunkLength
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidChunkLength')]
     public function testInvalidChunkLength(int $length)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -446,9 +422,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideChunk
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideChunk')]
     public function testChunk(string $string, array $chunks, int $length)
     {
         $this->assertEquals($chunks, static::createFromString($string)->chunk($length));
@@ -518,9 +492,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideLower
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLower')]
     public function testLower(string $expected, string $origin)
     {
         $instance = static::createFromString($origin)->lower();
@@ -542,9 +514,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideUpper
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUpper')]
     public function testUpper(string $expected, string $origin)
     {
         $instance = static::createFromString($origin)->upper();
@@ -566,9 +536,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideTitle
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTitle')]
     public function testTitle(string $expected, string $origin, bool $allWords)
     {
         $this->assertEquals(
@@ -592,9 +560,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideSlice
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSlice')]
     public function testSlice(string $expected, string $origin, int $start, ?int $length = null)
     {
         $this->assertEquals(
@@ -620,9 +586,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideSplice
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSplice')]
     public function testSplice(string $expected, int $start, ?int $length = null)
     {
         $this->assertEquals(
@@ -648,9 +612,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideAppend
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAppend')]
     public function testAppend(string $expected, array $suffixes)
     {
         $instance = static::createFromString('');
@@ -683,9 +645,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideAppend
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAppend')]
     public function testPrepend(string $expected, array $prefixes)
     {
         $instance = static::createFromString('');
@@ -700,9 +660,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         $this->assertEquals(static::createFromString($expected), $instance);
     }
 
-    /**
-     * @dataProvider provideTrim
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTrim')]
     public function testTrim(string $expected, string $origin, ?string $chars)
     {
         $result = static::createFromString($origin);
@@ -751,9 +709,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         $this->assertEquals(static::createFromString('def'), $str->ignoreCase()->trimPrefix('ABC.'));
     }
 
-    /**
-     * @dataProvider provideTrimStart
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTrimStart')]
     public function testTrimStart(string $expected, string $origin, ?string $chars)
     {
         $result = static::createFromString($origin);
@@ -787,9 +743,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideTrimEnd
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTrimEnd')]
     public function testTrimEnd(string $expected, string $origin, ?string $chars)
     {
         $result = static::createFromString($origin);
@@ -819,9 +773,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideBeforeAfter
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBeforeAfter')]
     public function testBeforeAfter(string $expected, string $needle, string $origin, int $offset, bool $before)
     {
         $result = static::createFromString($origin);
@@ -847,9 +799,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideBeforeAfterIgnoreCase
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBeforeAfterIgnoreCase')]
     public function testBeforeAfterIgnoreCase(string $expected, string $needle, string $origin, int $offset, bool $before)
     {
         $result = static::createFromString($origin)->ignoreCase();
@@ -875,9 +825,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideBeforeAfterLast
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBeforeAfterLast')]
     public function testBeforeAfterLast(string $expected, string $needle, string $origin, int $offset, bool $before)
     {
         $result = static::createFromString($origin);
@@ -904,9 +852,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideBeforeAfterLastIgnoreCase
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBeforeAfterLastIgnoreCase')]
     public function testBeforeAfterLastIgnoreCase(string $expected, string $needle, string $origin, int $offset, bool $before)
     {
         $result = static::createFromString($origin)->ignoreCase();
@@ -934,9 +880,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideFolded
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFolded')]
     public function testFolded(string $expected, string $origin)
     {
         $this->assertEquals(
@@ -953,9 +897,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideReplace
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideReplace')]
     public function testReplace(string $expectedString, int $expectedCount, string $origin, string $from, string $to)
     {
         $origin = static::createFromString($origin);
@@ -976,9 +918,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideReplaceMatches
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideReplaceMatches')]
     public function testReplaceMatches(string $expectedString, string $origin, string $fromRegexp, $to)
     {
         $origin = static::createFromString($origin);
@@ -1002,9 +942,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideReplaceIgnoreCase
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideReplaceIgnoreCase')]
     public function testReplaceIgnoreCase(string $expectedString, int $expectedCount, string $origin, string $from, string $to)
     {
         $origin = static::createFromString($origin);
@@ -1025,9 +963,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideCamel
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCamel')]
     public function testCamel(string $expectedString, string $origin)
     {
         $instance = static::createFromString($origin)->camel();
@@ -1051,9 +987,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideSnake
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSnake')]
     public function testSnake(string $expectedString, string $origin)
     {
         $instance = static::createFromString($origin)->snake();
@@ -1088,9 +1022,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideStartsWith
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideStartsWith')]
     public function testStartsWith(bool $expected, string $origin, $prefix, ?int $form = null)
     {
         $instance = static::createFromString($origin);
@@ -1117,9 +1049,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideStartsWithIgnoreCase
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideStartsWithIgnoreCase')]
     public function testStartsWithIgnoreCase(bool $expected, string $origin, $prefix)
     {
         $this->assertSame($expected, static::createFromString($origin)->ignoreCase()->startsWith($prefix));
@@ -1142,9 +1072,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideEndsWith
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEndsWith')]
     public function testEndsWith(bool $expected, string $origin, $suffix, ?int $form = null)
     {
         $instance = static::createFromString($origin);
@@ -1171,9 +1099,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideEndsWithIgnoreCase
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEndsWithIgnoreCase')]
     public function testEndsWithIgnoreCase(bool $expected, string $origin, $suffix)
     {
         $this->assertSame($expected, static::createFromString($origin)->ignoreCase()->endsWith($suffix));
@@ -1196,9 +1122,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideEnsureStart
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEnsureStart')]
     public function testEnsureStart(string $expectedString, string $origin, $prefix)
     {
         $instance = static::createFromString($origin)->ensureStart($prefix);
@@ -1222,9 +1146,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideEnsureStartIgnoreCase
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEnsureStartIgnoreCase')]
     public function testEnsureStartIgnoreCase(string $expectedString, string $origin, $prefix)
     {
         $instance = static::createFromString($origin)->ignoreCase()->ensureStart($prefix);
@@ -1247,9 +1169,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideEnsureEnd
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEnsureEnd')]
     public function testEnsureEnd(string $expectedString, string $origin, $suffix)
     {
         $instance = static::createFromString($origin)->ensureEnd($suffix);
@@ -1273,9 +1193,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideEnsureEndIgnoreCase
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEnsureEndIgnoreCase')]
     public function testEnsureEndIgnoreCase(string $expectedString, string $origin, $suffix)
     {
         $instance = static::createFromString($origin)->ignoreCase()->ensureEnd($suffix);
@@ -1298,9 +1216,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideCollapseWhitespace
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCollapseWhitespace')]
     public function testCollapseWhitespace(string $expectedString, string $origin)
     {
         $instance = static::createFromString($origin)->collapseWhitespace();
@@ -1319,9 +1235,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideEqualsTo
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEqualsTo')]
     public function testEqualsTo(bool $expected, string $origin, $other)
     {
         $this->assertSame($expected, static::createFromString($origin)->equalsTo($other));
@@ -1345,9 +1259,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideEqualsToIgnoreCase
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEqualsToIgnoreCase')]
     public function testEqualsToIgnoreCase(bool $expected, string $origin, $other)
     {
         $this->assertSame($expected, static::createFromString($origin)->ignoreCase()->equalsTo($other));
@@ -1370,9 +1282,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideIsEmpty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIsEmpty')]
     public function testIsEmpty(bool $expected, string $origin)
     {
         $this->assertSame($expected, static::createFromString($origin)->isEmpty());
@@ -1388,9 +1298,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideJoin
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideJoin')]
     public function testJoin(string $expected, string $origin, array $join)
     {
         $instance = static::createFromString($origin)->join($join);
@@ -1414,9 +1322,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideRepeat
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRepeat')]
     public function testRepeat(string $expected, string $origin, int $multiplier)
     {
         $instance = static::createFromString($origin)->repeat($multiplier);
@@ -1435,9 +1341,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider providePadBoth
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePadBoth')]
     public function testPadBoth(string $expected, string $origin, int $length, string $padStr)
     {
         $instance = static::createFromString($origin)->padBoth($length, $padStr);
@@ -1459,9 +1363,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider providePadEnd
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePadEnd')]
     public function testPadEnd(string $expected, string $origin, int $length, string $padStr)
     {
         $instance = static::createFromString($origin)->padEnd($length, $padStr);
@@ -1482,9 +1384,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider providePadStart
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePadStart')]
     public function testPadStart(string $expected, string $origin, int $length, string $padStr)
     {
         $instance = static::createFromString($origin)->padStart($length, $padStr);
@@ -1505,9 +1405,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideTruncate
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTruncate')]
     public function testTruncate(string $expected, string $origin, int $length, string $ellipsis, bool $cut = true)
     {
         $instance = static::createFromString($origin)->truncate($length, $ellipsis, $cut);
@@ -1542,9 +1440,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         self::assertSame('foobar', $instance->toString());
     }
 
-    /**
-     * @dataProvider provideReverse
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideReverse')]
     public function testReverse(string $expected, string $origin)
     {
         $instance = static::createFromString($origin)->reverse();
@@ -1561,9 +1457,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideWidth
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideWidth')]
     public function testWidth(int $expected, string $origin, bool $ignoreAnsiDecoration = true)
     {
         $this->assertSame($expected, static::createFromString($origin)->width($ignoreAnsiDecoration));
@@ -1592,9 +1486,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideToByteString
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideToByteString')]
     public function testToByteString(string $origin, string $encoding)
     {
         $instance = static::createFromString($origin)->toByteString($encoding);
diff --git a/src/Symfony/Component/String/Tests/AbstractUnicodeTestCase.php b/src/Symfony/Component/String/Tests/AbstractUnicodeTestCase.php
index 0432fa7..1f2ccf4 100644
--- a/src/Symfony/Component/String/Tests/AbstractUnicodeTestCase.php
+++ b/src/Symfony/Component/String/Tests/AbstractUnicodeTestCase.php
@@ -75,9 +75,7 @@ END'],
         );
     }
 
-    /**
-     * @dataProvider provideCodePointsAt
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCodePointsAt')]
     public function testCodePointsAt(array $expected, string $string, int $offset, ?int $form = null)
     {
         if (2 !== grapheme_strlen('च्छे') && 'नमस्ते' === $string) {
diff --git a/src/Symfony/Component/String/Tests/FunctionsTest.php b/src/Symfony/Component/String/Tests/FunctionsTest.php
index 6a69106..6f90fea 100644
--- a/src/Symfony/Component/String/Tests/FunctionsTest.php
+++ b/src/Symfony/Component/String/Tests/FunctionsTest.php
@@ -22,9 +22,7 @@ use function Symfony\Component\String\u;
 
 final class FunctionsTest extends TestCase
 {
-    /**
-     * @dataProvider provideSStrings
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSStrings')]
     public function testS(AbstractString $expected, ?string $input)
     {
         $this->assertEquals($expected, s($input));
@@ -42,9 +40,7 @@ final class FunctionsTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideUStrings
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUStrings')]
     public function testU(UnicodeString $expected, ?string $input)
     {
         $this->assertEquals($expected, u($input));
@@ -60,9 +56,7 @@ final class FunctionsTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideBStrings
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBStrings')]
     public function testB(ByteString $expected, ?string $input)
     {
         $this->assertEquals($expected, b($input));
diff --git a/src/Symfony/Component/String/Tests/Inflector/EnglishInflectorTest.php b/src/Symfony/Component/String/Tests/Inflector/EnglishInflectorTest.php
index e3b35cb..5f382c5 100644
--- a/src/Symfony/Component/String/Tests/Inflector/EnglishInflectorTest.php
+++ b/src/Symfony/Component/String/Tests/Inflector/EnglishInflectorTest.php
@@ -338,17 +338,13 @@ class EnglishInflectorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider singularizeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('singularizeProvider')]
     public function testSingularize(string $plural, $singular)
     {
         $this->assertSame(\is_array($singular) ? $singular : [$singular], (new EnglishInflector())->singularize($plural));
     }
 
-    /**
-     * @dataProvider pluralizeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('pluralizeProvider')]
     public function testPluralize(string $singular, $plural)
     {
         $this->assertSame(\is_array($plural) ? $plural : [$plural], (new EnglishInflector())->pluralize($singular));
diff --git a/src/Symfony/Component/String/Tests/Inflector/FrenchInflectorTest.php b/src/Symfony/Component/String/Tests/Inflector/FrenchInflectorTest.php
index 530b027..c364ef6 100644
--- a/src/Symfony/Component/String/Tests/Inflector/FrenchInflectorTest.php
+++ b/src/Symfony/Component/String/Tests/Inflector/FrenchInflectorTest.php
@@ -127,9 +127,7 @@ class FrenchInflectorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider pluralizeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('pluralizeProvider')]
     public function testSingularize(string $singular, string $plural)
     {
         $this->assertSame([$singular], (new FrenchInflector())->singularize($plural));
@@ -137,9 +135,7 @@ class FrenchInflectorTest extends TestCase
         $this->assertSame([ucfirst($singular)], (new FrenchInflector())->singularize(ucfirst($plural)));
     }
 
-    /**
-     * @dataProvider pluralizeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('pluralizeProvider')]
     public function testPluralize(string $singular, string $plural)
     {
         $this->assertSame([$plural], (new FrenchInflector())->pluralize($singular));
diff --git a/src/Symfony/Component/String/Tests/LazyStringTest.php b/src/Symfony/Component/String/Tests/LazyStringTest.php
index b5405bb..691fb48 100644
--- a/src/Symfony/Component/String/Tests/LazyStringTest.php
+++ b/src/Symfony/Component/String/Tests/LazyStringTest.php
@@ -29,9 +29,7 @@ class LazyStringTest extends TestCase
         $this->assertSame(1, $count);
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testReturnTypeError()
     {
         ErrorHandler::register();
diff --git a/src/Symfony/Component/String/Tests/Slugger/AsciiSluggerTest.php b/src/Symfony/Component/String/Tests/Slugger/AsciiSluggerTest.php
index 84b1885..e469787 100644
--- a/src/Symfony/Component/String/Tests/Slugger/AsciiSluggerTest.php
+++ b/src/Symfony/Component/String/Tests/Slugger/AsciiSluggerTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\String\Slugger\AsciiSlugger;
 
 class AsciiSluggerTest extends TestCase
 {
-    /**
-     * @dataProvider provideSlugTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSlugTests')]
     public function testSlug(string $expected, string $string, string $separator = '-', ?string $locale = null)
     {
         $slugger = new AsciiSlugger();
@@ -47,11 +45,8 @@ class AsciiSluggerTest extends TestCase
         yield [\function_exists('transliterator_transliterate') ? 'gh' : '', 'ғ', '-', 'uz_fr']; // Ensure we get the parent locale
     }
 
-    /**
-     * @dataProvider provideSlugEmojiTests
-     *
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSlugEmojiTests')]
     public function testSlugEmoji(string $expected, string $string, ?string $locale, string|bool $emoji = true)
     {
         $slugger = new AsciiSlugger();
@@ -97,9 +92,7 @@ class AsciiSluggerTest extends TestCase
         ];
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testSlugEmojiWithSetLocale()
     {
         if (!setlocale(\LC_ALL, 'C.UTF-8')) {
diff --git a/src/Symfony/Component/String/Tests/SluggerTest.php b/src/Symfony/Component/String/Tests/SluggerTest.php
index 6b4fc64..571e1ff 100644
--- a/src/Symfony/Component/String/Tests/SluggerTest.php
+++ b/src/Symfony/Component/String/Tests/SluggerTest.php
@@ -16,11 +16,8 @@ use Symfony\Component\String\Slugger\AsciiSlugger;
 
 class SluggerTest extends TestCase
 {
-    /**
-     * @requires extension intl
-     *
-     * @dataProvider provideSlug
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSlug')]
     public function testSlug(string $string, string $locale, string $expectedSlug)
     {
         $slugger = new AsciiSlugger($locale);
diff --git a/src/Symfony/Component/Templating/Tests/DelegatingEngineTest.php b/src/Symfony/Component/Templating/Tests/DelegatingEngineTest.php
index 00700e6..0e2085f 100644
--- a/src/Symfony/Component/Templating/Tests/DelegatingEngineTest.php
+++ b/src/Symfony/Component/Templating/Tests/DelegatingEngineTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Templating\EngineInterface;
 use Symfony\Component\Templating\Tests\Fixtures\MyStreamingEngine;
 use Symfony\Component\Templating\Tests\Fixtures\TestEngine;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class DelegatingEngineTest extends TestCase
 {
     public function testRenderDelegatesToSupportedEngine()
diff --git a/src/Symfony/Component/Templating/Tests/Helper/HelperTest.php b/src/Symfony/Component/Templating/Tests/Helper/HelperTest.php
index afac51a..9c8e2d8 100644
--- a/src/Symfony/Component/Templating/Tests/Helper/HelperTest.php
+++ b/src/Symfony/Component/Templating/Tests/Helper/HelperTest.php
@@ -14,9 +14,7 @@ namespace Symfony\Component\Templating\Tests\Helper;
 use PHPUnit\Framework\TestCase;
 use Symfony\Component\Templating\Tests\Fixtures\ProjectTemplateHelper;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class HelperTest extends TestCase
 {
     public function testGetSetCharset()
diff --git a/src/Symfony/Component/Templating/Tests/Helper/SlotsHelperTest.php b/src/Symfony/Component/Templating/Tests/Helper/SlotsHelperTest.php
index 92a584e..effac93 100644
--- a/src/Symfony/Component/Templating/Tests/Helper/SlotsHelperTest.php
+++ b/src/Symfony/Component/Templating/Tests/Helper/SlotsHelperTest.php
@@ -14,9 +14,7 @@ namespace Symfony\Component\Templating\Tests\Helper;
 use PHPUnit\Framework\TestCase;
 use Symfony\Component\Templating\Helper\SlotsHelper;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class SlotsHelperTest extends TestCase
 {
     public function testHasGetSet()
diff --git a/src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php b/src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php
index 486fc6c..48d48e3 100644
--- a/src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php
+++ b/src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Templating\TemplateReference;
 use Symfony\Component\Templating\Tests\Fixtures\ProjectTemplateCacheLoader;
 use Symfony\Component\Templating\Tests\Fixtures\ProjectTemplateLoaderVar;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class CacheLoaderTest extends TestCase
 {
     public function testConstructor()
diff --git a/src/Symfony/Component/Templating/Tests/Loader/ChainLoaderTest.php b/src/Symfony/Component/Templating/Tests/Loader/ChainLoaderTest.php
index e952afa..7f37302 100644
--- a/src/Symfony/Component/Templating/Tests/Loader/ChainLoaderTest.php
+++ b/src/Symfony/Component/Templating/Tests/Loader/ChainLoaderTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Templating\Loader\FilesystemLoader;
 use Symfony\Component\Templating\TemplateReference;
 use Symfony\Component\Templating\Tests\Fixtures\ProjectTemplateChainLoader;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class ChainLoaderTest extends TestCase
 {
     protected FilesystemLoader $loader1;
diff --git a/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php b/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php
index 4316bc2..fabc8b3 100644
--- a/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php
+++ b/src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Templating\Storage\FileStorage;
 use Symfony\Component\Templating\TemplateReference;
 use Symfony\Component\Templating\Tests\Fixtures\ProjectTemplateFilesystemLoader;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class FilesystemLoaderTest extends TestCase
 {
     protected static string $fixturesPath;
diff --git a/src/Symfony/Component/Templating/Tests/Loader/LoaderTest.php b/src/Symfony/Component/Templating/Tests/Loader/LoaderTest.php
index 6e6c9b3..5bc1227 100644
--- a/src/Symfony/Component/Templating/Tests/Loader/LoaderTest.php
+++ b/src/Symfony/Component/Templating/Tests/Loader/LoaderTest.php
@@ -15,9 +15,7 @@ use PHPUnit\Framework\TestCase;
 use Psr\Log\LoggerInterface;
 use Symfony\Component\Templating\Tests\Fixtures\ProjectTemplateLoader;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class LoaderTest extends TestCase
 {
     public function testGetSetLogger()
diff --git a/src/Symfony/Component/Templating/Tests/PhpEngineTest.php b/src/Symfony/Component/Templating/Tests/PhpEngineTest.php
index d1368f5..de2f928 100644
--- a/src/Symfony/Component/Templating/Tests/PhpEngineTest.php
+++ b/src/Symfony/Component/Templating/Tests/PhpEngineTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Templating\TemplateNameParser;
 use Symfony\Component\Templating\Tests\Fixtures\ProjectTemplateEngine;
 use Symfony\Component\Templating\Tests\Fixtures\ProjectTemplateEngineLoader;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class PhpEngineTest extends TestCase
 {
     protected ProjectTemplateEngineLoader $loader;
@@ -118,9 +116,7 @@ class PhpEngineTest extends TestCase
         $this->assertEquals('foobar', $engine->render('foo.php', ['template' => 'foo', 'parameters' => 'bar']), '->render() extract variables');
     }
 
-    /**
-     * @dataProvider forbiddenParameterNames
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('forbiddenParameterNames')]
     public function testRenderForbiddenParameter($name)
     {
         $this->expectException(\InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Templating/Tests/Storage/FileStorageTest.php b/src/Symfony/Component/Templating/Tests/Storage/FileStorageTest.php
index 8ea3c5e..a3f45ef 100644
--- a/src/Symfony/Component/Templating/Tests/Storage/FileStorageTest.php
+++ b/src/Symfony/Component/Templating/Tests/Storage/FileStorageTest.php
@@ -15,9 +15,7 @@ use PHPUnit\Framework\TestCase;
 use Symfony\Component\Templating\Storage\FileStorage;
 use Symfony\Component\Templating\Storage\Storage;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class FileStorageTest extends TestCase
 {
     public function testGetContent()
diff --git a/src/Symfony/Component/Templating/Tests/Storage/StorageTest.php b/src/Symfony/Component/Templating/Tests/Storage/StorageTest.php
index e508797..4ae04ce 100644
--- a/src/Symfony/Component/Templating/Tests/Storage/StorageTest.php
+++ b/src/Symfony/Component/Templating/Tests/Storage/StorageTest.php
@@ -14,9 +14,7 @@ namespace Symfony\Component\Templating\Tests\Storage;
 use PHPUnit\Framework\TestCase;
 use Symfony\Component\Templating\Tests\Fixtures\TestStorage;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class StorageTest extends TestCase
 {
     public function testMagicToString()
diff --git a/src/Symfony/Component/Templating/Tests/Storage/StringStorageTest.php b/src/Symfony/Component/Templating/Tests/Storage/StringStorageTest.php
index ca0e712..ce2d914 100644
--- a/src/Symfony/Component/Templating/Tests/Storage/StringStorageTest.php
+++ b/src/Symfony/Component/Templating/Tests/Storage/StringStorageTest.php
@@ -15,9 +15,7 @@ use PHPUnit\Framework\TestCase;
 use Symfony\Component\Templating\Storage\Storage;
 use Symfony\Component\Templating\Storage\StringStorage;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class StringStorageTest extends TestCase
 {
     public function testGetContent()
diff --git a/src/Symfony/Component/Templating/Tests/TemplateNameParserTest.php b/src/Symfony/Component/Templating/Tests/TemplateNameParserTest.php
index 9a8730d..7f864a4 100644
--- a/src/Symfony/Component/Templating/Tests/TemplateNameParserTest.php
+++ b/src/Symfony/Component/Templating/Tests/TemplateNameParserTest.php
@@ -15,9 +15,7 @@ use PHPUnit\Framework\TestCase;
 use Symfony\Component\Templating\TemplateNameParser;
 use Symfony\Component\Templating\TemplateReference;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class TemplateNameParserTest extends TestCase
 {
     protected TemplateNameParser $parser;
@@ -27,9 +25,7 @@ class TemplateNameParserTest extends TestCase
         $this->parser = new TemplateNameParser();
     }
 
-    /**
-     * @dataProvider getLogicalNameToTemplateProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLogicalNameToTemplateProvider')]
     public function testParse($name, $ref)
     {
         $template = $this->parser->parse($name);
diff --git a/src/Symfony/Component/Translation/Bridge/Crowdin/Tests/CrowdinProviderTest.php b/src/Symfony/Component/Translation/Bridge/Crowdin/Tests/CrowdinProviderTest.php
index 8409e86..9728662 100644
--- a/src/Symfony/Component/Translation/Bridge/Crowdin/Tests/CrowdinProviderTest.php
+++ b/src/Symfony/Component/Translation/Bridge/Crowdin/Tests/CrowdinProviderTest.php
@@ -504,9 +504,7 @@ XLIFF;
         $provider->write($translatorBag);
     }
 
-    /**
-     * @dataProvider getResponsesForProcessAddFileAndUploadTranslations
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getResponsesForProcessAddFileAndUploadTranslations')]
     public function testCompleteWriteProcessAddFileAndUploadTranslations(TranslatorBag $translatorBag, string $expectedLocale, string $expectedMessagesTranslationsContent)
     {
         $this->xliffFileDumper = new XliffFileDumper();
@@ -701,9 +699,7 @@ XLIFF
         ];
     }
 
-    /**
-     * @dataProvider getResponsesForOneLocaleAndOneDomain
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getResponsesForOneLocaleAndOneDomain')]
     public function testReadForOneLocaleAndOneDomain(string $locale, string $domain, string $responseContent, TranslatorBag $expectedTranslatorBag, string $expectedTargetLanguageId)
     {
         $responses = [
@@ -829,9 +825,7 @@ XLIFF
         ];
     }
 
-    /**
-     * @dataProvider getResponsesForDefaultLocaleAndOneDomain
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getResponsesForDefaultLocaleAndOneDomain')]
     public function testReadForDefaultLocaleAndOneDomain(string $locale, string $domain, string $responseContent, TranslatorBag $expectedTranslatorBag)
     {
         $responses = [
diff --git a/src/Symfony/Component/Translation/Bridge/Loco/Tests/LocoProviderTest.php b/src/Symfony/Component/Translation/Bridge/Loco/Tests/LocoProviderTest.php
index 5ce4cf0..68f4db9 100644
--- a/src/Symfony/Component/Translation/Bridge/Loco/Tests/LocoProviderTest.php
+++ b/src/Symfony/Component/Translation/Bridge/Loco/Tests/LocoProviderTest.php
@@ -698,9 +698,7 @@ class LocoProviderTest extends ProviderTestCase
         $provider->write($translatorBag);
     }
 
-    /**
-     * @dataProvider getResponsesForOneLocaleAndOneDomain
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getResponsesForOneLocaleAndOneDomain')]
     public function testReadForOneLocaleAndOneDomain(string $locale, string $domain, string $responseContent, TranslatorBag $expectedTranslatorBag)
     {
         $loader = $this->getLoader();
@@ -727,9 +725,7 @@ class LocoProviderTest extends ProviderTestCase
         $this->assertEquals($expectedTranslatorBag->getCatalogues(), $translatorBag->getCatalogues());
     }
 
-    /**
-     * @dataProvider getResponsesForManyLocalesAndManyDomains
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getResponsesForManyLocalesAndManyDomains')]
     public function testReadForManyLocalesAndManyDomains(array $locales, array $domains, array $responseContents, TranslatorBag $expectedTranslatorBag)
     {
         $responses = [];
@@ -772,9 +768,7 @@ class LocoProviderTest extends ProviderTestCase
         $this->assertEquals($expectedTranslatorBag->getCatalogues(), $translatorBag->getCatalogues());
     }
 
-    /**
-     * @dataProvider getResponsesForReadWithLastModified
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getResponsesForReadWithLastModified')]
     public function testReadWithLastModified(array $locales, array $domains, array $responseContents, array $lastModifieds, TranslatorBag $expectedTranslatorBag)
     {
         $responses = [];
diff --git a/src/Symfony/Component/Translation/Bridge/Loco/Tests/LocoProviderWithoutTranslatorBagTest.php b/src/Symfony/Component/Translation/Bridge/Loco/Tests/LocoProviderWithoutTranslatorBagTest.php
index 81b0da8..8d4dfc2 100644
--- a/src/Symfony/Component/Translation/Bridge/Loco/Tests/LocoProviderWithoutTranslatorBagTest.php
+++ b/src/Symfony/Component/Translation/Bridge/Loco/Tests/LocoProviderWithoutTranslatorBagTest.php
@@ -32,9 +32,8 @@ class LocoProviderWithoutTranslatorBagTest extends LocoProviderTest
 
     /**
      * Ensure the Last-Modified is not sent when $translatorBag is null.
-     *
-     * @dataProvider getResponsesForReadWithLastModified
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getResponsesForReadWithLastModified')]
     public function testReadWithLastModified(array $locales, array $domains, array $responseContents, array $lastModifieds, TranslatorBag $expectedTranslatorBag)
     {
         $responses = [];
diff --git a/src/Symfony/Component/Translation/Bridge/Lokalise/Tests/LokaliseProviderTest.php b/src/Symfony/Component/Translation/Bridge/Lokalise/Tests/LokaliseProviderTest.php
index 4966695..5646e38 100644
--- a/src/Symfony/Component/Translation/Bridge/Lokalise/Tests/LokaliseProviderTest.php
+++ b/src/Symfony/Component/Translation/Bridge/Lokalise/Tests/LokaliseProviderTest.php
@@ -602,9 +602,7 @@ class LokaliseProviderTest extends ProviderTestCase
         $provider->write($translatorBag);
     }
 
-    /**
-     * @dataProvider getResponsesForOneLocaleAndOneDomain
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getResponsesForOneLocaleAndOneDomain')]
     public function testReadForOneLocaleAndOneDomain(string $locale, string $domain, string $responseContent, TranslatorBag $expectedTranslatorBag)
     {
         $response = function (string $method, string $url, array $options = []) use ($locale, $domain, $responseContent): ResponseInterface {
@@ -646,9 +644,7 @@ class LokaliseProviderTest extends ProviderTestCase
         $this->assertEquals($expectedTranslatorBag->getCatalogues(), $translatorBag->getCatalogues());
     }
 
-    /**
-     * @dataProvider getResponsesForManyLocalesAndManyDomains
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getResponsesForManyLocalesAndManyDomains')]
     public function testReadForManyLocalesAndManyDomains(array $locales, array $domains, array $responseContents, TranslatorBag $expectedTranslatorBag)
     {
         $consecutiveLoadArguments = [];
diff --git a/src/Symfony/Component/Translation/Bridge/Phrase/Tests/PhraseProviderFactoryTest.php b/src/Symfony/Component/Translation/Bridge/Phrase/Tests/PhraseProviderFactoryTest.php
index 5eac650..45fea28 100644
--- a/src/Symfony/Component/Translation/Bridge/Phrase/Tests/PhraseProviderFactoryTest.php
+++ b/src/Symfony/Component/Translation/Bridge/Phrase/Tests/PhraseProviderFactoryTest.php
@@ -36,9 +36,7 @@ class PhraseProviderFactoryTest extends TestCase
     private MockObject&CacheItemPoolInterface $cache;
     private string $defaultLocale;
 
-    /**
-     * @dataProvider supportsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('supportsProvider')]
     public function testSupports(bool $expected, string $dsn)
     {
         $factory = $this->createFactory();
@@ -46,9 +44,7 @@ class PhraseProviderFactoryTest extends TestCase
         $this->assertSame($expected, $factory->supports(new Dsn($dsn)));
     }
 
-    /**
-     * @dataProvider createProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('createProvider')]
     public function testCreate(string $expected, string $dsn)
     {
         $factory = $this->createFactory();
@@ -57,9 +53,7 @@ class PhraseProviderFactoryTest extends TestCase
         $this->assertSame($expected, (string) $provider);
     }
 
-    /**
-     * @dataProvider unsupportedSchemeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('unsupportedSchemeProvider')]
     public function testUnsupportedSchemeException(string $dsn, string $message)
     {
         $this->expectException(UnsupportedSchemeException::class);
@@ -71,9 +65,7 @@ class PhraseProviderFactoryTest extends TestCase
             ->create($dsn);
     }
 
-    /**
-     * @dataProvider incompleteDsnProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('incompleteDsnProvider')]
     public function testIncompleteDsnException(string $dsn, string $message)
     {
         $this->expectException(IncompleteDsnException::class);
diff --git a/src/Symfony/Component/Translation/Bridge/Phrase/Tests/PhraseProviderTest.php b/src/Symfony/Component/Translation/Bridge/Phrase/Tests/PhraseProviderTest.php
index 34b29b2..6f3e892 100644
--- a/src/Symfony/Component/Translation/Bridge/Phrase/Tests/PhraseProviderTest.php
+++ b/src/Symfony/Component/Translation/Bridge/Phrase/Tests/PhraseProviderTest.php
@@ -48,9 +48,7 @@ class PhraseProviderTest extends TestCase
     private array $readConfig;
     private array $writeConfig;
 
-    /**
-     * @dataProvider toStringProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('toStringProvider')]
     public function testToString(?string $endpoint, string $expected)
     {
         $provider = $this->createProvider(endpoint: $endpoint);
@@ -58,10 +56,8 @@ class PhraseProviderTest extends TestCase
         self::assertSame($expected, (string) $provider);
     }
 
-    /**
-     * @dataProvider readProvider
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('readProvider')]
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testRead(string $locale, string $localeId, string $domain, string $responseContent, TranslatorBag $expectedTranslatorBag)
     {
         $item = $this->createMock(CacheItemInterface::class);
@@ -111,10 +107,8 @@ class PhraseProviderTest extends TestCase
         $this->assertSame($expectedTranslatorBag->getCatalogues(), $translatorBag->getCatalogues());
     }
 
-    /**
-     * @dataProvider readProvider
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('readProvider')]
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testReadCached(string $locale, string $localeId, string $domain, string $responseContent, TranslatorBag $expectedTranslatorBag)
     {
         $item = $this->createMock(CacheItemInterface::class);
@@ -262,10 +256,8 @@ class PhraseProviderTest extends TestCase
         $provider->read([$domain], [$locale]);
     }
 
-    /**
-     * @dataProvider cacheKeyProvider
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('cacheKeyProvider')]
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testCacheKeyOptionsSort(array $options, string $expectedKey)
     {
         $this->getCache()->expects(self::once())->method('getItem')->with($expectedKey);
@@ -294,10 +286,8 @@ class PhraseProviderTest extends TestCase
         $provider->read(['messages'], ['en_GB']);
     }
 
-    /**
-     * @dataProvider cacheItemProvider
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('cacheItemProvider')]
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testGetCacheItem(mixed $cachedValue, bool $hasMatchHeader)
     {
         $item = $this->createMock(CacheItemInterface::class);
@@ -341,15 +331,15 @@ class PhraseProviderTest extends TestCase
     public static function cacheItemProvider(): \Generator
     {
         yield 'null value' => [
-            'cached_value' => null,
-            'has_header' => false,
+            'cachedValue' => null,
+            'hasMatchHeader' => false,
         ];
 
         $item = ['etag' => 'W\Foo', 'modified' => 'foo', 'content' => 'bar'];
 
         yield 'correct value' => [
-            'cached_value' => $item,
-            'has_header' => true,
+            'cachedValue' => $item,
+            'hasMatchHeader' => true,
         ];
     }
 
@@ -364,7 +354,7 @@ class PhraseProviderTest extends TestCase
                     'enclose_in_cdata' => '1',
                 ],
             ],
-            'expected_key' => 'en_GB.messages.099584009f94b788bd46580c17f49c0b22c55e16',
+            'expectedKey' => 'en_GB.messages.099584009f94b788bd46580c17f49c0b22c55e16',
         ];
 
         yield 'sortorder two' => [
@@ -376,14 +366,12 @@ class PhraseProviderTest extends TestCase
                 ],
                 'tags' => [],
             ],
-            'expected_key' => 'en_GB.messages.099584009f94b788bd46580c17f49c0b22c55e16',
+            'expectedKey' => 'en_GB.messages.099584009f94b788bd46580c17f49c0b22c55e16',
         ];
     }
 
-    /**
-     * @dataProvider readProviderExceptionsProvider
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('readProviderExceptionsProvider')]
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testReadProviderExceptions(int $statusCode, string $expectedExceptionMessage, string $expectedLoggerMessage)
     {
         $this->expectException(ProviderExceptionInterface::class);
@@ -417,10 +405,8 @@ class PhraseProviderTest extends TestCase
         $provider->read(['messages'], ['en_GB']);
     }
 
-    /**
-     * @dataProvider initLocalesExceptionsProvider
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('initLocalesExceptionsProvider')]
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testInitLocalesExceptions(int $statusCode, string $expectedExceptionMessage, string $expectedLoggerMessage)
     {
         $this->expectException(ProviderExceptionInterface::class);
@@ -542,10 +528,8 @@ class PhraseProviderTest extends TestCase
         $provider->read(['messages'], ['nl_NL']);
     }
 
-    /**
-     * @dataProvider createLocalesExceptionsProvider
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('createLocalesExceptionsProvider')]
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testCreateLocaleExceptions(int $statusCode, string $expectedExceptionMessage, string $expectedLoggerMessage)
     {
         $this->expectException(ProviderExceptionInterface::class);
@@ -631,10 +615,8 @@ class PhraseProviderTest extends TestCase
         $provider->delete($bag);
     }
 
-    /**
-     * @dataProvider deleteExceptionsProvider
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('deleteExceptionsProvider')]
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testDeleteProviderExceptions(int $statusCode, string $expectedExceptionMessage, string $expectedLoggerMessage)
     {
         $this->expectException(ProviderExceptionInterface::class);
@@ -674,10 +656,8 @@ class PhraseProviderTest extends TestCase
         $provider->delete($bag);
     }
 
-    /**
-     * @dataProvider writeProvider
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('writeProvider')]
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testWrite(string $locale, string $localeId, string $domain, string $content, TranslatorBag $bag)
     {
         $this->getWriteConfig($domain, $localeId);
@@ -751,10 +731,8 @@ class PhraseProviderTest extends TestCase
         $provider->write($bag);
     }
 
-    /**
-     * @dataProvider writeExceptionsProvider
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('writeExceptionsProvider')]
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testWriteProviderExceptions(int $statusCode, string $expectedExceptionMessage, string $expectedLoggerMessage)
     {
         $this->expectException(ProviderExceptionInterface::class);
@@ -837,7 +815,7 @@ XLIFF;
             'locale' => 'en_GB',
             'localeId' => '13604ec993beefcdaba732812cdb828c',
             'domain' => 'messages',
-            'responseContent' => $expectedEnglishXliff,
+            'content' => $expectedEnglishXliff,
             'bag' => $bag,
         ];
 
@@ -876,7 +854,7 @@ XLIFF;
             'locale' => 'de',
             'localeId' => '5fea6ed5c21767730918a9400e420832',
             'domain' => 'validators',
-            'responseContent' => $expectedGermanXliff,
+            'content' => $expectedGermanXliff,
             'bag' => $bag,
         ];
     }
@@ -967,9 +945,9 @@ XLIFF;
 
         yield [
             'locale' => 'en_GB',
-            'locale_id' => '13604ec993beefcdaba732812cdb828c',
+            'localeId' => '13604ec993beefcdaba732812cdb828c',
             'domain' => 'messages',
-            'content' => <<<'XLIFF'
+            'responseContent' => <<<'XLIFF'
 <?xml version="1.0" encoding="UTF-8"?>
 <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
   <file original="global" datatype="plaintext" source-language="de" target-language="en-GB">
@@ -987,7 +965,7 @@ XLIFF;
   </file>
 </xliff>
 XLIFF,
-            'expected bag' => $bag,
+            'expectedTranslatorBag' => $bag,
         ];
 
         $bag = new TranslatorBag();
@@ -1015,9 +993,9 @@ XLIFF,
 
         yield [
             'locale' => 'de',
-            'locale_id' => '5fea6ed5c21767730918a9400e420832',
+            'localeId' => '5fea6ed5c21767730918a9400e420832',
             'domain' => 'validators',
-            'content' => <<<'XLIFF'
+            'responseContent' => <<<'XLIFF'
 <?xml version="1.0" encoding="UTF-8"?>
 <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
   <file original="file.ext" datatype="plaintext" source-language="de" target-language="de">
@@ -1035,7 +1013,7 @@ XLIFF,
   </file>
 </xliff>
 XLIFF,
-            'expected bag' => $bag,
+            'expectedTranslatorBag' => $bag,
         ];
     }
 
diff --git a/src/Symfony/Component/Translation/Test/ProviderFactoryTestCase.php b/src/Symfony/Component/Translation/Test/ProviderFactoryTestCase.php
index 95ffcb1..c187fe3 100644
--- a/src/Symfony/Component/Translation/Test/ProviderFactoryTestCase.php
+++ b/src/Symfony/Component/Translation/Test/ProviderFactoryTestCase.php
@@ -66,9 +66,7 @@ abstract class ProviderFactoryTestCase extends TestCase
         return [];
     }
 
-    /**
-     * @dataProvider supportsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('supportsProvider')]
     public function testSupports(bool $expected, string $dsn)
     {
         $factory = $this->createFactory();
@@ -76,9 +74,7 @@ abstract class ProviderFactoryTestCase extends TestCase
         $this->assertSame($expected, $factory->supports(new Dsn($dsn)));
     }
 
-    /**
-     * @dataProvider createProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('createProvider')]
     public function testCreate(string $expected, string $dsn)
     {
         $factory = $this->createFactory();
@@ -87,9 +83,7 @@ abstract class ProviderFactoryTestCase extends TestCase
         $this->assertSame($expected, (string) $provider);
     }
 
-    /**
-     * @dataProvider unsupportedSchemeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('unsupportedSchemeProvider')]
     public function testUnsupportedSchemeException(string $dsn, ?string $message = null)
     {
         $factory = $this->createFactory();
@@ -104,9 +98,7 @@ abstract class ProviderFactoryTestCase extends TestCase
         $factory->create($dsn);
     }
 
-    /**
-     * @dataProvider incompleteDsnProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('incompleteDsnProvider')]
     public function testIncompleteDsnException(string $dsn, ?string $message = null)
     {
         $factory = $this->createFactory();
diff --git a/src/Symfony/Component/Translation/Test/ProviderTestCase.php b/src/Symfony/Component/Translation/Test/ProviderTestCase.php
index a8fa0b8..e969139 100644
--- a/src/Symfony/Component/Translation/Test/ProviderTestCase.php
+++ b/src/Symfony/Component/Translation/Test/ProviderTestCase.php
@@ -42,9 +42,7 @@ abstract class ProviderTestCase extends TestCase
      */
     abstract public static function toStringProvider(): iterable;
 
-    /**
-     * @dataProvider toStringProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('toStringProvider')]
     public function testToString(ProviderInterface $provider, string $expected)
     {
         $this->assertSame($expected, (string) $provider);
diff --git a/src/Symfony/Component/Translation/Tests/Command/TranslationPullCommandTest.php b/src/Symfony/Component/Translation/Tests/Command/TranslationPullCommandTest.php
index c753495..24ce518 100644
--- a/src/Symfony/Component/Translation/Tests/Command/TranslationPullCommandTest.php
+++ b/src/Symfony/Component/Translation/Tests/Command/TranslationPullCommandTest.php
@@ -456,9 +456,7 @@ XLIFF
             , file_get_contents($filenameValidatorsFr));
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testPullForceIntlIcuMessages()
     {
         $arrayLoader = new ArrayLoader();
@@ -689,9 +687,7 @@ XLIFF
             , file_get_contents($filenameDomain));
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $application = new Application();
diff --git a/src/Symfony/Component/Translation/Tests/Command/TranslationPushCommandTest.php b/src/Symfony/Component/Translation/Tests/Command/TranslationPushCommandTest.php
index 44cc569..e0909a8 100644
--- a/src/Symfony/Component/Translation/Tests/Command/TranslationPushCommandTest.php
+++ b/src/Symfony/Component/Translation/Tests/Command/TranslationPushCommandTest.php
@@ -369,9 +369,7 @@ class TranslationPushCommandTest extends TranslationProviderTestCase
         $this->assertStringContainsString('[OK] New local translations has been sent to "null" (for "en, fr" locale(s), and "messages" domain(s)).', trim($tester->getDisplay()));
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $application = new Application();
diff --git a/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php b/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php
index a19ebfe..4ef51fb 100644
--- a/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php
+++ b/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php
@@ -57,9 +57,7 @@ class XliffLintCommandTest extends TestCase
         $this->assertStringContainsString('OK', trim($tester->getDisplay()));
     }
 
-    /**
-     * @dataProvider provideStrictFilenames
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideStrictFilenames')]
     public function testStrictFilenames($requireStrictFileNames, $fileNamePattern, $targetLanguage, $mustFail)
     {
         $tester = $this->createCommandTester($requireStrictFileNames);
@@ -252,9 +250,7 @@ XLIFF;
         yield [true, '%locale%.messages.xlf', 'es', true];
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $tester = new CommandCompletionTester($this->createCommand());
diff --git a/src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php b/src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php
index c6e0caf..9559f5a 100644
--- a/src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php
+++ b/src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php
@@ -152,10 +152,7 @@ class TranslationDataCollectorTest extends TestCase
 
     private function getTranslator()
     {
-        $translator = $this
-            ->getMockBuilder(DataCollectorTranslator::class)
-            ->disableOriginalConstructor()
-            ->getMock()
+        $translator = $this->createMock(DataCollectorTranslator::class)
         ;
 
         return $translator;
diff --git a/src/Symfony/Component/Translation/Tests/DependencyInjection/DataCollectorTranslatorPassTest.php b/src/Symfony/Component/Translation/Tests/DependencyInjection/DataCollectorTranslatorPassTest.php
index 43bace4..4b166dc 100644
--- a/src/Symfony/Component/Translation/Tests/DependencyInjection/DataCollectorTranslatorPassTest.php
+++ b/src/Symfony/Component/Translation/Tests/DependencyInjection/DataCollectorTranslatorPassTest.php
@@ -43,9 +43,7 @@ class DataCollectorTranslatorPassTest extends TestCase
         ;
     }
 
-    /**
-     * @dataProvider getImplementingTranslatorBagInterfaceTranslatorClassNames
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getImplementingTranslatorBagInterfaceTranslatorClassNames')]
     public function testProcessKeepsDataCollectorTranslatorIfItImplementsTranslatorBagInterface($class)
     {
         $this->container->register('translator', $class);
@@ -55,9 +53,7 @@ class DataCollectorTranslatorPassTest extends TestCase
         $this->assertTrue($this->container->hasDefinition('translator.data_collector'));
     }
 
-    /**
-     * @dataProvider getImplementingTranslatorBagInterfaceTranslatorClassNames
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getImplementingTranslatorBagInterfaceTranslatorClassNames')]
     public function testProcessKeepsDataCollectorIfTranslatorImplementsTranslatorBagInterface($class)
     {
         $this->container->register('translator', $class);
@@ -75,9 +71,7 @@ class DataCollectorTranslatorPassTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getNotImplementingTranslatorBagInterfaceTranslatorClassNames
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNotImplementingTranslatorBagInterfaceTranslatorClassNames')]
     public function testProcessRemovesDataCollectorTranslatorIfItDoesNotImplementTranslatorBagInterface($class)
     {
         $this->container->register('translator', $class);
@@ -87,9 +81,7 @@ class DataCollectorTranslatorPassTest extends TestCase
         $this->assertFalse($this->container->hasDefinition('translator.data_collector'));
     }
 
-    /**
-     * @dataProvider getNotImplementingTranslatorBagInterfaceTranslatorClassNames
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNotImplementingTranslatorBagInterfaceTranslatorClassNames')]
     public function testProcessRemovesDataCollectorIfTranslatorDoesNotImplementTranslatorBagInterface($class)
     {
         $this->container->register('translator', $class);
diff --git a/src/Symfony/Component/Translation/Tests/Exception/UnsupportedSchemeExceptionTest.php b/src/Symfony/Component/Translation/Tests/Exception/UnsupportedSchemeExceptionTest.php
index 9286225..da0224e 100644
--- a/src/Symfony/Component/Translation/Tests/Exception/UnsupportedSchemeExceptionTest.php
+++ b/src/Symfony/Component/Translation/Tests/Exception/UnsupportedSchemeExceptionTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\Translation\Bridge\Phrase\PhraseProviderFactory;
 use Symfony\Component\Translation\Exception\UnsupportedSchemeException;
 use Symfony\Component\Translation\Provider\Dsn;
 
-/**
- * @runTestsInSeparateProcesses
- */
+#[\PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses]
 final class UnsupportedSchemeExceptionTest extends TestCase
 {
     public static function setUpBeforeClass(): void
@@ -36,9 +34,7 @@ final class UnsupportedSchemeExceptionTest extends TestCase
         ]);
     }
 
-    /**
-     * @dataProvider messageWhereSchemeIsPartOfSchemeToPackageMapProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('messageWhereSchemeIsPartOfSchemeToPackageMapProvider')]
     public function testMessageWhereSchemeIsPartOfSchemeToPackageMap(string $scheme, string $package)
     {
         $dsn = new Dsn(\sprintf('%s://localhost', $scheme));
@@ -57,9 +53,7 @@ final class UnsupportedSchemeExceptionTest extends TestCase
         yield ['phrase', 'symfony/phrase-translation-provider'];
     }
 
-    /**
-     * @dataProvider messageWhereSchemeIsNotPartOfSchemeToPackageMapProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('messageWhereSchemeIsNotPartOfSchemeToPackageMapProvider')]
     public function testMessageWhereSchemeIsNotPartOfSchemeToPackageMap(string $expected, Dsn $dsn, ?string $name, array $supported)
     {
         $this->assertSame(
diff --git a/src/Symfony/Component/Translation/Tests/Extractor/PhpAstExtractorTest.php b/src/Symfony/Component/Translation/Tests/Extractor/PhpAstExtractorTest.php
index 9449ca7..51ce983 100644
--- a/src/Symfony/Component/Translation/Tests/Extractor/PhpAstExtractorTest.php
+++ b/src/Symfony/Component/Translation/Tests/Extractor/PhpAstExtractorTest.php
@@ -22,9 +22,7 @@ final class PhpAstExtractorTest extends TestCase
 {
     public const OTHER_DOMAIN = 'not_messages';
 
-    /**
-     * @dataProvider resourcesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('resourcesProvider')]
     public function testExtraction(iterable|string $resource)
     {
         $extractor = new PhpAstExtractor([
diff --git a/src/Symfony/Component/Translation/Tests/Extractor/PhpExtractorTest.php b/src/Symfony/Component/Translation/Tests/Extractor/PhpExtractorTest.php
index 14a9af3..9e72b8f 100644
--- a/src/Symfony/Component/Translation/Tests/Extractor/PhpExtractorTest.php
+++ b/src/Symfony/Component/Translation/Tests/Extractor/PhpExtractorTest.php
@@ -15,16 +15,13 @@ use PHPUnit\Framework\TestCase;
 use Symfony\Component\Translation\Extractor\PhpExtractor;
 use Symfony\Component\Translation\MessageCatalogue;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class PhpExtractorTest extends TestCase
 {
     /**
-     * @dataProvider resourcesProvider
-     *
      * @param array|string $resource
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('resourcesProvider')]
     public function testExtraction($resource)
     {
         // Arrange
diff --git a/src/Symfony/Component/Translation/Tests/Formatter/IntlFormatterTest.php b/src/Symfony/Component/Translation/Tests/Formatter/IntlFormatterTest.php
index 4bf8ed4..799943c 100644
--- a/src/Symfony/Component/Translation/Tests/Formatter/IntlFormatterTest.php
+++ b/src/Symfony/Component/Translation/Tests/Formatter/IntlFormatterTest.php
@@ -15,14 +15,10 @@ use Symfony\Component\Translation\Exception\InvalidArgumentException;
 use Symfony\Component\Translation\Formatter\IntlFormatter;
 use Symfony\Component\Translation\Formatter\IntlFormatterInterface;
 
-/**
- * @requires extension intl
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
 class IntlFormatterTest extends \PHPUnit\Framework\TestCase
 {
-    /**
-     * @dataProvider provideDataForFormat
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDataForFormat')]
     public function testFormat($expected, $message, $arguments)
     {
         $this->assertEquals($expected, trim((new IntlFormatter())->formatIntl($message, 'en', $arguments)));
diff --git a/src/Symfony/Component/Translation/Tests/Formatter/MessageFormatterTest.php b/src/Symfony/Component/Translation/Tests/Formatter/MessageFormatterTest.php
index 46e0e09..7bfdbf5 100644
--- a/src/Symfony/Component/Translation/Tests/Formatter/MessageFormatterTest.php
+++ b/src/Symfony/Component/Translation/Tests/Formatter/MessageFormatterTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Translation\Formatter\MessageFormatter;
 
 class MessageFormatterTest extends TestCase
 {
-    /**
-     * @dataProvider getTransMessages
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransMessages')]
     public function testFormat($expected, $message, $parameters = [])
     {
         $this->assertEquals($expected, $this->getMessageFormatter()->format($message, 'en', $parameters));
diff --git a/src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php b/src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php
index fca84fa..5d73c04 100644
--- a/src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php
+++ b/src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Translation\Exception\InvalidResourceException;
 use Symfony\Component\Translation\Exception\NotFoundResourceException;
 use Symfony\Component\Translation\Loader\IcuDatFileLoader;
 
-/**
- * @requires extension intl
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
 class IcuDatFileLoaderTest extends LocalizedTestCase
 {
     public function testLoadInvalidResource()
diff --git a/src/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php b/src/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php
index 7bce832..d7c5d3e 100644
--- a/src/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php
+++ b/src/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Translation\Exception\InvalidResourceException;
 use Symfony\Component\Translation\Exception\NotFoundResourceException;
 use Symfony\Component\Translation\Loader\IcuResFileLoader;
 
-/**
- * @requires extension intl
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
 class IcuResFileLoaderTest extends LocalizedTestCase
 {
     public function testLoad()
diff --git a/src/Symfony/Component/Translation/Tests/LocaleSwitcherTest.php b/src/Symfony/Component/Translation/Tests/LocaleSwitcherTest.php
index 8b8f33a..86352c7 100644
--- a/src/Symfony/Component/Translation/Tests/LocaleSwitcherTest.php
+++ b/src/Symfony/Component/Translation/Tests/LocaleSwitcherTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Routing\RequestContext;
 use Symfony\Component\Translation\LocaleSwitcher;
 use Symfony\Contracts\Translation\LocaleAwareInterface;
 
-/**
- * @requires extension intl
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
 class LocaleSwitcherTest extends TestCase
 {
     private string $intlLocale;
diff --git a/src/Symfony/Component/Translation/Tests/Provider/DsnTest.php b/src/Symfony/Component/Translation/Tests/Provider/DsnTest.php
index 8c7660f..4e8d8c3 100644
--- a/src/Symfony/Component/Translation/Tests/Provider/DsnTest.php
+++ b/src/Symfony/Component/Translation/Tests/Provider/DsnTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\Translation\Provider\Dsn;
 
 final class DsnTest extends TestCase
 {
-    /**
-     * @dataProvider constructProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('constructProvider')]
     public function testConstruct(string $dsnString, string $scheme, string $host, ?string $user = null, ?string $password = null, ?int $port = null, array $options = [], ?string $path = null)
     {
         $dsn = new Dsn($dsnString);
@@ -140,9 +138,7 @@ final class DsnTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider invalidDsnProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidDsnProvider')]
     public function testInvalidDsn(string $dsnString, string $exceptionMessage)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -169,9 +165,7 @@ final class DsnTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getOptionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getOptionProvider')]
     public function testGetOption($expected, string $dsnString, string $option, ?string $default = null)
     {
         $dsn = new Dsn($dsnString);
@@ -207,9 +201,7 @@ final class DsnTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getRequiredOptionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRequiredOptionProvider')]
     public function testGetRequiredOption(string $expectedValue, string $options, string $option)
     {
         $dsn = new Dsn(\sprintf('scheme://localhost?%s', $options));
@@ -232,9 +224,7 @@ final class DsnTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getRequiredOptionThrowsMissingRequiredOptionExceptionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRequiredOptionThrowsMissingRequiredOptionExceptionProvider')]
     public function testGetRequiredOptionThrowsMissingRequiredOptionException(string $expectedExceptionMessage, string $options, string $option)
     {
         $dsn = new Dsn(\sprintf('scheme://localhost?%s', $options));
diff --git a/src/Symfony/Component/Translation/Tests/PseudoLocalizationTranslatorTest.php b/src/Symfony/Component/Translation/Tests/PseudoLocalizationTranslatorTest.php
index d8490a5..348589b 100644
--- a/src/Symfony/Component/Translation/Tests/PseudoLocalizationTranslatorTest.php
+++ b/src/Symfony/Component/Translation/Tests/PseudoLocalizationTranslatorTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Translation\PseudoLocalizationTranslator;
 
 final class PseudoLocalizationTranslatorTest extends TestCase
 {
-    /**
-     * @dataProvider provideTrans
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTrans')]
     public function testTrans(string $expected, string $input, array $options = [])
     {
         mt_srand(987);
@@ -48,9 +46,7 @@ final class PseudoLocalizationTranslatorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideInvalidExpansionFactor
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidExpansionFactor')]
     public function testInvalidExpansionFactor(float $expansionFactor)
     {
         $this->expectException(\InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Translation/Tests/TranslatableTest.php b/src/Symfony/Component/Translation/Tests/TranslatableTest.php
index ce08c8a..17047d0 100644
--- a/src/Symfony/Component/Translation/Tests/TranslatableTest.php
+++ b/src/Symfony/Component/Translation/Tests/TranslatableTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\Translation\Translator;
 
 class TranslatableTest extends TestCase
 {
-    /**
-     * @dataProvider getTransTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransTests')]
     public function testTrans(string $expected, TranslatableMessage $translatable, array $translation, string $locale)
     {
         $translator = new Translator('en');
@@ -30,9 +28,7 @@ class TranslatableTest extends TestCase
         $this->assertSame($expected, $translatable->trans($translator, $locale));
     }
 
-    /**
-     * @dataProvider getFlattenedTransTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFlattenedTransTests')]
     public function testFlattenedTrans($expected, $messages, $translatable)
     {
         $translator = new Translator('en');
diff --git a/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php b/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php
index 4199f59..a695e1f 100644
--- a/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php
+++ b/src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php
@@ -54,9 +54,7 @@ class TranslatorCacheTest extends TestCase
         rmdir($this->tmpDir);
     }
 
-    /**
-     * @dataProvider runForDebugAndProduction
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('runForDebugAndProduction')]
     public function testThatACacheIsUsed($debug)
     {
         if (!class_exists(\MessageFormatter::class)) {
@@ -125,9 +123,7 @@ class TranslatorCacheTest extends TestCase
         $translator->trans($msgid);
     }
 
-    /**
-     * @dataProvider runForDebugAndProduction
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('runForDebugAndProduction')]
     public function testDifferentTranslatorsForSameLocaleDoNotOverwriteEachOthersCache($debug)
     {
         /*
diff --git a/src/Symfony/Component/Translation/Tests/TranslatorTest.php b/src/Symfony/Component/Translation/Tests/TranslatorTest.php
index fdbf6a9..63b1ff5 100644
--- a/src/Symfony/Component/Translation/Tests/TranslatorTest.php
+++ b/src/Symfony/Component/Translation/Tests/TranslatorTest.php
@@ -37,18 +37,14 @@ class TranslatorTest extends TestCase
         \Locale::setDefault($this->defaultLocale);
     }
 
-    /**
-     * @dataProvider getInvalidLocalesTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidLocalesTests')]
     public function testConstructorInvalidLocale($locale)
     {
         $this->expectException(InvalidArgumentException::class);
         new Translator($locale);
     }
 
-    /**
-     * @dataProvider getValidLocalesTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalesTests')]
     public function testConstructorValidLocale($locale)
     {
         $translator = new Translator($locale);
@@ -66,9 +62,7 @@ class TranslatorTest extends TestCase
         $this->assertEquals('fr', $translator->getLocale());
     }
 
-    /**
-     * @dataProvider getInvalidLocalesTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidLocalesTests')]
     public function testSetInvalidLocale($locale)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -76,9 +70,7 @@ class TranslatorTest extends TestCase
         $translator->setLocale($locale);
     }
 
-    /**
-     * @dataProvider getValidLocalesTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalesTests')]
     public function testSetValidLocale($locale)
     {
         $translator = new Translator($locale);
@@ -149,9 +141,7 @@ class TranslatorTest extends TestCase
         $this->assertEquals('bar (fr)', $translator->trans('bar'));
     }
 
-    /**
-     * @dataProvider getInvalidLocalesTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidLocalesTests')]
     public function testSetFallbackInvalidLocales($locale)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -159,9 +149,7 @@ class TranslatorTest extends TestCase
         $translator->setFallbackLocales(['fr', $locale]);
     }
 
-    /**
-     * @dataProvider getValidLocalesTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalesTests')]
     public function testSetFallbackValidLocales($locale)
     {
         $translator = new Translator($locale);
@@ -181,9 +169,7 @@ class TranslatorTest extends TestCase
         $this->assertEquals('foobar', $translator->trans('bar'));
     }
 
-    /**
-     * @dataProvider getInvalidLocalesTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidLocalesTests')]
     public function testAddResourceInvalidLocales($locale)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -191,9 +177,7 @@ class TranslatorTest extends TestCase
         $translator->addResource('array', ['foo' => 'foofoo'], $locale);
     }
 
-    /**
-     * @dataProvider getValidLocalesTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalesTests')]
     public function testAddResourceValidLocales($locale)
     {
         $translator = new Translator('fr');
@@ -216,9 +200,7 @@ class TranslatorTest extends TestCase
         $this->assertEquals('foobar', $translator->trans('bar'));
     }
 
-    /**
-     * @dataProvider getTransFileTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransFileTests')]
     public function testTransWithoutFallbackLocaleFile($format, $loader)
     {
         $this->expectException(NotFoundResourceException::class);
@@ -232,9 +214,7 @@ class TranslatorTest extends TestCase
         $translator->trans('foo');
     }
 
-    /**
-     * @dataProvider getTransFileTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransFileTests')]
     public function testTransWithFallbackLocaleFile($format, $loader)
     {
         $loaderClass = 'Symfony\\Component\\Translation\\Loader\\'.$loader;
@@ -288,9 +268,7 @@ class TranslatorTest extends TestCase
         $this->assertSame('bar', $translator->trans('bar'));
     }
 
-    /**
-     * @dataProvider getFallbackLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFallbackLocales')]
     public function testTransWithFallbackLocaleBis($expectedLocale, $locale)
     {
         $translator = new Translator($locale);
@@ -380,9 +358,7 @@ class TranslatorTest extends TestCase
         $this->assertContainsEquals(__DIR__.\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR.'resources.yml', $resources);
     }
 
-    /**
-     * @dataProvider getTransTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransTests')]
     public function testTrans($expected, $id, $translation, $parameters, $locale, $domain)
     {
         $translator = new Translator('en');
@@ -392,9 +368,7 @@ class TranslatorTest extends TestCase
         $this->assertEquals($expected, $translator->trans($id, $parameters, $domain, $locale));
     }
 
-    /**
-     * @dataProvider getTransICUTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransICUTests')]
     public function testTransICU(...$args)
     {
         if (!class_exists(\MessageFormatter::class)) {
@@ -404,9 +378,7 @@ class TranslatorTest extends TestCase
         $this->testTrans(...$args);
     }
 
-    /**
-     * @dataProvider getInvalidLocalesTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidLocalesTests')]
     public function testTransInvalidLocale($locale)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -417,9 +389,7 @@ class TranslatorTest extends TestCase
         $translator->trans('foo', [], '', $locale);
     }
 
-    /**
-     * @dataProvider getValidLocalesTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalesTests')]
     public function testTransValidLocale($locale)
     {
         $translator = new Translator($locale);
@@ -430,9 +400,7 @@ class TranslatorTest extends TestCase
         $this->assertEquals('OK', $translator->trans('test', [], null, $locale));
     }
 
-    /**
-     * @dataProvider getFlattenedTransTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFlattenedTransTests')]
     public function testFlattenedTrans($expected, $messages, $id)
     {
         $translator = new Translator('en');
@@ -550,9 +518,7 @@ class TranslatorTest extends TestCase
         ];
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testIntlFormattedDomain()
     {
         $translator = new Translator('en');
diff --git a/src/Symfony/Component/Translation/Tests/Util/ArrayConverterTest.php b/src/Symfony/Component/Translation/Tests/Util/ArrayConverterTest.php
index 446130c..696cfb3 100644
--- a/src/Symfony/Component/Translation/Tests/Util/ArrayConverterTest.php
+++ b/src/Symfony/Component/Translation/Tests/Util/ArrayConverterTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Translation\Util\ArrayConverter;
 
 class ArrayConverterTest extends TestCase
 {
-    /**
-     * @dataProvider messagesData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('messagesData')]
     public function testDump($input, $expectedOutput)
     {
         $this->assertEquals($expectedOutput, ArrayConverter::expandToTree($input));
diff --git a/src/Symfony/Component/Uid/Tests/Command/GenerateUlidCommandTest.php b/src/Symfony/Component/Uid/Tests/Command/GenerateUlidCommandTest.php
index c29211b..42735e6 100644
--- a/src/Symfony/Component/Uid/Tests/Command/GenerateUlidCommandTest.php
+++ b/src/Symfony/Component/Uid/Tests/Command/GenerateUlidCommandTest.php
@@ -20,10 +20,8 @@ use Symfony\Component\Uid\Ulid;
 
 final class GenerateUlidCommandTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     * @group time-sensitive
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
+    #[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
     public function testDefaults()
     {
         $time = microtime(false);
@@ -104,9 +102,7 @@ final class GenerateUlidCommandTest extends TestCase
         $this->assertNotSame($ulids[0], $ulids[1]);
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $application = new Application();
diff --git a/src/Symfony/Component/Uid/Tests/Command/GenerateUuidCommandTest.php b/src/Symfony/Component/Uid/Tests/Command/GenerateUuidCommandTest.php
index afea787..064eb01 100644
--- a/src/Symfony/Component/Uid/Tests/Command/GenerateUuidCommandTest.php
+++ b/src/Symfony/Component/Uid/Tests/Command/GenerateUuidCommandTest.php
@@ -121,9 +121,7 @@ final class GenerateUuidCommandTest extends TestCase
         $this->assertInstanceOf(UuidV4::class, Uuid::fromRfc4122(trim($commandTester->getDisplay())));
     }
 
-    /**
-     * @dataProvider provideInvalidCombinationOfBasedOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidCombinationOfBasedOptions')]
     public function testInvalidCombinationOfBasedOptions(array $input)
     {
         $commandTester = new CommandTester(new GenerateUuidCommand());
@@ -142,9 +140,7 @@ final class GenerateUuidCommandTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideExtraNodeOption
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideExtraNodeOption')]
     public function testExtraNodeOption(array $input)
     {
         $commandTester = new CommandTester(new GenerateUuidCommand());
@@ -162,9 +158,7 @@ final class GenerateUuidCommandTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideExtraNamespaceOption
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideExtraNamespaceOption')]
     public function testExtraNamespaceOption(array $input)
     {
         $commandTester = new CommandTester(new GenerateUuidCommand());
@@ -232,9 +226,7 @@ final class GenerateUuidCommandTest extends TestCase
         $this->assertSame('9c7d0eda-982d-5708-b4bd-79b3b179725d', (string) Uuid::fromRfc4122(trim($commandTester->getDisplay())));
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $application = new Application();
diff --git a/src/Symfony/Component/Uid/Tests/UlidTest.php b/src/Symfony/Component/Uid/Tests/UlidTest.php
index 4d5ba2f..caa1461 100644
--- a/src/Symfony/Component/Uid/Tests/UlidTest.php
+++ b/src/Symfony/Component/Uid/Tests/UlidTest.php
@@ -20,10 +20,8 @@ use Symfony\Component\Uid\UuidV4;
 
 class UlidTest extends TestCase
 {
-    /**
-     * @group time-sensitive
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testGenerate()
     {
         $a = new Ulid();
@@ -87,9 +85,7 @@ class UlidTest extends TestCase
         $this->assertTrue($ulid->equals(Ulid::fromString('YcVfxkQb6JRzqk5kF2tNLv')));
     }
 
-    /**
-     * @group time-sensitive
-     */
+    #[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
     public function testGetDateTime()
     {
         $this->markTestSkipped('Test failing on current reproducible infrastructure');
@@ -121,9 +117,7 @@ class UlidTest extends TestCase
         $this->assertFalse($a->equals((string) $a));
     }
 
-    /**
-     * @group time-sensitive
-     */
+    #[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
     public function testCompare()
     {
         $a = new Ulid();
@@ -148,9 +142,7 @@ class UlidTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideInvalidBinaryFormat
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidBinaryFormat')]
     public function testFromBinaryInvalidFormat(string $ulid)
     {
         $this->expectException(\InvalidArgumentException::class);
@@ -175,9 +167,7 @@ class UlidTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideInvalidBase58Format
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidBase58Format')]
     public function testFromBase58InvalidFormat(string $ulid)
     {
         $this->expectException(\InvalidArgumentException::class);
@@ -202,9 +192,7 @@ class UlidTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideInvalidBase32Format
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidBase32Format')]
     public function testFromBase32InvalidFormat(string $ulid)
     {
         $this->expectException(\InvalidArgumentException::class);
@@ -229,9 +217,7 @@ class UlidTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideInvalidRfc4122Format
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidRfc4122Format')]
     public function testFromRfc4122InvalidFormat(string $ulid)
     {
         $this->expectException(\InvalidArgumentException::class);
@@ -258,11 +244,9 @@ class UlidTest extends TestCase
         $this->assertInstanceOf(Ulid::class, Ulid::fromString('111111111u9QRyVM94rdmZ'));
     }
 
-    /**
-     * @testWith    ["00000000-0000-0000-0000-000000000000"]
-     *              ["1111111111111111111111"]
-     *              ["00000000000000000000000000"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['00000000-0000-0000-0000-000000000000'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['1111111111111111111111'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['00000000000000000000000000'])]
     public function testNilUlid(string $ulid)
     {
         $ulid = Ulid::fromString($ulid);
@@ -276,10 +260,8 @@ class UlidTest extends TestCase
         $this->assertSame('00000000000000000000000000', (string) new NilUlid());
     }
 
-    /**
-     * @testWith    ["ffffffff-ffff-ffff-ffff-ffffffffffff"]
-     *              ["7zzzzzzzzzzzzzzzzzzzzzzzzz"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['ffffffff-ffff-ffff-ffff-ffffffffffff'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['7zzzzzzzzzzzzzzzzzzzzzzzzz'])]
     public function testMaxUlid(string $ulid)
     {
         $ulid = Ulid::fromString($ulid);
diff --git a/src/Symfony/Component/Uid/Tests/UuidTest.php b/src/Symfony/Component/Uid/Tests/UuidTest.php
index cb7ac10..97322c8 100644
--- a/src/Symfony/Component/Uid/Tests/UuidTest.php
+++ b/src/Symfony/Component/Uid/Tests/UuidTest.php
@@ -30,9 +30,7 @@ class UuidTest extends TestCase
     private const A_UUID_V4 = 'd6b3345b-2905-4048-a83c-b5988e765d98';
     private const A_UUID_V7 = '017f22e2-79b0-7cc3-98c4-dc0c0c07398f';
 
-    /**
-     * @dataProvider provideInvalidUuids
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidUuids')]
     public function testConstructorWithInvalidUuid(string $uuid)
     {
         $this->expectException(\InvalidArgumentException::class);
@@ -47,9 +45,7 @@ class UuidTest extends TestCase
         yield ['these are just thirty-six characters'];
     }
 
-    /**
-     * @dataProvider provideInvalidVariant
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidVariant')]
     public function testInvalidVariant(string $uuid)
     {
         $uuid = new Uuid($uuid);
@@ -241,9 +237,7 @@ class UuidTest extends TestCase
         $this->assertFalse($uuid1->equals($uuid2));
     }
 
-    /**
-     * @dataProvider provideInvalidEqualType
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidEqualType')]
     public function testEqualsAgainstOtherType($other)
     {
         $this->assertFalse((new UuidV4(self::A_UUID_V4))->equals($other));
@@ -273,11 +267,9 @@ class UuidTest extends TestCase
         $this->assertSame([$a, $b, $c, $d], $uuids);
     }
 
-    /**
-     * @testWith    ["00000000-0000-0000-0000-000000000000"]
-     *              ["1111111111111111111111"]
-     *              ["00000000000000000000000000"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['00000000-0000-0000-0000-000000000000'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['1111111111111111111111'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['00000000000000000000000000'])]
     public function testNilUuid(string $uuid)
     {
         $uuid = Uuid::fromString($uuid);
@@ -291,10 +283,8 @@ class UuidTest extends TestCase
         $this->assertSame('00000000-0000-0000-0000-000000000000', (string) new NilUuid());
     }
 
-    /**
-     * @testWith    ["ffffffff-ffff-ffff-ffff-ffffffffffff"]
-     *              ["7zzzzzzzzzzzzzzzzzzzzzzzzz"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['ffffffff-ffff-ffff-ffff-ffffffffffff'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['7zzzzzzzzzzzzzzzzzzzzzzzzz'])]
     public function testMaxUuid(string $uuid)
     {
         $uuid = Uuid::fromString($uuid);
@@ -316,9 +306,7 @@ class UuidTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideInvalidBinaryFormat
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidBinaryFormat')]
     public function testFromBinaryInvalidFormat(string $ulid)
     {
         $this->expectException(\InvalidArgumentException::class);
@@ -343,9 +331,7 @@ class UuidTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideInvalidBase58Format
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidBase58Format')]
     public function testFromBase58InvalidFormat(string $ulid)
     {
         $this->expectException(\InvalidArgumentException::class);
@@ -370,9 +356,7 @@ class UuidTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideInvalidBase32Format
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidBase32Format')]
     public function testFromBase32InvalidFormat(string $ulid)
     {
         $this->expectException(\InvalidArgumentException::class);
@@ -397,9 +381,7 @@ class UuidTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideInvalidRfc4122Format
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidRfc4122Format')]
     public function testFromRfc4122InvalidFormat(string $ulid)
     {
         $this->expectException(\InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Validator/Tests/ConstraintValidatorTest.php b/src/Symfony/Component/Validator/Tests/ConstraintValidatorTest.php
index d378ba2..d0fed88 100644
--- a/src/Symfony/Component/Validator/Tests/ConstraintValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/ConstraintValidatorTest.php
@@ -20,9 +20,7 @@ class ConstraintValidatorTest extends TestCase
 {
     use IcuCompatibilityTrait;
 
-    /**
-     * @dataProvider formatValueProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('formatValueProvider')]
     public function testFormatValue(string $expected, mixed $value, int $format = 0)
     {
         \Locale::setDefault('en');
diff --git a/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php b/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php
index 0d22bd8..af7c623 100644
--- a/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php
+++ b/src/Symfony/Component/Validator/Tests/ConstraintViolationListTest.php
@@ -123,9 +123,7 @@ EOF;
         $this->assertEquals($expected, (string) $this->list);
     }
 
-    /**
-     * @dataProvider findByCodesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('findByCodesProvider')]
     public function testFindByCodes($code, $violationsCount)
     {
         $violations = [
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php b/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php
index a5eb25c..671d7ec 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php
@@ -78,9 +78,7 @@ abstract class AbstractComparisonValidatorTestCase extends ConstraintValidatorTe
         ];
     }
 
-    /**
-     * @dataProvider provideInvalidConstraintOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidConstraintOptions')]
     public function testThrowsConstraintExceptionIfNoValueOrPropertyPath($options)
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -98,9 +96,7 @@ abstract class AbstractComparisonValidatorTestCase extends ConstraintValidatorTe
         ]);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testValidComparisonToValue($dirtyValue, $comparisonValue)
     {
         $constraint = $this->createConstraint(['value' => $comparisonValue]);
@@ -124,9 +120,7 @@ abstract class AbstractComparisonValidatorTestCase extends ConstraintValidatorTe
         return $comparisons;
     }
 
-    /**
-     * @dataProvider provideValidComparisonsToPropertyPath
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidComparisonsToPropertyPath')]
     public function testValidComparisonToPropertyPath($comparedValue)
     {
         $constraint = $this->createConstraint(['propertyPath' => 'value']);
@@ -169,9 +163,7 @@ abstract class AbstractComparisonValidatorTestCase extends ConstraintValidatorTe
 
     abstract public static function provideValidComparisonsToPropertyPath(): array;
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testInvalidComparisonToValue($dirtyValue, $dirtyValueAsString, $comparedValue, $comparedValueString, $comparedValueType)
     {
         // Conversion of dates to string differs between ICU versions
@@ -215,9 +207,7 @@ abstract class AbstractComparisonValidatorTestCase extends ConstraintValidatorTe
             ->assertRaised();
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testThrowsOnInvalidStringDates(AbstractComparison $constraint, $expectedMessage, $value)
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -240,9 +230,7 @@ abstract class AbstractComparisonValidatorTestCase extends ConstraintValidatorTe
         ];
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testCompareWithNullValueAtPropertyAt($dirtyValue, $dirtyValueAsString, $isValid)
     {
         $constraint = $this->createConstraint(['propertyPath' => 'value']);
@@ -266,9 +254,7 @@ abstract class AbstractComparisonValidatorTestCase extends ConstraintValidatorTe
         }
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testCompareWithUninitializedPropertyAtPropertyPath($dirtyValue, $dirtyValueAsString, $isValid)
     {
         $this->setObject(new TypedDummy());
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php
index 65dae62..b2c509b 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php
@@ -38,9 +38,7 @@ class AllValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate('foo.barbar', new All(new Range(['min' => 4])));
     }
 
-    /**
-     * @dataProvider getValidArguments
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidArguments')]
     public function testWalkSingleConstraint($array)
     {
         $constraint = new Range(['min' => 4]);
@@ -56,9 +54,7 @@ class AllValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidArguments
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidArguments')]
     public function testWalkMultipleConstraints($array)
     {
         $constraint1 = new Range(['min' => 4]);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/AtLeastOneOfValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/AtLeastOneOfValidatorTest.php
index 8bda680..af7f8f5 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/AtLeastOneOfValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/AtLeastOneOfValidatorTest.php
@@ -54,9 +54,7 @@ class AtLeastOneOfValidatorTest extends ConstraintValidatorTestCase
         return new AtLeastOneOfValidator();
     }
 
-    /**
-     * @dataProvider getValidCombinations
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidCombinations')]
     public function testValidCombinations($value, $constraints)
     {
         $this->assertCount(0, Validation::createValidator()->validate($value, new AtLeastOneOf($constraints)));
@@ -96,9 +94,7 @@ class AtLeastOneOfValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidCombinations
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidCombinations')]
     public function testInvalidCombinationsWithDefaultMessage($value, $constraints)
     {
         $atLeastOneOf = new AtLeastOneOf(['constraints' => $constraints]);
@@ -118,9 +114,7 @@ class AtLeastOneOfValidatorTest extends ConstraintValidatorTestCase
         $this->assertEquals(new ConstraintViolation(implode('', $message), implode('', $message), [], $value, '', $value, null, AtLeastOneOf::AT_LEAST_ONE_OF_ERROR, $atLeastOneOf), $violations->get(0));
     }
 
-    /**
-     * @dataProvider getInvalidCombinations
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidCombinations')]
     public function testInvalidCombinationsWithCustomMessage($value, $constraints)
     {
         $atLeastOneOf = new AtLeastOneOf(['constraints' => $constraints, 'message' => 'foo', 'includeInternalMessages' => false]);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php
index 9661350..f8e2d52 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php
@@ -188,9 +188,7 @@ class BicValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate(new \stdClass(), new Bic());
     }
 
-    /**
-     * @dataProvider getValidBics
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidBics')]
     public function testValidBics($bic)
     {
         $this->validator->validate($bic, new Bic());
@@ -211,9 +209,7 @@ class BicValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidBics
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidBics')]
     public function testInvalidBics($bic, $code)
     {
         $constraint = new Bic([
@@ -228,9 +224,7 @@ class BicValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getInvalidBics
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidBics')]
     public function testInvalidBicsNamed($bic, $code)
     {
         $constraint = new Bic(message: 'myMessage');
@@ -268,12 +262,7 @@ class BicValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidBicSpecialCases
-     *
-     * Some territories have their own ISO country code but can use another country code
-     * for IBAN accounts. Example: "French Guiana" (country code "GF") can use FR too.
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidBicSpecialCases')]
     public function testValidBicSpecialCases(string $bic, string $iban)
     {
         $constraint = new Bic(['iban' => $iban]);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/BlankValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/BlankValidatorTest.php
index 9643c67..dc4fed8 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/BlankValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/BlankValidatorTest.php
@@ -36,9 +36,7 @@ class BlankValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getInvalidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidValues')]
     public function testInvalidValues($value, $valueAsString)
     {
         $constraint = new Blank([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CardSchemeValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CardSchemeValidatorTest.php
index 15f4fa6..abb96e7 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/CardSchemeValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/CardSchemeValidatorTest.php
@@ -36,9 +36,7 @@ class CardSchemeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidNumbers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidNumbers')]
     public function testValidNumbers($scheme, $number)
     {
         $this->validator->validate($number, new CardScheme(['schemes' => $scheme]));
@@ -46,9 +44,7 @@ class CardSchemeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidNumbers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidNumbers')]
     public function testValidNumbersWithNewLine($scheme, $number)
     {
         $this->validator->validate($number."\n", new CardScheme(['schemes' => $scheme, 'message' => 'myMessage']));
@@ -69,9 +65,7 @@ class CardSchemeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getInvalidNumbers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidNumbers')]
     public function testInvalidNumbers($scheme, $number, $code)
     {
         $constraint = new CardScheme([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php
index a78a2bf..72db760 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php
@@ -79,9 +79,7 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate('foobar', new Choice(['callback' => 'abcd']));
     }
 
-    /**
-     * @dataProvider provideConstraintsWithChoicesArray
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstraintsWithChoicesArray')]
     public function testValidChoiceArray(Choice $constraint)
     {
         $this->validator->validate('bar', $constraint);
@@ -97,9 +95,7 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase
         yield 'named arguments' => [new Choice(choices: ['foo', 'bar'])];
     }
 
-    /**
-     * @dataProvider provideConstraintsWithCallbackFunction
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstraintsWithCallbackFunction')]
     public function testValidChoiceCallbackFunction(Choice $constraint)
     {
         $this->validator->validate('bar', $constraint);
@@ -156,9 +152,7 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider provideConstraintsWithMultipleTrue
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstraintsWithMultipleTrue')]
     public function testMultipleChoices(Choice $constraint)
     {
         $this->validator->validate(['baz', 'bar'], $constraint);
@@ -178,9 +172,7 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase
         )];
     }
 
-    /**
-     * @dataProvider provideConstraintsWithMessage
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstraintsWithMessage')]
     public function testInvalidChoice(Choice $constraint)
     {
         $this->validator->validate('baz', $constraint);
@@ -216,9 +208,7 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider provideConstraintsWithMultipleMessage
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstraintsWithMultipleMessage')]
     public function testInvalidChoiceMultiple(Choice $constraint)
     {
         $this->validator->validate(['foo', 'baz'], $constraint);
@@ -245,9 +235,7 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase
         )];
     }
 
-    /**
-     * @dataProvider provideConstraintsWithMin
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstraintsWithMin')]
     public function testTooFewChoices(Choice $constraint)
     {
         $value = ['foo'];
@@ -280,9 +268,7 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase
         )];
     }
 
-    /**
-     * @dataProvider provideConstraintsWithMax
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstraintsWithMax')]
     public function testTooManyChoices(Choice $constraint)
     {
         $value = ['foo', 'bar', 'moo'];
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CidrTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CidrTest.php
index 3ad25af..cb86775 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/CidrTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/CidrTest.php
@@ -57,9 +57,7 @@ class CidrTest extends TestCase
         new Cidr(['version' => '8']);
     }
 
-    /**
-     * @dataProvider getValidMinMaxValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidMinMaxValues')]
     public function testWithValidMinMaxValues(string $ipVersion, int $netmaskMin, int $netmaskMax)
     {
         $cidrConstraint = new Cidr([
@@ -73,9 +71,7 @@ class CidrTest extends TestCase
         self::assertEquals($netmaskMax, $cidrConstraint->netmaskMax);
     }
 
-    /**
-     * @dataProvider getInvalidMinMaxValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidMinMaxValues')]
     public function testWithInvalidMinMaxValues(string $ipVersion, int $netmaskMin, int $netmaskMax)
     {
         $expectedMax = Ip::V4 == $ipVersion ? 32 : 128;
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CidrValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CidrValidatorTest.php
index d2a617d..ac32fda 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/CidrValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/CidrValidatorTest.php
@@ -54,9 +54,7 @@ class CidrValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate(123456, new Cidr());
     }
 
-    /**
-     * @dataProvider getWithInvalidNetmask
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getWithInvalidNetmask')]
     public function testInvalidNetmask(string $cidr)
     {
         $this->validator->validate($cidr, new Cidr());
@@ -67,9 +65,7 @@ class CidrValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getWithInvalidIps
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getWithInvalidIps')]
     public function testInvalidIpValue(string $cidr)
     {
         $this->validator->validate($cidr, new Cidr());
@@ -80,9 +76,7 @@ class CidrValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValid
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValid')]
     public function testValidCidr(string $cidr, string $version)
     {
         $this->validator->validate($cidr, new Cidr(['version' => $version]));
@@ -90,9 +84,7 @@ class CidrValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getWithInvalidMasksAndIps
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getWithInvalidMasksAndIps')]
     public function testInvalidIpAddressAndNetmask(string $cidr)
     {
         $this->validator->validate($cidr, new Cidr());
@@ -102,9 +94,7 @@ class CidrValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getOutOfRangeNetmask
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getOutOfRangeNetmask')]
     public function testOutOfRangeNetmask(string $cidr, ?string $version = null, ?int $min = null, ?int $max = null)
     {
         $cidrConstraint = new Cidr([
@@ -122,9 +112,7 @@ class CidrValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getWithWrongVersion
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getWithWrongVersion')]
     public function testWrongVersion(string $cidr, string $version)
     {
         $this->validator->validate($cidr, new Cidr(['version' => $version]));
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CollectionTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CollectionTest.php
index 17f543f..ad29bd1 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/CollectionTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/CollectionTest.php
@@ -176,10 +176,8 @@ class CollectionTest extends TestCase
         $this->assertSame('foo bar baz', $constraint->extraFieldsMessage);
     }
 
-    /**
-     * @testWith [[]]
-     *           [null]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([[]])]
+    #[\PHPUnit\Framework\Attributes\TestWith([null])]
     public function testEmptyConstraintListForField(?array $fieldConstraint)
     {
         $constraint = new Collection(
@@ -199,10 +197,8 @@ class CollectionTest extends TestCase
         $this->assertSame('foo bar baz', $constraint->extraFieldsMessage);
     }
 
-    /**
-     * @testWith [[]]
-     *           [null]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([[]])]
+    #[\PHPUnit\Framework\Attributes\TestWith([null])]
     public function testEmptyConstraintListForFieldInOptions(?array $fieldConstraint)
     {
         $constraint = new Collection([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CountValidatorTestCase.php b/src/Symfony/Component/Validator/Tests/Constraints/CountValidatorTestCase.php
index 104c907..5f59291 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/CountValidatorTestCase.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/CountValidatorTestCase.php
@@ -69,9 +69,7 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getThreeOrLessElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getThreeOrLessElements')]
     public function testValidValuesMax($value)
     {
         $constraint = new Count(['max' => 3]);
@@ -80,9 +78,7 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getThreeOrLessElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getThreeOrLessElements')]
     public function testValidValuesMaxNamed($value)
     {
         $constraint = new Count(max: 3);
@@ -91,9 +87,7 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getFiveOrMoreElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFiveOrMoreElements')]
     public function testValidValuesMin($value)
     {
         $constraint = new Count(['min' => 5]);
@@ -102,9 +96,7 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getFiveOrMoreElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFiveOrMoreElements')]
     public function testValidValuesMinNamed($value)
     {
         $constraint = new Count(min: 5);
@@ -113,9 +105,7 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getFourElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFourElements')]
     public function testValidValuesExact($value)
     {
         $constraint = new Count(4);
@@ -124,9 +114,7 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getFourElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFourElements')]
     public function testValidValuesExactNamed($value)
     {
         $constraint = new Count(exactly: 4);
@@ -135,9 +123,7 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getFiveOrMoreElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFiveOrMoreElements')]
     public function testTooManyValues($value)
     {
         $constraint = new Count([
@@ -156,9 +142,7 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getFiveOrMoreElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFiveOrMoreElements')]
     public function testTooManyValuesNamed($value)
     {
         $constraint = new Count(max: 4, maxMessage: 'myMessage');
@@ -174,9 +158,7 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getThreeOrLessElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getThreeOrLessElements')]
     public function testTooFewValues($value)
     {
         $constraint = new Count([
@@ -195,9 +177,7 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getThreeOrLessElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getThreeOrLessElements')]
     public function testTooFewValuesNamed($value)
     {
         $constraint = new Count(min: 4, minMessage: 'myMessage');
@@ -213,9 +193,7 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getFiveOrMoreElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFiveOrMoreElements')]
     public function testTooManyValuesExact($value)
     {
         $constraint = new Count([
@@ -235,9 +213,7 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getFiveOrMoreElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFiveOrMoreElements')]
     public function testTooManyValuesExactNamed($value)
     {
         $constraint = new Count(exactly: 4, exactMessage: 'myMessage');
@@ -253,9 +229,7 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getThreeOrLessElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getThreeOrLessElements')]
     public function testTooFewValuesExact($value)
     {
         $constraint = new Count([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php
index 4be3789..27ed85b 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php
@@ -60,9 +60,7 @@ class CountryValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate(new \stdClass(), new Country());
     }
 
-    /**
-     * @dataProvider getValidCountries
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidCountries')]
     public function testValidCountries($country)
     {
         $this->validator->validate($country, new Country());
@@ -79,9 +77,7 @@ class CountryValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidCountries
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidCountries')]
     public function testInvalidCountries($country)
     {
         $constraint = new Country([
@@ -104,9 +100,7 @@ class CountryValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidAlpha3Countries
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidAlpha3Countries')]
     public function testValidAlpha3Countries($country)
     {
         $this->validator->validate($country, new Country([
@@ -125,9 +119,7 @@ class CountryValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidAlpha3Countries
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidAlpha3Countries')]
     public function testInvalidAlpha3Countries($country)
     {
         $constraint = new Country([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CssColorValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CssColorValidatorTest.php
index b458170..a5ef85b 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/CssColorValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/CssColorValidatorTest.php
@@ -43,18 +43,14 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate(new \stdClass(), new CssColor(CssColor::HEX_LONG));
     }
 
-    /**
-     * @dataProvider getValidAnyColor
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidAnyColor')]
     public function testValidAnyColor($cssColor)
     {
         $this->validator->validate($cssColor, new CssColor());
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidAnyColor
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidAnyColor')]
     public function testValidAnyColorWithNewLine($cssColor)
     {
         $this->validator->validate($cssColor."\n", new CssColor([], 'myMessage'));
@@ -83,9 +79,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidHexLongColors
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidHexLongColors')]
     public function testValidHexLongColors($cssColor)
     {
         $this->validator->validate($cssColor, new CssColor(CssColor::HEX_LONG));
@@ -97,9 +91,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         return [['#ABCDEF'], ['#abcdef'], ['#C0FFEE'], ['#c0ffee'], ['#501311']];
     }
 
-    /**
-     * @dataProvider getValidHexLongColorsWithAlpha
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidHexLongColorsWithAlpha')]
     public function testValidHexLongColorsWithAlpha($cssColor)
     {
         $this->validator->validate($cssColor, new CssColor(CssColor::HEX_LONG_WITH_ALPHA));
@@ -111,9 +103,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         return [['#ABCDEF00'], ['#abcdef01'], ['#C0FFEE02'], ['#c0ffee03'], ['#501311FF']];
     }
 
-    /**
-     * @dataProvider getValidHexShortColors
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidHexShortColors')]
     public function testValidHexShortColors($cssColor)
     {
         $this->validator->validate($cssColor, new CssColor(CssColor::HEX_SHORT));
@@ -125,9 +115,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         return [['#F4B'], ['#FAB'], ['#f4b'], ['#fab']];
     }
 
-    /**
-     * @dataProvider getValidHexShortColorsWithAlpha
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidHexShortColorsWithAlpha')]
     public function testValidHexShortColorsWithAlpha($cssColor)
     {
         $this->validator->validate($cssColor, new CssColor(CssColor::HEX_SHORT_WITH_ALPHA));
@@ -139,9 +127,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         return [['#F4B1'], ['#FAB1'], ['#f4b1'], ['#fab1']];
     }
 
-    /**
-     * @dataProvider getValidBasicNamedColors
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidBasicNamedColors')]
     public function testValidBasicNamedColors($cssColor)
     {
         $this->validator->validate($cssColor, new CssColor(CssColor::BASIC_NAMED_COLORS));
@@ -156,9 +142,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidExtendedNamedColors
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidExtendedNamedColors')]
     public function testValidExtendedNamedColors($cssColor)
     {
         $this->validator->validate($cssColor, new CssColor(CssColor::EXTENDED_NAMED_COLORS));
@@ -173,9 +157,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidSystemColors
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidSystemColors')]
     public function testValidSystemColors($cssColor)
     {
         $this->validator->validate($cssColor, new CssColor(CssColor::SYSTEM_COLORS));
@@ -191,9 +173,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidKeywords
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidKeywords')]
     public function testValidKeywords($cssColor)
     {
         $this->validator->validate($cssColor, new CssColor(CssColor::KEYWORDS));
@@ -205,9 +185,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         return [['transparent'], ['currentColor']];
     }
 
-    /**
-     * @dataProvider getValidRGB
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidRGB')]
     public function testValidRGB($cssColor)
     {
         $this->validator->validate($cssColor, new CssColor(CssColor::RGB));
@@ -223,9 +201,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidRGBA
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidRGBA')]
     public function testValidRGBA($cssColor)
     {
         $this->validator->validate($cssColor, new CssColor(CssColor::RGBA));
@@ -242,9 +218,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidHSL
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidHSL')]
     public function testValidHSL($cssColor)
     {
         $this->validator->validate($cssColor, new CssColor(CssColor::HSL));
@@ -260,9 +234,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidHSLA
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidHSLA')]
     public function testValidHSLA($cssColor)
     {
         $this->validator->validate($cssColor, new CssColor(CssColor::HSLA));
@@ -279,9 +251,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidHexColors
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidHexColors')]
     public function testInvalidHexColors($cssColor)
     {
         $constraint = new CssColor([CssColor::HEX_LONG, CssColor::HEX_LONG_WITH_ALPHA], 'myMessage');
@@ -298,9 +268,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         return [['ABCDEF'], ['abcdef'], ['#K0FFEE'], ['#k0ffee'], ['#_501311'], ['ABCDEF00'], ['abcdefcc'], ['#K0FFEE33'], ['#k0ffeecc'], ['#_50131100'], ['#FAℬ'], ['#Ⅎab'], ['#F4️⃣B'], ['#f(4)b'], ['#907;']];
     }
 
-    /**
-     * @dataProvider getInvalidShortHexColors
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidShortHexColors')]
     public function testInvalidShortHexColors($cssColor)
     {
         $this->validator->validate($cssColor, new CssColor([CssColor::HEX_SHORT, CssColor::HEX_SHORT_WITH_ALPHA], 'myMessage'));
@@ -316,9 +284,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         return [['ABC'], ['ABCD'], ['abc'], ['abcd'], ['#K0F'], ['#K0FF'], ['#k0f'], ['#k0ff'], ['#_50'], ['#_501']];
     }
 
-    /**
-     * @dataProvider getInvalidNamedColors
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidNamedColors')]
     public function testInvalidNamedColors($cssColor)
     {
         $this->validator->validate($cssColor, new CssColor([
@@ -339,9 +305,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         return [['fabpot'], ['ngrekas'], ['symfony'], ['FABPOT'], ['NGREKAS'], ['SYMFONY']];
     }
 
-    /**
-     * @dataProvider getInvalidRGB
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidRGB')]
     public function testInvalidRGB($cssColor)
     {
         $this->validator->validate($cssColor, new CssColor([
@@ -362,9 +326,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         return [['rgb(999,999,999)'], ['rgb(-99,-99,-99)'], ['rgb(a,b,c)'], ['rgb(99 99, 9 99, 99 9)']];
     }
 
-    /**
-     * @dataProvider getInvalidRGBA
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidRGBA')]
     public function testInvalidRGBA($cssColor)
     {
         $this->validator->validate($cssColor, new CssColor([
@@ -385,9 +347,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         return [['rgba(999,999,999,999)'], ['rgba(-99,-99,-99,-99)'], ['rgba(a,b,c,d)'], ['rgba(99 99, 9 99, 99 9, . 9)']];
     }
 
-    /**
-     * @dataProvider getInvalidHSL
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidHSL')]
     public function testInvalidHSL($cssColor)
     {
         $this->validator->validate($cssColor, new CssColor([
@@ -408,9 +368,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         return [['hsl(1000, 1000%, 20000%)'], ['hsl(-100, -10%, -2%)'], ['hsl(a, b, c)'], ['hsl(a, b%, c%)'], ['hsl( 99 99% , 9 99% , 99 9%)']];
     }
 
-    /**
-     * @dataProvider getInvalidHSLA
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidHSLA')]
     public function testInvalidHSLA($cssColor)
     {
         $this->validator->validate($cssColor, new CssColor([
@@ -431,9 +389,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         return [['hsla(1000, 1000%, 20000%, 999)'], ['hsla(-100, -10%, -2%, 999)'], ['hsla(a, b, c, d)'], ['hsla(a, b%, c%, d)'], ['hsla( 9 99% , 99 9% , 9 %']];
     }
 
-    /**
-     * @dataProvider getInvalidFormats
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidFormats')]
     public function testUnknownFormatAsStringThrowsException($formats)
     {
         $this->expectException(\InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php
index d63c5ab..e17abd3 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php
@@ -60,9 +60,7 @@ class CurrencyValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate(new \stdClass(), new Currency());
     }
 
-    /**
-     * @dataProvider getValidCurrencies
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidCurrencies')]
     public function testValidCurrencies($currency)
     {
         $this->validator->validate($currency, new Currency());
@@ -70,9 +68,7 @@ class CurrencyValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidCurrencies
-     **/
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidCurrencies')]
     public function testValidCurrenciesWithCountrySpecificLocale($currency)
     {
         IntlTestHelper::requireFullIntl($this);
@@ -95,9 +91,7 @@ class CurrencyValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidCurrencies
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidCurrencies')]
     public function testInvalidCurrencies($currency)
     {
         $constraint = new Currency([
@@ -112,9 +106,7 @@ class CurrencyValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getInvalidCurrencies
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidCurrencies')]
     public function testInvalidCurrenciesNamed($currency)
     {
         $constraint = new Currency(message: 'myMessage');
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/DateTimeValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/DateTimeValidatorTest.php
index 8da07c4..e7aee70 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/DateTimeValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/DateTimeValidatorTest.php
@@ -57,9 +57,7 @@ class DateTimeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidDateTimes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidDateTimes')]
     public function testValidDateTimes($format, $dateTime)
     {
         $constraint = new DateTime([
@@ -82,9 +80,7 @@ class DateTimeValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidDateTimes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidDateTimes')]
     public function testInvalidDateTimes($format, $dateTime, $code)
     {
         $constraint = new DateTime([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/DateValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/DateValidatorTest.php
index 93dab41..69f4865 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/DateValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/DateValidatorTest.php
@@ -43,9 +43,7 @@ class DateValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate(new \stdClass(), new Date());
     }
 
-    /**
-     * @dataProvider getValidDates
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidDates')]
     public function testValidDates($date)
     {
         $this->validator->validate($date, new Date());
@@ -53,9 +51,7 @@ class DateValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidDates
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidDates')]
     public function testValidDatesWithNewLine(string $date)
     {
         $this->validator->validate($date."\n", new Date(['message' => 'myMessage']));
@@ -75,9 +71,7 @@ class DateValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidDates
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidDates')]
     public function testInvalidDates($date, $code)
     {
         $constraint = new Date([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/DivisibleByValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/DivisibleByValidatorTest.php
index 37ae208..cecb940 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/DivisibleByValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/DivisibleByValidatorTest.php
@@ -82,9 +82,7 @@ class DivisibleByValidatorTest extends AbstractComparisonValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider throwsOnNonNumericValuesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('throwsOnNonNumericValuesProvider')]
     public function testThrowsOnNonNumericValues(string $expectedGivenType, $value, $comparedValue)
     {
         $this->expectException(UnexpectedValueException::class);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php
index 35f938f..f4d3172 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Validator\Constraints\EmailValidator;
 use Symfony\Component\Validator\Exception\UnexpectedValueException;
 use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
 
-/**
- * @group dns-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('dns-sensitive')]
 class EmailValidatorTest extends ConstraintValidatorTestCase
 {
     use ExpectDeprecationTrait;
@@ -63,9 +61,7 @@ class EmailValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate(new \stdClass(), new Email());
     }
 
-    /**
-     * @dataProvider getValidEmails
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidEmails')]
     public function testValidEmails($email)
     {
         $this->validator->validate($email, new Email());
@@ -73,9 +69,7 @@ class EmailValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidEmails
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidEmails')]
     public function testValidEmailsWithNewLine($email)
     {
         $this->validator->validate($email."\n", new Email());
@@ -95,12 +89,9 @@ class EmailValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getValidEmails
-     * @dataProvider getEmailsOnlyValidInLooseMode
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidEmails')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getEmailsOnlyValidInLooseMode')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValidInLooseModeEmails($email)
     {
         $this->validator->validate($email, new Email(['mode' => Email::VALIDATION_MODE_LOOSE]));
@@ -119,9 +110,7 @@ class EmailValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidEmailsWithWhitespaces
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidEmailsWithWhitespaces')]
     public function testValidNormalizedEmails($email)
     {
         $this->validator->validate($email, new Email(['normalizer' => 'trim']));
@@ -137,12 +126,9 @@ class EmailValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getValidEmailsWithWhitespaces
-     * @dataProvider getEmailsWithWhitespacesOnlyValidInLooseMode
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidEmailsWithWhitespaces')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getEmailsWithWhitespacesOnlyValidInLooseMode')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValidNormalizedEmailsInLooseMode($email)
     {
         $this->validator->validate($email, new Email(['mode' => Email::VALIDATION_MODE_LOOSE, 'normalizer' => 'trim']));
@@ -160,9 +146,7 @@ class EmailValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidEmailsHtml5
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidEmailsHtml5')]
     public function testValidEmailsHtml5($email)
     {
         $this->validator->validate($email, new Email(['mode' => Email::VALIDATION_MODE_HTML5]));
@@ -180,9 +164,7 @@ class EmailValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidEmails
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidEmails')]
     public function testInvalidEmails($email)
     {
         $constraint = new Email([
@@ -207,9 +189,7 @@ class EmailValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidHtml5Emails
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidHtml5Emails')]
     public function testInvalidHtml5Emails($email)
     {
         $constraint = new Email([
@@ -247,9 +227,7 @@ class EmailValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidAllowNoTldEmails
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidAllowNoTldEmails')]
     public function testInvalidAllowNoTldEmails($email)
     {
         $constraint = new Email([
@@ -306,9 +284,7 @@ class EmailValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testModeLoose()
     {
         $this->expectDeprecation('Since symfony/validator 6.2: The "loose" mode is deprecated. It will be removed in 7.0 and the default mode will be changed to "html5".');
@@ -330,9 +306,7 @@ class EmailValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate('example@example..com', $constraint);
     }
 
-    /**
-     * @dataProvider getInvalidEmailsForStrictChecks
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidEmailsForStrictChecks')]
     public function testStrictWithInvalidEmails($email)
     {
         $constraint = new Email([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/ExpressionLanguageSyntaxTest.php b/src/Symfony/Component/Validator/Tests/Constraints/ExpressionLanguageSyntaxTest.php
index bc9911d..e483fca 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/ExpressionLanguageSyntaxTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/ExpressionLanguageSyntaxTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Validator\Constraints\ExpressionLanguageSyntaxValidator;
 use Symfony\Component\Validator\Mapping\ClassMetadata;
 use Symfony\Component\Validator\Mapping\Loader\AttributeLoader;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class ExpressionLanguageSyntaxTest extends TestCase
 {
     public function testValidatedByStandardValidator()
@@ -29,9 +27,7 @@ class ExpressionLanguageSyntaxTest extends TestCase
         self::assertSame(ExpressionLanguageSyntaxValidator::class, $constraint->validatedBy());
     }
 
-    /**
-     * @dataProvider provideServiceValidatedConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideServiceValidatedConstraints')]
     public function testValidatedByService(ExpressionLanguageSyntax $constraint)
     {
         self::assertSame('my_service', $constraint->validatedBy());
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/ExpressionLanguageSyntaxValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/ExpressionLanguageSyntaxValidatorTest.php
index f44e606..e7fefd7 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/ExpressionLanguageSyntaxValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/ExpressionLanguageSyntaxValidatorTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Validator\Constraints\ExpressionLanguageSyntaxValidator;
 use Symfony\Component\Validator\ConstraintValidatorInterface;
 use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class ExpressionLanguageSyntaxValidatorTest extends ConstraintValidatorTestCase
 {
     protected function createValidator(): ConstraintValidatorInterface
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/ExpressionSyntaxTest.php b/src/Symfony/Component/Validator/Tests/Constraints/ExpressionSyntaxTest.php
index 3f77cac..6d954f8 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/ExpressionSyntaxTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/ExpressionSyntaxTest.php
@@ -26,9 +26,7 @@ class ExpressionSyntaxTest extends TestCase
         self::assertSame(ExpressionSyntaxValidator::class, $constraint->validatedBy());
     }
 
-    /**
-     * @dataProvider provideServiceValidatedConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideServiceValidatedConstraints')]
     public function testValidatedByService(ExpressionSyntax $constraint)
     {
         self::assertSame('my_service', $constraint->validatedBy());
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/ExpressionValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/ExpressionValidatorTest.php
index c237c79..3cbdd89 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/ExpressionValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/ExpressionValidatorTest.php
@@ -355,9 +355,7 @@ class ExpressionValidatorTest extends ConstraintValidatorTestCase
         $this->assertCount(2, $this->context->getViolations());
     }
 
-    /**
-     * @dataProvider provideCompileIsValid
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompileIsValid')]
     public function testCompileIsValid(string $expression, array $names, string $expected)
     {
         $expressionLanguage = new ExpressionLanguage();
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/FileTest.php b/src/Symfony/Component/Validator/Tests/Constraints/FileTest.php
index 5b70dc1..3be4bf3 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/FileTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/FileTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\Validator\Mapping\Loader\AttributeLoader;
 
 class FileTest extends TestCase
 {
-    /**
-     * @dataProvider provideValidSizes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidSizes')]
     public function testMaxSize($maxSize, $bytes, $binaryFormat)
     {
         $file = new File(['maxSize' => $maxSize]);
@@ -40,9 +38,7 @@ class FileTest extends TestCase
         $this->assertFalse($file->__isset('toto'));
     }
 
-    /**
-     * @dataProvider provideValidSizes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidSizes')]
     public function testMaxSizeCanBeSetAfterInitialization($maxSize, $bytes, $binaryFormat)
     {
         $file = new File();
@@ -52,9 +48,7 @@ class FileTest extends TestCase
         $this->assertSame($binaryFormat, $file->binaryFormat);
     }
 
-    /**
-     * @dataProvider provideInvalidSizes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidSizes')]
     public function testInvalidValueForMaxSizeThrowsExceptionAfterInitialization($maxSize)
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -62,9 +56,7 @@ class FileTest extends TestCase
         $file->maxSize = $maxSize;
     }
 
-    /**
-     * @dataProvider provideInvalidSizes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidSizes')]
     public function testMaxSizeCannotBeSetToInvalidValueAfterInitialization($maxSize)
     {
         $file = new File(['maxSize' => 1000]);
@@ -77,9 +69,7 @@ class FileTest extends TestCase
         $this->assertSame(1000, $file->maxSize);
     }
 
-    /**
-     * @dataProvider provideInValidSizes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInValidSizes')]
     public function testInvalidMaxSize($maxSize)
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -118,9 +108,7 @@ class FileTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideFormats
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFormats')]
     public function testBinaryFormat($maxSize, $guessedFormat, $binaryFormat)
     {
         $file = new File(['maxSize' => $maxSize, 'binaryFormat' => $guessedFormat]);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTestCase.php b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTestCase.php
index 960a8f3..feeffae 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTestCase.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTestCase.php
@@ -159,9 +159,7 @@ abstract class FileValidatorTestCase extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideMaxSizeExceededTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMaxSizeExceededTests')]
     public function testMaxSizeExceeded($bytesWritten, $limit, $sizeAsString, $limitAsString, $suffix)
     {
         fseek($this->file, $bytesWritten - 1, \SEEK_SET);
@@ -211,9 +209,7 @@ abstract class FileValidatorTestCase extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideMaxSizeNotExceededTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMaxSizeNotExceededTests')]
     public function testMaxSizeNotExceeded($bytesWritten, $limit)
     {
         fseek($this->file, $bytesWritten - 1, \SEEK_SET);
@@ -260,9 +256,7 @@ abstract class FileValidatorTestCase extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideBinaryFormatTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBinaryFormatTests')]
     public function testBinaryFormat($bytesWritten, $limit, $binaryFormat, $sizeAsString, $limitAsString, $suffix)
     {
         fseek($this->file, $bytesWritten - 1, \SEEK_SET);
@@ -355,9 +349,7 @@ abstract class FileValidatorTestCase extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider provideMimeTypeConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMimeTypeConstraints')]
     public function testInvalidMimeType(File $constraint)
     {
         $file = $this
@@ -426,9 +418,7 @@ abstract class FileValidatorTestCase extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider provideDisallowEmptyConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDisallowEmptyConstraints')]
     public function testDisallowEmpty(File $constraint)
     {
         ftruncate($this->file, 0);
@@ -452,9 +442,7 @@ abstract class FileValidatorTestCase extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider uploadedFileErrorProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('uploadedFileErrorProvider')]
     public function testUploadedFileError($error, $message, array $params = [], $maxSize = null)
     {
         $file = new UploadedFile(tempnam(sys_get_temp_dir(), 'file-validator-test-'), 'originalName', 'mime', $error);
@@ -526,9 +514,7 @@ abstract class FileValidatorTestCase extends ConstraintValidatorTestCase
         $file->maxSize = -1;
     }
 
-    /**
-     * @dataProvider providerValidExtension
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerValidExtension')]
     public function testExtensionValid(string $name)
     {
         $path = __DIR__.'/Fixtures/'.$name;
@@ -555,9 +541,7 @@ abstract class FileValidatorTestCase extends ConstraintValidatorTestCase
         yield ['uppercased-extension.TXT'];
     }
 
-    /**
-     * @dataProvider provideInvalidExtension
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidExtension')]
     public function testExtensionInvalid(string $name, string $extension)
     {
         $path = __DIR__.'/Fixtures/'.$name;
@@ -654,9 +638,7 @@ abstract class FileValidatorTestCase extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider provideFilenameMaxLengthIsTooLong
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFilenameMaxLengthIsTooLong')]
     public function testFilenameMaxLengthIsTooLong(File $constraintFile, string $messageViolation)
     {
         file_put_contents($this->path, '1');
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest.php b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest.php
index d1eb66e..8ae5968 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest.php
@@ -64,9 +64,7 @@ class GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest extends Greate
         return new PositiveOrZero(['value' => 0]);
     }
 
-    /**
-     * @dataProvider provideInvalidConstraintOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidConstraintOptions')]
     public function testThrowsConstraintExceptionIfNoValueOrPropertyPath($options)
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -81,6 +79,7 @@ class GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest extends Greate
         $this->markTestSkipped('Value option is set for PositiveOrZero constraint automatically');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testInvalidValuePath()
     {
         $this->markTestSkipped('PropertyPath option is not used in PositiveOrZero constraint');
@@ -91,27 +90,27 @@ class GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest extends Greate
         self::markTestSkipped('The "value" option cannot be used in the PositiveOrZero constraint');
     }
 
-    /**
-     * @dataProvider provideValidComparisonsToPropertyPath
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidComparisonsToPropertyPath')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testValidComparisonToPropertyPath($comparedValue)
     {
         $this->markTestSkipped('PropertyPath option is not used in PositiveOrZero constraint');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testNoViolationOnNullObjectWithPropertyPath()
     {
         $this->markTestSkipped('PropertyPath option is not used in PositiveOrZero constraint');
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testThrowsOnInvalidStringDates(AbstractComparison $constraint, $expectedMessage, $value)
     {
         $this->markTestSkipped('The compared value cannot be an invalid string date because it is hardcoded to 0.');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testInvalidComparisonToPropertyPathAddsPathAsParameter()
     {
         $this->markTestSkipped('PropertyPath option is not used in PositiveOrZero constraint');
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorWithPositiveConstraintTest.php b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorWithPositiveConstraintTest.php
index f76726c..86290c0 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorWithPositiveConstraintTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorWithPositiveConstraintTest.php
@@ -62,9 +62,7 @@ class GreaterThanValidatorWithPositiveConstraintTest extends GreaterThanValidato
         return new Positive(['value' => 0]);
     }
 
-    /**
-     * @dataProvider provideInvalidConstraintOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidConstraintOptions')]
     public function testThrowsConstraintExceptionIfNoValueOrPropertyPath($options)
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -79,11 +77,13 @@ class GreaterThanValidatorWithPositiveConstraintTest extends GreaterThanValidato
         $this->markTestSkipped('Value option is set for Positive constraint automatically');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testNoViolationOnNullObjectWithPropertyPath()
     {
         $this->markTestSkipped('PropertyPath option is not used in Positive constraint');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testInvalidValuePath()
     {
         $this->markTestSkipped('PropertyPath option is not used in Positive constraint');
@@ -94,22 +94,21 @@ class GreaterThanValidatorWithPositiveConstraintTest extends GreaterThanValidato
         self::markTestSkipped('The "value" option cannot be used in the Positive constraint');
     }
 
-    /**
-     * @dataProvider provideValidComparisonsToPropertyPath
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidComparisonsToPropertyPath')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testValidComparisonToPropertyPath($comparedValue)
     {
         $this->markTestSkipped('PropertyPath option is not used in Positive constraint');
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testThrowsOnInvalidStringDates(AbstractComparison $constraint, $expectedMessage, $value)
     {
         $this->markTestSkipped('The compared value cannot be an invalid string date because it is hardcoded to 0.');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testInvalidComparisonToPropertyPathAddsPathAsParameter()
     {
         $this->markTestSkipped('PropertyPath option is not used in Positive constraint');
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/HostnameValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/HostnameValidatorTest.php
index f0b03e0..290d869 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/HostnameValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/HostnameValidatorTest.php
@@ -42,9 +42,7 @@ class HostnameValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate(new \stdClass(), new Hostname());
     }
 
-    /**
-     * @dataProvider getValidMultilevelDomains
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidMultilevelDomains')]
     public function testValidTldDomainsPassValidationIfTldRequired($domain)
     {
         $this->validator->validate($domain, new Hostname());
@@ -52,9 +50,7 @@ class HostnameValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidMultilevelDomains
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidMultilevelDomains')]
     public function testValidTldDomainsPassValidationIfTldNotRequired($domain)
     {
         $this->validator->validate($domain, new Hostname(['requireTld' => false]));
@@ -76,9 +72,7 @@ class HostnameValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidDomains
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidDomains')]
     public function testInvalidDomainsRaiseViolationIfTldRequired($domain)
     {
         $this->validator->validate($domain, new Hostname([
@@ -91,9 +85,7 @@ class HostnameValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getInvalidDomains
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidDomains')]
     public function testInvalidDomainsRaiseViolationIfTldNotRequired($domain)
     {
         $this->validator->validate($domain, new Hostname([
@@ -118,9 +110,7 @@ class HostnameValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getReservedDomains
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getReservedDomains')]
     public function testReservedDomainsPassValidationIfTldNotRequired($domain)
     {
         $this->validator->validate($domain, new Hostname(['requireTld' => false]));
@@ -128,9 +118,7 @@ class HostnameValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getReservedDomains
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getReservedDomains')]
     public function testReservedDomainsRaiseViolationIfTldRequired($domain)
     {
         $this->validator->validate($domain, new Hostname([
@@ -171,9 +159,7 @@ class HostnameValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getTopLevelDomains
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTopLevelDomains')]
     public function testTopLevelDomainsPassValidationIfTldNotRequired($domain)
     {
         $this->validator->validate($domain, new Hostname(['requireTld' => false]));
@@ -181,9 +167,7 @@ class HostnameValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getTopLevelDomains
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTopLevelDomains')]
     public function testTopLevelDomainsRaiseViolationIfTldRequired($domain)
     {
         $this->validator->validate($domain, new Hostname([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IbanValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IbanValidatorTest.php
index a9f59b0..df42f22 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/IbanValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/IbanValidatorTest.php
@@ -38,9 +38,7 @@ class IbanValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidIbans
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidIbans')]
     public function testValidIbans($iban)
     {
         $this->validator->validate($iban, new Iban());
@@ -48,9 +46,7 @@ class IbanValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidIbans
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidIbans')]
     public function testValidIbansWithNewLine(string $iban)
     {
         $this->validator->validate($iban."\n", new Iban());
@@ -190,9 +186,7 @@ class IbanValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getIbansWithInvalidFormat
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getIbansWithInvalidFormat')]
     public function testIbansWithInvalidFormat($iban)
     {
         $this->assertViolationRaised($iban, Iban::INVALID_FORMAT_ERROR);
@@ -309,9 +303,7 @@ class IbanValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getIbansWithValidFormatButIncorrectChecksum
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getIbansWithValidFormatButIncorrectChecksum')]
     public function testIbansWithValidFormatButIncorrectChecksum($iban)
     {
         $this->assertViolationRaised($iban, Iban::CHECKSUM_FAILED_ERROR);
@@ -427,9 +419,7 @@ class IbanValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getUnsupportedCountryCodes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getUnsupportedCountryCodes')]
     public function testIbansWithUnsupportedCountryCode($countryCode)
     {
         $this->assertViolationRaised($countryCode.'260211000000230064016', Iban::NOT_SUPPORTED_COUNTRY_CODE_ERROR);
@@ -451,9 +441,7 @@ class IbanValidatorTest extends ConstraintValidatorTestCase
         $this->assertViolationRaised('CH930076201162385295]', Iban::INVALID_CHARACTERS_ERROR);
     }
 
-    /**
-     * @dataProvider getIbansWithInvalidCountryCode
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getIbansWithInvalidCountryCode')]
     public function testIbansWithInvalidCountryCode($iban)
     {
         $this->assertViolationRaised($iban, Iban::INVALID_COUNTRY_CODE_ERROR);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php
index e1c048a..aed93b4 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php
@@ -19,10 +19,9 @@ use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
 use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
 
 /**
- * @requires extension fileinfo
- *
  * @extends ConstraintValidatorTestCase<ImageValidator>
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('fileinfo')]
 class ImageValidatorTest extends ConstraintValidatorTestCase
 {
     protected string $path;
@@ -75,9 +74,8 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
 
     /**
      * Checks that the logic from FileValidator still works.
-     *
-     * @dataProvider provideConstraintsWithNotFoundMessage
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstraintsWithNotFoundMessage')]
     public function testFileNotFound(Image $constraint)
     {
         $this->validator->validate('foobar', $constraint);
@@ -112,9 +110,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider provideMinWidthConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMinWidthConstraints')]
     public function testWidthTooSmall(Image $constraint)
     {
         $this->validator->validate($this->image, $constraint);
@@ -137,9 +133,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideMaxWidthConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMaxWidthConstraints')]
     public function testWidthTooBig(Image $constraint)
     {
         $this->validator->validate($this->image, $constraint);
@@ -162,9 +156,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideMinHeightConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMinHeightConstraints')]
     public function testHeightTooSmall(Image $constraint)
     {
         $this->validator->validate($this->image, $constraint);
@@ -187,9 +179,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideMaxHeightConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMaxHeightConstraints')]
     public function testHeightTooBig(Image $constraint)
     {
         $this->validator->validate($this->image, $constraint);
@@ -212,9 +202,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideMinPixelsConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMinPixelsConstraints')]
     public function testPixelsTooFew(Image $constraint)
     {
         $this->validator->validate($this->image, $constraint);
@@ -239,9 +227,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideMaxPixelsConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMaxPixelsConstraints')]
     public function testPixelsTooMany(Image $constraint)
     {
         $this->validator->validate($this->image, $constraint);
@@ -326,9 +312,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate($this->image, $constraint);
     }
 
-    /**
-     * @dataProvider provideMinRatioConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMinRatioConstraints')]
     public function testRatioTooSmall(Image $constraint)
     {
         $this->validator->validate($this->image, $constraint);
@@ -351,9 +335,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideMaxRatioConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMaxRatioConstraints')]
     public function testRatioTooBig(Image $constraint)
     {
         $this->validator->validate($this->image, $constraint);
@@ -429,9 +411,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate($this->image, $constraint);
     }
 
-    /**
-     * @dataProvider provideAllowSquareConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAllowSquareConstraints')]
     public function testSquareNotAllowed(Image $constraint)
     {
         $this->validator->validate($this->image, $constraint);
@@ -454,9 +434,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideAllowLandscapeConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAllowLandscapeConstraints')]
     public function testLandscapeNotAllowed(Image $constraint)
     {
         $this->validator->validate($this->imageLandscape, $constraint);
@@ -479,9 +457,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideAllowPortraitConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAllowPortraitConstraints')]
     public function testPortraitNotAllowed(Image $constraint)
     {
         $this->validator->validate($this->imagePortrait, $constraint);
@@ -504,9 +480,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideDetectCorruptedConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDetectCorruptedConstraints')]
     public function testCorrupted(Image $constraint)
     {
         if (!\function_exists('imagecreatefromstring')) {
@@ -550,9 +524,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideInvalidMimeTypeWithNarrowedSet
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidMimeTypeWithNarrowedSet')]
     public function testInvalidMimeTypeWithNarrowedSet(Image $constraint)
     {
         $this->validator->validate($this->image, $constraint);
@@ -582,9 +554,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider providerValidExtension
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerValidExtension')]
     public function testExtensionValid(string $name)
     {
         if (!class_exists(MimeTypes::class)) {
@@ -604,9 +574,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
         yield ['test.png.gif'];
     }
 
-    /**
-     * @dataProvider provideInvalidExtension
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidExtension')]
     public function testExtensionInvalid(string $name, string $extension)
     {
         $path = __DIR__.'/Fixtures/'.$name;
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php
index 8206818..7b7e3af 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php
@@ -52,9 +52,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         ]);
     }
 
-    /**
-     * @dataProvider getValidIpsV4
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidIpsV4')]
     public function testValidIpsV4($ip)
     {
         $this->validator->validate($ip, new Ip([
@@ -78,9 +76,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidIpsV4WithWhitespaces
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidIpsV4WithWhitespaces')]
     public function testValidIpsV4WithWhitespaces($ip)
     {
         $this->validator->validate($ip, new Ip([
@@ -113,9 +109,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidIpsV6
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidIpsV6')]
     public function testValidIpsV6($ip)
     {
         $this->validator->validate($ip, new Ip([
@@ -150,9 +144,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidIpsAll
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidIpsAll')]
     public function testValidIpsAll($ip)
     {
         $this->validator->validate($ip, new Ip([
@@ -167,9 +159,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         return array_merge(self::getValidIpsV4(), self::getValidIpsV6());
     }
 
-    /**
-     * @dataProvider getInvalidIpsV4
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidIpsV4')]
     public function testInvalidIpsV4($ip)
     {
         $constraint = new Ip([
@@ -200,9 +190,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidPrivateIpsV4
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidPrivateIpsV4')]
     public function testInvalidPrivateIpsV4($ip)
     {
         $constraint = new Ip([
@@ -227,9 +215,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidReservedIpsV4
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidReservedIpsV4')]
     public function testInvalidReservedIpsV4($ip)
     {
         $constraint = new Ip([
@@ -254,9 +240,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidPublicIpsV4
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidPublicIpsV4')]
     public function testInvalidPublicIpsV4($ip)
     {
         $constraint = new Ip([
@@ -277,9 +261,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         return array_merge(self::getInvalidPrivateIpsV4(), self::getInvalidReservedIpsV4());
     }
 
-    /**
-     * @dataProvider getInvalidIpsV6
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidIpsV6')]
     public function testInvalidIpsV6($ip)
     {
         $constraint = new Ip([
@@ -314,9 +296,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidPrivateIpsV6
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidPrivateIpsV6')]
     public function testInvalidPrivateIpsV6($ip)
     {
         $constraint = new Ip([
@@ -341,9 +321,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidReservedIpsV6
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidReservedIpsV6')]
     public function testInvalidReservedIpsV6($ip)
     {
         $constraint = new Ip([
@@ -367,9 +345,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         return self::getInvalidIpsV6();
     }
 
-    /**
-     * @dataProvider getInvalidPublicIpsV6
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidPublicIpsV6')]
     public function testInvalidPublicIpsV6($ip)
     {
         $constraint = new Ip([
@@ -390,9 +366,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         return array_merge(self::getInvalidPrivateIpsV6(), self::getInvalidReservedIpsV6());
     }
 
-    /**
-     * @dataProvider getInvalidIpsAll
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidIpsAll')]
     public function testInvalidIpsAll($ip)
     {
         $constraint = new Ip([
@@ -413,9 +387,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         return array_merge(self::getInvalidIpsV4(), self::getInvalidIpsV6());
     }
 
-    /**
-     * @dataProvider getInvalidPrivateIpsAll
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidPrivateIpsAll')]
     public function testInvalidPrivateIpsAll($ip)
     {
         $constraint = new Ip([
@@ -436,9 +408,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         return array_merge(self::getInvalidPrivateIpsV4(), self::getInvalidPrivateIpsV6());
     }
 
-    /**
-     * @dataProvider getInvalidReservedIpsAll
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidReservedIpsAll')]
     public function testInvalidReservedIpsAll($ip)
     {
         $constraint = new Ip([
@@ -459,9 +429,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         return array_merge(self::getInvalidReservedIpsV4(), self::getInvalidReservedIpsV6());
     }
 
-    /**
-     * @dataProvider getInvalidPublicIpsAll
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidPublicIpsAll')]
     public function testInvalidPublicIpsAll($ip)
     {
         $constraint = new Ip([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IsFalseValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IsFalseValidatorTest.php
index e597647..d595d53 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/IsFalseValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/IsFalseValidatorTest.php
@@ -36,9 +36,7 @@ class IsFalseValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider provideInvalidConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidConstraints')]
     public function testTrueIsInvalid(IsFalse $constraint)
     {
         $this->validator->validate(true, $constraint);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IsNullValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IsNullValidatorTest.php
index f0ff58f..a6ec6ac 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/IsNullValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/IsNullValidatorTest.php
@@ -29,9 +29,7 @@ class IsNullValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getInvalidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidValues')]
     public function testInvalidValues($value, $valueAsString)
     {
         $constraint = new IsNull([
@@ -46,9 +44,7 @@ class IsNullValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getInvalidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidValues')]
     public function testInvalidValuesNamed($value, $valueAsString)
     {
         $constraint = new IsNull(message: 'myMessage');
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IsTrueValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IsTrueValidatorTest.php
index 1dc47f4..3871b63 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/IsTrueValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/IsTrueValidatorTest.php
@@ -36,9 +36,7 @@ class IsTrueValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider provideInvalidConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidConstraints')]
     public function testFalseIsInvalid(IsTrue $constraint)
     {
         $this->validator->validate(false, $constraint);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php
index 3b25702..83791de 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php
@@ -145,9 +145,7 @@ class IsbnValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate(new \stdClass(), $constraint);
     }
 
-    /**
-     * @dataProvider getValidIsbn10
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidIsbn10')]
     public function testValidIsbn10($isbn)
     {
         $constraint = new Isbn([
@@ -159,9 +157,7 @@ class IsbnValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getInvalidIsbn10
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidIsbn10')]
     public function testInvalidIsbn10($isbn, $code)
     {
         $constraint = new Isbn([
@@ -190,9 +186,7 @@ class IsbnValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidIsbn13
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidIsbn13')]
     public function testValidIsbn13($isbn)
     {
         $constraint = new Isbn(['type' => 'isbn13']);
@@ -202,9 +196,7 @@ class IsbnValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getInvalidIsbn13
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidIsbn13')]
     public function testInvalidIsbn13($isbn, $code)
     {
         $constraint = new Isbn([
@@ -233,9 +225,7 @@ class IsbnValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidIsbn
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidIsbn')]
     public function testValidIsbnAny($isbn)
     {
         $constraint = new Isbn();
@@ -245,9 +235,7 @@ class IsbnValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getInvalidIsbn10
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidIsbn10')]
     public function testInvalidIsbnAnyIsbn10($isbn, $code)
     {
         $constraint = new Isbn([
@@ -267,9 +255,7 @@ class IsbnValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getInvalidIsbn13
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidIsbn13')]
     public function testInvalidIsbnAnyIsbn13($isbn, $code)
     {
         $constraint = new Isbn([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IsinValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IsinValidatorTest.php
index dca4a42..987d809 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/IsinValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/IsinValidatorTest.php
@@ -37,9 +37,7 @@ class IsinValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidIsin
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidIsin')]
     public function testValidIsin($isin)
     {
         $this->validator->validate($isin, new Isin());
@@ -63,9 +61,7 @@ class IsinValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getIsinWithInvalidLenghFormat
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getIsinWithInvalidLenghFormat')]
     public function testIsinWithInvalidFormat($isin)
     {
         $this->assertViolationRaised($isin, Isin::INVALID_LENGTH_ERROR);
@@ -88,9 +84,7 @@ class IsinValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getIsinWithInvalidPattern
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getIsinWithInvalidPattern')]
     public function testIsinWithInvalidPattern($isin)
     {
         $this->assertViolationRaised($isin, Isin::INVALID_PATTERN_ERROR);
@@ -106,9 +100,7 @@ class IsinValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getIsinWithValidFormatButIncorrectChecksum
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getIsinWithValidFormatButIncorrectChecksum')]
     public function testIsinWithValidFormatButIncorrectChecksum($isin)
     {
         $this->expectViolationsAt(0, $isin, new Luhn());
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IssnValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IssnValidatorTest.php
index 9eece3e..a0482b2 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/IssnValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/IssnValidatorTest.php
@@ -114,9 +114,7 @@ class IssnValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate(new \stdClass(), $constraint);
     }
 
-    /**
-     * @dataProvider getValidLowerCasedIssn
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLowerCasedIssn')]
     public function testCaseSensitiveIssns($issn)
     {
         $constraint = new Issn([
@@ -132,9 +130,7 @@ class IssnValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidNonHyphenatedIssn
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidNonHyphenatedIssn')]
     public function testRequireHyphenIssns($issn)
     {
         $constraint = new Issn([
@@ -150,9 +146,7 @@ class IssnValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidIssn
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidIssn')]
     public function testValidIssn($issn)
     {
         $constraint = new Issn();
@@ -162,9 +156,7 @@ class IssnValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getInvalidIssn
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidIssn')]
     public function testInvalidIssn($issn, $code)
     {
         $constraint = new Issn([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/JsonValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/JsonValidatorTest.php
index 92d8a20..e57a821 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/JsonValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/JsonValidatorTest.php
@@ -22,9 +22,7 @@ class JsonValidatorTest extends ConstraintValidatorTestCase
         return new JsonValidator();
     }
 
-    /**
-     * @dataProvider getValidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValues')]
     public function testJsonIsValid($value)
     {
         $this->validator->validate($value, new Json());
@@ -32,9 +30,7 @@ class JsonValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getInvalidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidValues')]
     public function testInvalidValues($value)
     {
         $constraint = new Json([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php
index 5752430..785d953 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php
@@ -60,9 +60,7 @@ class LanguageValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate(new \stdClass(), new Language());
     }
 
-    /**
-     * @dataProvider getValidLanguages
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLanguages')]
     public function testValidLanguages($language)
     {
         $this->validator->validate($language, new Language());
@@ -78,9 +76,7 @@ class LanguageValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidLanguages
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidLanguages')]
     public function testInvalidLanguages($language)
     {
         $constraint = new Language([
@@ -103,9 +99,7 @@ class LanguageValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidAlpha3Languages
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidAlpha3Languages')]
     public function testValidAlpha3Languages($language)
     {
         $this->validator->validate($language, new Language([
@@ -124,9 +118,7 @@ class LanguageValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidAlpha3Languages
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidAlpha3Languages')]
     public function testInvalidAlpha3Languages($language)
     {
         $constraint = new Language([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php
index 000b9d9..b0f83d3 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php
@@ -113,9 +113,7 @@ class LengthValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getFiveOrMoreCharacters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFiveOrMoreCharacters')]
     public function testValidValuesMin($value)
     {
         $constraint = new Length(['min' => 5]);
@@ -124,9 +122,7 @@ class LengthValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getThreeOrLessCharacters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getThreeOrLessCharacters')]
     public function testValidValuesMax($value)
     {
         $constraint = new Length(['max' => 3]);
@@ -135,9 +131,7 @@ class LengthValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getFourCharacters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFourCharacters')]
     public function testValidValuesExact($value)
     {
         $constraint = new Length(4);
@@ -146,9 +140,7 @@ class LengthValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getThreeCharactersWithWhitespaces
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getThreeCharactersWithWhitespaces')]
     public function testValidNormalizedValues($value)
     {
         $constraint = new Length(['min' => 3, 'max' => 3, 'normalizer' => 'trim']);
@@ -181,9 +173,7 @@ class LengthValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getThreeOrLessCharacters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getThreeOrLessCharacters')]
     public function testInvalidValuesMin($value, $valueLength)
     {
         $constraint = new Length([
@@ -203,9 +193,7 @@ class LengthValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getThreeOrLessCharacters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getThreeOrLessCharacters')]
     public function testInvalidValuesMinNamed($value, $valueLength)
     {
         $constraint = new Length(min: 4, minMessage: 'myMessage');
@@ -222,9 +210,7 @@ class LengthValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getFiveOrMoreCharacters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFiveOrMoreCharacters')]
     public function testInvalidValuesMax($value, $valueLength)
     {
         $constraint = new Length([
@@ -244,9 +230,7 @@ class LengthValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getFiveOrMoreCharacters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFiveOrMoreCharacters')]
     public function testInvalidValuesMaxNamed($value, $valueLength)
     {
         $constraint = new Length(max: 4, maxMessage: 'myMessage');
@@ -263,9 +247,7 @@ class LengthValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getThreeOrLessCharacters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getThreeOrLessCharacters')]
     public function testInvalidValuesExactLessThanFour($value, $valueLength)
     {
         $constraint = new Length([
@@ -286,9 +268,7 @@ class LengthValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getThreeOrLessCharacters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getThreeOrLessCharacters')]
     public function testInvalidValuesExactLessThanFourNamed($value, $valueLength)
     {
         $constraint = new Length(exactly: 4, exactMessage: 'myMessage');
@@ -305,9 +285,7 @@ class LengthValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getFiveOrMoreCharacters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFiveOrMoreCharacters')]
     public function testInvalidValuesExactMoreThanFour($value, $valueLength)
     {
         $constraint = new Length([
@@ -328,9 +306,7 @@ class LengthValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getOneCharset
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getOneCharset')]
     public function testOneCharset($value, $charset, $isValid)
     {
         $constraint = new Length([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest.php
index 2ec049f..647425e 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest.php
@@ -61,9 +61,7 @@ class LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest extends LessThanO
         return new NegativeOrZero(['value' => 0]);
     }
 
-    /**
-     * @dataProvider provideInvalidConstraintOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidConstraintOptions')]
     public function testThrowsConstraintExceptionIfNoValueOrPropertyPath($options)
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -78,11 +76,13 @@ class LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest extends LessThanO
         $this->markTestSkipped('Value option is set for NegativeOrZero constraint automatically');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testNoViolationOnNullObjectWithPropertyPath()
     {
         $this->markTestSkipped('PropertyPath option is not used in NegativeOrZero constraint');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testInvalidValuePath()
     {
         $this->markTestSkipped('PropertyPath option is not used in NegativeOrZero constraint');
@@ -93,30 +93,28 @@ class LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest extends LessThanO
         self::markTestSkipped('The "value" option cannot be used in the NegativeOrZero constraint');
     }
 
-    /**
-     * @dataProvider provideValidComparisonsToPropertyPath
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidComparisonsToPropertyPath')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testValidComparisonToPropertyPath($comparedValue)
     {
         $this->markTestSkipped('PropertyPath option is not used in NegativeOrZero constraint');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testInvalidComparisonToPropertyPathAddsPathAsParameter()
     {
         $this->markTestSkipped('PropertyPath option is not used in NegativeOrZero constraint');
     }
 
-    /**
-     * @dataProvider provideComparisonsToNullValueAtPropertyPath
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideComparisonsToNullValueAtPropertyPath')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCompareWithNullValueAtPropertyAt($dirtyValue, $dirtyValueAsString, $isValid)
     {
         $this->markTestSkipped('PropertyPath option is not used in NegativeOrZero constraint');
     }
 
-    /**
-     * @dataProvider provideComparisonsToNullValueAtPropertyPath
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideComparisonsToNullValueAtPropertyPath')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCompareWithUninitializedPropertyAtPropertyPath($dirtyValue, $dirtyValueAsString, $isValid)
     {
         $this->markTestSkipped('PropertyPath option is not used in NegativeOrZero constraint');
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorWithNegativeConstraintTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorWithNegativeConstraintTest.php
index 982eccd..bbfbb76 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorWithNegativeConstraintTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorWithNegativeConstraintTest.php
@@ -61,9 +61,7 @@ class LessThanValidatorWithNegativeConstraintTest extends LessThanValidatorTest
         return new Negative(['value' => 0]);
     }
 
-    /**
-     * @dataProvider provideInvalidConstraintOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidConstraintOptions')]
     public function testThrowsConstraintExceptionIfNoValueOrPropertyPath($options)
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -78,11 +76,13 @@ class LessThanValidatorWithNegativeConstraintTest extends LessThanValidatorTest
         $this->markTestSkipped('Value option is set for Negative constraint automatically');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testNoViolationOnNullObjectWithPropertyPath()
     {
         $this->markTestSkipped('PropertyPath option is not used in Negative constraint');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testInvalidValuePath()
     {
         $this->markTestSkipped('PropertyPath option is not used in Negative constraint');
@@ -93,9 +93,8 @@ class LessThanValidatorWithNegativeConstraintTest extends LessThanValidatorTest
         self::markTestSkipped('The "value" option cannot be used in the Negative constraint');
     }
 
-    /**
-     * @dataProvider provideValidComparisonsToPropertyPath
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidComparisonsToPropertyPath')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testValidComparisonToPropertyPath($comparedValue)
     {
         $this->markTestSkipped('PropertyPath option is not used in Negative constraint');
@@ -106,22 +105,21 @@ class LessThanValidatorWithNegativeConstraintTest extends LessThanValidatorTest
         self::markTestSkipped('The "value" option cannot be used in the Negative constraint');
     }
 
-    /**
-     * @dataProvider provideComparisonsToNullValueAtPropertyPath
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideComparisonsToNullValueAtPropertyPath')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCompareWithNullValueAtPropertyAt($dirtyValue, $dirtyValueAsString, $isValid)
     {
         $this->markTestSkipped('PropertyPath option is not used in Negative constraint');
     }
 
-    /**
-     * @dataProvider provideComparisonsToNullValueAtPropertyPath
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideComparisonsToNullValueAtPropertyPath')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCompareWithUninitializedPropertyAtPropertyPath($dirtyValue, $dirtyValueAsString, $isValid)
     {
         $this->markTestSkipped('PropertyPath option is not used in Negative constraint');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testInvalidComparisonToPropertyPathAddsPathAsParameter()
     {
         $this->markTestSkipped('PropertyPath option is not used in Negative constraint');
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LocaleValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LocaleValidatorTest.php
index ac166b3..76a8de9 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/LocaleValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/LocaleValidatorTest.php
@@ -43,9 +43,7 @@ class LocaleValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate(new \stdClass(), new Locale());
     }
 
-    /**
-     * @dataProvider getValidLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocales')]
     public function testValidLocales($locale)
     {
         $this->validator->validate($locale, new Locale());
@@ -66,9 +64,7 @@ class LocaleValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidLocales')]
     public function testInvalidLocales($locale)
     {
         $constraint = new Locale([
@@ -106,9 +102,7 @@ class LocaleValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getUncanonicalizedLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getUncanonicalizedLocales')]
     public function testValidLocalesWithCanonicalization(string $locale)
     {
         $constraint = new Locale([
@@ -120,9 +114,7 @@ class LocaleValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocales')]
     public function testValidLocalesWithoutCanonicalization(string $locale)
     {
         $constraint = new Locale([
@@ -135,9 +127,7 @@ class LocaleValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getUncanonicalizedLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getUncanonicalizedLocales')]
     public function testInvalidLocalesWithoutCanonicalization(string $locale)
     {
         $constraint = new Locale([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LuhnValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LuhnValidatorTest.php
index b0571eb..85d24c0 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/LuhnValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/LuhnValidatorTest.php
@@ -37,9 +37,7 @@ class LuhnValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidNumbers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidNumbers')]
     public function testValidNumbers($number)
     {
         $this->validator->validate($number, new Luhn());
@@ -71,9 +69,7 @@ class LuhnValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidNumbers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidNumbers')]
     public function testInvalidNumbers($number, $code)
     {
         $constraint = new Luhn([
@@ -99,9 +95,7 @@ class LuhnValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidTypes')]
     public function testInvalidTypes($number)
     {
         $this->expectException(UnexpectedValueException::class);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/NoSuspiciousCharactersValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/NoSuspiciousCharactersValidatorTest.php
index d15e416..e4a0eba 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/NoSuspiciousCharactersValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/NoSuspiciousCharactersValidatorTest.php
@@ -16,10 +16,9 @@ use Symfony\Component\Validator\Constraints\NoSuspiciousCharactersValidator;
 use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
 
 /**
- * @requires extension intl
- *
  * @extends ConstraintValidatorTestCase<NoSuspiciousCharactersValidator>
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
 class NoSuspiciousCharactersValidatorTest extends ConstraintValidatorTestCase
 {
     protected function createValidator(): NoSuspiciousCharactersValidator
@@ -27,9 +26,7 @@ class NoSuspiciousCharactersValidatorTest extends ConstraintValidatorTestCase
         return new NoSuspiciousCharactersValidator();
     }
 
-    /**
-     * @dataProvider provideNonSuspiciousStrings
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNonSuspiciousStrings')]
     public function testNonSuspiciousStrings(string $string, array $options = [])
     {
         $this->validator->validate($string, new NoSuspiciousCharacters($options));
@@ -53,9 +50,7 @@ class NoSuspiciousCharactersValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideSuspiciousStrings
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSuspiciousStrings')]
     public function testSuspiciousStrings(string $string, array $options, array $errors)
     {
         $this->validator->validate($string, new NoSuspiciousCharacters($options));
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php
index 8d1ba3d..f5c587f 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php
@@ -22,9 +22,7 @@ class NotBlankValidatorTest extends ConstraintValidatorTestCase
         return new NotBlankValidator();
     }
 
-    /**
-     * @dataProvider getValidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValues')]
     public function testValidValues($value)
     {
         $this->validator->validate($value, new NotBlank());
@@ -125,9 +123,7 @@ class NotBlankValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getWhitespaces
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getWhitespaces')]
     public function testNormalizedStringIsInvalid($value)
     {
         $constraint = new NotBlank([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/NotCompromisedPasswordValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/NotCompromisedPasswordValidatorTest.php
index 2535294..5c23014 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/NotCompromisedPasswordValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/NotCompromisedPasswordValidatorTest.php
@@ -95,9 +95,7 @@ class NotCompromisedPasswordValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider provideConstraintsWithThreshold
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstraintsWithThreshold')]
     public function testThresholdNotReached(NotCompromisedPassword $constraint)
     {
         $this->validator->validate(self::PASSWORD_LEAKED, $constraint);
@@ -208,9 +206,7 @@ class NotCompromisedPasswordValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate(self::PASSWORD_TRIGGERING_AN_ERROR, new NotCompromisedPassword());
     }
 
-    /**
-     * @dataProvider provideErrorSkippingConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideErrorSkippingConstraints')]
     public function testApiErrorSkipped(NotCompromisedPassword $constraint)
     {
         $this->validator->validate(self::PASSWORD_TRIGGERING_AN_ERROR, $constraint);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/NotNullValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/NotNullValidatorTest.php
index 82156e3..c411c7c 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/NotNullValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/NotNullValidatorTest.php
@@ -22,9 +22,7 @@ class NotNullValidatorTest extends ConstraintValidatorTestCase
         return new NotNullValidator();
     }
 
-    /**
-     * @dataProvider getValidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValues')]
     public function testValidValues($value)
     {
         $this->validator->validate($value, new NotNull());
@@ -42,9 +40,7 @@ class NotNullValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideInvalidConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidConstraints')]
     public function testNullIsInvalid(NotNull $constraint)
     {
         $this->validator->validate(null, $constraint);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/PasswordStrengthValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/PasswordStrengthValidatorTest.php
index 21dabca..435e188 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/PasswordStrengthValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/PasswordStrengthValidatorTest.php
@@ -22,9 +22,7 @@ class PasswordStrengthValidatorTest extends ConstraintValidatorTestCase
         return new PasswordStrengthValidator();
     }
 
-    /**
-     * @dataProvider getValidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValues')]
     public function testValidValues(string $value, int $expectedStrength)
     {
         $this->validator->validate($value, new PasswordStrength(minScore: $expectedStrength));
@@ -50,9 +48,7 @@ class PasswordStrengthValidatorTest extends ConstraintValidatorTestCase
         yield ['pudding-smack-👌🏼-fox-😎', PasswordStrength::STRENGTH_VERY_STRONG];
     }
 
-    /**
-     * @dataProvider provideInvalidConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidConstraints')]
     public function testThePasswordIsWeak(PasswordStrength $constraint, string $password, string $expectedMessage, string $expectedCode, array $parameters = [])
     {
         $this->validator->validate($password, $constraint);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php
index 1e57443..25d2837 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php
@@ -69,9 +69,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getTenToTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenToTwenty')]
     public function testValidValuesMin($value)
     {
         $constraint = new Range(['min' => 10]);
@@ -80,9 +78,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getTenToTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenToTwenty')]
     public function testValidValuesMinNamed($value)
     {
         $constraint = new Range(min: 10);
@@ -91,9 +87,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getTenToTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenToTwenty')]
     public function testValidValuesMax($value)
     {
         $constraint = new Range(['max' => 20]);
@@ -102,9 +96,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getTenToTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenToTwenty')]
     public function testValidValuesMaxNamed($value)
     {
         $constraint = new Range(max: 20);
@@ -113,9 +105,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getTenToTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenToTwenty')]
     public function testValidValuesMinMax($value)
     {
         $constraint = new Range(['min' => 10, 'max' => 20]);
@@ -124,9 +114,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getTenToTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenToTwenty')]
     public function testValidValuesMinMaxNamed($value)
     {
         $constraint = new Range(min: 10, max: 20);
@@ -135,9 +123,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getLessThanTen
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLessThanTen')]
     public function testInvalidValuesMin($value, $formattedValue)
     {
         $constraint = new Range([
@@ -154,9 +140,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getLessThanTen
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLessThanTen')]
     public function testInvalidValuesMinNamed($value, $formattedValue)
     {
         $constraint = new Range(min: 10, minMessage: 'myMessage');
@@ -170,9 +154,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getMoreThanTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getMoreThanTwenty')]
     public function testInvalidValuesMax($value, $formattedValue)
     {
         $constraint = new Range([
@@ -189,9 +171,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getMoreThanTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getMoreThanTwenty')]
     public function testInvalidValuesMaxNamed($value, $formattedValue)
     {
         $constraint = new Range(max: 20, maxMessage: 'myMessage');
@@ -205,9 +185,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getMoreThanTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getMoreThanTwenty')]
     public function testInvalidValuesCombinedMax($value, $formattedValue)
     {
         $constraint = new Range([
@@ -226,9 +204,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getMoreThanTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getMoreThanTwenty')]
     public function testInvalidValuesCombinedMaxNamed($value, $formattedValue)
     {
         $constraint = new Range(min: 10, max: 20, notInRangeMessage: 'myNotInRangeMessage');
@@ -243,9 +219,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getLessThanTen
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLessThanTen')]
     public function testInvalidValuesCombinedMin($value, $formattedValue)
     {
         $constraint = new Range([
@@ -264,9 +238,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getLessThanTen
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLessThanTen')]
     public function testInvalidValuesCombinedMinNamed($value, $formattedValue)
     {
         $constraint = new Range(min: 10, max: 20, notInRangeMessage: 'myNotInRangeMessage');
@@ -340,9 +312,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         return $tests;
     }
 
-    /**
-     * @dataProvider getTenthToTwentiethMarch2014
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenthToTwentiethMarch2014')]
     public function testValidDatesMin($value)
     {
         $constraint = new Range(['min' => 'March 10, 2014']);
@@ -351,9 +321,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getTenthToTwentiethMarch2014
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenthToTwentiethMarch2014')]
     public function testValidDatesMax($value)
     {
         $constraint = new Range(['max' => 'March 20, 2014']);
@@ -362,9 +330,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getTenthToTwentiethMarch2014
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenthToTwentiethMarch2014')]
     public function testValidDatesMinMax($value)
     {
         $constraint = new Range(['min' => 'March 10, 2014', 'max' => 'March 20, 2014']);
@@ -373,9 +339,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getSoonerThanTenthMarch2014
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getSoonerThanTenthMarch2014')]
     public function testInvalidDatesMin(\DateTimeInterface $value, string $dateTimeAsString)
     {
         // Conversion of dates to string differs between ICU versions
@@ -396,9 +360,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getLaterThanTwentiethMarch2014
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLaterThanTwentiethMarch2014')]
     public function testInvalidDatesMax(\DateTimeInterface $value, string $dateTimeAsString)
     {
         // Conversion of dates to string differs between ICU versions
@@ -419,9 +381,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getLaterThanTwentiethMarch2014
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLaterThanTwentiethMarch2014')]
     public function testInvalidDatesCombinedMax(\DateTimeInterface $value, string $dateTimeAsString)
     {
         // Conversion of dates to string differs between ICU versions
@@ -444,9 +404,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getSoonerThanTenthMarch2014
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getSoonerThanTenthMarch2014')]
     public function testInvalidDatesCombinedMin($value, $dateTimeAsString)
     {
         // Conversion of dates to string differs between ICU versions
@@ -583,9 +541,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testThrowsOnInvalidStringDates($expectedMessage, $value, $min, $max)
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -620,9 +576,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getTenToTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenToTwenty')]
     public function testValidValuesMinPropertyPath($value)
     {
         $this->setObject(new Limit(10));
@@ -634,9 +588,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getTenToTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenToTwenty')]
     public function testValidValuesMinPropertyPathNamed($value)
     {
         $this->setObject(new Limit(10));
@@ -646,9 +598,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getTenToTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenToTwenty')]
     public function testValidValuesMaxPropertyPath($value)
     {
         $this->setObject(new Limit(20));
@@ -660,9 +610,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getTenToTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenToTwenty')]
     public function testValidValuesMaxPropertyPathNamed($value)
     {
         $this->setObject(new Limit(20));
@@ -672,9 +620,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getTenToTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenToTwenty')]
     public function testValidValuesMinMaxPropertyPath($value)
     {
         $this->setObject(new MinMax(10, 20));
@@ -687,9 +633,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getLessThanTen
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLessThanTen')]
     public function testInvalidValuesMinPropertyPath($value, $formattedValue)
     {
         $this->setObject(new Limit(10));
@@ -709,9 +653,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getMoreThanTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getMoreThanTwenty')]
     public function testInvalidValuesMaxPropertyPath($value, $formattedValue)
     {
         $this->setObject(new Limit(20));
@@ -731,9 +673,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getMoreThanTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getMoreThanTwenty')]
     public function testInvalidValuesCombinedMaxPropertyPath($value, $formattedValue)
     {
         $this->setObject(new MinMax(10, 20));
@@ -756,9 +696,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getMoreThanTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getMoreThanTwenty')]
     public function testInvalidValuesCombinedMaxPropertyPathNamed($value, $formattedValue)
     {
         $this->setObject(new MinMax(10, 20));
@@ -781,9 +719,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getLessThanTen
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLessThanTen')]
     public function testInvalidValuesCombinedMinPropertyPath($value, $formattedValue)
     {
         $this->setObject(new MinMax(10, 20));
@@ -806,9 +742,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getLessThanTen
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLessThanTen')]
     public function testInvalidValuesCombinedMinPropertyPathNamed($value, $formattedValue)
     {
         $this->setObject(new MinMax(10, 20));
@@ -831,9 +765,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getLessThanTen
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLessThanTen')]
     public function testViolationOnNullObjectWithDefinedMin($value, $formattedValue)
     {
         $this->setObject(null);
@@ -852,9 +784,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getMoreThanTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getMoreThanTwenty')]
     public function testViolationOnNullObjectWithDefinedMax($value, $formattedValue)
     {
         $this->setObject(null);
@@ -873,9 +803,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getTenthToTwentiethMarch2014
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenthToTwentiethMarch2014')]
     public function testValidDatesMinPropertyPath($value)
     {
         $this->setObject(new Limit('March 10, 2014'));
@@ -885,9 +813,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getTenthToTwentiethMarch2014
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenthToTwentiethMarch2014')]
     public function testValidDatesMaxPropertyPath($value)
     {
         $this->setObject(new Limit('March 20, 2014'));
@@ -898,9 +824,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getTenthToTwentiethMarch2014
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenthToTwentiethMarch2014')]
     public function testValidDatesMinMaxPropertyPath($value)
     {
         $this->setObject(new MinMax('March 10, 2014', 'March 20, 2014'));
@@ -911,9 +835,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getSoonerThanTenthMarch2014
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getSoonerThanTenthMarch2014')]
     public function testInvalidDatesMinPropertyPath($value, $dateTimeAsString)
     {
         // Conversion of dates to string differs between ICU versions
@@ -937,9 +859,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getLaterThanTwentiethMarch2014
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLaterThanTwentiethMarch2014')]
     public function testInvalidDatesMaxPropertyPath($value, $dateTimeAsString)
     {
         // Conversion of dates to string differs between ICU versions
@@ -963,9 +883,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getLaterThanTwentiethMarch2014
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLaterThanTwentiethMarch2014')]
     public function testInvalidDatesCombinedMaxPropertyPath($value, $dateTimeAsString)
     {
         // Conversion of dates to string differs between ICU versions
@@ -992,9 +910,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getSoonerThanTenthMarch2014
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getSoonerThanTenthMarch2014')]
     public function testInvalidDatesCombinedMinPropertyPath($value, $dateTimeAsString)
     {
         // Conversion of dates to string differs between ICU versions
@@ -1063,9 +979,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideMessageIfMinAndMaxSet
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMessageIfMinAndMaxSet')]
     public function testMessageIfMinAndMaxSet(array $constraintExtraOptions, int $value, string $expectedMessage, string $expectedCode)
     {
         $constraint = new Range(array_merge(['min' => 1, 'max' => 10], $constraintExtraOptions));
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/RegexTest.php b/src/Symfony/Component/Validator/Tests/Constraints/RegexTest.php
index 4df86e4..ccea83c 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/RegexTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/RegexTest.php
@@ -65,9 +65,7 @@ class RegexTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideHtmlPatterns
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideHtmlPatterns')]
     public function testGetHtmlPattern($pattern, $htmlPattern, $match = true)
     {
         $constraint = new Regex([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php
index 82739f0..2fa2638 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php
@@ -43,9 +43,7 @@ class RegexValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate(new \stdClass(), new Regex(['pattern' => '/^[0-9]+$/']));
     }
 
-    /**
-     * @dataProvider getValidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValues')]
     public function testValidValues($value)
     {
         $constraint = new Regex(['pattern' => '/^[0-9]+$/']);
@@ -54,9 +52,7 @@ class RegexValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidValuesWithWhitespaces
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValuesWithWhitespaces')]
     public function testValidValuesWithWhitespaces($value)
     {
         $constraint = new Regex(['pattern' => '/^[0-9]+$/', 'normalizer' => 'trim']);
@@ -65,9 +61,7 @@ class RegexValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidValuesWithWhitespaces
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValuesWithWhitespaces')]
     public function testValidValuesWithWhitespacesNamed($value)
     {
         $constraint = new Regex(pattern: '/^[0-9]+$/', normalizer: 'trim');
@@ -104,9 +98,7 @@ class RegexValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidValues')]
     public function testInvalidValues($value)
     {
         $constraint = new Regex([
@@ -123,9 +115,7 @@ class RegexValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getInvalidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidValues')]
     public function testInvalidValuesNamed($value)
     {
         $constraint = new Regex(pattern: '/^[0-9]+$/', message: 'myMessage');
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php
index 5d9027a..761ee78 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php
@@ -50,9 +50,7 @@ class TimeValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate(new \stdClass(), new Time());
     }
 
-    /**
-     * @dataProvider getValidTimes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidTimes')]
     public function testValidTimes($time)
     {
         $this->validator->validate($time, new Time());
@@ -60,9 +58,7 @@ class TimeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidTimes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidTimes')]
     public function testValidTimesWithNewLine(string $time)
     {
         $this->validator->validate($time."\n", new Time());
@@ -82,9 +78,7 @@ class TimeValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidTimesWithoutSeconds
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidTimesWithoutSeconds')]
     public function testValidTimesWithoutSeconds(string $time)
     {
         $this->validator->validate($time, new Time([
@@ -94,9 +88,7 @@ class TimeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidTimesWithoutSeconds
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidTimesWithoutSeconds')]
     public function testValidTimesWithoutSecondsWithNewLine(string $time)
     {
         $this->validator->validate($time."\n", new Time(withSeconds: false));
@@ -116,9 +108,7 @@ class TimeValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidTimesWithoutSeconds
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidTimesWithoutSeconds')]
     public function testInvalidTimesWithoutSeconds(string $time)
     {
         $this->validator->validate($time, $constraint = new Time());
@@ -138,9 +128,7 @@ class TimeValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidTimes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidTimes')]
     public function testInvalidTimes($time, $code)
     {
         $constraint = new Time([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/TimezoneTest.php b/src/Symfony/Component/Validator/Tests/Constraints/TimezoneTest.php
index 42a38a7..49be2df 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/TimezoneTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/TimezoneTest.php
@@ -22,6 +22,7 @@ use Symfony\Component\Validator\Mapping\Loader\AttributeLoader;
  */
 class TimezoneTest extends TestCase
 {
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testValidTimezoneConstraints()
     {
         new Timezone();
@@ -50,9 +51,7 @@ class TimezoneTest extends TestCase
         new Timezone(['countryCode' => 'AR']);
     }
 
-    /**
-     * @dataProvider provideInvalidZones
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidZones')]
     public function testExceptionForInvalidGroupedTimezones(int $zone)
     {
         $this->expectException(ConstraintDefinitionException::class);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/TimezoneValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/TimezoneValidatorTest.php
index c4127c9..daf99db 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/TimezoneValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/TimezoneValidatorTest.php
@@ -47,9 +47,7 @@ class TimezoneValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate(new \stdClass(), new Timezone());
     }
 
-    /**
-     * @dataProvider getValidTimezones
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidTimezones')]
     public function testValidTimezones(string $timezone)
     {
         $this->validator->validate($timezone, new Timezone());
@@ -87,9 +85,7 @@ class TimezoneValidatorTest extends ConstraintValidatorTestCase
         yield ['Pacific/Noumea'];
     }
 
-    /**
-     * @dataProvider getValidGroupedTimezones
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidGroupedTimezones')]
     public function testValidGroupedTimezones(string $timezone, int $zone)
     {
         $constraint = new Timezone([
@@ -120,9 +116,7 @@ class TimezoneValidatorTest extends ConstraintValidatorTestCase
         yield ['Atlantic/Azores', \DateTimeZone::ATLANTIC | \DateTimeZone::ASIA];
     }
 
-    /**
-     * @dataProvider getInvalidTimezones
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidTimezones')]
     public function testInvalidTimezoneWithoutZone(string $timezone)
     {
         $constraint = new Timezone([
@@ -145,9 +139,7 @@ class TimezoneValidatorTest extends ConstraintValidatorTestCase
         yield ['foobar'];
     }
 
-    /**
-     * @dataProvider getInvalidGroupedTimezones
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidGroupedTimezones')]
     public function testInvalidGroupedTimezones(string $timezone, int $zone)
     {
         $constraint = new Timezone([
@@ -188,9 +180,7 @@ class TimezoneValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidGroupedTimezonesByCountry
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidGroupedTimezonesByCountry')]
     public function testValidGroupedTimezonesByCountry(string $timezone, string $country)
     {
         $constraint = new Timezone([
@@ -225,9 +215,7 @@ class TimezoneValidatorTest extends ConstraintValidatorTestCase
         yield ['Pacific/Kiritimati', 'KI'];
     }
 
-    /**
-     * @dataProvider getInvalidGroupedTimezonesByCountry
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidGroupedTimezonesByCountry')]
     public function testInvalidGroupedTimezonesByCountry(string $timezone, string $countryCode)
     {
         $constraint = new Timezone([
@@ -269,9 +257,7 @@ class TimezoneValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getDeprecatedTimezones
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDeprecatedTimezones')]
     public function testDeprecatedTimezonesAreValidWithBC(string $timezone)
     {
         // Skip test if the timezone is not available in the current timezone database
@@ -286,9 +272,7 @@ class TimezoneValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getDeprecatedTimezones
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDeprecatedTimezones')]
     public function testDeprecatedTimezonesAreInvalidWithoutBC(string $timezone)
     {
         $constraint = new Timezone([
@@ -321,9 +305,7 @@ class TimezoneValidatorTest extends ConstraintValidatorTestCase
         yield ['US/Pacific'];
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testIntlCompatibility()
     {
         $reflector = new \ReflectionExtension('intl');
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/TypeValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/TypeValidatorTest.php
index 8b4fe25..706dab2 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/TypeValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/TypeValidatorTest.php
@@ -58,9 +58,7 @@ class TypeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValues')]
     public function testValidValues($value, $type)
     {
         $constraint = new Type(['type' => $type]);
@@ -114,9 +112,7 @@ class TypeValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidValues')]
     public function testInvalidValues($value, $type, $valueAsString)
     {
         $constraint = new Type([
@@ -180,9 +176,7 @@ class TypeValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidValuesMultipleTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValuesMultipleTypes')]
     public function testValidValuesMultipleTypes($value, array $types)
     {
         $constraint = new Type(['type' => $types]);
@@ -200,9 +194,7 @@ class TypeValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideConstraintsWithMultipleTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstraintsWithMultipleTypes')]
     public function testInvalidValuesMultipleTypes(Type $constraint)
     {
         $this->validator->validate('12345', $constraint);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/UlidValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/UlidValidatorTest.php
index abe5490..7283e00 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/UlidValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/UlidValidatorTest.php
@@ -53,9 +53,7 @@ class UlidValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getInvalidUlids
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidUlids')]
     public function testInvalidUlid(string $ulid, string $code)
     {
         $constraint = new Ulid([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/UniqueValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/UniqueValidatorTest.php
index 8fe05ad..ecde5ca 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/UniqueValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/UniqueValidatorTest.php
@@ -31,9 +31,7 @@ class UniqueValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate('', new Unique());
     }
 
-    /**
-     * @dataProvider getValidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValues')]
     public function testValidValues($value)
     {
         $this->validator->validate($value, new Unique());
@@ -58,9 +56,7 @@ class UniqueValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidValues')]
     public function testInvalidValues($value, $expectedMessageParam)
     {
         $constraint = new Unique([
@@ -99,9 +95,7 @@ class UniqueValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getCallback
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getCallback')]
     public function testExpectsUniqueObjects($callback)
     {
         $object1 = new \stdClass();
@@ -125,9 +119,7 @@ class UniqueValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getCallback
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getCallback')]
     public function testExpectsNonUniqueObjects($callback)
     {
         $object1 = new \stdClass();
@@ -223,9 +215,7 @@ class UniqueValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getInvalidFieldNames
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidFieldNames')]
     public function testCollectionFieldNamesMustBeString(string $type, mixed $field)
     {
         $this->expectException(UnexpectedTypeException::class);
@@ -243,9 +233,7 @@ class UniqueValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidCollectionValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidCollectionValues')]
     public function testInvalidCollectionValues(array $value, array $fields, string $expectedMessageParam)
     {
         $this->validator->validate($value, new Unique([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php
index 27866b0..5aef8fc 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php
@@ -50,9 +50,7 @@ class UrlValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate(new \stdClass(), new Url());
     }
 
-    /**
-     * @dataProvider getValidUrls
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUrls')]
     public function testValidUrls($url)
     {
         $this->validator->validate($url, new Url());
@@ -60,9 +58,7 @@ class UrlValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidUrls
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUrls')]
     public function testValidUrlsWithNewLine($url)
     {
         $this->validator->validate($url."\n", new Url());
@@ -73,9 +69,7 @@ class UrlValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidUrlsWithWhitespaces
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUrlsWithWhitespaces')]
     public function testValidUrlsWithWhitespaces($url)
     {
         $this->validator->validate($url, new Url(['normalizer' => 'trim']));
@@ -83,10 +77,8 @@ class UrlValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidRelativeUrls
-     * @dataProvider getValidUrls
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidRelativeUrls')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUrls')]
     public function testValidRelativeUrl($url)
     {
         $constraint = new Url([
@@ -98,10 +90,8 @@ class UrlValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidRelativeUrls
-     * @dataProvider getValidUrls
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidRelativeUrls')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUrls')]
     public function testValidRelativeUrlWithNewLine(string $url)
     {
         $constraint = new Url([
@@ -224,9 +214,7 @@ class UrlValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidUrls
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidUrls')]
     public function testInvalidUrls($url)
     {
         $constraint = new Url([
@@ -241,10 +229,8 @@ class UrlValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getInvalidRelativeUrls
-     * @dataProvider getInvalidUrls
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidRelativeUrls')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidUrls')]
     public function testInvalidRelativeUrl($url)
     {
         $constraint = new Url([
@@ -324,9 +310,7 @@ class UrlValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidCustomUrls
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidCustomUrls')]
     public function testCustomProtocolIsValid($url)
     {
         $constraint = new Url([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php
index da78e4c..494203a 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php
@@ -56,9 +56,7 @@ class UuidValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate(new \stdClass(), new Uuid());
     }
 
-    /**
-     * @dataProvider getValidStrictUuids
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidStrictUuids')]
     public function testValidStrictUuids($uuid, $versions = null)
     {
         $constraint = new Uuid();
@@ -87,9 +85,7 @@ class UuidValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidStrictUuidsWithWhitespaces
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidStrictUuidsWithWhitespaces')]
     public function testValidStrictUuidsWithWhitespaces($uuid, $versions = null)
     {
         $constraint = new Uuid(['normalizer' => 'trim']);
@@ -125,9 +121,7 @@ class UuidValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getInvalidStrictUuids
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidStrictUuids')]
     public function testInvalidStrictUuids($uuid, $code, $versions = null)
     {
         $constraint = new Uuid([
@@ -189,9 +183,7 @@ class UuidValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidNonStrictUuids
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidNonStrictUuids')]
     public function testValidNonStrictUuids($uuid)
     {
         $constraint = new Uuid([
@@ -220,9 +212,7 @@ class UuidValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidNonStrictUuids
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidNonStrictUuids')]
     public function testInvalidNonStrictUuids($uuid, $code)
     {
         $constraint = new Uuid([
@@ -264,9 +254,7 @@ class UuidValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getUuidForTimeBasedAssertions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getUuidForTimeBasedAssertions')]
     public function testTimeBasedUuid(string $uid, bool $expectedTimeBased)
     {
         $constraint = new Uuid([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/WhenTest.php b/src/Symfony/Component/Validator/Tests/Constraints/WhenTest.php
index 72b08d6..bf5b837 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/WhenTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/WhenTest.php
@@ -54,9 +54,7 @@ final class WhenTest extends TestCase
         ]);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testAnnotations()
     {
         $loader = new AnnotationLoader(new AnnotationReader());
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/WhenValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/WhenValidatorTest.php
index cba81b2..99a7903 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/WhenValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/WhenValidatorTest.php
@@ -64,6 +64,7 @@ final class WhenValidatorTest extends ConstraintValidatorTestCase
         ]));
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testConstraintsAreExecutedWithObject()
     {
         $number = new \stdClass();
diff --git a/src/Symfony/Component/Validator/Tests/DependencyInjection/AddAutoMappingConfigurationPassTest.php b/src/Symfony/Component/Validator/Tests/DependencyInjection/AddAutoMappingConfigurationPassTest.php
index 9a68179..1c6ae5a 100644
--- a/src/Symfony/Component/Validator/Tests/DependencyInjection/AddAutoMappingConfigurationPassTest.php
+++ b/src/Symfony/Component/Validator/Tests/DependencyInjection/AddAutoMappingConfigurationPassTest.php
@@ -36,9 +36,7 @@ class AddAutoMappingConfigurationPassTest extends TestCase
         $this->assertCount(1, $container->getDefinitions());
     }
 
-    /**
-     * @dataProvider mappingProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('mappingProvider')]
     public function testProcess(string $namespace, array $services, string $expectedRegexp)
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderWithHybridAnnotationsTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderWithHybridAnnotationsTest.php
index 453e7b6..ca4283c 100644
--- a/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderWithHybridAnnotationsTest.php
+++ b/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderWithHybridAnnotationsTest.php
@@ -17,13 +17,12 @@ use Symfony\Component\Validator\Constraints\NotBlank;
 use Symfony\Component\Validator\Mapping\ClassMetadata;
 use Symfony\Component\Validator\Mapping\Loader\AnnotationLoader;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class AnnotationLoaderWithHybridAnnotationsTest extends AttributeLoaderTest
 {
     use ExpectDeprecationTrait;
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadClassMetadataReturnsTrueIfSuccessful()
     {
         $this->expectDeprecation('Since symfony/validator 6.4: Class "Symfony\Component\Validator\Tests\Fixtures\Attribute\Entity" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.');
@@ -32,6 +31,7 @@ class AnnotationLoaderWithHybridAnnotationsTest extends AttributeLoaderTest
         parent::testLoadClassMetadataReturnsTrueIfSuccessful();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadClassMetadata()
     {
         $this->expectDeprecation('Since symfony/validator 6.4: Class "Symfony\Component\Validator\Tests\Fixtures\Attribute\Entity" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.');
@@ -40,6 +40,7 @@ class AnnotationLoaderWithHybridAnnotationsTest extends AttributeLoaderTest
         parent::testLoadClassMetadata();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadClassMetadataAndMerge()
     {
         $this->expectDeprecation('Since symfony/validator 6.4: Class "Symfony\Component\Validator\Tests\Fixtures\Attribute\Entity" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.');
diff --git a/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderWithLegacyAnnotationsTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderWithLegacyAnnotationsTest.php
index 86d6d8b..30e2414 100644
--- a/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderWithLegacyAnnotationsTest.php
+++ b/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderWithLegacyAnnotationsTest.php
@@ -15,13 +15,12 @@ use Doctrine\Common\Annotations\AnnotationReader;
 use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
 use Symfony\Component\Validator\Mapping\Loader\AnnotationLoader;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class AnnotationLoaderWithLegacyAnnotationsTest extends AttributeLoaderTest
 {
     use ExpectDeprecationTrait;
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadClassMetadataReturnsTrueIfSuccessful()
     {
         $this->expectDeprecation('Since symfony/validator 6.4: Class "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.');
@@ -37,6 +36,7 @@ class AnnotationLoaderWithLegacyAnnotationsTest extends AttributeLoaderTest
         parent::testLoadClassMetadataReturnsTrueIfSuccessful();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadClassMetadata()
     {
         $this->expectDeprecation('Since symfony/validator 6.4: Class "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.');
@@ -52,6 +52,7 @@ class AnnotationLoaderWithLegacyAnnotationsTest extends AttributeLoaderTest
         parent::testLoadClassMetadata();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadParentClassMetadata()
     {
         $this->expectDeprecation('Since symfony/validator 6.4: Property "Symfony\Component\Validator\Tests\Fixtures\Annotation\EntityParent::$other" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.');
@@ -59,6 +60,7 @@ class AnnotationLoaderWithLegacyAnnotationsTest extends AttributeLoaderTest
         parent::testLoadParentClassMetadata();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadClassMetadataAndMerge()
     {
         $this->expectDeprecation('Since symfony/validator 6.4: Property "Symfony\Component\Validator\Tests\Fixtures\Annotation\EntityParent::$other" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.');
@@ -75,6 +77,7 @@ class AnnotationLoaderWithLegacyAnnotationsTest extends AttributeLoaderTest
         parent::testLoadClassMetadataAndMerge();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadGroupSequenceProviderAnnotation()
     {
         $this->expectDeprecation('Since symfony/validator 6.4: Class "Symfony\Component\Validator\Tests\Fixtures\Annotation\GroupSequenceProviderEntity" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.');
diff --git a/src/Symfony/Component/Validator/Tests/Mapping/Loader/PropertyInfoLoaderTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Loader/PropertyInfoLoaderTest.php
index 4b10dfd..cc1a683 100644
--- a/src/Symfony/Component/Validator/Tests/Mapping/Loader/PropertyInfoLoaderTest.php
+++ b/src/Symfony/Component/Validator/Tests/Mapping/Loader/PropertyInfoLoaderTest.php
@@ -33,9 +33,7 @@ use Symfony\Component\Validator\Validation;
  */
 class PropertyInfoLoaderTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testLoadClassMetadata()
     {
         $propertyInfoStub = $this->createMock(PropertyInfoExtractorInterface::class);
@@ -188,9 +186,7 @@ class PropertyInfoLoaderTest extends TestCase
         $this->assertCount(0, $noAutoMappingConstraints, 'DisableAutoMapping constraint is not added in the list');
     }
 
-    /**
-     * @dataProvider regexpProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('regexpProvider')]
     public function testClassValidator(bool $expected, ?string $classValidatorRegexp = null)
     {
         $propertyInfoStub = $this->createMock(PropertyInfoExtractorInterface::class);
diff --git a/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php
index e34e546..c0e9cc1 100644
--- a/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php
+++ b/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php
@@ -45,9 +45,7 @@ class YamlFileLoaderTest extends TestCase
         $this->assertSame([], $r->getValue($loader));
     }
 
-    /**
-     * @dataProvider provideInvalidYamlFiles
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidYamlFiles')]
     public function testInvalidYamlFiles($path)
     {
         $this->expectException(\InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Validator/Tests/Resources/TranslationFilesTest.php b/src/Symfony/Component/Validator/Tests/Resources/TranslationFilesTest.php
index 326ed4f..8a0f2f0 100644
--- a/src/Symfony/Component/Validator/Tests/Resources/TranslationFilesTest.php
+++ b/src/Symfony/Component/Validator/Tests/Resources/TranslationFilesTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Translation\Util\XliffUtils;
 
 class TranslationFilesTest extends TestCase
 {
-    /**
-     * @dataProvider provideTranslationFiles
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTranslationFiles')]
     public function testTranslationFileIsValid($filePath)
     {
         $document = new \DOMDocument();
@@ -29,9 +27,7 @@ class TranslationFilesTest extends TestCase
         $this->assertCount(0, $errors, \sprintf('"%s" is invalid:%s', $filePath, \PHP_EOL.implode(\PHP_EOL, array_column($errors, 'message'))));
     }
 
-    /**
-     * @dataProvider provideTranslationFiles
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTranslationFiles')]
     public function testTranslationFileIsValidWithoutEntityLoader($filePath)
     {
         $document = new \DOMDocument();
diff --git a/src/Symfony/Component/Validator/Tests/Util/PropertyPathTest.php b/src/Symfony/Component/Validator/Tests/Util/PropertyPathTest.php
index f7f33d4..ba57dbd 100644
--- a/src/Symfony/Component/Validator/Tests/Util/PropertyPathTest.php
+++ b/src/Symfony/Component/Validator/Tests/Util/PropertyPathTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Validator\Util\PropertyPath;
 
 class PropertyPathTest extends TestCase
 {
-    /**
-     * @dataProvider provideAppendPaths
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAppendPaths')]
     public function testAppend($basePath, $subPath, $expectedPath, $message)
     {
         $this->assertSame($expectedPath, PropertyPath::append($basePath, $subPath), $message);
diff --git a/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php b/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php
index e02023a..d91ee79 100644
--- a/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php
@@ -540,9 +540,7 @@ class RecursiveValidatorTest extends TestCase
         $this->validate($entity);
     }
 
-    /**
-     * @dataProvider getConstraintMethods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConstraintMethods')]
     public function testArrayReference($constraintMethod)
     {
         $entity = new Entity();
@@ -581,9 +579,7 @@ class RecursiveValidatorTest extends TestCase
         $this->assertNull($violations[0]->getCode());
     }
 
-    /**
-     * @dataProvider getConstraintMethods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConstraintMethods')]
     public function testRecursiveArrayReference($constraintMethod)
     {
         $entity = new Entity();
@@ -646,9 +642,7 @@ class RecursiveValidatorTest extends TestCase
         $this->assertCount(0, $violations);
     }
 
-    /**
-     * @dataProvider getConstraintMethods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConstraintMethods')]
     public function testArrayTraversalCannotBeDisabled($constraintMethod)
     {
         $entity = new Entity();
@@ -669,9 +663,7 @@ class RecursiveValidatorTest extends TestCase
         $this->assertCount(1, $violations);
     }
 
-    /**
-     * @dataProvider getConstraintMethods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConstraintMethods')]
     public function testRecursiveArrayTraversalCannotBeDisabled($constraintMethod)
     {
         $entity = new Entity();
@@ -693,9 +685,7 @@ class RecursiveValidatorTest extends TestCase
         $this->assertCount(1, $violations);
     }
 
-    /**
-     * @dataProvider getConstraintMethods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConstraintMethods')]
     public function testIgnoreScalarsDuringArrayTraversal($constraintMethod)
     {
         $entity = new Entity();
@@ -709,9 +699,7 @@ class RecursiveValidatorTest extends TestCase
         $this->assertCount(0, $violations);
     }
 
-    /**
-     * @dataProvider getConstraintMethods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConstraintMethods')]
     public function testIgnoreNullDuringArrayTraversal($constraintMethod)
     {
         $entity = new Entity();
@@ -1226,9 +1214,7 @@ class RecursiveValidatorTest extends TestCase
         $this->assertSame('Violation in other group', $violations[0]->getMessage());
     }
 
-    /**
-     * @dataProvider getTestReplaceDefaultGroup
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTestReplaceDefaultGroup')]
     public function testReplaceDefaultGroup($sequence, array $assertViolations)
     {
         $entity = new GroupSequenceProviderEntity($sequence);
diff --git a/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php b/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php
index 94b5c97..75b6fc0 100644
--- a/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php
+++ b/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php
@@ -76,9 +76,7 @@ class ValidatorBuilderTest extends TestCase
         $this->assertSame($this->builder, $this->builder->addMethodMappings([]));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testEnableAnnotationMappingWithDefaultDoctrineAnnotationReader()
     {
         $this->expectDeprecation('Since symfony/validator 6.4: Method "Symfony\Component\Validator\ValidatorBuilder::enableAnnotationMapping()" is deprecated, use "enableAttributeMapping()" instead.');
@@ -96,9 +94,7 @@ class ValidatorBuilderTest extends TestCase
         $this->assertInstanceOf(PsrCachedReader::class, $r->getValue($loaders[0]));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testEnableAnnotationMappingWithCustomDoctrineAnnotationReader()
     {
         $reader = $this->createMock(Reader::class);
@@ -118,18 +114,14 @@ class ValidatorBuilderTest extends TestCase
         $this->assertSame($reader, $r->getValue($loaders[0]));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExpectDeprecationWhenEnablingAnnotationMapping()
     {
         $this->expectDeprecation('Since symfony/validator 6.4: Method "Symfony\Component\Validator\ValidatorBuilder::enableAnnotationMapping()" is deprecated, use "enableAttributeMapping()" instead.');
         $this->assertSame($this->builder, $this->builder->enableAnnotationMapping());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExpectDeprecationWhenDisablingAnnotationMapping()
     {
         $this->expectDeprecation('Since symfony/validator 6.4: Method "Symfony\Component\Validator\ValidatorBuilder::disableAnnotationMapping()" is deprecated, use "disableAttributeMapping()" instead.');
diff --git a/src/Symfony/Component/VarDumper/Test/VarDumperTestTrait.php b/src/Symfony/Component/VarDumper/Test/VarDumperTestTrait.php
index 4475efd..83cb153 100644
--- a/src/Symfony/Component/VarDumper/Test/VarDumperTestTrait.php
+++ b/src/Symfony/Component/VarDumper/Test/VarDumperTestTrait.php
@@ -33,9 +33,7 @@ trait VarDumperTestTrait
         $this->varDumperConfig['flags'] = $flags;
     }
 
-    /**
-     * @after
-     */
+    #[\PHPUnit\Framework\Attributes\After]
     protected function tearDownVarDumper(): void
     {
         $this->varDumperConfig['casters'] = [];
diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php
index 8e4ef4c..d72dfeb 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php
@@ -32,9 +32,7 @@ class CasterTest extends TestCase
         "\0Foo\0private" => 'priv',
     ];
 
-    /**
-     * @dataProvider provideFilter
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFilter')]
     public function testFilter($filter, $expectedDiff, $listedProperties = null)
     {
         if (null === $listedProperties) {
diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php
index 2ce71c5..418aaaa 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php
@@ -41,9 +41,7 @@ class DateCasterTest extends TestCase
         date_default_timezone_set($this->previousTimezone);
     }
 
-    /**
-     * @dataProvider provideDateTimes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDateTimes')]
     public function testDumpDateTime($time, $timezone, $xDate, $xTimestamp)
     {
         $date = new \DateTime($time, new \DateTimeZone($timezone));
@@ -57,9 +55,7 @@ EODUMP;
         $this->assertDumpEquals($xDump, $date);
     }
 
-    /**
-     * @dataProvider provideDateTimes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDateTimes')]
     public function testDumpDateTimeImmutable($time, $timezone, $xDate, $xTimestamp)
     {
         $date = new \DateTimeImmutable($time, new \DateTimeZone($timezone));
@@ -73,9 +69,7 @@ EODUMP;
         $this->assertDumpEquals($xDump, $date);
     }
 
-    /**
-     * @dataProvider provideDateTimes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDateTimes')]
     public function testCastDateTime($time, $timezone, $xDate, $xTimestamp, $xInfos)
     {
         $stub = new Stub();
@@ -122,9 +116,7 @@ EODUMP;
         ];
     }
 
-    /**
-     * @dataProvider provideNoTimezoneDateTimes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNoTimezoneDateTimes')]
     public function testCastDateTimeNoTimezone($time, $xDate, $xInfos)
     {
         date_default_timezone_set('UTC');
@@ -204,9 +196,7 @@ EODUMP;
         $this->assertDumpMatchesFormat($xDump, $dateCast["\0~\0date"]);
     }
 
-    /**
-     * @dataProvider provideIntervals
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIntervals')]
     public function testDumpInterval($intervalSpec, $ms, $invert, $expected)
     {
         $interval = $this->createInterval($intervalSpec, $ms, $invert);
@@ -220,9 +210,7 @@ EODUMP;
         $this->assertDumpMatchesFormat($xDump, $interval);
     }
 
-    /**
-     * @dataProvider provideIntervals
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIntervals')]
     public function testDumpIntervalExcludingVerbosity($intervalSpec, $ms, $invert, $expected)
     {
         $interval = $this->createInterval($intervalSpec, $ms, $invert);
@@ -236,9 +224,7 @@ EODUMP;
         $this->assertDumpEquals($xDump, $interval, Caster::EXCLUDE_VERBOSE);
     }
 
-    /**
-     * @dataProvider provideIntervals
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIntervals')]
     public function testCastInterval($intervalSpec, $ms, $invert, $xInterval, $xSeconds)
     {
         $interval = $this->createInterval($intervalSpec, $ms, $invert);
@@ -307,9 +293,7 @@ EODUMP;
         ];
     }
 
-    /**
-     * @dataProvider provideTimeZones
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTimeZones')]
     public function testDumpTimeZone($timezone, $expected)
     {
         $timezone = new \DateTimeZone($timezone);
@@ -323,9 +307,7 @@ EODUMP;
         $this->assertDumpMatchesFormat($xDump, $timezone);
     }
 
-    /**
-     * @dataProvider provideTimeZones
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTimeZones')]
     public function testDumpTimeZoneExcludingVerbosity($timezone, $expected)
     {
         $timezone = new \DateTimeZone($timezone);
@@ -339,9 +321,7 @@ EODUMP;
         $this->assertDumpMatchesFormat($xDump, $timezone, Caster::EXCLUDE_VERBOSE);
     }
 
-    /**
-     * @dataProvider provideTimeZones
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTimeZones')]
     public function testCastTimeZone($timezone, $xTimezone, $xRegion)
     {
         $timezone = new \DateTimeZone($timezone);
@@ -400,9 +380,7 @@ EODUMP;
         ];
     }
 
-    /**
-     * @dataProvider providePeriods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePeriods')]
     public function testDumpPeriod($start, $interval, $end, $options, $expected)
     {
         $p = new \DatePeriod(new \DateTimeImmutable($start), new \DateInterval($interval), \is_int($end) ? $end : new \DateTime($end), $options);
@@ -416,9 +394,7 @@ EODUMP;
         $this->assertDumpMatchesFormat($xDump, $p);
     }
 
-    /**
-     * @dataProvider providePeriods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePeriods')]
     public function testCastPeriod($start, $interval, $end, $options, $xPeriod, $xDates)
     {
         $p = new \DatePeriod(new \DateTimeImmutable($start, new \DateTimeZone('UTC')), new \DateInterval($interval), \is_int($end) ? $end : new \DateTimeImmutable($end, new \DateTimeZone('UTC')), $options);
diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/DoctrineCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/DoctrineCasterTest.php
index f2d7b27..ae2ef1f 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/DoctrineCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/DoctrineCasterTest.php
@@ -18,16 +18,12 @@ use Doctrine\ORM\PersistentCollection;
 use PHPUnit\Framework\TestCase;
 use Symfony\Component\VarDumper\Test\VarDumperTestTrait;
 
-/**
- * @requires function \Doctrine\Common\Collections\ArrayCollection::__construct
- */
+#[\PHPUnit\Framework\Attributes\RequiresMethod(\Doctrine\Common\Collections\ArrayCollection::class, '__construct')]
 class DoctrineCasterTest extends TestCase
 {
     use VarDumperTestTrait;
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testCastPersistentCollection()
     {
         $classMetadata = new ClassMetadata(__CLASS__);
diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/ExceptionCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/ExceptionCasterTest.php
index 4978efb..d962add 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/ExceptionCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/ExceptionCasterTest.php
@@ -127,9 +127,7 @@ EODUMP;
         $this->assertDumpMatchesFormat($expectedDump, $e);
     }
 
-    /**
-     * @requires function \Symfony\Component\ErrorHandler\Exception\SilencedErrorContext::__construct
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresMethod(\Symfony\Component\ErrorHandler\Exception\SilencedErrorContext::class, '__construct')]
     public function testCastSilencedErrorContext()
     {
         $e = $this->getTestSilencedErrorContext();
@@ -356,9 +354,7 @@ EODUMP;
         $this->assertDumpMatchesFormat($expectedDump, $e, Caster::EXCLUDE_VERBOSE);
     }
 
-    /**
-     * @requires function \Symfony\Component\ErrorHandler\Exception\FlattenException::create
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresMethod(\Symfony\Component\ErrorHandler\Exception\FlattenException::class, 'create')]
     public function testFlattenException()
     {
         $f = FlattenException::createFromThrowable(new \Exception('Hello'));
diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php
index 2ecf081..88a90cc 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php
@@ -17,9 +17,8 @@ use Symfony\Component\VarDumper\Test\VarDumperTestTrait;
 
 /**
  * @author Kirill Nesmeyanov <nesk@xakep.ru>
- *
- * @requires extension ffi
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('ffi')]
 class FFICasterTest extends TestCase
 {
     use VarDumperTestTrait;
@@ -114,9 +113,7 @@ class FFICasterTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider scalarsDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('scalarsDataProvider')]
     public function testCastScalar(string $type, string $value, int $size, int $align)
     {
         $this->assertDumpEquals(<<<PHP
diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/GmpCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/GmpCasterTest.php
index a2ab956..4773465 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/GmpCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/GmpCasterTest.php
@@ -20,9 +20,7 @@ class GmpCasterTest extends TestCase
 {
     use VarDumperTestTrait;
 
-    /**
-     * @requires extension gmp
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('gmp')]
     public function testCastGmp()
     {
         $gmpString = gmp_init('1234');
diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/IntlCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/IntlCasterTest.php
index dc6ea47..525a615 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/IntlCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/IntlCasterTest.php
@@ -14,9 +14,7 @@ namespace Symfony\Component\VarDumper\Tests\Caster;
 use PHPUnit\Framework\TestCase;
 use Symfony\Component\VarDumper\Test\VarDumperTestTrait;
 
-/**
- * @requires extension intl
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
 class IntlCasterTest extends TestCase
 {
     use VarDumperTestTrait;
diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/MysqliCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/MysqliCasterTest.php
index 4eba406..d3afeb88 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/MysqliCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/MysqliCasterTest.php
@@ -14,11 +14,8 @@ namespace Symfony\Component\VarDumper\Tests\Caster;
 use PHPUnit\Framework\TestCase;
 use Symfony\Component\VarDumper\Test\VarDumperTestTrait;
 
-/**
- * @requires extension mysqli
- *
- * @group integration
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('mysqli')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class MysqliCasterTest extends TestCase
 {
     use VarDumperTestTrait;
diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php
index c6a96ec..5b9595a 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php
@@ -25,9 +25,7 @@ class PdoCasterTest extends TestCase
 {
     use VarDumperTestTrait;
 
-    /**
-     * @requires extension pdo_sqlite
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pdo_sqlite')]
     public function testCastPdo()
     {
         $pdo = new \PDO('sqlite::memory:');
diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/RdKafkaCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/RdKafkaCasterTest.php
index 592c3d6..4d88677 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/RdKafkaCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/RdKafkaCasterTest.php
@@ -18,11 +18,8 @@ use RdKafka\Producer;
 use RdKafka\TopicConf;
 use Symfony\Component\VarDumper\Test\VarDumperTestTrait;
 
-/**
- * @requires extension rdkafka
- *
- * @group integration
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('rdkafka')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class RdKafkaCasterTest extends TestCase
 {
     use VarDumperTestTrait;
diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/RedisCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/RedisCasterTest.php
index ac587d7..af05a19 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/RedisCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/RedisCasterTest.php
@@ -16,16 +16,13 @@ use Symfony\Component\VarDumper\Test\VarDumperTestTrait;
 
 /**
  * @author Nicolas Grekas <p@tchwork.com>
- *
- * @group integration
  */
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class RedisCasterTest extends TestCase
 {
     use VarDumperTestTrait;
 
-    /**
-     * @requires extension redis
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('redis')]
     public function testNotConnected()
     {
         $redis = new \Redis();
@@ -39,10 +36,8 @@ EODUMP;
         $this->assertDumpMatchesFormat($xCast, $redis);
     }
 
-    /**
-     * @testWith ["Redis"]
-     *           ["Relay\\Relay"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['Redis'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['Relay\Relay'])]
     public function testConnected(string $class)
     {
         if (!class_exists($class)) {
diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php
index 653e7a5..b5a422c 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php
@@ -320,9 +320,7 @@ EOTXT
         );
     }
 
-    /**
-     * @requires PHP 8.2
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.2')]
     public function testReflectionUnionTypeWithIntersection()
     {
         $var = (new \ReflectionProperty(ReflectionUnionTypeWithIntersectionFixture::class, 'a'))->getType();
@@ -407,9 +405,7 @@ EOTXT
         );
     }
 
-    /**
-     * @requires PHP 8.2
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.2')]
     public function testNullReturnType()
     {
         $className = Php82NullStandaloneReturnType::class;
@@ -463,9 +459,7 @@ EOTXT
         );
     }
 
-    /**
-     * @requires PHP < 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.4')]
     public function testGeneratorPriorTo84()
     {
         if (\extension_loaded('xdebug')) {
@@ -538,9 +532,7 @@ EODUMP;
         $this->assertDumpMatchesFormat($expectedDump, $generator);
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testGenerator()
     {
         if (\extension_loaded('xdebug')) {
diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php
index 0a24d21..ac895f2 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php
@@ -64,7 +64,7 @@ EOTXT
         ];
     }
 
-    /** @dataProvider getCastFileInfoTests */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getCastFileInfoTests')]
     public function testCastFileInfo($file, $dump)
     {
         $this->assertDumpMatchesFormat($dump, new \SplFileInfo($file));
@@ -119,9 +119,7 @@ EOTXT;
         $this->assertDumpMatchesFormat($dump, $var);
     }
 
-    /**
-     * @dataProvider provideCastSplDoublyLinkedList
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCastSplDoublyLinkedList')]
     public function testCastSplDoublyLinkedList($modeValue, $modeDump)
     {
         $var = new \SplDoublyLinkedList();
diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php
index 635c4c4..794f50c 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php
@@ -52,9 +52,7 @@ EODUMP;
         $this->assertDumpMatchesFormat($expectedDump, $this->reader);
     }
 
-    /**
-     * @dataProvider provideNodes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNodes')]
     public function testNodes($seek, $expectedDump)
     {
         while ($seek--) {
diff --git a/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php b/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php
index 5a24f1c..9e272b2 100644
--- a/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php
@@ -37,9 +37,7 @@ class CliDescriptorTest extends TestCase
         putenv('TERMINAL_EMULATOR'.(self::$prevTerminalEmulator ? '='.self::$prevTerminalEmulator : ''));
     }
 
-    /**
-     * @dataProvider provideContext
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideContext')]
     public function testDescribe(array $context, string $expectedOutput, bool $decorated = false)
     {
         $output = new BufferedOutput();
diff --git a/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/HtmlDescriptorTest.php b/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/HtmlDescriptorTest.php
index 0db5b3f..a25e702 100644
--- a/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/HtmlDescriptorTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/HtmlDescriptorTest.php
@@ -48,9 +48,7 @@ class HtmlDescriptorTest extends TestCase
         $this->assertDoesNotMatchRegularExpression('#<style>(.*?)</style><script>(.*?)</script>(.*)#', $output->fetch(), 'styles & scripts are output only once');
     }
 
-    /**
-     * @dataProvider provideContext
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideContext')]
     public function testDescribe(array $context, string $expectedOutput)
     {
         $output = new BufferedOutput();
diff --git a/src/Symfony/Component/VarDumper/Tests/Command/ServerDumpCommandTest.php b/src/Symfony/Component/VarDumper/Tests/Command/ServerDumpCommandTest.php
index 47c45fd..a39348e 100644
--- a/src/Symfony/Component/VarDumper/Tests/Command/ServerDumpCommandTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Command/ServerDumpCommandTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\VarDumper\Server\DumpServer;
 
 class ServerDumpCommandTest extends TestCase
 {
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $tester = new CommandCompletionTester($this->createCommand());
diff --git a/src/Symfony/Component/VarDumper/Tests/Dumper/CliDumperTest.php b/src/Symfony/Component/VarDumper/Tests/Dumper/CliDumperTest.php
index d1d9f26..f15801e 100644
--- a/src/Symfony/Component/VarDumper/Tests/Dumper/CliDumperTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Dumper/CliDumperTest.php
@@ -117,9 +117,7 @@ EOTXT
         );
     }
 
-    /**
-     * @dataProvider provideDumpWithCommaFlagTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDumpWithCommaFlagTests')]
     public function testDumpWithCommaFlag($expected, $flags)
     {
         $dumper = new CliDumper(null, null, $flags);
@@ -436,9 +434,7 @@ EOTXT,
         yield [[], 0, "\e[0;38;5;208m[]\e[m\n"];
     }
 
-    /**
-     * @dataProvider provideDumpArrayWithColor
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDumpArrayWithColor')]
     public function testDumpArrayWithColor($value, $flags, $expectedOut)
     {
         if ('\\' === \DIRECTORY_SEPARATOR) {
diff --git a/src/Symfony/Component/VarDumper/Tests/Dumper/ContextProvider/RequestContextProviderTest.php b/src/Symfony/Component/VarDumper/Tests/Dumper/ContextProvider/RequestContextProviderTest.php
index 5c14159..25d1c50 100644
--- a/src/Symfony/Component/VarDumper/Tests/Dumper/ContextProvider/RequestContextProviderTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Dumper/ContextProvider/RequestContextProviderTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\HttpFoundation\RequestStack;
 use Symfony\Component\VarDumper\Cloner\Data;
 use Symfony\Component\VarDumper\Dumper\ContextProvider\RequestContextProvider;
 
-/**
- * @requires function \Symfony\Component\HttpFoundation\RequestStack::__construct
- */
+#[\PHPUnit\Framework\Attributes\RequiresMethod(\Symfony\Component\HttpFoundation\RequestStack::class, '__construct')]
 class RequestContextProviderTest extends TestCase
 {
     public function testGetContextOnNullRequest()
diff --git a/src/Symfony/Component/VarDumper/Tests/Dumper/ContextualizedDumperTest.php b/src/Symfony/Component/VarDumper/Tests/Dumper/ContextualizedDumperTest.php
index c9c4d11..17e6ac8 100644
--- a/src/Symfony/Component/VarDumper/Tests/Dumper/ContextualizedDumperTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Dumper/ContextualizedDumperTest.php
@@ -19,9 +19,8 @@ use Symfony\Component\VarDumper\Dumper\ContextualizedDumper;
 
 /**
  * @author Kévin Thérage <therage.kevin@gmail.com>
- *
- * @backupGlobals
  */
+#[\PHPUnit\Framework\Attributes\BackupGlobals(null)]
 class ContextualizedDumperTest extends TestCase
 {
     public function testContextualizedCliDumper()
diff --git a/src/Symfony/Component/VarDumper/Tests/Dumper/HtmlDumperTest.php b/src/Symfony/Component/VarDumper/Tests/Dumper/HtmlDumperTest.php
index d843e14..49da4bf 100644
--- a/src/Symfony/Component/VarDumper/Tests/Dumper/HtmlDumperTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Dumper/HtmlDumperTest.php
@@ -166,9 +166,7 @@ EOTXT
         );
     }
 
-    /**
-     * @dataProvider varToDumpProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('varToDumpProvider')]
     public function testDumpString($var, $needle)
     {
         $dumper = new HtmlDumper();
diff --git a/src/Symfony/Component/VarExporter/Tests/InstantiatorTest.php b/src/Symfony/Component/VarExporter/Tests/InstantiatorTest.php
index 062d4ea..9ad7258 100644
--- a/src/Symfony/Component/VarExporter/Tests/InstantiatorTest.php
+++ b/src/Symfony/Component/VarExporter/Tests/InstantiatorTest.php
@@ -25,9 +25,7 @@ class InstantiatorTest extends TestCase
         Instantiator::instantiate('SomeNotExistingClass');
     }
 
-    /**
-     * @dataProvider provideFailingInstantiation
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFailingInstantiation')]
     public function testFailingInstantiation(string $class)
     {
         $this->expectException(NotInstantiableTypeException::class);
diff --git a/src/Symfony/Component/VarExporter/Tests/LazyGhostTraitTest.php b/src/Symfony/Component/VarExporter/Tests/LazyGhostTraitTest.php
index 8326ee4..921f24e 100644
--- a/src/Symfony/Component/VarExporter/Tests/LazyGhostTraitTest.php
+++ b/src/Symfony/Component/VarExporter/Tests/LazyGhostTraitTest.php
@@ -137,9 +137,7 @@ class LazyGhostTraitTest extends TestCase
         $this->assertTrue($clone->isLazyObjectInitialized());
     }
 
-    /**
-     * @dataProvider provideMagicClass
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMagicClass')]
     public function testMagicClass(MagicClass $instance)
     {
         $this->assertSame('bar', $instance->foo);
@@ -202,9 +200,7 @@ class LazyGhostTraitTest extends TestCase
         $this->assertSame(1, $counter);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testPartialInitialization()
     {
         $counter = 0;
@@ -262,9 +258,7 @@ class LazyGhostTraitTest extends TestCase
         $this->assertSame([123, 345, 456, 567, 234, 678], array_values($properties));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testPartialInitializationWithReset()
     {
         $initializer = static fn (ChildTestClass $instance, string $property, ?string $scope, mixed $default) => 234;
@@ -297,9 +291,7 @@ class LazyGhostTraitTest extends TestCase
         $this->assertSame(234, $instance->public);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testPartialInitializationWithNastyPassByRef()
     {
         $instance = ChildTestClass::createLazyGhost(['public' => fn (ChildTestClass $instance, string &$property, ?string &$scope, mixed $default) => $property = $scope = 123]);
@@ -332,9 +324,7 @@ class LazyGhostTraitTest extends TestCase
         $this->assertSame(-3, $r->getValue($obj));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testFullPartialInitialization()
     {
         $counter = 0;
@@ -363,9 +353,7 @@ class LazyGhostTraitTest extends TestCase
         $this->assertSame(1000, $counter);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testPartialInitializationFallback()
     {
         $counter = 0;
@@ -388,9 +376,7 @@ class LazyGhostTraitTest extends TestCase
         $this->assertSame(1000, $counter);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testFullInitializationAfterPartialInitialization()
     {
         $counter = 0;
@@ -436,9 +422,7 @@ class LazyGhostTraitTest extends TestCase
         $this->assertSame([123], $proxy->foo);
     }
 
-    /**
-     * @requires PHP 8.3
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.3')]
     public function testReadOnlyClass()
     {
         $proxy = $this->createLazyGhost(ReadOnlyClass::class, fn ($proxy) => $proxy->__construct(123));
@@ -481,9 +465,7 @@ class LazyGhostTraitTest extends TestCase
         $this->assertSame(['property' => 'property', 'method' => 'method'], $output);
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testPropertyHooks()
     {
         $initialized = false;
@@ -506,9 +488,7 @@ class LazyGhostTraitTest extends TestCase
         $this->assertSame(345, $object->backed);
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testPropertyHooksWithDefaultValue()
     {
         $initialized = false;
@@ -534,9 +514,7 @@ class LazyGhostTraitTest extends TestCase
         $this->assertTrue($object->backedBoolWithDefault);
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testAsymmetricVisibility()
     {
         $object = $this->createLazyGhost(AsymmetricVisibility::class, function ($instance) {
diff --git a/src/Symfony/Component/VarExporter/Tests/LazyProxyTraitTest.php b/src/Symfony/Component/VarExporter/Tests/LazyProxyTraitTest.php
index 976fce0..3e4461a 100644
--- a/src/Symfony/Component/VarExporter/Tests/LazyProxyTraitTest.php
+++ b/src/Symfony/Component/VarExporter/Tests/LazyProxyTraitTest.php
@@ -257,9 +257,7 @@ class LazyProxyTraitTest extends TestCase
         $this->assertSame([123], $proxy->foo);
     }
 
-    /**
-     * @requires PHP 8.2
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.2')]
     public function testReadOnlyClass()
     {
         if (\PHP_VERSION_ID < 80300) {
@@ -301,9 +299,7 @@ class LazyProxyTraitTest extends TestCase
         $this->assertSame(['property' => 'property', 'method' => 'method'], $output);
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testConcretePropertyHooks()
     {
         $initialized = false;
@@ -330,9 +326,7 @@ class LazyProxyTraitTest extends TestCase
         $this->assertSame(345, $object->backed);
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testAbstractPropertyHooks()
     {
         $initialized = false;
@@ -364,9 +358,7 @@ class LazyProxyTraitTest extends TestCase
         $this->assertTrue($initialized);
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testAsymmetricVisibility()
     {
         $object = $this->createLazyProxy(AsymmetricVisibility::class, function () {
diff --git a/src/Symfony/Component/VarExporter/Tests/ProxyHelperTest.php b/src/Symfony/Component/VarExporter/Tests/ProxyHelperTest.php
index b9c67ad..9e7c1fb 100644
--- a/src/Symfony/Component/VarExporter/Tests/ProxyHelperTest.php
+++ b/src/Symfony/Component/VarExporter/Tests/ProxyHelperTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\StringMagicGetClass;
 
 class ProxyHelperTest extends TestCase
 {
-    /**
-     * @dataProvider provideExportSignature
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideExportSignature')]
     public function testExportSignature(string $expected, \ReflectionMethod $method)
     {
         $this->assertSame($expected, ProxyHelper::exportSignature($method));
@@ -161,9 +159,7 @@ class ProxyHelperTest extends TestCase
         $this->assertSame($expected, ProxyHelper::generateLazyProxy(null, [new \ReflectionClass(TestForProxyHelperInterface1::class), new \ReflectionClass(TestForProxyHelperInterface2::class)]));
     }
 
-    /**
-     * @dataProvider classWithUnserializeMagicMethodProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('classWithUnserializeMagicMethodProvider')]
     public function testGenerateLazyProxyForClassWithUnserializeMagicMethod(object $obj, string $expected)
     {
         $this->assertStringContainsString($expected, ProxyHelper::generateLazyProxy(new \ReflectionClass($obj::class)));
@@ -237,9 +233,7 @@ class ProxyHelperTest extends TestCase
         ProxyHelper::generateLazyGhost(new \ReflectionClass(StringMagicGetClass::class));
     }
 
-    /**
-     * @requires PHP 8.2
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.2')]
     public function testNullStandaloneReturnType()
     {
         self::assertStringContainsString(
@@ -248,9 +242,7 @@ class ProxyHelperTest extends TestCase
         );
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testPropertyHooks()
     {
         $proxyCode = ProxyHelper::generateLazyProxy(new \ReflectionClass(Hooked::class));
diff --git a/src/Symfony/Component/VarExporter/Tests/VarExporterTest.php b/src/Symfony/Component/VarExporter/Tests/VarExporterTest.php
index 60bbce8..d56e713 100644
--- a/src/Symfony/Component/VarExporter/Tests/VarExporterTest.php
+++ b/src/Symfony/Component/VarExporter/Tests/VarExporterTest.php
@@ -39,9 +39,7 @@ class VarExporterTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provideFailingSerialization
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFailingSerialization')]
     public function testFailingSerialization($value)
     {
         $this->expectException(NotInstantiableTypeException::class);
@@ -77,9 +75,7 @@ class VarExporterTest extends TestCase
         yield [$a];
     }
 
-    /**
-     * @dataProvider provideExport
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideExport')]
     public function testExport(string $testName, $value, bool $staticValueExpected = false)
     {
         $dumpedValue = $this->getDump($value);
diff --git a/src/Symfony/Component/WebLink/Tests/LinkTest.php b/src/Symfony/Component/WebLink/Tests/LinkTest.php
index e1c03ba..ccbb6d4 100644
--- a/src/Symfony/Component/WebLink/Tests/LinkTest.php
+++ b/src/Symfony/Component/WebLink/Tests/LinkTest.php
@@ -69,9 +69,7 @@ class LinkTest extends TestCase
         $this->assertContains('next', $link->getRels());
     }
 
-    /**
-     * @dataProvider templatedHrefProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('templatedHrefProvider')]
     public function testTemplated(string $href)
     {
         $link = (new Link())
@@ -80,9 +78,7 @@ class LinkTest extends TestCase
         $this->assertTrue($link->isTemplated());
     }
 
-    /**
-     * @dataProvider notTemplatedHrefProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('notTemplatedHrefProvider')]
     public function testNotTemplated(string $href)
     {
         $link = (new Link())
diff --git a/src/Symfony/Component/Webhook/Test/AbstractRequestParserTestCase.php b/src/Symfony/Component/Webhook/Test/AbstractRequestParserTestCase.php
index ab41b52..3c6fb7d 100644
--- a/src/Symfony/Component/Webhook/Test/AbstractRequestParserTestCase.php
+++ b/src/Symfony/Component/Webhook/Test/AbstractRequestParserTestCase.php
@@ -21,9 +21,7 @@ use Symfony\Component\Webhook\Client\RequestParserInterface;
  */
 abstract class AbstractRequestParserTestCase extends TestCase
 {
-    /**
-     * @dataProvider getPayloads
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPayloads')]
     public function testParse(string $payload, RemoteEvent $expected)
     {
         $request = $this->createRequest($payload);
diff --git a/src/Symfony/Component/Workflow/Tests/Attribute/AsListenerTest.php b/src/Symfony/Component/Workflow/Tests/Attribute/AsListenerTest.php
index 0a8c232..7b1d932 100644
--- a/src/Symfony/Component/Workflow/Tests/Attribute/AsListenerTest.php
+++ b/src/Symfony/Component/Workflow/Tests/Attribute/AsListenerTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Workflow\Exception\LogicException;
 
 class AsListenerTest extends TestCase
 {
-    /**
-     * @dataProvider provideOkTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideOkTests')]
     public function testOk(string $class, string $expectedEvent, ?string $workflow = null, ?string $node = null)
     {
         $attribute = new $class($workflow, $node);
@@ -58,9 +56,7 @@ class AsListenerTest extends TestCase
         yield [Attribute\AsTransitionListener::class, 'workflow.w.transition.n', 'w', 'n'];
     }
 
-    /**
-     * @dataProvider provideTransitionThrowException
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTransitionThrowException')]
     public function testTransitionThrowException(string $class)
     {
         $this->expectException(LogicException::class);
@@ -77,9 +73,7 @@ class AsListenerTest extends TestCase
         yield [Attribute\AsTransitionListener::class, 'workflow.transition'];
     }
 
-    /**
-     * @dataProvider providePlaceThrowException
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePlaceThrowException')]
     public function testPlaceThrowException(string $class)
     {
         $this->expectException(LogicException::class);
diff --git a/src/Symfony/Component/Workflow/Tests/Debug/TraceableWorkflowTest.php b/src/Symfony/Component/Workflow/Tests/Debug/TraceableWorkflowTest.php
index 3d8e699..db4867d 100644
--- a/src/Symfony/Component/Workflow/Tests/Debug/TraceableWorkflowTest.php
+++ b/src/Symfony/Component/Workflow/Tests/Debug/TraceableWorkflowTest.php
@@ -38,9 +38,7 @@ class TraceableWorkflowTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideFunctionNames
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFunctionNames')]
     public function testCallsInner(string $function, array $args, mixed $returnValue)
     {
         $this->innerWorkflow->expects($this->once())
diff --git a/src/Symfony/Component/Workflow/Tests/Dumper/GraphvizDumperTest.php b/src/Symfony/Component/Workflow/Tests/Dumper/GraphvizDumperTest.php
index 9356715..bf3abb8 100644
--- a/src/Symfony/Component/Workflow/Tests/Dumper/GraphvizDumperTest.php
+++ b/src/Symfony/Component/Workflow/Tests/Dumper/GraphvizDumperTest.php
@@ -20,9 +20,7 @@ class GraphvizDumperTest extends TestCase
 {
     use WorkflowBuilderTrait;
 
-    /**
-     * @dataProvider provideWorkflowDefinitionWithoutMarking
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideWorkflowDefinitionWithoutMarking')]
     public function testDumpWithoutMarking($definition, $expected, $withMetadata)
     {
         $dump = (new GraphvizDumper())->dump($definition, null, ['with-metadata' => $withMetadata]);
@@ -30,9 +28,7 @@ class GraphvizDumperTest extends TestCase
         $this->assertEquals($expected, $dump);
     }
 
-    /**
-     * @dataProvider provideWorkflowDefinitionWithMarking
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideWorkflowDefinitionWithMarking')]
     public function testDumpWithMarking($definition, $marking, $expected, $withMetadata)
     {
         $dump = (new GraphvizDumper())->dump($definition, $marking, ['with-metadata' => $withMetadata]);
diff --git a/src/Symfony/Component/Workflow/Tests/Dumper/MermaidDumperTest.php b/src/Symfony/Component/Workflow/Tests/Dumper/MermaidDumperTest.php
index a8d1978..65d87ac 100644
--- a/src/Symfony/Component/Workflow/Tests/Dumper/MermaidDumperTest.php
+++ b/src/Symfony/Component/Workflow/Tests/Dumper/MermaidDumperTest.php
@@ -23,9 +23,7 @@ class MermaidDumperTest extends TestCase
 {
     use WorkflowBuilderTrait;
 
-    /**
-     * @dataProvider provideWorkflowDefinitionWithoutMarking
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideWorkflowDefinitionWithoutMarking')]
     public function testDumpWithoutMarking(Definition $definition, string $expected)
     {
         $dumper = new MermaidDumper(MermaidDumper::TRANSITION_TYPE_WORKFLOW);
@@ -35,9 +33,7 @@ class MermaidDumperTest extends TestCase
         $this->assertEquals($expected, $dump);
     }
 
-    /**
-     * @dataProvider provideWorkflowWithReservedWords
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideWorkflowWithReservedWords')]
     public function testDumpWithReservedWordsAsPlacenames(Definition $definition, string $expected)
     {
         $dumper = new MermaidDumper(MermaidDumper::TRANSITION_TYPE_WORKFLOW);
@@ -47,9 +43,7 @@ class MermaidDumperTest extends TestCase
         $this->assertEquals($expected, $dump);
     }
 
-    /**
-     * @dataProvider provideStateMachine
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideStateMachine')]
     public function testDumpAsStateMachine(Definition $definition, string $expected)
     {
         $dumper = new MermaidDumper(MermaidDumper::TRANSITION_TYPE_STATEMACHINE);
@@ -59,9 +53,7 @@ class MermaidDumperTest extends TestCase
         $this->assertEquals($expected, $dump);
     }
 
-    /**
-     * @dataProvider provideWorkflowWithMarking
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideWorkflowWithMarking')]
     public function testDumpWorkflowWithMarking(Definition $definition, Marking $marking, string $expected)
     {
         $dumper = new MermaidDumper(MermaidDumper::TRANSITION_TYPE_WORKFLOW);
diff --git a/src/Symfony/Component/Workflow/Tests/Dumper/PlantUmlDumperTest.php b/src/Symfony/Component/Workflow/Tests/Dumper/PlantUmlDumperTest.php
index a018a4e..714b6f7 100644
--- a/src/Symfony/Component/Workflow/Tests/Dumper/PlantUmlDumperTest.php
+++ b/src/Symfony/Component/Workflow/Tests/Dumper/PlantUmlDumperTest.php
@@ -23,9 +23,7 @@ class PlantUmlDumperTest extends TestCase
 {
     use WorkflowBuilderTrait;
 
-    /**
-     * @dataProvider provideWorkflowDefinitionWithoutMarking
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideWorkflowDefinitionWithoutMarking')]
     public function testDumpWorkflowWithoutMarking($definition, $marking, $expectedFileName, $title)
     {
         $dumper = new PlantUmlDumper(PlantUmlDumper::WORKFLOW_TRANSITION);
@@ -46,9 +44,7 @@ class PlantUmlDumperTest extends TestCase
         yield [self::createComplexWorkflowDefinition(), $marking, 'complex-workflow-marking', 'ComplexDiagram'];
     }
 
-    /**
-     * @dataProvider provideStateMachineDefinitionWithoutMarking
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideStateMachineDefinitionWithoutMarking')]
     public function testDumpStateMachineWithoutMarking($definition, $marking, $expectedFileName, $title)
     {
         $dumper = new PlantUmlDumper(PlantUmlDumper::STATEMACHINE_TRANSITION);
diff --git a/src/Symfony/Component/Workflow/Tests/SupportStrategy/InstanceOfSupportStrategyTest.php b/src/Symfony/Component/Workflow/Tests/SupportStrategy/InstanceOfSupportStrategyTest.php
index 48a455e..8ab1462 100644
--- a/src/Symfony/Component/Workflow/Tests/SupportStrategy/InstanceOfSupportStrategyTest.php
+++ b/src/Symfony/Component/Workflow/Tests/SupportStrategy/InstanceOfSupportStrategyTest.php
@@ -34,9 +34,7 @@ class InstanceOfSupportStrategyTest extends TestCase
 
     private function createWorkflow(): MockObject&Workflow
     {
-        return $this->getMockBuilder(Workflow::class)
-            ->disableOriginalConstructor()
-            ->getMock();
+        return $this->createMock(Workflow::class);
     }
 }
 
diff --git a/src/Symfony/Component/Workflow/Tests/Validator/StateMachineValidatorTest.php b/src/Symfony/Component/Workflow/Tests/Validator/StateMachineValidatorTest.php
index e88408b..a5d3534 100644
--- a/src/Symfony/Component/Workflow/Tests/Validator/StateMachineValidatorTest.php
+++ b/src/Symfony/Component/Workflow/Tests/Validator/StateMachineValidatorTest.php
@@ -89,6 +89,7 @@ class StateMachineValidatorTest extends TestCase
         //           +----+
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testValid()
     {
         $places = ['a', 'b', 'c'];
diff --git a/src/Symfony/Component/Workflow/Tests/Validator/WorkflowValidatorTest.php b/src/Symfony/Component/Workflow/Tests/Validator/WorkflowValidatorTest.php
index 50c3abd..d2478a2 100644
--- a/src/Symfony/Component/Workflow/Tests/Validator/WorkflowValidatorTest.php
+++ b/src/Symfony/Component/Workflow/Tests/Validator/WorkflowValidatorTest.php
@@ -39,6 +39,7 @@ class WorkflowValidatorTest extends TestCase
         (new WorkflowValidator())->validate($definition, 'foo');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSameTransitionNameButNotSamePlace()
     {
         $places = range('a', 'd');
diff --git a/src/Symfony/Component/Workflow/Tests/WorkflowTest.php b/src/Symfony/Component/Workflow/Tests/WorkflowTest.php
index 543398a..8a4c44d 100644
--- a/src/Symfony/Component/Workflow/Tests/WorkflowTest.php
+++ b/src/Symfony/Component/Workflow/Tests/WorkflowTest.php
@@ -435,9 +435,7 @@ class WorkflowTest extends TestCase
         yield [true, []];
     }
 
-    /**
-     * @dataProvider provideApplyWithEventDispatcherForAnnounceTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideApplyWithEventDispatcherForAnnounceTests')]
     public function testApplyWithEventDispatcherForAnnounce(bool $fired, array $context)
     {
         $definition = $this->createComplexWorkflowDefinition();
diff --git a/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php b/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php
index 5208f12..c7b879c 100644
--- a/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php
+++ b/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php
@@ -151,9 +151,7 @@ YAML;
         $tester->execute(['filename' => $filename], ['decorated' => false]);
     }
 
-    /**
-     * @dataProvider provideCompletionSuggestions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompletionSuggestions')]
     public function testComplete(array $input, array $expectedSuggestions)
     {
         $tester = new CommandCompletionTester($this->createCommand());
diff --git a/src/Symfony/Component/Yaml/Tests/DumperTest.php b/src/Symfony/Component/Yaml/Tests/DumperTest.php
index 24758b8..e2af62e 100644
--- a/src/Symfony/Component/Yaml/Tests/DumperTest.php
+++ b/src/Symfony/Component/Yaml/Tests/DumperTest.php
@@ -216,9 +216,7 @@ EOF;
         $this->dumper->dump(['foo' => new A(), 'bar' => 1], 0, 0, Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE);
     }
 
-    /**
-     * @dataProvider getEscapeSequences
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getEscapeSequences')]
     public function testEscapedEscapeSequencesInQuotedScalar($input, $expected)
     {
         $this->assertSame($expected, $this->dumper->dump($input));
@@ -265,9 +263,7 @@ EOF;
         $this->assertSame('!!binary ZsM/cg==', $this->dumper->dump("f\xc3\x3fr"));
     }
 
-    /**
-     * @dataProvider objectAsMapProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('objectAsMapProvider')]
     public function testDumpObjectAsMap($object, $expected)
     {
         $yaml = $this->dumper->dump($object, 0, 0, Yaml::DUMP_OBJECT_AS_MAP);
@@ -853,9 +849,7 @@ YAML;
         $this->assertSame('{ foo: ~ }', $this->dumper->dump(['foo' => null], 0, 0, Yaml::DUMP_NULL_AS_TILDE));
     }
 
-    /**
-     * @dataProvider getNumericKeyData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNumericKeyData')]
     public function testDumpInlineNumericKeyAsString(array $input, bool $inline, int $flags, string $expected)
     {
         $this->assertSame($expected, $this->dumper->dump($input, $inline ? 0 : 4, 0, $flags));
@@ -958,9 +952,7 @@ YAML;
         ], 2));
     }
 
-    /**
-     * @dataProvider getDateTimeData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDateTimeData')]
     public function testDumpDateTime(array $input, string $expected)
     {
         $this->assertSame($expected, rtrim($this->dumper->dump($input, 1)));
diff --git a/src/Symfony/Component/Yaml/Tests/InlineTest.php b/src/Symfony/Component/Yaml/Tests/InlineTest.php
index c68c4ee..73d1871 100644
--- a/src/Symfony/Component/Yaml/Tests/InlineTest.php
+++ b/src/Symfony/Component/Yaml/Tests/InlineTest.php
@@ -26,17 +26,13 @@ class InlineTest extends TestCase
         Inline::initialize(0, 0);
     }
 
-    /**
-     * @dataProvider getTestsForParse
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTestsForParse')]
     public function testParse(string $yaml, $value, $flags = 0)
     {
         $this->assertSame($value, Inline::parse($yaml, $flags), \sprintf('::parse() converts an inline YAML to a PHP structure (%s)', $yaml));
     }
 
-    /**
-     * @dataProvider getTestsForParseWithMapObjects
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTestsForParseWithMapObjects')]
     public function testParseWithMapObjects($yaml, $value, $flags = Yaml::PARSE_OBJECT_FOR_MAP)
     {
         $actual = Inline::parse($yaml, $flags);
@@ -44,9 +40,7 @@ class InlineTest extends TestCase
         $this->assertSame(serialize($value), serialize($actual));
     }
 
-    /**
-     * @dataProvider getTestsForParsePhpConstants
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTestsForParsePhpConstants')]
     public function testParsePhpConstants($yaml, $value)
     {
         $actual = Inline::parse($yaml, Yaml::PARSE_CONSTANT);
@@ -113,9 +107,7 @@ class InlineTest extends TestCase
         Inline::parse('!php/enum SomeEnum::Foo', Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE);
     }
 
-    /**
-     * @dataProvider getTestsForDump
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTestsForDump')]
     public function testDump($yaml, $value, $parseFlags = 0)
     {
         $this->assertEquals($yaml, Inline::dump($value), \sprintf('::dump() converts a PHP structure to an inline YAML (%s)', $yaml));
@@ -217,9 +209,7 @@ class InlineTest extends TestCase
         $this->assertSame($expect, Inline::parseScalar($value));
     }
 
-    /**
-     * @dataProvider getDataForParseReferences
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDataForParseReferences')]
     public function testParseReferences($yaml, $expected)
     {
         $references = ['var' => 'var-value'];
@@ -265,9 +255,7 @@ class InlineTest extends TestCase
         Inline::parse('{ foo: * #foo }');
     }
 
-    /**
-     * @dataProvider getReservedIndicators
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getReservedIndicators')]
     public function testParseUnquotedScalarStartingWithReservedIndicator($indicator)
     {
         $this->expectException(ParseException::class);
@@ -281,9 +269,7 @@ class InlineTest extends TestCase
         return [['@'], ['`']];
     }
 
-    /**
-     * @dataProvider getScalarIndicators
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getScalarIndicators')]
     public function testParseUnquotedScalarStartingWithScalarIndicator($indicator)
     {
         $this->expectException(ParseException::class);
@@ -297,9 +283,7 @@ class InlineTest extends TestCase
         return [['|'], ['>'], ['%']];
     }
 
-    /**
-     * @dataProvider getDataForIsHash
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDataForIsHash')]
     public function testIsHash($array, $expected)
     {
         $this->assertSame($expected, Inline::isHash($array));
@@ -562,18 +546,14 @@ class InlineTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getTimestampTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTimestampTests')]
     public function testParseTimestampAsUnixTimestampByDefault(string $yaml, int $year, int $month, int $day, int $hour, int $minute, int $second, int $microsecond)
     {
         $expectedDate = (new \DateTimeImmutable($yaml, new \DateTimeZone('UTC')))->format('U');
         $this->assertSame($microsecond ? (float) "$expectedDate.$microsecond" : (int) $expectedDate, Inline::parse($yaml));
     }
 
-    /**
-     * @dataProvider getTimestampTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTimestampTests')]
     public function testParseTimestampAsDateTimeObject(string $yaml, int $year, int $month, int $day, int $hour, int $minute, int $second, int $microsecond, string $timezone)
     {
         $expected = (new \DateTimeImmutable($yaml))
@@ -596,9 +576,7 @@ class InlineTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getTimestampTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTimestampTests')]
     public function testParseNestedTimestampListAsDateTimeObject(string $yaml, int $year, int $month, int $day, int $hour, int $minute, int $second, int $microsecond)
     {
         $expected = (new \DateTimeImmutable($yaml))
@@ -620,17 +598,13 @@ class InlineTest extends TestCase
         Inline::parse('2024-50-50', Yaml::PARSE_DATETIME);
     }
 
-    /**
-     * @dataProvider getDateTimeDumpTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDateTimeDumpTests')]
     public function testDumpDateTime($dateTime, $expected)
     {
         $this->assertSame($expected, Inline::dump($dateTime));
     }
 
-    /**
-     * @dataProvider getNumericKeyData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNumericKeyData')]
     public function testDumpNumericKeyAsString(array|int $input, int $flags, string $expected)
     {
         $this->assertSame($expected, Inline::dump($input, $flags));
@@ -748,9 +722,7 @@ class InlineTest extends TestCase
         return $tests;
     }
 
-    /**
-     * @dataProvider getBinaryData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getBinaryData')]
     public function testParseBinaryData($data)
     {
         $this->assertSame('Hello world', Inline::parse($data));
@@ -765,9 +737,7 @@ class InlineTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidBinaryData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidBinaryData')]
     public function testParseInvalidBinaryData($data, $expectedMessage)
     {
         $this->expectException(ParseException::class);
@@ -810,9 +780,7 @@ class InlineTest extends TestCase
         Inline::parse('{: foo}');
     }
 
-    /**
-     * @dataProvider getTestsForNullValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTestsForNullValues')]
     public function testParseMissingMappingValueAsNull($yaml, $expected)
     {
         $this->assertSame($expected, Inline::parse($yaml));
@@ -831,9 +799,7 @@ class InlineTest extends TestCase
         $this->assertSame(['' => 'foo'], Inline::parse('{ "": foo }'));
     }
 
-    /**
-     * @dataProvider getNotPhpCompatibleMappingKeyData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNotPhpCompatibleMappingKeyData')]
     public function testImplicitStringCastingOfMappingKeysIsDeprecated($yaml, $expected)
     {
         $this->expectException(ParseException::class);
@@ -912,9 +878,7 @@ class InlineTest extends TestCase
         Inline::parse("{abc: 'def'");
     }
 
-    /**
-     * @dataProvider getTestsForOctalNumbers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTestsForOctalNumbers')]
     public function testParseOctalNumbers($expected, $yaml)
     {
         self::assertSame($expected, Inline::parse($yaml));
@@ -929,9 +893,7 @@ class InlineTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getTestsForOctalNumbersYaml11Notation
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTestsForOctalNumbersYaml11Notation')]
     public function testParseOctalNumbersYaml11Notation(string $expected, string $yaml)
     {
         self::assertSame($expected, Inline::parse($yaml));
@@ -948,9 +910,7 @@ class InlineTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider phpObjectTagWithEmptyValueProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('phpObjectTagWithEmptyValueProvider')]
     public function testPhpObjectWithEmptyValue(string $value)
     {
         $this->expectException(ParseException::class);
@@ -971,9 +931,7 @@ class InlineTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider phpConstTagWithEmptyValueProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('phpConstTagWithEmptyValueProvider')]
     public function testPhpConstTagWithEmptyValue(string $value)
     {
         $this->expectException(ParseException::class);
@@ -982,9 +940,7 @@ class InlineTest extends TestCase
         Inline::parse($value, Yaml::PARSE_CONSTANT);
     }
 
-    /**
-     * @dataProvider phpConstTagWithEmptyValueProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('phpConstTagWithEmptyValueProvider')]
     public function testPhpEnumTagWithEmptyValue(string $value)
     {
         $this->expectException(ParseException::class);
@@ -1018,9 +974,7 @@ class InlineTest extends TestCase
         self::assertSame('foo#nocomment', Inline::parse('foo#nocomment'));
     }
 
-    /**
-     * @dataProvider unquotedExclamationMarkThrowsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('unquotedExclamationMarkThrowsProvider')]
     public function testUnquotedExclamationMarkThrows(string $value)
     {
         $this->expectException(ParseException::class);
@@ -1052,9 +1006,7 @@ class InlineTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider quotedExclamationMarkProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('quotedExclamationMarkProvider')]
     public function testQuotedExclamationMark($expected, string $value)
     {
         $this->assertSame($expected, Inline::parse($value));
@@ -1083,9 +1035,7 @@ class InlineTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider ideographicSpaceProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('ideographicSpaceProvider')]
     public function testParseIdeographicSpace(string $yaml, string $expected)
     {
         $this->assertSame($expected, Inline::parse($yaml));
diff --git a/src/Symfony/Component/Yaml/Tests/ParserTest.php b/src/Symfony/Component/Yaml/Tests/ParserTest.php
index ebf0327..bf59efe 100644
--- a/src/Symfony/Component/Yaml/Tests/ParserTest.php
+++ b/src/Symfony/Component/Yaml/Tests/ParserTest.php
@@ -118,9 +118,7 @@ YAML;
         $this->parser->parse($yml, Yaml::PARSE_CUSTOM_TAGS);
     }
 
-    /**
-     * @dataProvider getDataFormSpecifications
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDataFormSpecifications')]
     public function testSpecifications($expected, $yaml, $comment)
     {
         $this->assertEquals($expected, var_export($this->parser->parse($yaml), true), $comment);
@@ -136,9 +134,7 @@ YAML;
         return self::loadTestsFromFixtureFiles('nonStringKeys.yml');
     }
 
-    /**
-     * @dataProvider invalidIndentation
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidIndentation')]
     public function testTabsAsIndentationInYaml(string $given, string $expectedMessage)
     {
         $this->expectException(ParseException::class);
@@ -182,9 +178,7 @@ YAML;
         $this->parser->parse("abc:\n\tabc");
     }
 
-    /**
-     * @dataProvider validTokenSeparators
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validTokenSeparators')]
     public function testValidTokenSeparation(string $given, array $expected)
     {
         $actual = $this->parser->parse($given);
@@ -531,9 +525,7 @@ EOF;
         return $tests;
     }
 
-    /**
-     * @dataProvider getBlockChompingTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getBlockChompingTests')]
     public function testBlockChomping($expected, $yaml)
     {
         $this->assertSame($expected, $this->parser->parse($yaml));
@@ -578,9 +570,7 @@ EOF;
         $this->assertSameData(['foo' => null, 'bar' => 1], $this->parser->parse($input), '->parse() does not parse objects');
     }
 
-    /**
-     * @dataProvider getObjectForMapTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getObjectForMapTests')]
     public function testObjectForMap($yaml, $expected)
     {
         $flags = Yaml::PARSE_OBJECT_FOR_MAP;
@@ -686,9 +676,7 @@ EOF;
         $this->assertSame($expected, $this->parser->parse($yaml));
     }
 
-    /**
-     * @requires extension iconv
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('iconv')]
     public function testNonUtf8Exception()
     {
         $yamls = [
@@ -861,9 +849,7 @@ EOT;
         return $tests;
     }
 
-    /**
-     * @dataProvider getParseExceptionNotAffectedMultiLineStringLastResortParsing
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getParseExceptionNotAffectedMultiLineStringLastResortParsing')]
     public function testParseExceptionNotAffectedByMultiLineStringLastResortParsing($yaml)
     {
         $this->expectException(ParseException::class);
@@ -966,9 +952,7 @@ EOD;
         $this->assertSame($expected, Yaml::parse($input));
     }
 
-    /**
-     * @dataProvider getParseExceptionOnDuplicateData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getParseExceptionOnDuplicateData')]
     public function testParseExceptionOnDuplicate($input, $duplicateKey, $lineNumber)
     {
         $this->expectException(ParseException::class);
@@ -1274,9 +1258,7 @@ EOT;
         $this->assertSame(['foo' => ['bar' => 'foobar']], $this->parser->parse($yaml));
     }
 
-    /**
-     * @dataProvider getCommentLikeStringInScalarBlockData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getCommentLikeStringInScalarBlockData')]
     public function testCommentLikeStringsAreNotStrippedInBlockScalars($yaml, $expectedParserResult)
     {
         $this->assertSame($expectedParserResult, $this->parser->parse($yaml));
@@ -1459,9 +1441,7 @@ EOT
         );
     }
 
-    /**
-     * @dataProvider getBinaryData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getBinaryData')]
     public function testParseBinaryData($data)
     {
         $this->assertSame(['data' => 'Hello world'], $this->parser->parse($data));
@@ -1488,9 +1468,7 @@ EOT,
         ];
     }
 
-    /**
-     * @dataProvider getInvalidBinaryData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidBinaryData')]
     public function testParseInvalidBinaryData($data, $expectedMessage)
     {
         $this->expectException(ParseException::class);
@@ -1563,9 +1541,7 @@ EOT;
         $this->assertSameData(['date' => $expectedDate], $this->parser->parse($yaml, Yaml::PARSE_DATETIME));
     }
 
-    /**
-     * @dataProvider parserThrowsExceptionWithCorrectLineNumberProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('parserThrowsExceptionWithCorrectLineNumberProvider')]
     public function testParserThrowsExceptionWithCorrectLineNumber($lineNumber, $yaml)
     {
         $this->expectException(ParseException::class);
@@ -1710,9 +1686,7 @@ YAML;
         $this->assertSame($expected, $this->parser->parse($yaml));
     }
 
-    /**
-     * @dataProvider wrappedUnquotedStringsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('wrappedUnquotedStringsProvider')]
     public function testWrappedUnquotedStringWithMultipleSpacesInValue(string $yaml, array $expected)
     {
         $this->assertSame($expected, $this->parser->parse($yaml));
@@ -1751,9 +1725,7 @@ EOT;
         $this->assertSame(['foo' => 'bar baz foobar foo', 'bar' => 'baz'], $this->parser->parse($yaml));
     }
 
-    /**
-     * @dataProvider unquotedStringWithTrailingComment
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('unquotedStringWithTrailingComment')]
     public function testParseMultiLineUnquotedStringWithTrailingComment(string $yaml, array $expected)
     {
         $this->assertSame($expected, $this->parser->parse($yaml));
@@ -1814,9 +1786,7 @@ EOT;
         ];
     }
 
-    /**
-     * @dataProvider escapedQuotationCharactersInQuotedStrings
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('escapedQuotationCharactersInQuotedStrings')]
     public function testParseQuotedStringContainingEscapedQuotationCharacters(string $yaml, array $expected)
     {
         $this->assertSame($expected, $this->parser->parse($yaml));
@@ -1872,9 +1842,7 @@ YAML
         $this->assertSame("foo bar\nbaz", $this->parser->parse("foo\nbar\n\nbaz"));
     }
 
-    /**
-     * @dataProvider multiLineDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('multiLineDataProvider')]
     public function testParseMultiLineMappingValue($yaml, $expected, $parseError)
     {
         $this->assertSame($expected, $this->parser->parse($yaml));
@@ -1939,9 +1907,7 @@ EOF;
         return $tests;
     }
 
-    /**
-     * @dataProvider inlineNotationSpanningMultipleLinesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('inlineNotationSpanningMultipleLinesProvider')]
     public function testInlineNotationSpanningMultipleLines($expected, string $yaml)
     {
         $this->assertSame($expected, $this->parser->parse($yaml));
@@ -2365,9 +2331,7 @@ YAML;
         $this->parser->parse('["\\"]');
     }
 
-    /**
-     * @dataProvider taggedValuesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('taggedValuesProvider')]
     public function testCustomTagSupport($expected, $yaml)
     {
         $this->assertSameData($expected, $this->parser->parse($yaml, Yaml::PARSE_CUSTOM_TAGS));
@@ -2619,9 +2583,7 @@ YAML;
         $this->parser->parse('!php/const:App\Kernel::SEMART_VERSION', Yaml::PARSE_CUSTOM_TAGS | Yaml::PARSE_CONSTANT);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testDeprecatedPhpConstantSyntaxAsScalarKey()
     {
         $this->expectDeprecation('Since symfony/yaml 6.2: YAML syntax for key "!php/const:Symfony\Component\Yaml\Tests\B::BAR" is deprecated and replaced by "!php/const Symfony\Component\Yaml\Tests\B::BAR".');
@@ -2798,9 +2760,7 @@ EOE;
         $this->parser->parse($yaml);
     }
 
-    /**
-     * @dataProvider circularReferenceProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('circularReferenceProvider')]
     public function testDetectCircularReferences($yaml)
     {
         $this->expectException(ParseException::class);
@@ -2878,9 +2838,7 @@ YAML;
         $this->assertSame($expected, $this->parser->parse($yaml));
     }
 
-    /**
-     * @dataProvider indentedMappingData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('indentedMappingData')]
     public function testParseIndentedMappings($yaml, $expected)
     {
         $this->assertSame($expected, $this->parser->parse($yaml));
diff --git a/src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php b/src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php
index a1464a3..f09fcdd 100644
--- a/src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php
+++ b/src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php
@@ -341,10 +341,8 @@ abstract class HttpClientTestCase extends TestCase
         $this->assertSame('', $response->getContent(false));
     }
 
-    /**
-     * @testWith [[]]
-     *           [["Content-Length: 7"]]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([[]])]
+    #[\PHPUnit\Framework\Attributes\TestWith([['Content-Length: 7']])]
     public function testRedirects(array $headers = [])
     {
         $client = $this->getHttpClient(__FUNCTION__);
@@ -1022,9 +1020,7 @@ abstract class HttpClientTestCase extends TestCase
         }
     }
 
-    /**
-     * @requires extension zlib
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('zlib')]
     public function testAutoEncodingRequest()
     {
         $client = $this->getHttpClient(__FUNCTION__);
@@ -1095,9 +1091,7 @@ abstract class HttpClientTestCase extends TestCase
         $this->assertContains('Link: </style.css>; rel=preload; as=style', $response->getInfo('response_headers'));
     }
 
-    /**
-     * @requires extension zlib
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('zlib')]
     public function testUserlandEncodingRequest()
     {
         $client = $this->getHttpClient(__FUNCTION__);
@@ -1117,9 +1111,7 @@ abstract class HttpClientTestCase extends TestCase
         $this->assertSame('gzip', $body['HTTP_ACCEPT_ENCODING']);
     }
 
-    /**
-     * @requires extension zlib
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('zlib')]
     public function testGzipBroken()
     {
         $client = $this->getHttpClient(__FUNCTION__);
diff --git a/src/Symfony/Contracts/Translation/Test/TranslatorTest.php b/src/Symfony/Contracts/Translation/Test/TranslatorTest.php
index fad5d75..65c6104 100644
--- a/src/Symfony/Contracts/Translation/Test/TranslatorTest.php
+++ b/src/Symfony/Contracts/Translation/Test/TranslatorTest.php
@@ -51,9 +51,7 @@ class TranslatorTest extends TestCase
         };
     }
 
-    /**
-     * @dataProvider getTransTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransTests')]
     public function testTrans($expected, $id, $parameters)
     {
         $translator = $this->getTranslator();
@@ -61,9 +59,7 @@ class TranslatorTest extends TestCase
         $this->assertEquals($expected, $translator->trans($id, $parameters));
     }
 
-    /**
-     * @dataProvider getTransChoiceTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransChoiceTests')]
     public function testTransChoiceWithExplicitLocale($expected, $id, $number)
     {
         $translator = $this->getTranslator();
@@ -71,11 +67,8 @@ class TranslatorTest extends TestCase
         $this->assertEquals($expected, $translator->trans($id, ['%count%' => $number]));
     }
 
-    /**
-     * @requires extension intl
-     *
-     * @dataProvider getTransChoiceTests
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransChoiceTests')]
     public function testTransChoiceWithDefaultLocale($expected, $id, $number)
     {
         $translator = $this->getTranslator();
@@ -83,9 +76,7 @@ class TranslatorTest extends TestCase
         $this->assertEquals($expected, $translator->trans($id, ['%count%' => $number]));
     }
 
-    /**
-     * @dataProvider getTransChoiceTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransChoiceTests')]
     public function testTransChoiceWithEnUsPosix($expected, $id, $number)
     {
         $translator = $this->getTranslator();
@@ -101,9 +92,7 @@ class TranslatorTest extends TestCase
         $this->assertEquals('en', $translator->getLocale());
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testGetLocaleReturnsDefaultLocaleIfNotSet()
     {
         $translator = $this->getTranslator();
@@ -139,9 +128,7 @@ class TranslatorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getInterval
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInterval')]
     public function testInterval($expected, $number, $interval)
     {
         $translator = $this->getTranslator();
@@ -164,9 +151,7 @@ class TranslatorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getChooseTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getChooseTests')]
     public function testChoose($expected, $id, $number, $locale = null)
     {
         $translator = $this->getTranslator();
@@ -181,9 +166,7 @@ class TranslatorTest extends TestCase
         $this->assertEquals('There are two apples', $translator->trans('There are two apples', ['%count%' => 2]));
     }
 
-    /**
-     * @dataProvider getNonMatchingMessages
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNonMatchingMessages')]
     public function testThrowExceptionIfMatchingMessageCannotBeFound($id, $number)
     {
         $this->expectException(\InvalidArgumentException::class);
@@ -295,18 +278,14 @@ class TranslatorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider failingLangcodes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('failingLangcodes')]
     public function testFailedLangcodes($nplural, $langCodes)
     {
         $matrix = $this->generateTestData($langCodes);
         $this->validateMatrix($nplural, $matrix, false);
     }
 
-    /**
-     * @dataProvider successLangcodes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('successLangcodes')]
     public function testLangcodes($nplural, $langCodes)
     {
         $matrix = $this->generateTestData($langCodes);
