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

../rector-poc/rector src/Symfony/
---
 .../ArgumentResolver/EntityValueResolverTest.php   |  20 +-
 .../DataCollector/DoctrineDataCollectorTest.php    |  20 +-
 .../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 +-
 .../Bridge/Doctrine/Tests/ManagerRegistryTest.php  |   7 +-
 .../Tests/Middleware/Debug/MiddlewareTest.php      |  29 +-
 .../Tests/Middleware/IdleConnection/DriverTest.php |   4 +-
 .../Middleware/IdleConnection/ListenerTest.php     |   4 +-
 .../Tests/PropertyInfo/DoctrineExtractorTest.php   |  27 +-
 .../DoctrineTokenProviderPostgresTest.php          |   7 +-
 .../RememberMe/DoctrineTokenProviderTest.php       |   4 +-
 .../Bridge/Doctrine/Tests/Types/UlidTypeTest.php   |   4 +-
 .../Bridge/Doctrine/Tests/Types/UuidTypeTest.php   |   4 +-
 .../Validator/Constraints/UniqueEntityTest.php     |   4 +-
 .../Constraints/UniqueEntityValidatorTest.php      |  72 +---
 .../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/PhpUnit/Tests/ClockMockTest.php |   3 +-
 .../Bridge/PhpUnit/Tests/CoverageListenerTest.php  |   8 +-
 .../DeprecationErrorHandler/ConfigurationTest.php  |  14 +-
 .../DeprecationErrorHandler/DeprecationTest.php    |  14 +-
 .../Bridge/PhpUnit/Tests/EnumExistsMockTest.php    |   4 +-
 .../PhpUnit/Tests/ExpectDeprecationTraitTest.php   |  23 +-
 .../Tests/ExpectedDeprecationAnnotationTest.php    |  10 +-
 .../FailTests/ExpectDeprecationTraitTestFail.php   |  12 +-
 .../Tests/FailTests/NoAssertionsTestNotRisky.php   |   3 +-
 .../Tests/FailTests/NoAssertionsTestRisky.php      |   6 +-
 .../PhpUnit/Tests/Metadata/AttributeReaderTest.php |   8 +-
 .../Tests/OnlyExpectingDeprecationSkippedTest.php  |   6 +-
 .../Bridge/PhpUnit/Tests/ProcessIsolationTest.php  |  11 +-
 .../Bridge/PhpUnit/Tests/SymfonyExtension.php      |   1 +
 .../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/DumpExtensionTest.php     |   8 +-
 .../Twig/Tests/Extension/EmojiExtensionTest.php    |  12 +-
 .../FormExtensionBootstrap5LayoutTest.php          |   2 +-
 .../Tests/Extension/FormExtensionDivLayoutTest.php |   8 +-
 .../Extension/HttpFoundationExtensionTest.php      |  16 +-
 .../Twig/Tests/Extension/RoutingExtensionTest.php  |   4 +-
 .../Twig/Tests/Extension/SecurityExtensionTest.php |   8 +-
 .../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 +-
 .../Validator/Constraints/TwigValidatorTest.php    |  11 +-
 .../DependencyInjection/DebugExtensionTest.php     |   4 +-
 .../CacheWarmer/SerializerCacheWarmerTest.php      |  12 +-
 .../Tests/Command/CachePoolClearCommandTest.php    |   4 +-
 .../Tests/Command/CachePoolDeleteCommandTest.php   |   4 +-
 .../Tests/Command/CachePruneCommandTest.php        |   1 +
 .../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/SecretsRevealCommandTest.php     |   8 +-
 .../Tests/Command/SecretsSetCommandTest.php        |   4 +-
 .../Tests/Command/TranslationDebugCommandTest.php  |   4 +-
 .../TranslationExtractCommandCompletionTest.php    |   4 +-
 .../Command/TranslationExtractCommandTest.php      |   4 +-
 .../Tests/Command/WorkflowDumpCommandTest.php      |   4 +-
 .../Descriptor/AbstractDescriptorTestCase.php      |  45 +--
 .../Console/Descriptor/TextDescriptorTest.php      |   3 +-
 .../Tests/Controller/AbstractControllerTest.php    |  12 +-
 .../Tests/Controller/RedirectControllerTest.php    |  12 +-
 .../Compiler/ProfilerPassTest.php                  |   4 +-
 .../Compiler/UnusedTagsPassTest.php                |   4 +-
 .../DependencyInjection/ConfigurationTest.php      |  24 +-
 .../FrameworkExtensionTestCase.php                 |  12 +-
 .../PhpFrameworkExtensionTest.php                  |   8 +-
 .../XmlFrameworkExtensionTest.php                  |   2 +
 .../AbstractAttributeRoutingTestCase.php           |   4 +-
 .../Tests/Functional/ApiAttributesTest.php         |  10 +-
 .../Tests/Functional/CachePoolClearCommandTest.php |   4 +-
 .../Tests/Functional/CachePoolListCommandTest.php  |   4 +-
 .../Tests/Functional/CachePoolsTest.php            |  15 +-
 .../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/PropertyInfoTest.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 +
 .../DependencyInjection/MainConfigurationTest.php  |  11 +-
 .../Security/Factory/AbstractFactoryTest.php       |   8 +-
 .../Security/Factory/AccessTokenFactoryTest.php    |  20 +-
 .../DependencyInjection/SecurityExtensionTest.php  |  20 +-
 .../XmlCompleteConfigurationTest.php               |   1 +
 .../XmlCustomAuthenticatorTest.php                 |   5 +-
 .../DependencyInjection/XmlCustomProviderTest.php  |   5 +-
 .../Tests/Functional/AccessTokenTest.php           |  56 +--
 .../Tests/Functional/AuthenticatorTest.php         |  12 +-
 .../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      |  53 +--
 .../Tests/Functional/AttributeExtensionTest.php    |   9 +-
 .../Tests/Controller/ProfilerControllerTest.php    |  20 +-
 .../Tests/Csp/ContentSecurityPolicyHandlerTest.php |   8 +-
 .../DependencyInjection/ConfigurationTest.php      |   8 +-
 .../WebProfilerExtensionTest.php                   |  12 +-
 .../EventListener/WebDebugToolbarListenerTest.php  |  43 +--
 .../Tests/Profiler/CodeExtensionTest.php           |   4 +-
 .../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/Command/ImportMapRequireCommandTest.php  |   4 +-
 .../Tests/Compiler/CssAssetUrlCompilerTest.php     |   8 +-
 .../Compiler/JavaScriptImportPathCompilerTest.php  |  12 +-
 .../Parser/JavascriptSequenceParserTest.php        |  12 +-
 .../Compiler/SourceMappingUrlsCompilerTest.php     |   4 +-
 .../Tests/ImportMap/ImportMapAuditorTest.php       |   4 +-
 .../Tests/ImportMap/ImportMapConfigReaderTest.php  |  13 +-
 .../Tests/ImportMap/ImportMapEntryTest.php         |   4 +-
 .../Tests/ImportMap/ImportMapGeneratorTest.php     |   8 +-
 .../Tests/ImportMap/ImportMapManagerTest.php       |   8 +-
 .../ImportMap/ImportMapOutdatedCommandTest.php     |   4 +-
 .../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     |  16 +-
 .../Tests/Marshaller/DeflateMarshallerTest.php     |   4 +-
 .../Tests/Marshaller/SodiumMarshallerTest.php      |   4 +-
 .../Tests/Messenger/EarlyExpirationHandlerTest.php |   4 +-
 .../Cache/Tests/Traits/RedisProxiesTest.php        |  17 +-
 .../Cache/Tests/Traits/RedisTraitTest.php          |  21 +-
 .../Component/Clock/Test/ClockSensitiveTrait.php   |   7 +-
 .../Component/Clock/Tests/DatePointTest.php        |  18 +-
 .../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     |  15 +-
 .../Config/Tests/Definition/StringNodeTest.php     |  26 +-
 .../Component/Config/Tests/FileLocatorTest.php     |   4 +-
 .../Config/Tests/Loader/FileLoaderTest.php         |   4 +-
 .../Config/Tests/Resource/ComposerResourceTest.php |   4 +-
 .../Tests/Resource/ReflectionClassResourceTest.php |   4 +-
 .../Component/Config/Tests/Util/XmlUtilsTest.php   |   8 +-
 .../Component/Console/Tests/ApplicationTest.php    | 112 ++----
 .../Console/Tests/CI/GithubActionReporterTest.php  |   4 +-
 .../Console/Tests/Command/CommandTest.php          |  26 +-
 .../Console/Tests/Command/CompleteCommandTest.php  |  12 +-
 .../Tests/Command/DumpCompletionCommandTest.php    |   4 +-
 .../Console/Tests/Command/HelpCommandTest.php      |   4 +-
 .../Console/Tests/Command/InvokableCommandTest.php |  16 +-
 .../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          |  24 +-
 .../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/AutowireInlineTest.php         |  20 +-
 .../Tests/Attribute/AutowireTest.php               |   4 +-
 .../Tests/ChildDefinitionTest.php                  |   4 +-
 .../AliasDeprecatedPublicServicesPassTest.php      |   4 +-
 .../Tests/Compiler/AutowirePassTest.php            |   8 +-
 .../Tests/Compiler/CheckAliasValidityPassTest.php  |   4 +
 .../Compiler/CheckArgumentsValidityPassTest.php    |   4 +-
 .../Compiler/CheckCircularReferencesPassTest.php   |   3 +
 .../Compiler/CheckDefinitionValidityPassTest.php   |   8 +-
 ...ExceptionOnInvalidReferenceBehaviorPassTest.php |  14 +-
 .../Compiler/CheckReferenceValidityPassTest.php    |   1 +
 .../Compiler/CheckTypeDeclarationsPassTest.php     |  30 ++
 .../Tests/Compiler/IntegrationTest.php             |   4 +-
 .../MergeExtensionConfigurationPassTest.php        |   1 +
 .../Compiler/PriorityTaggedServiceTraitTest.php    |   4 +-
 .../RegisterAutoconfigureAttributesPassTest.php    |   1 +
 .../RegisterServiceSubscribersPassTest.php         |   4 +-
 .../Tests/Compiler/ResolveClassPassTest.php        |   8 +-
 .../Tests/Compiler/ResolveFactoryClassPassTest.php |   4 +-
 .../ResolveReferencesToAliasesPassTest.php         |  10 +-
 .../Compiler/ValidateEnvPlaceholdersPassTest.php   |   1 +
 .../ContainerParametersResourceCheckerTest.php     |   4 +-
 .../Tests/ContainerBuilderTest.php                 |  30 +-
 .../DependencyInjection/Tests/ContainerTest.php    |   8 +-
 .../DependencyInjection/Tests/CrossCheckTest.php   |   4 +-
 .../DependencyInjection/Tests/DefinitionTest.php   |   4 +-
 .../Tests/Dumper/PhpDumperTest.php                 |  29 +-
 .../Tests/Dumper/XmlDumperTest.php                 |  13 +-
 .../Tests/Dumper/YamlDumperTest.php                |   4 +-
 .../Tests/EnvVarProcessorTest.php                  | 125 ++-----
 .../InvalidParameterTypeExceptionTest.php          |   4 +-
 .../Tests/Extension/ExtensionTest.php              |   4 +-
 .../LazyProxy/PhpDumper/LazyServiceDumperTest.php  |   4 +-
 .../Loader/Configurator/EnvConfiguratorTest.php    |   4 +-
 .../Tests/Loader/FileLoaderTest.php                |  32 +-
 .../Tests/Loader/IniFileLoaderTest.php             |   9 +-
 .../Tests/Loader/LoaderResolverTest.php            |   4 +-
 .../Tests/Loader/PhpFileLoaderTest.php             |   4 +-
 .../Tests/Loader/XmlFileLoaderTest.php             |  19 +-
 .../Tests/Loader/YamlFileLoaderTest.php            |  13 +-
 .../Tests/ParameterBag/FrozenParameterBagTest.php  |   4 +-
 .../Tests/ParameterBag/ParameterBagTest.php        |  32 +-
 .../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 +-
 .../Emoji/Tests/EmojiTransliteratorTest.php        |  12 +-
 .../ErrorHandler/Tests/DebugClassLoaderTest.php    |  36 +-
 .../ClassNotFoundErrorEnhancerTest.php             |   4 +-
 .../UndefinedFunctionErrorEnhancerTest.php         |   4 +-
 .../UndefinedMethodErrorEnhancerTest.php           |   4 +-
 .../ErrorHandler/Tests/ErrorHandlerTest.php        |  24 +-
 .../Tests/ErrorRenderer/FileLinkFormatterTest.php  |   4 +-
 .../Tests/ErrorRenderer/HtmlErrorRendererTest.php  |   8 +-
 .../Tests/Exception/FlattenExceptionTest.php       |  24 +-
 .../Tests/Debug/WrappedListenerTest.php            |   4 +-
 .../Tests/ExpressionLanguageTest.php               |  60 +--
 .../ExpressionLanguage/Tests/LexerTest.php         |   4 +-
 .../Tests/Node/AbstractNodeTestCase.php            |  12 +-
 .../Tests/Node/BinaryNodeTest.php                  |   6 +-
 .../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 +-
 .../Core/EventListener/ResizeFormListenerTest.php  |  12 +-
 .../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 |   5 +-
 .../Tests/Extension/Core/Type/DateTypeTest.php     |  21 +-
 .../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     |  17 +-
 .../Tests/Extension/Core/Type/TimezoneTypeTest.php |  17 +-
 .../Form/Tests/Extension/Core/Type/UrlTypeTest.php |   4 +-
 .../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       |  57 +--
 .../Component/HttpClient/Tests/HttpOptionsTest.php |   4 +-
 .../HttpClient/Tests/HttplugClientTest.php         |   8 +-
 .../HttpClient/Tests/MockHttpClientTest.php        |  20 +-
 .../HttpClient/Tests/NativeHttpClientTest.php      |  10 +-
 .../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/RetryableHttpClientTest.php   |   4 +-
 .../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 +-
 .../HttpFoundation/Tests/File/FileTest.php         |   8 +-
 .../HttpFoundation/Tests/File/UploadedFileTest.php |   8 +-
 .../HttpFoundation/Tests/HeaderUtilsTest.php       |  16 +-
 .../Component/HttpFoundation/Tests/IpUtilsTest.php |  32 +-
 .../RateLimiter/AbstractRequestRateLimiterTest.php |   4 +-
 .../AttributesRequestMatcherTest.php               |   4 +-
 .../ExpressionRequestMatcherTest.php               |   4 +-
 .../RequestMatcher/HeaderRequestMatcherTest.php    |  12 +-
 .../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 +-
 .../QueryParameterRequestMatcherTest.php           |  12 +-
 .../RequestMatcher/SchemeRequestMatcherTest.php    |   4 +-
 .../Component/HttpFoundation/Tests/RequestTest.php | 149 +++-----
 .../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        |  12 +-
 .../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   |  23 +-
 .../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/UriSignerTest.php         |   4 +-
 .../HttpFoundation/Tests/UrlHelperTest.php         |  20 +-
 .../BackedEnumValueResolverTest.php                |   8 +-
 .../ArgumentResolver/DateTimeValueResolverTest.php |  29 +-
 .../QueryParameterValueResolverTest.php            |  12 +-
 .../RequestPayloadValueResolverTest.php            |  30 +-
 .../ArgumentResolver/UidValueResolverTest.php      |  12 +-
 .../UploadedFileValueResolverTest.php              |  52 +--
 .../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 +-
 .../AddAnnotatedClassesToCachePassTest.php         |   4 +-
 .../RegisterControllerArgumentLocatorsPassTest.php |  12 +-
 .../HttpKernel/Tests/Event/ControllerEventTest.php |  12 +-
 .../EventListener/CacheAttributeListenerTest.php   |  24 +-
 .../DisallowRobotsIndexingListenerTest.php         |   4 +-
 .../Tests/EventListener/ErrorListenerTest.php      |  19 +-
 .../Tests/EventListener/ProfilerListenerTest.php   |   4 +-
 .../Tests/EventListener/RouterListenerTest.php     |  12 +-
 .../Tests/EventListener/SessionListenerTest.php    |  47 +--
 .../Tests/Exception/HttpExceptionTest.php          |  12 +-
 .../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   |  24 +-
 .../Tests/HttpCache/ResponseCacheStrategyTest.php  |   7 +-
 .../HttpKernel/Tests/HttpKernelBrowserTest.php     |   8 +-
 .../Component/HttpKernel/Tests/HttpKernelTest.php  |   4 +-
 .../Component/HttpKernel/Tests/KernelTest.php      |  16 +-
 .../Component/HttpKernel/Tests/Log/LoggerTest.php  |   4 +-
 .../Tests/Profiler/FileProfilerStorageTest.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 +-
 .../Intl/Tests/Util/GitRepositoryTest.php          |  11 +-
 .../Component/Intl/Tests/Util/IcuVersionTest.php   |   8 +-
 .../Component/Intl/Tests/Util/VersionTest.php      |   8 +-
 .../Component/JsonPath/Tests/JsonCrawlerTest.php   |  16 +-
 .../Tests/JsonPathComplianceTestSuiteTest.php      |   4 +-
 .../Component/JsonPath/Tests/JsonPathTest.php      |   4 +-
 .../Tests/Tokenizer/JsonPathTokenizerTest.php      |  24 +-
 .../Tests/CacheWarmer/LazyGhostCacheWarmerTest.php |   4 +-
 .../JsonStreamer/Tests/JsonStreamWriterTest.php    |   4 +-
 .../Tests/Read/LazyInstantiatorTest.php            |  16 +-
 .../JsonStreamer/Tests/Read/LexerTest.php          |   4 +-
 .../JsonStreamer/Tests/Read/SplitterTest.php       |   8 +-
 .../Tests/Read/StreamReaderGeneratorTest.php       |   4 +-
 .../Tests/Write/StreamWriterGeneratorTest.php      |   4 +-
 .../Ldap/Tests/Adapter/AbstractQueryTest.php       |   5 +-
 .../Ldap/Tests/Adapter/ExtLdap/AdapterTest.php     |  35 +-
 .../Tests/Adapter/ExtLdap/EntryManagerTest.php     |   3 +-
 .../Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php |  47 +--
 src/Symfony/Component/Ldap/Tests/LdapTest.php      |   4 +-
 .../Security/CheckLdapCredentialsListenerTest.php  |   8 +-
 .../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     |  18 +-
 .../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 +-
 .../Tests/Store/PredisStoreWithExceptionsTest.php  |   4 +-
 .../Store/PredisStoreWithoutExceptionsTest.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 +-
 .../Lock/Tests/Store/RelayClusterStoreTest.php     |   7 +-
 .../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 +-
 .../Tests/Transport/AhaSendApiTransportTest.php    |   4 +-
 .../Transport/SesApiAsyncAwsTransportTest.php      |   4 +-
 .../Transport/SesHttpAsyncAwsTransportTest.php     |   4 +-
 .../Tests/Transport/AzureApiTransportTest.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/MailomatApiTransportTest.php   |   4 +-
 .../Tests/Transport/MailtrapApiTransportTest.php   |   4 +-
 .../Tests/Transport/PostalApiTransportTest.php     |   4 +-
 .../Tests/Transport/PostmarkApiTransportTest.php   |   4 +-
 .../Tests/Transport/ResendApiTransportTest.php     |   4 +-
 .../Tests/Transport/ScalewayApiTransportTest.php   |   4 +-
 .../RemoteEvent/SendgridPayloadConverterTest.php   |   8 +-
 .../Tests/Transport/SendgridApiTransportTest.php   |   4 +-
 .../Tests/Transport/SendgridSmtpTransportTest.php  |   4 +-
 .../Webhook/SendgridSignedRequestParserTest.php    |   3 +-
 .../SendgridWrongSecretRequestParserTest.php       |   3 +-
 .../SendgridWrongSignatureRequestParserTest.php    |   3 +-
 .../Tests/Transport/SweegoApiTransportTest.php     |   4 +-
 .../Test/AbstractTransportFactoryTestCase.php      |  12 +-
 .../DkimSignedMessageListenerTest.php              |   4 +-
 .../Tests/EventListener/EnvelopeListenerTest.php   |   4 +-
 .../Tests/EventListener/MessageListenerTest.php    |   4 +-
 .../SmimeEncryptedMessageListenerTest.php          |  12 +-
 .../SmimeSignedMessageListenerTest.php             |   4 +-
 .../Exception/UnsupportedSchemeExceptionTest.php   |  12 +-
 .../Tests/Transport/AbstractTransportTest.php      |   4 +-
 .../Component/Mailer/Tests/Transport/DsnTest.php   |  12 +-
 .../Tests/Transport/FailoverTransportTest.php      |  16 +-
 .../Tests/Transport/NativeTransportFactoryTest.php |   8 +-
 .../Tests/Transport/RoundRobinTransportTest.php    |   8 +-
 .../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 +-
 .../Tests/Transport/BeanstalkdReceiverTest.php     |   4 +-
 .../Beanstalkd/Tests/Transport/ConnectionTest.php  |   8 +-
 .../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    |  25 +-
 .../Redis/Tests/Transport/RedisReceiverTest.php    |   8 +-
 .../Tests/Transport/RedisTransportFactoryTest.php  |  13 +-
 .../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 +-
 .../EventListener/ResetServicesListenerTest.php    |   4 +-
 .../SendFailedMessageForRetryListenerTest.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      |   8 +-
 .../Middleware/HandleMessageMiddlewareTest.php     |   4 +-
 .../Tests/Middleware/SendMessageMiddlewareTest.php |   5 +-
 .../Tests/Retry/MultiplierRetryStrategyTest.php    |   8 +-
 .../InMemory/InMemoryTransportFactoryTest.php      |   4 +-
 .../Tests/Transport/Sender/SendersLocatorTest.php  |   8 +-
 .../Normalizer/FlattenExceptionNormalizerTest.php  |   4 +-
 .../Transport/Serialization/SerializerTest.php     |   4 +-
 .../Tests/Transport/TransportFactoryTest.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        |  16 +-
 .../Bandwidth/Tests/BandwidthTransportTest.php     |   8 +-
 .../Bridge/Bluesky/Tests/BlueskyTransportTest.php  |   4 +-
 .../ClickSend/Tests/ClickSendTransportTest.php     |   8 +-
 .../Firebase/Tests/FirebaseTransportTest.php       |   4 +-
 .../Tests/FortySixElksTransportTest.php            |   4 +-
 .../Bridge/GoIp/Tests/GoIpTransportTest.php        |   3 +-
 .../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 +-
 .../OvhCloud/Tests/OvhCloudTransportTest.php       |   7 +-
 .../Bridge/Plivo/Tests/PlivoTransportTest.php      |   8 +-
 .../RingCentral/Tests/RingCentralTransportTest.php |   8 +-
 .../Tests/SimpleTextinTransportTest.php            |   8 +-
 .../Bridge/Sipgate/Tests/SipgateTransportTest.php  |   4 +-
 .../Bridge/Slack/Tests/SlackOptionsTest.php        |  17 +-
 .../Bridge/Slack/Tests/SlackTransportTest.php      |   6 +-
 .../Sms77/Tests/Sms77TransportFactoryTest.php      |   4 +-
 .../Bridge/Sms77/Tests/Sms77TransportTest.php      |   4 +-
 .../SmsBiuras/Tests/SmsBiurasTransportTest.php     |   4 +-
 .../Bridge/Smsapi/Tests/SmsapiTransportTest.php    |   4 +-
 .../Bridge/Smsbox/Tests/SmsboxOptionsTest.php      |  12 +-
 .../Bridge/Smsense/Tests/SmsenseTransportTest.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 +-
 .../Test/AbstractTransportFactoryTestCase.php      |  12 +-
 .../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 |  24 +-
 .../Tests/Transport/FailoverTransportTest.php      |  12 +-
 .../ObjectMapper/Tests/ObjectMapperTest.php        |  20 +-
 .../OptionsResolver/Tests/OptionsResolverTest.php  | 120 ++----
 .../Tests/Command/UserPasswordHashCommandTest.php  |   6 +-
 .../Tests/Hasher/NativePasswordHasherTest.php      |  14 +-
 .../Tests/Hasher/SodiumPasswordHasherTest.php      |   4 +-
 .../Process/Tests/ExecutableFinderTest.php         |  12 +-
 .../Component/Process/Tests/PhpSubprocessTest.php  |   4 +-
 .../Component/Process/Tests/ProcessTest.php        | 104 ++----
 .../Tests/PropertyAccessorArrayAccessTestCase.php  |  20 +-
 .../Tests/PropertyAccessorCollectionTestCase.php   |   4 +-
 .../PropertyAccess/Tests/PropertyAccessorTest.php  |  95 ++---
 .../Tests/PropertyPathBuilderTest.php              |   4 +-
 .../PropertyAccess/Tests/PropertyPathTest.php      |   4 +-
 .../Tests/AbstractPropertyInfoExtractorTest.php    |   4 +-
 .../DependencyInjection/PropertyInfoPassTest.php   |   4 +-
 .../Tests/Extractor/ConstructorExtractorTest.php   |   8 +-
 .../Tests/Extractor/PhpDocExtractorTest.php        | 157 +++-----
 .../Tests/Extractor/PhpStanExtractorTest.php       | 196 +++-------
 .../Tests/Extractor/ReflectionExtractorTest.php    | 157 +++-----
 .../Tests/PropertyInfoCacheExtractorTest.php       |  19 +-
 .../Tests/PropertyInfoExtractorTest.php            |   7 +-
 .../Component/PropertyInfo/Tests/TypeTest.php      |   3 +-
 .../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          |   4 +-
 .../Dumper/CompiledUrlGeneratorDumperTest.php      |  15 +-
 .../Routing/Tests/Generator/UrlGeneratorTest.php   |  31 +-
 .../Tests/Loader/AttributeClassLoaderTest.php      |   4 +-
 .../Routing/Tests/Loader/ContainerLoaderTest.php   |   4 +-
 .../Routing/Tests/Loader/DirectoryLoaderTest.php   |   1 +
 .../Routing/Tests/Loader/ObjectLoaderTest.php      |   4 +-
 .../Routing/Tests/Loader/PhpFileLoaderTest.php     |   4 +-
 .../Tests/Loader/Psr4DirectoryLoaderTest.php       |   8 +-
 .../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 +-
 .../Component/Routing/Tests/RequestContextTest.php | Bin 8178 -> 8448 bytes
 .../Tests/Requirement/EnumRequirementTest.php      |   4 +-
 .../Routing/Tests/Requirement/RequirementTest.php  | 410 +++++++++------------
 .../Component/Routing/Tests/RouteCompilerTest.php  |  20 +-
 src/Symfony/Component/Routing/Tests/RouteTest.php  |  24 +-
 .../AddScheduleMessengerPassTest.php               |   4 +-
 .../Tests/Generator/MessageGeneratorTest.php       |   8 +-
 .../Normalizer/SchedulerTriggerNormalizerTest.php  |  12 +-
 .../Tests/Trigger/CronExpressionTriggerTest.php    |   4 +-
 .../Tests/Trigger/PeriodicalTriggerTest.php        |  20 +-
 .../Core/Test/AccessDecisionStrategyTestCase.php   |   3 +-
 .../Authentication/Token/AbstractTokenTest.php     |  12 +-
 .../Authentication/Token/RememberMeTokenTest.php   |   4 +-
 .../Authorization/AuthorizationCheckerTest.php     |   8 +-
 .../Tests/Authorization/ExpressionLanguageTest.php |   4 +-
 .../TraceableAccessDecisionManagerTest.php         |   8 +-
 .../Authorization/Voter/AuthenticatedVoterTest.php |  18 +-
 .../Tests/Authorization/Voter/ClosureVoterTest.php |   4 +-
 .../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 +-
 .../Security/Core/Tests/User/InMemoryUserTest.php  |   6 +-
 .../Validator/Constraints/UserPasswordTest.php     |   4 +-
 .../Constraints/UserPasswordValidatorTestCase.php  |  12 +-
 .../Csrf/Tests/SameOriginCsrfTokenManagerTest.php  |   8 +-
 .../TokenGenerator/UriSafeTokenGeneratorTest.php   |   4 +-
 .../TokenStorage/NativeSessionTokenStorageTest.php |  20 +-
 .../AccessToken/Oidc/OidcTokenHandlerTest.php      |  18 +-
 .../Oidc/OidcUserInfoTokenHandlerTest.php          |   4 +-
 .../Authentication/AuthenticatorManagerBCTest.php  |  77 +---
 .../Authentication/AuthenticatorManagerTest.php    |  19 +-
 .../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   |  12 +-
 .../Authenticator/LoginLinkAuthenticatorTest.php   |   4 +-
 .../Authenticator/Passport/Badge/UserBadgeTest.php |   9 +-
 .../Authenticator/RememberMeAuthenticatorTest.php  |   4 +-
 .../Authenticator/RemoteUserAuthenticatorTest.php  |   8 +-
 .../Tests/Authenticator/X509AuthenticatorTest.php  |  12 +-
 .../Tests/Controller/UserValueResolverTest.php     |   4 +-
 .../EventListener/CheckCredentialsListenerTest.php |   8 +-
 .../CheckRememberMeConditionsListenerTest.php      |   8 +-
 .../ClearSiteDataLogoutListenerTest.php            |   4 +-
 .../CsrfTokenClearingLogoutListenerTest.php        |   1 +
 .../IsGrantedAttributeListenerTest.php             |   4 +-
 .../IsGrantedAttributeWithClosureListenerTest.php  |   8 +-
 .../PasswordMigratingListenerTest.php              |   4 +-
 .../EventListener/UserProviderListenerTest.php     |   4 +-
 .../Http/Tests/Firewall/ContextListenerTest.php    |  12 +-
 .../Http/Tests/Firewall/ExceptionListenerTest.php  |  24 +-
 .../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 +-
 .../Tests/Store/RelayClusterStoreTest.php          |   4 +-
 .../Semaphore/Tests/Store/RelayStoreTest.php       |   4 +-
 .../Semaphore/Tests/Store/StoreFactoryTest.php     |   4 +-
 .../Serializer/Tests/Attribute/ContextTest.php     |   4 +-
 .../Serializer/Tests/Attribute/MaxDepthTest.php    |   6 +-
 .../CompiledClassMetadataCacheWarmerTest.php       |   4 +-
 .../Encoder/CsvEncoderContextBuilderTest.php       |  11 +-
 .../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 +-
 .../DependencyInjection/SerializerPassTest.php     |  50 +--
 .../Tests/DeserializeNestedArrayOfObjectsTest.php  |   4 +-
 .../Serializer/Tests/Encoder/CsvEncoderTest.php    |   6 +-
 .../Serializer/Tests/Encoder/JsonDecodeTest.php    |   8 +-
 .../Serializer/Tests/Encoder/JsonEncodeTest.php    |   4 +-
 .../Serializer/Tests/Encoder/XmlEncoderTest.php    |   4 +-
 .../Factory/CompiledClassMetadataFactoryTest.php   |  11 +-
 .../CamelCaseToSnakeCaseNameConverterTest.php      |   8 +-
 .../MetadataAwareNameConverterTest.php             |  24 +-
 .../SnakeCaseToCamelCaseNameConverterTest.php      |   8 +-
 .../Tests/Normalizer/AbstractNormalizerTest.php    |  10 +-
 .../Normalizer/AbstractObjectNormalizerTest.php    |  12 +-
 .../ConstraintViolationListNormalizerTest.php      |   4 +-
 .../Tests/Normalizer/DataUriNormalizerTest.php     |  20 +-
 .../Normalizer/DateIntervalNormalizerTest.php      |  16 +-
 .../Tests/Normalizer/DateTimeNormalizerTest.php    |  20 +-
 .../Normalizer/GetSetMethodNormalizerTest.php      |  10 +-
 .../Tests/Normalizer/NumberNormalizerTest.php      |  66 +---
 .../Tests/Normalizer/PropertyNormalizerTest.php    |   9 +-
 .../Tests/Normalizer/UidNormalizerTest.php         |  12 +-
 .../Component/Serializer/Tests/SerializerTest.php  |  20 +-
 .../Stopwatch/Tests/StopwatchEventTest.php         |   3 +-
 .../Stopwatch/Tests/StopwatchPeriodTest.php        |  12 +-
 .../Component/Stopwatch/Tests/StopwatchTest.php    |   3 +-
 .../String/Tests/AbstractAsciiTestCase.php         | 224 +++--------
 .../String/Tests/AbstractUnicodeTestCase.php       |  25 +-
 .../Component/String/Tests/FunctionsTest.php       |  12 +-
 .../Tests/Inflector/EnglishInflectorTest.php       |   8 +-
 .../String/Tests/Inflector/FrenchInflectorTest.php |   8 +-
 .../Tests/Inflector/SpanishInflectorTest.php       |  12 +-
 .../Component/String/Tests/LazyStringTest.php      |   4 +-
 .../String/Tests/Slugger/AsciiSluggerTest.php      |  15 +-
 src/Symfony/Component/String/Tests/SluggerTest.php |   7 +-
 .../Bridge/Crowdin/Tests/CrowdinProviderTest.php   |  12 +-
 .../Bridge/Loco/Tests/LocoProviderTest.php         |  12 +-
 .../Tests/LocoProviderWithoutTranslatorBagTest.php |   3 +-
 .../Bridge/Lokalise/Tests/LokaliseProviderTest.php |   8 +-
 .../Bridge/Phrase/Tests/PhraseProviderTest.php     |  64 ++--
 .../Test/AbstractProviderFactoryTestCase.php       |  12 +-
 .../Translation/Test/ProviderTestCase.php          |   4 +-
 .../Tests/Command/TranslationLintCommandTest.php   |   8 +-
 .../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/Formatter/IntlFormatterTest.php          |  12 +-
 .../Tests/Formatter/MessageFormatterTest.php       |   4 +-
 .../Translation/Tests/Loader/CsvFileLoaderTest.php |   5 +-
 .../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 |  72 +---
 .../Translation/Tests/Util/ArrayConverterTest.php  |   4 +-
 .../TypeInfo/Tests/Type/ArrayShapeTypeTest.php     |   4 +-
 .../TypeInfo/Tests/Type/CollectionTypeTest.php     |   5 +-
 .../TypeInfo/Tests/Type/IntersectionTypeTest.php   |   1 +
 .../Component/TypeInfo/Tests/TypeFactoryTest.php   |   9 +-
 .../PhpDocAwareReflectionTypeResolverTest.php      |   4 +-
 .../TypeResolver/ReflectionTypeResolverTest.php    |   4 +-
 .../Tests/TypeResolver/StringTypeResolverTest.php  |   8 +-
 .../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       |  44 +--
 .../Validator/Tests/ConstraintValidatorTest.php    |   4 +-
 .../Tests/ConstraintViolationListTest.php          |   4 +-
 .../AbstractComparisonValidatorTestCase.php        |   8 +-
 .../Tests/Constraints/AllValidatorTest.php         |   8 +-
 .../Constraints/AtLeastOneOfValidatorTest.php      |  12 +-
 .../Tests/Constraints/BicValidatorTest.php         |  23 +-
 .../Tests/Constraints/BlankValidatorTest.php       |   4 +-
 .../Tests/Constraints/CardSchemeValidatorTest.php  |  12 +-
 .../Validator/Tests/Constraints/CascadeTest.php    |   4 +-
 .../Tests/Constraints/CharsetValidatorTest.php     |  12 +-
 .../Tests/Constraints/ChoiceValidatorTest.php      |  42 +--
 .../Validator/Tests/Constraints/CidrTest.php       |   8 +-
 .../Tests/Constraints/CidrValidatorTest.php        |  24 +-
 .../Validator/Tests/Constraints/CollectionTest.php |  20 +-
 .../Validator/Tests/Constraints/CompoundTest.php   |   4 +-
 .../Tests/Constraints/CountValidatorTestCase.php   |  70 +---
 .../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/DisableAutoMappingTest.php   |   4 +-
 .../Tests/Constraints/DivisibleByValidatorTest.php |   4 +-
 .../Validator/Tests/Constraints/EmailTest.php      |   8 +-
 .../Tests/Constraints/EmailValidatorTest.php       |  36 +-
 .../Tests/Constraints/EnableAutoMappingTest.php    |   4 +-
 .../Tests/Constraints/ExpressionSyntaxTest.php     |   8 +-
 .../Validator/Tests/Constraints/ExpressionTest.php |   4 +-
 .../Tests/Constraints/ExpressionValidatorTest.php  |   4 +-
 .../Validator/Tests/Constraints/FileTest.php       |  24 +-
 .../Tests/Constraints/FileValidatorTestCase.php    |  44 +--
 ...alValidatorWithPositiveOrZeroConstraintTest.php |  22 +-
 ...aterThanValidatorWithPositiveConstraintTest.php |  22 +-
 .../Tests/Constraints/HostnameValidatorTest.php    |  32 +-
 .../Tests/Constraints/IbanValidatorTest.php        |  24 +-
 .../Tests/Constraints/ImageValidatorTest.php       |  70 +---
 .../Validator/Tests/Constraints/IpTest.php         |   8 +-
 .../Tests/Constraints/IpValidatorTest.php          |  84 ++---
 .../Tests/Constraints/IsFalseValidatorTest.php     |   4 +-
 .../Tests/Constraints/IsNullValidatorTest.php      |   8 +-
 .../Tests/Constraints/IsTrueValidatorTest.php      |   4 +-
 .../Tests/Constraints/IsbnValidatorTest.php        |  38 +-
 .../Tests/Constraints/IsinValidatorTest.php        |  16 +-
 .../Tests/Constraints/IssnValidatorTest.php        |  16 +-
 .../Tests/Constraints/JsonValidatorTest.php        |   8 +-
 .../Tests/Constraints/LanguageValidatorTest.php    |  16 +-
 .../Validator/Tests/Constraints/LengthTest.php     |   8 +-
 .../Tests/Constraints/LengthValidatorTest.php      |  48 +--
 ...alValidatorWithNegativeOrZeroConstraintTest.php |  22 +-
 ...LessThanValidatorWithNegativeConstraintTest.php |  22 +-
 .../Tests/Constraints/LocaleValidatorTest.php      |  20 +-
 .../Tests/Constraints/LuhnValidatorTest.php        |  12 +-
 .../Tests/Constraints/MacAddressValidatorTest.php  | 188 ++++------
 .../NoSuspiciousCharactersValidatorTest.php        |  11 +-
 .../Validator/Tests/Constraints/NotBlankTest.php   |   8 +-
 .../Tests/Constraints/NotBlankValidatorTest.php    |   8 +-
 .../NotCompromisedPasswordValidatorTest.php        |   8 +-
 .../Tests/Constraints/NotNullValidatorTest.php     |   8 +-
 .../Constraints/PasswordStrengthValidatorTest.php  |  12 +-
 .../PasswordStrengthValidatorWithClosureTest.php   |   8 +-
 .../Validator/Tests/Constraints/RangeTest.php      |  20 +-
 .../Tests/Constraints/RangeValidatorTest.php       | 202 +++-------
 .../Validator/Tests/Constraints/RegexTest.php      |  16 +-
 .../Tests/Constraints/RegexValidatorTest.php       |  26 +-
 .../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        |  12 +-
 .../Validator/Tests/Constraints/UniqueTest.php     |   8 +-
 .../Tests/Constraints/UniqueValidatorTest.php      |  24 +-
 .../Validator/Tests/Constraints/UrlTest.php        |  12 +-
 .../Tests/Constraints/UrlValidatorTest.php         |  42 +--
 .../Validator/Tests/Constraints/UuidTest.php       |   8 +-
 .../Tests/Constraints/UuidValidatorTest.php        |  24 +-
 .../Tests/Constraints/WeekValidatorTest.php        |  12 +-
 .../Validator/Tests/Constraints/WhenTest.php       |   8 +-
 .../Tests/Constraints/WhenValidatorTest.php        |   1 +
 .../Validator/Tests/Constraints/WordCountTest.php  |   4 +-
 .../Tests/Constraints/WordCountValidatorTest.php   |  12 +-
 .../Tests/Constraints/YamlValidatorTest.php        |   8 +-
 .../AddAutoMappingConfigurationPassTest.php        |   4 +-
 .../Mapping/Loader/PropertyInfoLoaderTest.php      |   8 +-
 .../Tests/Mapping/Loader/XmlFileLoaderTest.php     |   5 +-
 .../Tests/Mapping/Loader/YamlFileLoaderTest.php    |   9 +-
 .../Tests/Resources/TranslationFilesTest.php       |   8 +-
 .../Validator/Tests/Util/PropertyPathTest.php      |   4 +-
 .../Tests/Validator/RecursiveValidatorTest.php     |  28 +-
 .../VarDumper/Test/VarDumperTestTrait.php          |   4 +-
 .../Tests/Caster/AddressInfoCasterTest.php         |   4 +-
 .../VarDumper/Tests/Caster/CasterTest.php          |   4 +-
 .../VarDumper/Tests/Caster/CurlCasterTest.php      |   8 +-
 .../VarDumper/Tests/Caster/DOMCasterTest.php       |  40 +-
 .../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/OpenSSLCasterTest.php   |   4 +-
 .../VarDumper/Tests/Caster/PdoCasterTest.php       |   4 +-
 .../VarDumper/Tests/Caster/RdKafkaCasterTest.php   |   7 +-
 .../VarDumper/Tests/Caster/RedisCasterTest.php     |  13 +-
 .../Tests/Caster/ReflectionCasterTest.php          |  12 +-
 .../VarDumper/Tests/Caster/ResourceCasterTest.php  |  34 +-
 .../VarDumper/Tests/Caster/SocketCasterTest.php    |  28 +-
 .../VarDumper/Tests/Caster/SplCasterTest.php       |   6 +-
 .../VarDumper/Tests/Caster/SqliteCasterTest.php    |   4 +-
 .../VarDumper/Tests/Caster/StubCasterTest.php      |   8 +-
 .../VarDumper/Tests/Caster/XmlReaderCasterTest.php |  20 +-
 .../Tests/Command/Descriptor/CliDescriptorTest.php |   4 +-
 .../Command/Descriptor/HtmlDescriptorTest.php      |   4 +-
 .../Tests/Command/ServerDumpCommandTest.php        |   4 +-
 .../VarDumper/Tests/Dumper/CliDumperTest.php       |  12 +-
 .../ContextProvider/RequestContextProviderTest.php |   4 +-
 .../Tests/Dumper/ContextualizedDumperTest.php      |   3 +-
 .../VarDumper/Tests/Dumper/HtmlDumperTest.php      |   8 +-
 .../VarExporter/Tests/InstantiatorTest.php         |   4 +-
 .../VarExporter/Tests/LazyProxyTraitTest.php       |  20 +-
 .../VarExporter/Tests/LegacyLazyGhostTraitTest.php |  24 +-
 .../VarExporter/Tests/LegacyLazyProxyTraitTest.php |   7 +-
 .../VarExporter/Tests/LegacyProxyHelperTest.php    |   7 +-
 .../VarExporter/Tests/ProxyHelperTest.php          |  16 +-
 .../VarExporter/Tests/VarExporterTest.php          |   8 +-
 src/Symfony/Component/WebLink/Tests/LinkTest.php   |   8 +-
 .../Webhook/Test/AbstractRequestParserTestCase.php |   4 +-
 .../Tests/Controller/WebhookControllerTest.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 +-
 .../Workflow/Tests/Event/EventNameTraitTest.php    |   3 +-
 .../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    |  24 +-
 src/Symfony/Component/Yaml/Tests/InlineTest.php    | 100 ++---
 src/Symfony/Component/Yaml/Tests/ParserTest.php    |  85 ++---
 .../HttpClient/Test/HttpClientTestCase.php         |  18 +-
 .../Tests/Service/ServiceSubscriberTraitTest.php   |   4 +-
 .../Contracts/Translation/Test/TranslatorTest.php  |  43 +--
 1085 files changed, 3808 insertions(+), 9468 deletions(-)

diff --git a/src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php b/src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php
index 8207317..0d24484 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php
@@ -64,9 +64,7 @@ class EntityValueResolverTest extends TestCase
         $this->assertSame([], $resolver->resolve($request, $argument));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testResolveWithNoIdAndDataOptional()
     {
         $manager = $this->createMock(ObjectManager::class);
@@ -108,9 +106,7 @@ 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->createMock(ObjectManager::class);
@@ -136,12 +132,10 @@ class EntityValueResolverTest extends TestCase
         $this->assertSame([$object], $resolver->resolve($request, $argument));
     }
 
-    /**
-     * @dataProvider idsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('idsProvider')]
     public function testResolveWithIdAndTypeAlias(string|int $id)
     {
-        $manager = $this->getMockBuilder(ObjectManager::class)->getMock();
+        $manager = $this->createMock(ObjectManager::class);
         $registry = $this->createRegistry($manager);
         $resolver = new EntityValueResolver(
             $registry,
@@ -156,7 +150,7 @@ class EntityValueResolverTest extends TestCase
 
         $argument = $this->createArgument('Throwable', $mapEntity = new MapEntity(id: 'id'));
 
-        $repository = $this->getMockBuilder(ObjectRepository::class)->getMock();
+        $repository = $this->createMock(ObjectRepository::class);
         $repository->expects($this->once())
             ->method('find')
             ->with($id)
@@ -251,9 +245,7 @@ class EntityValueResolverTest extends TestCase
         yield ['foo'];
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testResolveGuessOptional()
     {
         $manager = $this->createMock(ObjectManager::class);
diff --git a/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php b/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php
index 595ac76..35cda92 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php
@@ -65,9 +65,7 @@ class DoctrineDataCollectorTest extends TestCase
         $this->assertEquals(1, $c->getQueryCount());
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testCollectTime()
     {
         $c = $this->createCollector([]);
@@ -93,9 +91,7 @@ class DoctrineDataCollectorTest extends TestCase
         $this->assertEquals(3, $c->getTime());
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testCollectTimeWithFloatExecutionMS()
     {
         $queries = [
@@ -154,9 +150,7 @@ class DoctrineDataCollectorTest extends TestCase
         $this->assertEquals([], $c->getQueries());
     }
 
-    /**
-     * @dataProvider paramProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('paramProvider')]
     public function testCollectQueries($param, $types, $expected)
     {
         $queries = [
@@ -205,9 +199,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 = [
@@ -247,9 +239,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/DependencyInjection/DoctrineExtensionTest.php b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php
index 75cc439..a5b8011 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php
@@ -145,9 +145,7 @@ class DoctrineExtensionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getAutomappingData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAutomappingData')]
     public function testFixManagersAutoMappings(array $originalEm1, array $originalEm2, array $expectedEm1, array $expectedEm2)
     {
         $emConfigs = [
@@ -187,9 +185,7 @@ class DoctrineExtensionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider providerBasicDrivers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerBasicDrivers')]
     public function testLoadBasicCacheDriver(string $class, array $config, array $expectedCalls = [])
     {
         $container = $this->createContainer();
@@ -270,9 +266,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 017b327..4d342e7 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php
@@ -111,9 +111,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();
@@ -145,9 +143,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')) {
@@ -188,9 +184,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 e010600..c269860 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 aa12fdb..1b5af39 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php
@@ -119,9 +119,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/ManagerRegistryTest.php b/src/Symfony/Bridge/Doctrine/Tests/ManagerRegistryTest.php
index 4803e6a..4976395 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/ManagerRegistryTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/ManagerRegistryTest.php
@@ -49,11 +49,8 @@ class ManagerRegistryTest extends TestCase
         $this->assertFalse(isset($foo->bar));
     }
 
-    /**
-     * @requires PHP 8.4
-     *
-     * @dataProvider provideResetServiceWithNativeLazyObjectsCases
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideResetServiceWithNativeLazyObjectsCases')]
     public function testResetServiceWithNativeLazyObjects(string $class)
     {
         $container = new $class();
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Middleware/Debug/MiddlewareTest.php b/src/Symfony/Bridge/Doctrine/Tests/Middleware/Debug/MiddlewareTest.php
index eb3acbb..16c2b1c 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;
@@ -93,9 +91,7 @@ EOT);
         ];
     }
 
-    /**
-     * @dataProvider provideExecuteMethod
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideExecuteMethod')]
     public function testWithoutBinding(callable $executeMethod)
     {
         $this->init();
@@ -110,9 +106,7 @@ EOT);
         $this->assertGreaterThan(0, $debug[1]['executionMS']);
     }
 
-    /**
-     * @dataProvider provideExecuteMethod
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideExecuteMethod')]
     public function testWithValueBound(callable $executeMethod)
     {
         $this->init();
@@ -140,9 +134,7 @@ EOT;
         $this->assertGreaterThan(0, $debug[1]['executionMS']);
     }
 
-    /**
-     * @dataProvider provideExecuteMethod
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideExecuteMethod')]
     public function testWithParamBound(callable $executeMethod)
     {
         $this->init();
@@ -179,9 +171,7 @@ EOT;
         ];
     }
 
-    /**
-     * @dataProvider provideEndTransactionMethod
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEndTransactionMethod')]
     public function testTransaction(callable $endTransactionMethod, string $expectedEndTransactionDebug)
     {
         $this->init();
@@ -237,9 +227,7 @@ EOT;
         ];
     }
 
-    /**
-     * @dataProvider provideExecuteAndEndTransactionMethods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideExecuteAndEndTransactionMethods')]
     public function testGlobalDoctrineDuration(callable $sqlMethod, callable $endTransactionMethod)
     {
         $this->init();
@@ -263,9 +251,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/Middleware/IdleConnection/DriverTest.php b/src/Symfony/Bridge/Doctrine/Tests/Middleware/IdleConnection/DriverTest.php
index 010e187..ed778b4 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Middleware/IdleConnection/DriverTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Middleware/IdleConnection/DriverTest.php
@@ -18,9 +18,7 @@ use Symfony\Bridge\Doctrine\Middleware\IdleConnection\Driver;
 
 class DriverTest extends TestCase
 {
-    /**
-     * @group time-sensitive
-     */
+    #[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
     public function testConnect()
     {
         $driverMock = $this->createMock(DriverInterface::class);
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Middleware/IdleConnection/ListenerTest.php b/src/Symfony/Bridge/Doctrine/Tests/Middleware/IdleConnection/ListenerTest.php
index 72fa7e0..95e3a8f 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Middleware/IdleConnection/ListenerTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Middleware/IdleConnection/ListenerTest.php
@@ -25,9 +25,7 @@ class ListenerTest extends TestCase
         $containerMock = $this->createMock(ContainerInterface::class);
         $connectionExpiries = new \ArrayObject(['connectionone' => time() - 30, 'connectiontwo' => time() + 40]);
 
-        $connectionOneMock = $this->getMockBuilder(ConnectionInterface::class)
-            ->disableOriginalConstructor()
-            ->getMock();
+        $connectionOneMock = $this->createMock(ConnectionInterface::class);
 
         $containerMock->expects($this->exactly(1))
             ->method('get')
diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php
index 2a5f337..70b8d80 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php
@@ -114,11 +114,8 @@ class DoctrineExtractorTest extends TestCase
         );
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider legacyTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('legacyTypesProvider')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractLegacy(string $property, ?array $type = null)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor::getTypes()" method is deprecated, use "Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor::getType()" instead.');
@@ -126,9 +123,7 @@ class DoctrineExtractorTest extends TestCase
         $this->assertEquals($type, $this->createExtractor()->getTypes(DoctrineDummy::class, $property, []));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractWithEmbeddedLegacy()
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor::getTypes()" method is deprecated, use "Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor::getType()" instead.');
@@ -148,9 +143,7 @@ class DoctrineExtractorTest extends TestCase
         $this->assertEquals($expectedTypes, $actualTypes);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractEnumLegacy()
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor::getTypes()" method is deprecated, use "Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor::getType()" instead.');
@@ -162,9 +155,7 @@ class DoctrineExtractorTest extends TestCase
         $this->assertNull($this->createExtractor()->getTypes(DoctrineEnum::class, 'enumCustom', []));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public static function legacyTypesProvider(): array
     {
         // DBAL 4 has a special fallback strategy for BINGINT (int -> string)
@@ -264,9 +255,7 @@ class DoctrineExtractorTest extends TestCase
         $this->assertNull($this->createExtractor()->getProperties('Not\Exist'));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGetTypesCatchExceptionLegacy()
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor::getTypes()" method is deprecated, use "Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor::getType()" instead.');
@@ -300,9 +289,7 @@ class DoctrineExtractorTest extends TestCase
         $this->assertNull($this->createExtractor()->getType(DoctrineEnum::class, 'enumCustom'));
     }
 
-    /**
-     * @dataProvider typeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('typeProvider')]
     public function testExtract(string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->createExtractor()->getType(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 2971f4d..dcb36af 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 b490d94..034d88a 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Types/UlidTypeTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Types/UlidTypeTest.php
@@ -129,9 +129,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 f26e43f..55e393c 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Types/UuidTypeTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Types/UuidTypeTest.php
@@ -140,9 +140,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/UniqueEntityTest.php b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityTest.php
index a301572..f5ce355 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityTest.php
@@ -61,9 +61,7 @@ class UniqueEntityTest extends TestCase
         self::assertSame(['some_group'], $constraint->groups);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValueOptionConfiguresFields()
     {
         $constraint = new UniqueEntity(['value' => 'email']);
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php
index 4f93768..ab42249 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php
@@ -185,9 +185,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValidateEntityWithPrivatePropertyAndProxyObjectDoctrineStyle()
     {
         $entity = new SingleIntIdWithPrivateNameEntity(1, 'Foo');
@@ -226,9 +224,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValidateCustomErrorPathDoctrineStyle()
     {
         $entity1 = new SingleIntIdEntity(1, 'Foo');
@@ -267,10 +263,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);
@@ -303,9 +297,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);
@@ -314,10 +306,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');
@@ -414,9 +404,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider resultTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('resultTypesProvider')]
     public function testValidateResultTypes($entity1, $result)
     {
         $constraint = new UniqueEntity(
@@ -817,9 +805,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider resultWithEmptyIterator
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('resultWithEmptyIterator')]
     public function testValidateUniquenessWithEmptyIterator($entity, $result)
     {
         $constraint = new UniqueEntity(
@@ -954,9 +940,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValidateDTOUniquenessDoctrineStyle()
     {
         $constraint = new UniqueEntity([
@@ -1017,9 +1001,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValidateMappingOfFieldNamesDoctrineStyle()
     {
         $constraint = new UniqueEntity([
@@ -1061,9 +1043,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate($dto, $constraint);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidateDTOFieldNameDoctrineStyle()
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -1094,9 +1074,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate($dto, $constraint);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidateEntityFieldNameDoctrineStyle()
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -1142,9 +1120,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValidateDTOUniquenessWhenUpdatingEntityDoctrineStyle()
     {
         $constraint = new UniqueEntity([
@@ -1197,9 +1173,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValidateDTOUniquenessWhenUpdatingEntityWithTheSameValueDoctrineStyle()
     {
         $constraint = new UniqueEntity([
@@ -1251,9 +1225,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValidateIdentifierMappingOfFieldNamesDoctrineStyle()
     {
         $constraint = new UniqueEntity([
@@ -1311,9 +1283,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate($dto, $constraint);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidateMissingIdentifierFieldNameDoctrineStyle()
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -1361,9 +1331,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate($dto, $constraint);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testUninitializedValueThrowExceptionDoctrineStyle()
     {
         $this->expectExceptionMessage('Typed property Symfony\Bridge\Doctrine\Tests\Fixtures\Dto::$foo must not be accessed before initialization');
@@ -1404,9 +1372,7 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate($dto, $constraint);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testEntityManagerNullObjectWhenDTODoctrineStyle()
     {
         $this->expectException(ConstraintDefinitionException::class);
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php b/src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php
index e68f09f..923985c 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 2a952ab..a085dc8 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 626c94c..e2280ee 100644
--- a/src/Symfony/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php
+++ b/src/Symfony/Bridge/Monolog/Tests/Handler/ConsoleHandlerTest.php
@@ -46,9 +46,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 5c96b39..9d51d92 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(Level::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 48a1347..d46fed3 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/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 d13b6a8..165efe6 100644
--- a/src/Symfony/Bridge/PhpUnit/Tests/CoverageListenerTest.php
+++ b/src/Symfony/Bridge/PhpUnit/Tests/CoverageListenerTest.php
@@ -13,14 +13,10 @@ namespace Symfony\Bridge\PhpUnit\Tests;
 
 use PHPUnit\Framework\TestCase;
 
-/**
- * @requires PHPUnit < 10
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpunit('< 10')]
 class CoverageListenerTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function test()
     {
         $dir = __DIR__.'/../Tests/Fixtures/coverage';
diff --git a/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/ConfigurationTest.php b/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/ConfigurationTest.php
index 1ec5366..fd008f6 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,10 +467,8 @@ class ConfigurationTest extends TestCase
         $this->assertEquals(json_encode($expected, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES), file_get_contents($filename));
     }
 
-    /**
-     * @requires PHPUnit < 10
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpunit('< 10')]
+    #[\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 9adeca4..888b77e 100644
--- a/src/Symfony/Bridge/PhpUnit/Tests/ExpectDeprecationTraitTest.php
+++ b/src/Symfony/Bridge/PhpUnit/Tests/ExpectDeprecationTraitTest.php
@@ -14,18 +14,16 @@ namespace Symfony\Bridge\PhpUnit\Tests;
 use PHPUnit\Framework\TestCase;
 use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
 
-/**
- * @requires PHPUnit < 10
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpunit('< 10')]
 final class ExpectDeprecationTraitTest extends TestCase
 {
     use ExpectDeprecationTrait;
 
     /**
      * 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');
@@ -35,10 +33,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');
@@ -47,9 +46,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');
@@ -61,10 +60,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');
@@ -75,11 +75,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 1db5448..ca06aa2 100644
--- a/src/Symfony/Bridge/PhpUnit/Tests/ExpectedDeprecationAnnotationTest.php
+++ b/src/Symfony/Bridge/PhpUnit/Tests/ExpectedDeprecationAnnotationTest.php
@@ -13,18 +13,17 @@ namespace Symfony\Bridge\PhpUnit\Tests;
 
 use PHPUnit\Framework\TestCase;
 
-/**
- * @requires PHPUnit < 10
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpunit('< 10')]
 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);
@@ -33,11 +32,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 7bf40df..3036420 100644
--- a/src/Symfony/Bridge/PhpUnit/Tests/FailTests/ExpectDeprecationTraitTestFail.php
+++ b/src/Symfony/Bridge/PhpUnit/Tests/FailTests/ExpectDeprecationTraitTestFail.php
@@ -19,18 +19,17 @@ use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
  *
  * This class is deliberately suffixed with *TestFail.php so that it is ignored
  * by PHPUnit. This test is designed to fail. See ../expectdeprecationfail.phpt.
- *
- * @requires PHPUnit < 10
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpunit('< 10')]
 final class ExpectDeprecationTraitTestFail extends TestCase
 {
     use ExpectDeprecationTrait;
 
     /**
      * 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');
@@ -40,10 +39,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/NoAssertionsTestNotRisky.php b/src/Symfony/Bridge/PhpUnit/Tests/FailTests/NoAssertionsTestNotRisky.php
index 8008287..dcde777 100644
--- a/src/Symfony/Bridge/PhpUnit/Tests/FailTests/NoAssertionsTestNotRisky.php
+++ b/src/Symfony/Bridge/PhpUnit/Tests/FailTests/NoAssertionsTestNotRisky.php
@@ -17,9 +17,8 @@ use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
 /**
  * This class is deliberately suffixed with *TestRisky.php so that it is ignored
  * by PHPUnit. This test is designed to fail. See ../expectnotrisky.phpt.
- *
- * @requires PHPUnit < 10
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpunit('< 10')]
 final class NoAssertionsTestNotRisky extends TestCase
 {
     use ExpectDeprecationTrait;
diff --git a/src/Symfony/Bridge/PhpUnit/Tests/FailTests/NoAssertionsTestRisky.php b/src/Symfony/Bridge/PhpUnit/Tests/FailTests/NoAssertionsTestRisky.php
index 5ec1375..027cfc5 100644
--- a/src/Symfony/Bridge/PhpUnit/Tests/FailTests/NoAssertionsTestRisky.php
+++ b/src/Symfony/Bridge/PhpUnit/Tests/FailTests/NoAssertionsTestRisky.php
@@ -17,18 +17,16 @@ use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
 /**
  * This class is deliberately suffixed with *TestRisky.php so that it is ignored
  * by PHPUnit. This test is designed to fail. See ../expectrisky.phpt.
- *
- * @requires PHPUnit < 10
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpunit('< 10')]
 final class NoAssertionsTestRisky extends TestCase
 {
     use ExpectDeprecationTrait;
 
     /**
      * 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/Metadata/AttributeReaderTest.php b/src/Symfony/Bridge/PhpUnit/Tests/Metadata/AttributeReaderTest.php
index b82a7ac..9ed5b9a 100644
--- a/src/Symfony/Bridge/PhpUnit/Tests/Metadata/AttributeReaderTest.php
+++ b/src/Symfony/Bridge/PhpUnit/Tests/Metadata/AttributeReaderTest.php
@@ -17,14 +17,10 @@ use Symfony\Bridge\PhpUnit\Attribute\TimeSensitive;
 use Symfony\Bridge\PhpUnit\Metadata\AttributeReader;
 use Symfony\Bridge\PhpUnit\Tests\Metadata\Fixtures\FooBar;
 
-/**
- * @requires PHP 8.0
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhp('8.0')]
 final class AttributeReaderTest extends TestCase
 {
-    /**
-     * @dataProvider provideReadCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideReadCases')]
     public function testAttributesAreRead(string $method, string $attributeClass, array $expected)
     {
         $reader = new AttributeReader();
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 ad6d2d5..c08cd5e 100644
--- a/src/Symfony/Bridge/PhpUnit/Tests/ProcessIsolationTest.php
+++ b/src/Symfony/Bridge/PhpUnit/Tests/ProcessIsolationTest.php
@@ -16,26 +16,25 @@ use PHPUnit\Framework\TestCase;
 /**
  * Don't remove this test case, it tests the legacy group.
  *
- * @group legacy
  *
- * @runTestsInSeparateProcesses
  *
- * @requires PHPUnit < 10
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpunit('< 10')]
+#[\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/PhpUnit/Tests/SymfonyExtension.php b/src/Symfony/Bridge/PhpUnit/Tests/SymfonyExtension.php
index 1219c27..43f041e 100644
--- a/src/Symfony/Bridge/PhpUnit/Tests/SymfonyExtension.php
+++ b/src/Symfony/Bridge/PhpUnit/Tests/SymfonyExtension.php
@@ -23,6 +23,7 @@ use Symfony\Bridge\PhpUnit\Tests\Fixtures\symfonyextension\src\FinalClass;
 #[TimeSensitive('App\Foo\A')]
 class SymfonyExtension extends TestCase
 {
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testExtensionOfFinalClass()
     {
         $this->expectUserDeprecationMessage(\sprintf('The "%s" class is considered final. It may change without further notice as of its next major version. You should not extend it from "%s".', FinalClass::class, ClassExtendingFinalClass::class));
diff --git a/src/Symfony/Bridge/PsrHttpMessage/Tests/Factory/PsrHttpFactoryTest.php b/src/Symfony/Bridge/PsrHttpMessage/Tests/Factory/PsrHttpFactoryTest.php
index f5b09c8..5c5c0a8 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 23bdbb9..a0dad7d 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 0367f77..dacc06e 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 7ba828c..1e0c91a 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 9e4e23a..d3c5f6a 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();
@@ -111,9 +110,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();
@@ -150,9 +147,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 28e8997..b9c7d08 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
@@ -626,9 +624,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 2f7410d..73dc1ad 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractLayoutTestCase.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractLayoutTestCase.php
@@ -2711,9 +2711,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/DumpExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/DumpExtensionTest.php
index 01817ce..27ad048 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/EmojiExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/EmojiExtensionTest.php
index 492929a..dbafc74 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/EmojiExtensionTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/EmojiExtensionTest.php
@@ -14,16 +14,12 @@ namespace Symfony\Bridge\Twig\Tests\Extension;
 use PHPUnit\Framework\TestCase;
 use Symfony\Bridge\Twig\Extension\EmojiExtension;
 
-/**
- * @requires extension intl
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
 class EmojiExtensionTest extends TestCase
 {
-    /**
-     * @testWith ["🅰️", ":a:"]
-     *           ["🅰️", ":a:", "slack"]
-     *           ["🅰", ":a:", "github"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['🅰️', ':a:'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['🅰️', ':a:', 'slack'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['🅰', ':a:', 'github'])]
     public function testEmojify(string $expected, string $string, ?string $catalog = null)
     {
         $extension = new EmojiExtension();
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 d0e90b1..8fd1da7 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/SecurityExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/SecurityExtensionTest.php
index e0ca4dc..54a0600 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/SecurityExtensionTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/SecurityExtensionTest.php
@@ -32,9 +32,7 @@ class SecurityExtensionTest extends TestCase
         ClassExistsMock::withMockedClasses([FieldVote::class => true]);
     }
 
-    /**
-     * @dataProvider provideObjectFieldAclCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideObjectFieldAclCases')]
     public function testIsGrantedCreatesFieldVoteObjectWhenFieldNotNull($object, $field, $expectedSubject)
     {
         $securityChecker = $this->createMock(AuthorizationCheckerInterface::class);
@@ -65,9 +63,7 @@ class SecurityExtensionTest extends TestCase
         $securityExtension->isGranted('ROLE', 'object', 'bar');
     }
 
-    /**
-     * @dataProvider provideObjectFieldAclCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideObjectFieldAclCases')]
     public function testIsGrantedForUserCreatesFieldVoteObjectWhenFieldNotNull($object, $field, $expectedSubject)
     {
         if (!interface_exists(UserAuthorizationCheckerInterface::class)) {
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 fc48beb..a977685 100644
--- a/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationNodeVisitorTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/NodeVisitor/TranslationNodeVisitorTest.php
@@ -25,7 +25,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 0c4bcdf..aefafc3 100644
--- a/src/Symfony/Bridge/Twig/Tests/TokenParser/FormThemeTokenParserTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/TokenParser/FormThemeTokenParserTest.php
@@ -24,9 +24,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/Bridge/Twig/Tests/Validator/Constraints/TwigValidatorTest.php b/src/Symfony/Bridge/Twig/Tests/Validator/Constraints/TwigValidatorTest.php
index da5597a..9928dcf 100644
--- a/src/Symfony/Bridge/Twig/Tests/Validator/Constraints/TwigValidatorTest.php
+++ b/src/Symfony/Bridge/Twig/Tests/Validator/Constraints/TwigValidatorTest.php
@@ -39,9 +39,7 @@ class TwigValidatorTest extends ConstraintValidatorTestCase
         return new TwigValidator($environment);
     }
 
-    /**
-     * @dataProvider getValidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValues')]
     public function testTwigIsValid($value)
     {
         $this->validator->validate($value, new Twig());
@@ -49,9 +47,7 @@ class TwigValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getInvalidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidValues')]
     public function testInvalidValues($value, $message, $line)
     {
         $constraint = new Twig('myMessageTest');
@@ -67,9 +63,8 @@ class TwigValidatorTest extends ConstraintValidatorTestCase
 
     /**
      * When deprecations are skipped by the validator, the testsuite reporter will catch them so we need to mark the test as legacy.
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testTwigWithSkipDeprecation()
     {
         $constraint = new Twig(skipDeprecations: true);
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/SerializerCacheWarmerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/SerializerCacheWarmerTest.php
index f17aad0..7703822 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/SerializerCacheWarmerTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/SerializerCacheWarmerTest.php
@@ -38,9 +38,7 @@ class SerializerCacheWarmerTest extends TestCase
         return $this->arrayPool = new PhpArrayAdapter($file, new NullAdapter());
     }
 
-    /**
-     * @dataProvider loaderProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('loaderProvider')]
     public function testWarmUp(array $loaders)
     {
         $file = sys_get_temp_dir().'/cache-serializer.php';
@@ -57,9 +55,7 @@ class SerializerCacheWarmerTest extends TestCase
         $this->assertTrue($arrayPool->getItem('Symfony_Bundle_FrameworkBundle_Tests_Fixtures_Serialization_Author')->isHit());
     }
 
-    /**
-     * @dataProvider loaderProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('loaderProvider')]
     public function testWarmUpAbsoluteFilePath(array $loaders)
     {
         $file = sys_get_temp_dir().'/0/cache-serializer.php';
@@ -79,9 +75,7 @@ class SerializerCacheWarmerTest extends TestCase
         $this->assertTrue($arrayPool->getItem('Symfony_Bundle_FrameworkBundle_Tests_Fixtures_Serialization_Author')->isHit());
     }
 
-    /**
-     * @dataProvider loaderProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('loaderProvider')]
     public function testWarmUpWithoutBuildDir(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 3a927f2..318fe48 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 3db39e1..3bc4198 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 a2d0ad7..ad5c703 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePruneCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CachePruneCommandTest.php
@@ -23,6 +23,7 @@ use Symfony\Component\HttpKernel\KernelInterface;
 
 class CachePruneCommandTest extends TestCase
 {
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCommandWithPools()
     {
         $tester = $this->getCommandTester($this->getKernel(), $this->getRewindableGenerator());
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/SecretsRevealCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsRevealCommandTest.php
index d77d303..4797ea4 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsRevealCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/SecretsRevealCommandTest.php
@@ -59,9 +59,7 @@ class SecretsRevealCommandTest extends TestCase
         $this->assertStringContainsString('The secret "secretKey" could not be decrypted.', trim($tester->getDisplay(true)));
     }
 
-    /**
-     * @backupGlobals enabled
-     */
+    #[\PHPUnit\Framework\Attributes\BackupGlobals(true)]
     public function testLocalVaultOverride()
     {
         $vault = $this->createMock(AbstractVault::class);
@@ -78,9 +76,7 @@ class SecretsRevealCommandTest extends TestCase
         $this->assertEquals('newSecretValue', trim($tester->getDisplay(true)));
     }
 
-    /**
-     * @backupGlobals enabled
-     */
+    #[\PHPUnit\Framework\Attributes\BackupGlobals(true)]
     public function testOnlyLocalVaultContainsName()
     {
         $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 c6c91a8..7bb98f7 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php
@@ -240,9 +240,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/TranslationExtractCommandCompletionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationExtractCommandCompletionTest.php
index 6d2f22d..6c9743d 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationExtractCommandCompletionTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationExtractCommandCompletionTest.php
@@ -30,9 +30,7 @@ class TranslationExtractCommandCompletionTest 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/TranslationExtractCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationExtractCommandTest.php
index c5e78de..b8a6126 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationExtractCommandTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationExtractCommandTest.php
@@ -177,9 +177,7 @@ class TranslationExtractCommandTest extends TestCase
         $this->assertEquals($expectedPaths, $filteredTransPaths);
     }
 
-    /**
-     * @dataProvider removeNoFillProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('removeNoFillProvider')]
     public function testRemoveNoFillTranslationsMethod($noFillCounter, $messages)
     {
         // Preparing mock
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 eb18fbc..697ec32 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 getDescribeRouteCollectionWithHttpMethodFilterTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeRouteCollectionWithHttpMethodFilterTestData')]
     public function testDescribeRouteCollectionWithHttpMethodFilter(string $httpMethod, RouteCollection $routes, $expectedDescription)
     {
         $this->assertDescription($expectedDescription, $routes, ['method' => $httpMethod]);
@@ -65,7 +65,7 @@ abstract class AbstractDescriptorTestCase extends TestCase
         }
     }
 
-    /** @dataProvider getDescribeRouteTestData */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDescribeRouteTestData')]
     public function testDescribeRoute(Route $route, $expectedDescription)
     {
         $this->assertDescription($expectedDescription, $route);
@@ -76,7 +76,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);
@@ -87,7 +87,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);
@@ -98,9 +98,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);
@@ -111,7 +109,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);
@@ -122,7 +120,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, []);
@@ -142,7 +140,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);
@@ -153,7 +151,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);
@@ -187,10 +185,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);
@@ -213,7 +211,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);
@@ -224,7 +222,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);
@@ -235,11 +233,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);
@@ -250,7 +245,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));
@@ -266,9 +261,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]);
@@ -357,7 +350,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 2024cb8..a8ef325 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/AbstractControllerTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/AbstractControllerTest.php
@@ -389,9 +389,7 @@ class AbstractControllerTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provideDenyAccessUnlessGrantedSetsAttributesAsArray
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDenyAccessUnlessGrantedSetsAttributesAsArray')]
     public function testdenyAccessUnlessGrantedSetsAttributesAsArray($attribute, $exceptionAttributes)
     {
         $authorizationChecker = $this->createMock(AuthorizationCheckerInterface::class);
@@ -458,7 +456,7 @@ class AbstractControllerTest extends TestCase
         $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();
@@ -481,7 +479,7 @@ class AbstractControllerTest extends TestCase
         $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();
@@ -526,9 +524,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/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/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/ConfigurationTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
index c8142e9..638315c 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
@@ -61,9 +61,7 @@ class ConfigurationTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getTestInvalidSessionName
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTestInvalidSessionName')]
     public function testInvalidSessionName($sessionName)
     {
         $processor = new Processor();
@@ -153,9 +151,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();
@@ -189,9 +185,7 @@ class ConfigurationTest extends TestCase
         yield [false, true, false];
     }
 
-    /**
-     * @dataProvider provideValidAssetsPackageNameConfigurationTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidAssetsPackageNameConfigurationTests')]
     public function testValidAssetsPackageNameConfiguration($packageName)
     {
         $processor = new Processor();
@@ -221,9 +215,7 @@ class ConfigurationTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideInvalidAssetConfigurationTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidAssetConfigurationTests')]
     public function testInvalidAssetsConfiguration(array $assetConfig, $expectedMessage)
     {
         $processor = new Processor();
@@ -275,9 +267,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();
@@ -375,9 +365,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 3eae93e..ba0373c 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php
@@ -1934,9 +1934,7 @@ abstract class FrameworkExtensionTestCase extends TestCase
         }
     }
 
-    /**
-     * @dataProvider appRedisTagAwareConfigProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('appRedisTagAwareConfigProvider')]
     public function testAppRedisTagAwareAdapter(string $configFile)
     {
         $container = $this->createContainerFromFile($configFile);
@@ -1980,9 +1978,7 @@ abstract class FrameworkExtensionTestCase extends TestCase
         }
     }
 
-    /**
-     * @dataProvider appRedisTagAwareConfigProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('appRedisTagAwareConfigProvider')]
     public function testCacheTaggableTagAppliedToRedisAwareAppPool(string $configFile)
     {
         $container = $this->createContainerFromFile($configFile);
@@ -2222,9 +2218,7 @@ abstract class FrameworkExtensionTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideMailer
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMailer')]
     public function testMailer(string $configFile, array $expectedTransports, array $expectedRecipients, array $expectedAllowedRecipients)
     {
         $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 c4f67c2..38713bb 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/PhpFrameworkExtensionTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/PhpFrameworkExtensionTest.php
@@ -135,9 +135,7 @@ class PhpFrameworkExtensionTest extends FrameworkExtensionTestCase
         });
     }
 
-    /**
-     * @dataProvider provideWorkflowValidationCustomTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideWorkflowValidationCustomTests')]
     public function testWorkflowValidationCustomBroken(string $class, string $message)
     {
         $this->expectException(InvalidConfigurationException::class);
@@ -431,9 +429,7 @@ class PhpFrameworkExtensionTest extends FrameworkExtensionTestCase
         });
     }
 
-    /**
-     * @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 1b2eb66..6c3c8bf 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 3771ae2..af31bb3 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(string $uri, array $query, string $expectedResponse, int $expectedStatusCode)
     {
         $client = self::createClient(['test_case' => 'ApiAttributesTest']);
@@ -214,10 +212,8 @@ class ApiAttributesTest extends AbstractWebTestCase
         ];
     }
 
-    /**
-     * @group nophpunit11
-     * @dataProvider mapRequestPayloadProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('mapRequestPayloadProvider')]
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testMapRequestPayload(string $uri, string $format, array $parameters, ?string $content, callable $responseAssertion, int $expectedStatusCode)
     {
         $client = self::createClient(['test_case' => 'ApiAttributesTest']);
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..ff3bcc6 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,8 @@ class CachePoolsTest extends AbstractWebTestCase
         }
     }
 
-    /**
-     * @requires extension redis
-     *
-     * @group integration
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('redis')]
+    #[\PHPUnit\Framework\Attributes\Group('integration')]
     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 d21d4d1..f538bfb 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 f0b6b4b..6fc3b49 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, bool $resolveEnvVars, int $expectedExitCode, 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/PropertyInfoTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/PropertyInfoTest.php
index 18cd61b..57831d1 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/PropertyInfoTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/PropertyInfoTest.php
@@ -29,9 +29,7 @@ class PropertyInfoTest extends AbstractWebTestCase
         $this->assertEquals(Type::list(Type::int()), $propertyInfo->getType(Dummy::class, 'codes'));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testPhpDocPriorityLegacy()
     {
         static::bootKernel(['test_case' => 'Serializer']);
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 d2c0215..48fd621 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RouterTest.php
@@ -438,9 +438,7 @@ class RouterTest extends TestCase
         $router->getRouteCollection();
     }
 
-    /**
-     * @dataProvider getNonStringValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNonStringValues')]
     public function testDefaultValuesAsNonStrings($value)
     {
         $routes = new RouteCollection();
@@ -455,9 +453,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();
@@ -525,9 +521,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 = tempnam(sys_get_temp_dir(), 'sf_router_');
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Secrets/SodiumVaultTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Secrets/SodiumVaultTest.php
index f91f4bc..b1218aa 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Secrets/SodiumVaultTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Secrets/SodiumVaultTest.php
@@ -16,9 +16,7 @@ use Symfony\Bundle\FrameworkBundle\Secrets\SodiumVault;
 use Symfony\Component\Filesystem\Filesystem;
 use Symfony\Component\String\LazyString;
 
-/**
- * @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 e481a96..e5e56bd 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php
@@ -130,7 +130,7 @@ class TranslatorTest extends TestCase
         new Translator(new 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 5528c9b..32e02a2 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php
@@ -77,7 +77,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();
@@ -126,10 +126,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')
@@ -165,29 +162,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();
@@ -196,10 +185,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 4ab483a..b03f3ca 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Debug/TraceableFirewallListenerTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Debug/TraceableFirewallListenerTest.php
@@ -32,9 +32,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 04fba9f..5e0542e 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/MainConfigurationTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php
index 6904a21..02e1b9e 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php
@@ -233,9 +233,7 @@ class MainConfigurationTest extends TestCase
         $configuration->getConfigTreeBuilder();
     }
 
-    /**
-     * @dataProvider provideHideUserNotFoundData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideHideUserNotFoundData')]
     public function testExposeSecurityErrors(array $config, ExposeSecurityLevel $expectedExposeSecurityErrors)
     {
         $config = array_merge(static::$minimalConfig, $config);
@@ -259,11 +257,8 @@ class MainConfigurationTest extends TestCase
         yield [['expose_security_errors' => 'all'], ExposeSecurityLevel::All];
     }
 
-    /**
-     * @dataProvider provideHideUserNotFoundLegacyData
-     *
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideHideUserNotFoundLegacyData')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExposeSecurityErrorsWithLegacyConfig(array $config, ExposeSecurityLevel $expectedExposeSecurityErrors, ?bool $expectedHideUserNotFound)
     {
         $this->expectUserDeprecationMessage('Since symfony/security-bundle 7.3: The "hide_user_not_found" option is deprecated and will be removed in 8.0. Use the "expose_security_errors" option instead.');
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 be300e7..4551da7 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php
@@ -25,9 +25,7 @@ class AbstractFactoryTest extends TestCase
         $this->container = new ContainerBuilder();
     }
 
-    /**
-     * @dataProvider getFailureHandlers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFailureHandlers')]
     public function testDefaultFailureHandler($serviceId, $defaultHandlerInjection)
     {
         $options = [
@@ -68,9 +66,7 @@ class AbstractFactoryTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getSuccessHandlers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getSuccessHandlers')]
     public function testDefaultSuccessHandler($serviceId, $defaultHandlerInjection)
     {
         $options = [
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 c41ebf2..fbb5730 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AccessTokenFactoryTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AccessTokenFactoryTest.php
@@ -184,11 +184,11 @@ class AccessTokenFactoryTest extends TestCase
     }
 
     /**
-     * @group legacy
-     * @group jwt
      *
      * @expectedDeprecation Since symfony/security-bundle 7.1: The "key" option is deprecated and will be removed in 8.0. Use the "keyset" option instead.
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\Group('jwt')]
     public function testOidcTokenHandlerConfigurationWithSingleAlgorithm()
     {
         $container = new ContainerBuilder();
@@ -224,9 +224,7 @@ class AccessTokenFactoryTest extends TestCase
         $this->assertEquals($expected, $container->getDefinition('security.access_token_handler.firewall1')->getArguments());
     }
 
-    /**
-     * @group jwt
-     */
+    #[\PHPUnit\Framework\Attributes\Group('jwt')]
     public function testOidcTokenHandlerConfigurationWithMultipleAlgorithms()
     {
         $container = new ContainerBuilder();
@@ -262,9 +260,7 @@ class AccessTokenFactoryTest extends TestCase
         $this->assertEquals($expected, $container->getDefinition('security.access_token_handler.firewall1')->getArguments());
     }
 
-    /**
-     * @group jwt
-     */
+    #[\PHPUnit\Framework\Attributes\Group('jwt')]
     public function testOidcTokenHandlerConfigurationWithEncryption()
     {
         $container = new ContainerBuilder();
@@ -347,9 +343,7 @@ class AccessTokenFactoryTest extends TestCase
         $this->processConfig($config, $factory);
     }
 
-    /**
-     * @group jwt
-     */
+    #[\PHPUnit\Framework\Attributes\Group('jwt')]
     public function testOidcTokenHandlerConfigurationWithDiscovery()
     {
         $container = new ContainerBuilder();
@@ -431,9 +425,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 8607e45..36ad25f 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php
@@ -139,6 +139,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();
@@ -182,6 +183,7 @@ class SecurityExtensionTest extends TestCase
         $container->compile();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testPerListenerProviderWithRememberMeAndAnonymous()
     {
         $container = $this->getRawContainer();
@@ -277,7 +279,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();
@@ -476,9 +478,7 @@ class SecurityExtensionTest extends TestCase
         $this->assertFalse($container->has(UserProviderInterface::class));
     }
 
-    /**
-     * @dataProvider acceptableIpsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('acceptableIpsProvider')]
     public function testAcceptableAccessControlIps($ips)
     {
         $container = $this->getRawContainer();
@@ -663,9 +663,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();
@@ -694,9 +692,7 @@ class SecurityExtensionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideConfigureCustomAuthenticatorData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConfigureCustomAuthenticatorData')]
     public function testConfigureCustomAuthenticator(array $firewall, array $expectedAuthenticators)
     {
         $container = $this->getRawContainer();
@@ -769,9 +765,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();
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 479df93..c9d48a1 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AccessTokenTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AccessTokenTest.php
@@ -63,9 +63,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']);
@@ -99,9 +97,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']);
@@ -156,9 +152,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']);
@@ -171,9 +165,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']);
@@ -195,9 +187,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']);
@@ -209,9 +199,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']);
@@ -256,9 +244,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']);
@@ -292,9 +278,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']);
@@ -351,12 +335,9 @@ class AccessTokenTest extends AbstractWebTestCase
         $this->assertSame(['message' => 'Welcome @dunglas!'], json_decode($response->getContent(), true));
     }
 
-    /**
-     * @dataProvider validAccessTokens
-     *
-     * @requires extension openssl
-     * @group jwt
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('openssl')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('validAccessTokens')]
+    #[\PHPUnit\Framework\Attributes\Group('jwt')]
     public function testOidcSuccess(callable $tokenFactory)
     {
         try {
@@ -374,12 +355,9 @@ class AccessTokenTest extends AbstractWebTestCase
         $this->assertSame(['message' => 'Welcome @dunglas!'], json_decode($response->getContent(), true));
     }
 
-    /**
-     * @dataProvider invalidAccessTokens
-     *
-     * @requires extension openssl
-     * @group jwt
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('openssl')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidAccessTokens')]
+    #[\PHPUnit\Framework\Attributes\Group('jwt')]
     public function testOidcFailure(callable $tokenFactory)
     {
         try {
@@ -397,10 +375,8 @@ class AccessTokenTest extends AbstractWebTestCase
         $this->assertSame('Bearer realm="My API",error="invalid_token",error_description="Invalid credentials."', $response->headers->get('WWW-Authenticate'));
     }
 
-    /**
-     * @requires extension openssl
-     * @group jwt
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('openssl')]
+    #[\PHPUnit\Framework\Attributes\Group('jwt')]
     public function testOidcFailureWithJweEnforced()
     {
         $client = $this->createClient(['test_case' => 'AccessToken', 'root_config' => 'config_oidc_jwe.yml']);
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticatorTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticatorTest.php
index b78f262..0280c88 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticatorTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/AuthenticatorTest.php
@@ -13,9 +13,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
 
 class AuthenticatorTest extends AbstractWebTestCase
 {
-    /**
-     * @dataProvider provideEmails
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEmails')]
     public function testFirewallUserProvider($email, $withinFirewall)
     {
         $client = $this->createClient(['test_case' => 'Authenticator', 'root_config' => 'firewall_user_provider.yml']);
@@ -31,9 +29,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']);
@@ -51,9 +47,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 ee8cc60..d51e36c 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 7698717..eeb1bb6 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php
@@ -65,9 +65,7 @@ class SecurityTest extends AbstractWebTestCase
         $this->assertFalse($security->isGrantedForUser($offlineUser, 'ROLE_FOO'));
     }
 
-    /**
-     * @dataProvider userWillBeMarkedAsChangedIfRolesHasChangedProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('userWillBeMarkedAsChangedIfRolesHasChangedProvider')]
     public function testUserWillBeMarkedAsChangedIfRolesHasChanged(UserInterface $userWithAdminRole, UserInterface $userWithoutAdminRole)
     {
         $client = $this->createClient(['test_case' => 'AbstractTokenCompareRoles', 'root_config' => 'config.yml']);
@@ -108,10 +106,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 9a126ae..a23b7b6 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/SecurityTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/SecurityTest.php
@@ -55,9 +55,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);
@@ -99,9 +97,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 ddc489e..a35a90b 100644
--- a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php
+++ b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php
@@ -44,7 +44,7 @@ class TwigExtensionTest extends TestCase
 
         $this->assertEquals(Environment::class, $container->getDefinition('twig')->getClass(), '->load() loads the twig.xml file');
 
-        $this->assertContains('form_div_layout.html.twig', $container->getParameter('twig.form.resources'), '->load() includes default template for form resources');
+        $this->assertStringContainsString('form_div_layout.html.twig', $container->getParameter('twig.form.resources'), '->load() includes default template for form resources');
 
         // Twig options
         $options = $container->getDefinition('twig')->getArgument(1);
@@ -63,9 +63,7 @@ class TwigExtensionTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider getFormatsAndBuildDir
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFormatsAndBuildDir')]
     public function testLoadFullConfiguration(string $format, ?string $buildDir)
     {
         $container = $this->createContainer($buildDir);
@@ -77,8 +75,8 @@ class TwigExtensionTest extends TestCase
 
         // Form resources
         $resources = $container->getParameter('twig.form.resources');
-        $this->assertContains('form_div_layout.html.twig', $resources, '->load() includes default template for form resources');
-        $this->assertContains('MyBundle::form.html.twig', $resources, '->load() merges new templates into form resources');
+        $this->assertStringContainsString('form_div_layout.html.twig', $resources, '->load() includes default template for form resources');
+        $this->assertStringContainsString('MyBundle::form.html.twig', $resources, '->load() merges new templates into form resources');
 
         // Globals
         $calls = $container->getDefinition('twig')->getMethodCalls();
@@ -108,9 +106,7 @@ class TwigExtensionTest extends TestCase
         $this->assertEquals(null !== $buildDir ? new Reference('twig.template_cache.chain') : '%kernel.cache_dir%/twig', $options['cache'], '->load() sets the cache option');
     }
 
-    /**
-     * @dataProvider getFormatsAndBuildDir
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFormatsAndBuildDir')]
     public function testLoadNoCacheConfiguration(string $format, ?string $buildDir)
     {
         $container = $this->createContainer($buildDir);
@@ -125,9 +121,7 @@ class TwigExtensionTest extends TestCase
         $this->assertFalse($options['cache'], '->load() sets cache option to false');
     }
 
-    /**
-     * @dataProvider getFormatsAndBuildDir
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFormatsAndBuildDir')]
     public function testLoadPathCacheConfiguration(string $format, ?string $buildDir)
     {
         $container = $this->createContainer($buildDir);
@@ -142,9 +136,7 @@ class TwigExtensionTest extends TestCase
         $this->assertSame('random-path', $options['cache'], '->load() sets cache option to string path');
     }
 
-    /**
-     * @dataProvider getFormatsAndBuildDir
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFormatsAndBuildDir')]
     public function testLoadProdCacheConfiguration(string $format, ?string $buildDir)
     {
         $container = $this->createContainer($buildDir);
@@ -159,11 +151,8 @@ class TwigExtensionTest extends TestCase
         $this->assertEquals(null !== $buildDir ? new Reference('twig.template_cache.chain') : '%kernel.cache_dir%/twig', $options['cache'], '->load() sets cache option to CacheChain reference');
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getFormats
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFormats')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLoadCustomBaseTemplateClassConfiguration(string $format)
     {
         $container = $this->createContainer();
@@ -178,9 +167,7 @@ class TwigExtensionTest extends TestCase
         $this->assertEquals('stdClass', $options['base_template_class'], '->load() sets the base_template_class option');
     }
 
-    /**
-     * @dataProvider getFormats
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFormats')]
     public function testLoadCustomTemplateEscapingGuesserConfiguration(string $format)
     {
         $container = $this->createContainer();
@@ -192,9 +179,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(string $format)
     {
         $container = $this->createContainer();
@@ -206,9 +191,7 @@ class TwigExtensionTest extends TestCase
         $this->assertEquals('name', $options['autoescape']);
     }
 
-    /**
-     * @dataProvider getFormats
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFormats')]
     public function testLoadCustomDateFormats(string $fileFormat)
     {
         $container = $this->createContainer();
@@ -255,9 +238,7 @@ class TwigExtensionTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider getFormats
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFormats')]
     public function testTwigLoaderPaths(string $format)
     {
         $container = $this->createContainer();
@@ -308,9 +289,7 @@ class TwigExtensionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider stopwatchExtensionAvailabilityProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('stopwatchExtensionAvailabilityProvider')]
     public function testStopwatchExtensionAvailability(bool $debug, bool $stopwatchEnabled, bool $expected)
     {
         $container = $this->createContainer();
@@ -363,9 +342,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/TwigBundle/Tests/Functional/AttributeExtensionTest.php b/src/Symfony/Bundle/TwigBundle/Tests/Functional/AttributeExtensionTest.php
index 32db815..7fe67d1 100644
--- a/src/Symfony/Bundle/TwigBundle/Tests/Functional/AttributeExtensionTest.php
+++ b/src/Symfony/Bundle/TwigBundle/Tests/Functional/AttributeExtensionTest.php
@@ -32,8 +32,8 @@ use Twig\Extension\AttributeExtension;
 
 class AttributeExtensionTest extends TestCase
 {
-    /** @beforeClass */
     #[BeforeClass]
+    #[\PHPUnit\Framework\Attributes\BeforeClass]
     public static function assertTwigVersion(): void
     {
         if (!class_exists(AttributeExtension::class)) {
@@ -90,12 +90,9 @@ class AttributeExtensionTest extends TestCase
         $kernel->boot();
     }
 
-    /**
-     * @before
-     *
-     * @after
-     */
     #[Before, After]
+    #[\PHPUnit\Framework\Attributes\Before]
+    #[\PHPUnit\Framework\Attributes\After]
     protected function deleteTempDir()
     {
         if (file_exists($dir = sys_get_temp_dir().'/'.Kernel::VERSION.'/AttributeExtension')) {
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php
index 0e0a1e0..95deb88 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);
@@ -173,9 +171,7 @@ class ProfilerControllerTest extends WebTestCase
         ];
     }
 
-    /**
-     * @dataProvider getOpenFileCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getOpenFileCases')]
     public function testOpeningDisallowedPaths($path, $isAllowed)
     {
         $urlGenerator = $this->createMock(UrlGeneratorInterface::class);
@@ -206,9 +202,7 @@ class ProfilerControllerTest extends WebTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideCspVariants
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCspVariants')]
     public function testReturns404onTokenNotFound($withCsp)
     {
         $twig = $this->createMock(Environment::class);
@@ -256,9 +250,7 @@ class ProfilerControllerTest extends WebTestCase
         }
     }
 
-    /**
-     * @dataProvider provideCspVariants
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCspVariants')]
     public function testSearchResultsAction($withCsp)
     {
         $twig = $this->createMock(Environment::class);
@@ -433,9 +425,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 6a9fc99..030e114 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();
@@ -79,9 +77,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 490bc91..1e4f247 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php
+++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php
@@ -88,9 +88,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);
@@ -112,9 +110,7 @@ class WebProfilerExtensionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getToolbarConfig
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getToolbarConfig')]
     public function testToolbarConfig(bool $toolbarEnabled, bool $listenerInjected, bool $listenerEnabled)
     {
         $extension = new WebProfilerExtension();
@@ -146,9 +142,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 981c85b..30f3931 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/Profiler/CodeExtensionTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/CodeExtensionTest.php
index 314deea..cb82bd2 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/CodeExtensionTest.php
+++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/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/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/Command/ImportMapRequireCommandTest.php b/src/Symfony/Component/AssetMapper/Tests/Command/ImportMapRequireCommandTest.php
index fb410ba..1b4b70a 100644
--- a/src/Symfony/Component/AssetMapper/Tests/Command/ImportMapRequireCommandTest.php
+++ b/src/Symfony/Component/AssetMapper/Tests/Command/ImportMapRequireCommandTest.php
@@ -32,9 +32,7 @@ class ImportMapRequireCommandTest extends KernelTestCase
         return ImportMapTestAppKernel::class;
     }
 
-    /**
-     * @dataProvider getRequirePackageTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRequirePackageTests')]
     public function testDryRunOptionToShowInformationBeforeApplyInstallation(int $verbosity, array $packageEntries, array $packagesToInstall, string $expected, ?string $path = null)
     {
         $importMapManager = $this->createMock(ImportMapManager::class);
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 084b5ee..b1579e1 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');
@@ -456,9 +454,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);
@@ -593,9 +589,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/Parser/JavascriptSequenceParserTest.php b/src/Symfony/Component/AssetMapper/Tests/Compiler/Parser/JavascriptSequenceParserTest.php
index 794b7bb..2becbdf 100644
--- a/src/Symfony/Component/AssetMapper/Tests/Compiler/Parser/JavascriptSequenceParserTest.php
+++ b/src/Symfony/Component/AssetMapper/Tests/Compiler/Parser/JavascriptSequenceParserTest.php
@@ -53,9 +53,7 @@ class JavascriptSequenceParserTest extends TestCase
         $this->assertTrue($parser->isExecutable());
     }
 
-    /**
-     * @dataProvider provideSequenceCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSequenceCases')]
     public function testParseSequence(string $content, int $position, bool $isExcecutable)
     {
         $parser = new JavascriptSequenceParser($content);
@@ -103,9 +101,7 @@ class JavascriptSequenceParserTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideCommentCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCommentCases')]
     public function testIdentifyComment(string $content, int $position, bool $isComment)
     {
         $parser = new JavascriptSequenceParser($content);
@@ -169,9 +165,7 @@ class JavascriptSequenceParserTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideStringCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideStringCases')]
     public function testIdentifyStrings(string $content, int $position, bool $isString)
     {
         $parser = new JavascriptSequenceParser($content);
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 a83b327..d7af4a4 100644
--- a/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapConfigReaderTest.php
+++ b/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapConfigReaderTest.php
@@ -109,9 +109,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));
@@ -133,9 +131,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));
@@ -163,9 +159,8 @@ EOF;
         $this->assertSame('file2.js', $entry->path);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDeprecatedMethodTriggerDeprecation()
     {
         $this->expectUserDeprecationMessage('Since symfony/asset-mapper 7.1: The method "Symfony\Component\AssetMapper\ImportMap\ImportMapConfigReader::splitPackageNameAndFilePath()" is deprecated and will be removed in 8.0. Use ImportMapEntry::splitPackageNameAndFilePath() instead.');
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 e6084fc..4a11e0a 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/ImportMapOutdatedCommandTest.php b/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapOutdatedCommandTest.php
index cc53f7b..e84c64f 100644
--- a/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapOutdatedCommandTest.php
+++ b/src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapOutdatedCommandTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\Console\Tester\CommandTester;
 
 class ImportMapOutdatedCommandTest extends TestCase
 {
-    /**
-     * @dataProvider provideNoOutdatedPackageCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNoOutdatedPackageCases')]
     public function testCommandWhenNoOutdatedPackages(string $display, ?string $format = null)
     {
         $updateChecker = $this->createMock(ImportMapUpdateChecker::class);
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 e21b73a..2b54a57 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';
@@ -116,9 +114,7 @@ class RemotePackageStorageTest extends TestCase
         $this->assertEquals('any content', $this->filesystem->readFile($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 dd7f8e4..561af3c 100644
--- a/src/Symfony/Component/BrowserKit/Tests/AbstractBrowserTest.php
+++ b/src/Symfony/Component/BrowserKit/Tests/AbstractBrowserTest.php
@@ -650,9 +650,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();
@@ -772,9 +770,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 2e456b8..93422ed 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 6300747..4f1391d 100644
--- a/src/Symfony/Component/BrowserKit/Tests/Test/Constraint/BrowserCookieValueSameTest.php
+++ b/src/Symfony/Component/BrowserKit/Tests/Test/Constraint/BrowserCookieValueSameTest.php
@@ -20,9 +20,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 6bc8985..ff7aa17 100644
--- a/src/Symfony/Component/BrowserKit/Tests/Test/Constraint/BrowserHasCookieTest.php
+++ b/src/Symfony/Component/BrowserKit/Tests/Test/Constraint/BrowserHasCookieTest.php
@@ -20,9 +20,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();
@@ -39,9 +37,7 @@ class BrowserHasCookieTest extends TestCase
         $constraint->evaluate($browser);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testConstraintWithWrongPath()
     {
         $browser = $this->getBrowser();
@@ -53,9 +49,7 @@ class BrowserHasCookieTest extends TestCase
         $constraint->evaluate($browser);
     }
 
-    /**
-     * @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 c139cc9..28a6cd3 100644
--- a/src/Symfony/Component/Cache/Tests/Adapter/AbstractRedisAdapterTestCase.php
+++ b/src/Symfony/Component/Cache/Tests/Adapter/AbstractRedisAdapterTestCase.php
@@ -43,9 +43,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 a5578d9..9d2335b 100644
--- a/src/Symfony/Component/Cache/Tests/Marshaller/DefaultMarshallerTest.php
+++ b/src/Symfony/Component/Cache/Tests/Marshaller/DefaultMarshallerTest.php
@@ -29,9 +29,7 @@ class DefaultMarshallerTest extends TestCase
         $this->assertSame(['b'], $failed);
     }
 
-    /**
-     * @requires extension igbinary
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('igbinary')]
     public function testIgbinarySerialize()
     {
         if (version_compare('3.1.6', phpversion('igbinary'), '>')) {
@@ -58,9 +56,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'), '>')) {
@@ -81,9 +77,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'), '>')) {
@@ -109,9 +103,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 162ac49..6eb9867 100644
--- a/src/Symfony/Component/Cache/Tests/Traits/RedisProxiesTest.php
+++ b/src/Symfony/Component/Cache/Tests/Traits/RedisProxiesTest.php
@@ -21,12 +21,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';
@@ -76,9 +73,7 @@ class RedisProxiesTest extends TestCase
         $this->assertSame($expected, $proxy);
     }
 
-    /**
-     * @requires extension relay
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('relay')]
     public function testRelayProxy()
     {
         $proxy = file_get_contents(\dirname(__DIR__, 2).'/Traits/RelayProxy.php');
@@ -123,9 +118,7 @@ class RedisProxiesTest extends TestCase
         $this->assertEquals($expectedProxy, $proxy);
     }
 
-    /**
-     * @requires extension relay
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('relay')]
     public function testRelayClusterProxy()
     {
         $proxy = file_get_contents(\dirname(__DIR__, 2).'/Traits/RelayClusterProxy.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 f71f3a1..d080c74 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 c3f3ce7..776d896 100644
--- a/src/Symfony/Component/Clock/Tests/DatePointTest.php
+++ b/src/Symfony/Component/Clock/Tests/DatePointTest.php
@@ -45,9 +45,7 @@ class DatePointTest extends TestCase
         DatePoint::createFromFormat('Y-m-d H:i:s', 'Bad Date');
     }
 
-    /**
-     * @dataProvider provideValidTimestamps
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidTimestamps')]
     public function testCreateFromTimestamp(int|float $timestamp, string $expected)
     {
         $date = DatePoint::createFromTimestamp($timestamp);
@@ -68,9 +66,7 @@ class DatePointTest extends TestCase
         yield 'negative integer-ish float' => [-100.0, '1969-12-31T23:58:20.000000+00:00'];
     }
 
-    /**
-     * @dataProvider provideOutOfRangeFloatTimestamps
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideOutOfRangeFloatTimestamps')]
     public function testCreateFromTimestampWithFloatOutOfRange(float $timestamp)
     {
         $this->expectException(\DateRangeError::class);
@@ -115,12 +111,10 @@ class DatePointTest extends TestCase
         $date->setMicrosecond(1000000);
     }
 
-    /**
-     * @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 bbc5a85..5d15877 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 = [];
@@ -74,9 +73,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 e639fb2..490ce61 100644
--- a/src/Symfony/Component/Config/Tests/ConfigCacheTest.php
+++ b/src/Symfony/Component/Config/Tests/ConfigCacheTest.php
@@ -39,9 +39,7 @@ class ConfigCacheTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider debugModes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('debugModes')]
     public function testCacheIsNotValidIfNothingHasBeenCached(bool $debug)
     {
         unlink($this->cacheFile); // remove tempnam() side effect
@@ -61,9 +59,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 9358a97..db0a05c 100644
--- a/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php
+++ b/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php
@@ -17,9 +17,7 @@ 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');
@@ -53,9 +51,7 @@ class BooleanNodeTest extends TestCase
         $node->normalize(123);
     }
 
-    /**
-     * @dataProvider getValidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValues')]
     public function testValidNonEmptyValues(bool $value)
     {
         $node = new BooleanNode('test');
@@ -72,9 +68,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 281813a..f128a6d 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();
@@ -329,6 +323,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 d144737..91759c6 100644
--- a/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php
+++ b/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php
@@ -193,9 +193,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 534372b..b11571d 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 f33a79f..0d8440b 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 9ccd910..784be18 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');
@@ -125,9 +121,7 @@ class ScalarNodeTest extends TestCase
         $node->normalize([]);
     }
 
-    /**
-     * @dataProvider getValidNonEmptyValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidNonEmptyValues')]
     public function testValidNonEmptyValues($value)
     {
         $node = new ScalarNode('test');
@@ -150,10 +144,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/Definition/StringNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/StringNodeTest.php
index ddc219d..4cfab71 100644
--- a/src/Symfony/Component/Config/Tests/Definition/StringNodeTest.php
+++ b/src/Symfony/Component/Config/Tests/Definition/StringNodeTest.php
@@ -17,27 +17,23 @@ use Symfony\Component\Config\Definition\StringNode;
 
 class StringNodeTest extends TestCase
 {
-    /**
-     * @testWith [""]
-     *           ["valid string"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([''])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['valid string'])]
     public function testNormalize(string $value)
     {
         $node = new StringNode('test');
         $this->assertSame($value, $node->normalize($value));
     }
 
-    /**
-     * @testWith [null]
-     *           [false]
-     *           [true]
-     *           [0]
-     *           [1]
-     *           [0.0]
-     *           [0.1]
-     *           [{}]
-     *           [{"foo": "bar"}]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([null])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([0])]
+    #[\PHPUnit\Framework\Attributes\TestWith([1])]
+    #[\PHPUnit\Framework\Attributes\TestWith([0.0])]
+    #[\PHPUnit\Framework\Attributes\TestWith([0.1])]
+    #[\PHPUnit\Framework\Attributes\TestWith([[]])]
+    #[\PHPUnit\Framework\Attributes\TestWith([['foo' => 'bar']])]
     public function testNormalizeThrowsExceptionOnInvalidValues($value)
     {
         $node = new StringNode('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 26c5088..748d6dc 100644
--- a/src/Symfony/Component/Config/Tests/Resource/ReflectionClassResourceTest.php
+++ b/src/Symfony/Component/Config/Tests/Resource/ReflectionClassResourceTest.php
@@ -60,9 +60,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, int $resourceClassNameSuffix, ?\Closure $setContext = null)
     {
         if ($setContext) {
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 6390d48..d784692 100644
--- a/src/Symfony/Component/Console/Tests/ApplicationTest.php
+++ b/src/Symfony/Component/Console/Tests/ApplicationTest.php
@@ -435,9 +435,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');
@@ -510,9 +508,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();
@@ -784,10 +780,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();
@@ -816,10 +810,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();
@@ -958,9 +950,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();
@@ -984,9 +974,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();
@@ -1147,6 +1135,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();
@@ -1245,10 +1234,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);
@@ -1292,9 +1279,7 @@ class ApplicationTest extends TestCase
         $application->run($input, $output);
     }
 
-    /**
-     * @dataProvider getAddingAlreadySetDefinitionElementData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAddingAlreadySetDefinitionElementData')]
     public function testAddingAlreadySetDefinitionElementData($def)
     {
         $application = new Application();
@@ -1982,9 +1967,7 @@ class ApplicationTest extends TestCase
         $app->get('test');
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testSignalListenerNotCalledByDefault()
     {
         $command = new SignableCommand(false);
@@ -2002,9 +1985,7 @@ class ApplicationTest extends TestCase
         $this->assertFalse($dispatcherCalled);
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testSignalListener()
     {
         $command = new SignableCommand();
@@ -2023,9 +2004,7 @@ class ApplicationTest extends TestCase
         $this->assertTrue($command->signaled);
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testSignalSubscriberNotCalledByDefault()
     {
         $command = new BaseSignableCommand(false);
@@ -2040,9 +2019,7 @@ class ApplicationTest extends TestCase
         $this->assertFalse($subscriber->signaled);
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testSignalSubscriber()
     {
         $command = new BaseSignableCommand();
@@ -2061,9 +2038,7 @@ class ApplicationTest extends TestCase
         $this->assertTrue($subscriber2->signaled);
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testSignalDispatchWithoutEventToDispatch()
     {
         $command = new SignableCommand();
@@ -2075,9 +2050,7 @@ class ApplicationTest extends TestCase
         $this->assertTrue($command->signaled);
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testSignalDispatchWithoutEventDispatcher()
     {
         $command = new SignableCommand();
@@ -2089,9 +2062,7 @@ class ApplicationTest extends TestCase
         $this->assertTrue($command->signaled);
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testSetSignalsToDispatchEvent()
     {
         if (!\defined('SIGUSR1')) {
@@ -2223,9 +2194,7 @@ class ApplicationTest extends TestCase
         $this->assertTrue($terminateEventDispatched);
     }
 
-    /**
-     * @group tty
-     */
+    #[\PHPUnit\Framework\Attributes\Group('tty')]
     public function testSignalableRestoresStty()
     {
         if (!Terminal::hasSttyAvailable()) {
@@ -2256,9 +2225,7 @@ class ApplicationTest extends TestCase
         $this->assertSame($previousSttyMode, $sttyMode);
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testSignalableInvokableCommand()
     {
         $command = new Command();
@@ -2274,9 +2241,7 @@ class ApplicationTest extends TestCase
         $this->assertTrue($invokable->signaled);
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testSignalableInvokableCommandThatExtendsBaseCommand()
     {
         $command = new class extends Command implements SignalableCommandInterface {
@@ -2291,9 +2256,7 @@ class ApplicationTest extends TestCase
         $this->assertTrue($command->signaled);
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testAlarmSubscriberNotCalledByDefault()
     {
         $command = new BaseSignableCommand(false);
@@ -2309,9 +2272,7 @@ class ApplicationTest extends TestCase
         $this->assertFalse($subscriber->signaled);
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testAlarmSubscriberNotCalledForOtherSignals()
     {
         $command = new SignableCommand();
@@ -2330,9 +2291,7 @@ class ApplicationTest extends TestCase
         $this->assertFalse($subscriber2->signaled);
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testAlarmSubscriber()
     {
         $command = new BaseSignableCommand(signal: \SIGALRM);
@@ -2351,9 +2310,7 @@ class ApplicationTest extends TestCase
         $this->assertTrue($subscriber2->signaled);
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testAlarmDispatchWithoutEventDispatcher()
     {
         $command = new AlarmableCommand(1);
@@ -2366,9 +2323,7 @@ class ApplicationTest extends TestCase
         $this->assertTrue($command->signaled);
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testAlarmableCommandWithoutInterval()
     {
         $command = new AlarmableCommand(0);
@@ -2385,9 +2340,7 @@ class ApplicationTest extends TestCase
         $this->assertFalse($command->signaled);
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testAlarmableCommandHandlerCalledAfterEventListener()
     {
         $command = new AlarmableCommand(1);
@@ -2404,12 +2357,9 @@ class ApplicationTest extends TestCase
         $this->assertSame([AlarmEventSubscriber::class, AlarmableCommand::class], $command->signalHandlers);
     }
 
-    /**
-     * @requires extension pcntl
-     *
-     * @testWith [false]
-     *           [4]
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
+    #[\PHPUnit\Framework\Attributes\TestWith([4])]
     public function testAlarmSubscriberCalledAfterSignalSubscriberAndInheritsExitCode(int|false $exitCode)
     {
         $command = new BaseSignableCommand(signal: \SIGALRM);
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 0db3572..a07625f 100644
--- a/src/Symfony/Component/Console/Tests/Command/CommandTest.php
+++ b/src/Symfony/Component/Console/Tests/Command/CommandTest.php
@@ -137,9 +137,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);
@@ -370,9 +368,7 @@ class CommandTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getSetCodeBindToClosureTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getSetCodeBindToClosureTests')]
     public function testSetCodeBindToClosure($previouslyBound, $expected)
     {
         $code = createClosure();
@@ -448,9 +444,7 @@ class CommandTest extends TestCase
         $this->assertSame(['f'], $command->getAliases());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testCommandAttributeWithDeprecatedMethods()
     {
         $this->expectUserDeprecationMessage('Since symfony/console 7.3: Method "Symfony\Component\Console\Command\Command::getDefaultName()" is deprecated and will be removed in Symfony 8.0, use the #[AsCommand] attribute instead.');
@@ -468,9 +462,7 @@ class CommandTest extends TestCase
         $this->assertSame('This is a command I wrote all by myself', $command->getDescription());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testAttributeOverridesPropertyWithDeprecatedMethods()
     {
         $this->expectUserDeprecationMessage('Since symfony/console 7.3: Method "Symfony\Component\Console\Command\Command::getDefaultName()" is deprecated and will be removed in Symfony 8.0, use the #[AsCommand] attribute instead.');
@@ -494,9 +486,8 @@ class CommandTest extends TestCase
         $this->assertEquals('foo2', $property->getValue($apl));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDeprecatedMethods()
     {
         $this->expectUserDeprecationMessage('Since symfony/console 7.3: Overriding "Command::getDefaultName()" in "Symfony\Component\Console\Tests\Command\FooCommand" is deprecated and will be removed in Symfony 8.0, use the #[AsCommand] attribute instead.');
@@ -505,9 +496,8 @@ class CommandTest extends TestCase
         new FooCommand();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDeprecatedNonIntegerReturnTypeFromClosureCode()
     {
         $this->expectUserDeprecationMessage('Since symfony/console 7.3: Returning a non-integer value from the command "foo" is deprecated and will throw an exception in Symfony 8.0.');
diff --git a/src/Symfony/Component/Console/Tests/Command/CompleteCommandTest.php b/src/Symfony/Component/Console/Tests/Command/CompleteCommandTest.php
index 75519eb..c0b8336 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->execute(['--shell' => 'bash', '--current' => '1', '--input' => ['bin/console']]);
     }
 
-    /**
-     * @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/InvokableCommandTest.php b/src/Symfony/Component/Console/Tests/Command/InvokableCommandTest.php
index 9fc4080..8046b6d 100644
--- a/src/Symfony/Component/Console/Tests/Command/InvokableCommandTest.php
+++ b/src/Symfony/Component/Console/Tests/Command/InvokableCommandTest.php
@@ -208,9 +208,7 @@ class InvokableCommandTest extends TestCase
         $command->run(new ArrayInput([]), new NullOutput());
     }
 
-    /**
-     * @dataProvider provideInputArguments
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInputArguments')]
     public function testInputArguments(array $parameters, array $expected)
     {
         $command = new Command('foo');
@@ -238,9 +236,7 @@ class InvokableCommandTest extends TestCase
         yield 'required & without-value' => [['a' => 'x', 'b' => null, 'c' => null, 'd' => null], ['x', null, '', []]];
     }
 
-    /**
-     * @dataProvider provideBinaryInputOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBinaryInputOptions')]
     public function testBinaryInputOptions(array $parameters, array $expected)
     {
         $command = new Command('foo');
@@ -266,9 +262,7 @@ class InvokableCommandTest extends TestCase
         yield 'negative' => [['--no-a' => null, '--no-c' => null], [false, false, false]];
     }
 
-    /**
-     * @dataProvider provideNonBinaryInputOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNonBinaryInputOptions')]
     public function testNonBinaryInputOptions(array $parameters, array $expected)
     {
         $command = new Command('foo');
@@ -321,9 +315,7 @@ class InvokableCommandTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideInvalidOptionDefinitions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidOptionDefinitions')]
     public function testInvalidOptionDefinition(callable $code)
     {
         $command = new Command('foo');
diff --git a/src/Symfony/Component/Console/Tests/Command/ListCommandTest.php b/src/Symfony/Component/Console/Tests/Command/ListCommandTest.php
index a6ffc8a..e7cca53 100644
--- a/src/Symfony/Component/Console/Tests/Command/ListCommandTest.php
+++ b/src/Symfony/Component/Console/Tests/Command/ListCommandTest.php
@@ -115,9 +115,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 9ac6601..b0af3e8 100644
--- a/src/Symfony/Component/Console/Tests/DependencyInjection/AddConsoleCommandPassTest.php
+++ b/src/Symfony/Component/Console/Tests/DependencyInjection/AddConsoleCommandPassTest.php
@@ -28,9 +28,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 0098644..c01f443 100644
--- a/src/Symfony/Component/Console/Tests/Helper/HelperTest.php
+++ b/src/Symfony/Component/Console/Tests/Helper/HelperTest.php
@@ -61,17 +61,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 c0278cc..c79c76a 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 2a4441d..d36cd31 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()
@@ -176,9 +174,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 76e40ce..e91627e 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 eb85364..bd8f8d8 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));
@@ -1260,9 +1254,7 @@ TABLE;
         Table::getStyleDefinition('absent');
     }
 
-    /**
-     * @dataProvider renderSetTitle
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('renderSetTitle')]
     public function testSetTitle($headerTitle, $footerTitle, $style, $expected)
     {
         (new Table($output = $this->getOutputStream()))
@@ -1536,9 +1528,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());
@@ -1984,9 +1974,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 0e76f9e..4f8ad7b 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->assertSame(['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);
@@ -509,9 +501,7 @@ class ArgvInputTest extends TestCase
         $this->assertSame('-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);
@@ -574,9 +564,7 @@ class ArgvInputTest extends TestCase
         $this->assertSame(['--foo', 'bar'], $input->getRawTokens());
     }
 
-    /**
-     * @dataProvider provideGetRawTokensTrueTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideGetRawTokensTrueTests')]
     public function testGetRawTokensTrue(array $argv, array $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 74d2c08..7d915a7 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->assertSame(['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 ab203e6..e079bdb 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->assertSame($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 92425da..4dee111 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 0464c8c..0d5d829 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 64e4910..c3f9c25 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 15d8212..073e1d1 100644
--- a/src/Symfony/Component/Console/Tests/Question/QuestionTest.php
+++ b/src/Symfony/Component/Console/Tests/Question/QuestionTest.php
@@ -44,9 +44,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);
@@ -89,9 +87,7 @@ class QuestionTest extends TestCase
         $this->assertNull($exception);
     }
 
-    /**
-     * @dataProvider providerTrueFalse
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerTrueFalse')]
     public function testIsSetHiddenFallback(bool $hidden)
     {
         $this->question->setHiddenFallback($hidden);
@@ -122,9 +118,7 @@ class QuestionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider providerGetSetAutocompleterValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerGetSetAutocompleterValues')]
     public function testGetSetAutocompleterValues($values, $expectValues)
     {
         $this->question->setAutocompleterValues($values);
@@ -143,9 +137,7 @@ class QuestionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider providerSetAutocompleterValuesInvalid
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerSetAutocompleterValuesInvalid')]
     public function testSetAutocompleterValuesInvalid($values)
     {
         self::expectException(\TypeError::class);
@@ -236,9 +228,7 @@ class QuestionTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider providerGetSetValidator
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerGetSetValidator')]
     public function testGetSetValidator($callback)
     {
         $this->question->setValidator($callback);
@@ -255,9 +245,7 @@ class QuestionTest extends TestCase
         return [[1], [5], [null]];
     }
 
-    /**
-     * @dataProvider providerGetSetMaxAttempts
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerGetSetMaxAttempts')]
     public function testGetSetMaxAttempts($attempts)
     {
         $this->question->setMaxAttempts($attempts);
@@ -269,9 +257,7 @@ class QuestionTest extends TestCase
         return [[0], [-1]];
     }
 
-    /**
-     * @dataProvider providerSetMaxAttemptsInvalid
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerSetMaxAttemptsInvalid')]
     public function testSetMaxAttemptsInvalid($attempts)
     {
         self::expectException(\InvalidArgumentException::class);
@@ -297,9 +283,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 92d500f..95f1e5f 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 a3b7ae4..3a1cc8d 100644
--- a/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php
+++ b/src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php
@@ -47,9 +47,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;
@@ -58,9 +56,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 b4f6527..5e1b8ee 100644
--- a/src/Symfony/Component/Console/Tests/Tester/Constraint/CommandIsSuccessfulTest.php
+++ b/src/Symfony/Component/Console/Tests/Tester/Constraint/CommandIsSuccessfulTest.php
@@ -27,9 +27,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 82de5ab..e914a82 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 f521a94..53f282b 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/AutowireInlineTest.php b/src/Symfony/Component/DependencyInjection/Tests/Attribute/AutowireInlineTest.php
index a9ae1fb..418b363 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Attribute/AutowireInlineTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Attribute/AutowireInlineTest.php
@@ -24,9 +24,7 @@ class AutowireInlineTest extends TestCase
         self::assertSame([123, 456], $autowireInline->value['factory']);
     }
 
-    /**
-     * @dataProvider provideInvalidCalls
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidCalls')]
     public function testInvalidCallsArray(array $calls)
     {
         $autowireInline = new AutowireInline('someClass', calls: $calls);
@@ -86,9 +84,7 @@ class AutowireInlineTest extends TestCase
         self::assertTrue($attribute->lazy);
     }
 
-    /**
-     * @dataProvider provideFactories
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFactories')]
     public function testFactory(string|array $factory, string|array $expectedResult)
     {
         $attribute = new AutowireInline($factory);
@@ -101,9 +97,7 @@ class AutowireInlineTest extends TestCase
         self::assertFalse($attribute->lazy);
     }
 
-    /**
-     * @dataProvider provideFactories
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFactories')]
     public function testFactoryAndParams(string|array $factory, string|array $expectedResult)
     {
         $attribute = new AutowireInline($factory, ['someParam']);
@@ -116,9 +110,7 @@ class AutowireInlineTest extends TestCase
         self::assertFalse($attribute->lazy);
     }
 
-    /**
-     * @dataProvider provideFactories
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFactories')]
     public function testFactoryAndParamsLazy(string|array $factory, string|array $expectedResult)
     {
         $attribute = new AutowireInline($factory, ['someParam'], lazy: true);
@@ -143,9 +135,7 @@ class AutowireInlineTest extends TestCase
         yield '@reference with method' => [['@someClass', 'someMethod'], [new Reference('someClass'), 'someMethod']];
     }
 
-    /**
-     * @dataProvider provideCalls
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCalls')]
     public function testCalls(string|array $calls, array $expectedResult)
     {
         $attribute = new AutowireInline('someClass', calls: $calls);
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 d6bbbc7..5661617 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php
@@ -400,9 +400,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();
@@ -874,9 +872,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();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckAliasValidityPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckAliasValidityPassTest.php
index 3c3b126..05d38c2 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckAliasValidityPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckAliasValidityPassTest.php
@@ -32,6 +32,7 @@ class CheckAliasValidityPassTest extends TestCase
         $this->process($container);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessAcceptsClassImplementingAliasedInterface()
     {
         $container = new ContainerBuilder();
@@ -42,6 +43,7 @@ class CheckAliasValidityPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessIgnoresArbitraryAlias()
     {
         $container = new ContainerBuilder();
@@ -52,6 +54,7 @@ class CheckAliasValidityPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessIgnoresTargetWithFactory()
     {
         $container = new ContainerBuilder();
@@ -62,6 +65,7 @@ class CheckAliasValidityPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testProcessIgnoresTargetWithoutClass()
     {
         $container = new ContainerBuilder();
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 449a274..ccbd060 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,6 +879,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testUnionTypePassesWithTrue()
     {
         $container = new ContainerBuilder();
@@ -930,6 +954,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         (new CheckTypeDeclarationsPass(true))->process($container);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testReferencePassesMixed()
     {
         $container = new ContainerBuilder();
@@ -944,6 +969,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testIntersectionTypePassesWithReference()
     {
         $container = new ContainerBuilder();
@@ -971,6 +997,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         (new CheckTypeDeclarationsPass(true))->process($container);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCallableClass()
     {
         $container = new ContainerBuilder();
@@ -982,6 +1009,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testStaticCallableClass()
     {
         $container = new ContainerBuilder();
@@ -993,6 +1021,7 @@ class CheckTypeDeclarationsPassTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testIgnoreDefinitionFactoryArgument()
     {
         $container = new ContainerBuilder();
@@ -1007,6 +1036,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 3f18555..dda35b5 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 aeeaf25..024f7f4 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php
@@ -153,6 +153,7 @@ class MergeExtensionConfigurationPassTest extends TestCase
         }
     }
 
+    #[\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 3f76725..1e3dbfe 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 931a4f5..8bb4f82 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterAutoconfigureAttributesPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterAutoconfigureAttributesPassTest.php
@@ -179,6 +179,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/RegisterServiceSubscribersPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterServiceSubscribersPassTest.php
index e7b36d3..889fafd 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterServiceSubscribersPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/RegisterServiceSubscribersPassTest.php
@@ -458,9 +458,7 @@ class RegisterServiceSubscribersPassTest extends TestCase
         $this->assertEquals($expected, $container->getDefinition((string) $locator->getFactory()[0])->getArgument(0));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testSubscribedServiceWithLegacyAttributes()
     {
         $container = new ContainerBuilder();
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 aedf7fa..7783aaf 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveReferencesToAliasesPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveReferencesToAliasesPassTest.php
@@ -87,9 +87,9 @@ class ResolveReferencesToAliasesPassTest 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 testDeprecationNoticeWhenReferencedByAlias()
     {
         $this->expectUserDeprecationMessage('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.');
@@ -109,9 +109,9 @@ class ResolveReferencesToAliasesPassTest 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 testDeprecationNoticeWhenReferencedByDefinition()
     {
         $this->expectUserDeprecationMessage('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.');
@@ -131,6 +131,7 @@ class ResolveReferencesToAliasesPassTest extends TestCase
         $this->process($container);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testNoDeprecationNoticeWhenReferencedByDeprecatedAlias()
     {
         $container = new ContainerBuilder();
@@ -149,6 +150,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 7749e19..7457ceb 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Config/ContainerParametersResourceCheckerTest.php
@@ -34,9 +34,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/ContainerBuilderTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php
index dc33ddc..a0545fd 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();
@@ -313,18 +313,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);
@@ -856,9 +852,7 @@ class ContainerBuilderTest extends TestCase
         $this->assertSame([AsTaggedItem::class => [$c1, $c2]], $container->getAttributeAutoconfigurators());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGetAutoconfiguredAttributes()
     {
         $container = new ContainerBuilder();
@@ -1634,6 +1628,7 @@ class ContainerBuilderTest extends TestCase
         $container->compile();
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testUnusedServiceRemovedByPassAndServiceNotFoundExceptionWasNotThrown()
     {
         $container = new ContainerBuilder();
@@ -1702,9 +1697,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';
@@ -2011,9 +2004,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 testDirectlyAccessingDeprecatedPublicService()
     {
         $this->expectUserDeprecationMessage('Since foo/bar 3.8: Accessing the "Symfony\Component\DependencyInjection\Tests\A" service directly from the container is deprecated, use dependency injection instead.');
@@ -2029,6 +2022,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 5ccb1c7..d293ebe 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 459e566..f76815f 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 f9302e8..880a9d2 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';
@@ -868,10 +864,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();
@@ -1219,9 +1213,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';
@@ -1801,9 +1793,9 @@ PHP
 
     /**
      * 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 testDirectlyAccessingDeprecatedPublicService()
     {
         $this->expectUserDeprecationMessage('Since foo/bar 3.8: Accessing the "bar" service directly from the container is deprecated, use dependency injection instead.');
@@ -1824,6 +1816,7 @@ PHP
         $container->get('bar');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testReferencingDeprecatedPublicService()
     {
         $container = new ContainerBuilder();
@@ -2113,9 +2106,7 @@ PHP
         $this->assertNotSame($fooService->factoredFromServiceWithParam, $barService->factoredFromServiceWithParam);
     }
 
-    /**
-     * @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 e5875c6..2de0ea8 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());
@@ -198,9 +192,7 @@ class EnvVarProcessorTest extends TestCase
         unset($_ENV['FOO'], $GLOBALS['ENV_FOO']);
     }
 
-    /**
-     * @dataProvider validBools
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validBools')]
     public function testGetEnvNot($value, $processed)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -228,9 +220,7 @@ class EnvVarProcessorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider validInts
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validInts')]
     public function testGetEnvInt($value, $processed)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -253,9 +243,7 @@ class EnvVarProcessorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider invalidInts
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidInts')]
     public function testGetEnvIntInvalid($value)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -279,9 +267,7 @@ class EnvVarProcessorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider validFloats
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validFloats')]
     public function testGetEnvFloat($value, $processed)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -304,9 +290,7 @@ class EnvVarProcessorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider invalidFloats
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidFloats')]
     public function testGetEnvFloatInvalid($value)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -330,9 +314,7 @@ class EnvVarProcessorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider validConsts
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validConsts')]
     public function testGetEnvConst($value, $processed)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -354,9 +336,7 @@ class EnvVarProcessorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider invalidConsts
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidConsts')]
     public function testGetEnvConstInvalid($value)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -411,9 +391,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());
@@ -450,9 +428,7 @@ class EnvVarProcessorTest extends TestCase
         });
     }
 
-    /**
-     * @dataProvider otherJsonValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('otherJsonValues')]
     public function testGetEnvJsonOther($value)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -504,9 +480,7 @@ class EnvVarProcessorTest extends TestCase
         });
     }
 
-    /**
-     * @dataProvider noArrayValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('noArrayValues')]
     public function testGetEnvKeyNoArrayResult($value)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -531,9 +505,7 @@ class EnvVarProcessorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider invalidArrayValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidArrayValues')]
     public function testGetEnvKeyArrayKeyNotFound($value)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -557,9 +529,7 @@ class EnvVarProcessorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider arrayValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('arrayValues')]
     public function testGetEnvKey($value)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -599,9 +569,7 @@ class EnvVarProcessorTest extends TestCase
         }));
     }
 
-    /**
-     * @dataProvider provideGetEnvEnum
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideGetEnvEnum')]
     public function testGetEnvEnum(\BackedEnum $backedEnum)
     {
         $processor = new EnvVarProcessor(new Container());
@@ -665,9 +633,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());
@@ -715,9 +681,7 @@ class EnvVarProcessorTest extends TestCase
         $this->assertEquals('foo', $result);
     }
 
-    /**
-     * @dataProvider validResolve
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validResolve')]
     public function testGetEnvResolve($value, $processed)
     {
         $container = new ContainerBuilder();
@@ -751,9 +715,7 @@ class EnvVarProcessorTest extends TestCase
         $this->assertSame('%', $result);
     }
 
-    /**
-     * @dataProvider notScalarResolve
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('notScalarResolve')]
     public function testGetEnvResolveNotScalar($value)
     {
         $container = new ContainerBuilder();
@@ -808,9 +770,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());
@@ -976,9 +936,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']);
@@ -996,18 +954,17 @@ CSV;
         ];
     }
 
-    /**
-     * @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 testGetEnvBadUrl(string $url)
     {
         $this->expectException(RuntimeException::class);
@@ -1017,14 +974,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());
@@ -1049,9 +1004,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 1d5e9b6..ed6d95c 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/PhpDumper/LazyServiceDumperTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/LazyProxy/PhpDumper/LazyServiceDumperTest.php
@@ -65,9 +65,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 0ad1b36..9baeb45 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php
@@ -151,10 +151,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();
@@ -259,9 +257,7 @@ class FileLoaderTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider excludeTrailingSlashConsistencyProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('excludeTrailingSlashConsistencyProvider')]
     public function testExcludeTrailingSlashConsistency(string $exclude, string $excludedId)
     {
         $container = new ContainerBuilder();
@@ -289,12 +285,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();
@@ -308,9 +302,7 @@ class FileLoaderTest extends TestCase
         $this->assertSame($expected, $container->getDefinition(Foo::class)->hasTag('container.excluded'));
     }
 
-    /**
-     * @dataProvider provideEnvAndExpectedExclusions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEnvAndExpectedExclusions')]
     public function testRegisterWithNotWhenAttributes(string $env, bool $expectedNotFooExclusion)
     {
         $container = new ContainerBuilder();
@@ -349,9 +341,7 @@ class FileLoaderTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideResourcesWithAsAliasAttributes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideResourcesWithAsAliasAttributes')]
     public function testRegisterClassesWithAsAlias(string $resource, array $expectedAliases, ?string $env = null)
     {
         $container = new ContainerBuilder();
@@ -388,9 +378,7 @@ class FileLoaderTest extends TestCase
         yield 'Test-env specific' => ['PrototypeAsAlias/WithAsAlias*Env.php', [], 'test'];
     }
 
-    /**
-     * @dataProvider provideResourcesWithDuplicatedAsAliasAttributes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideResourcesWithDuplicatedAsAliasAttributes')]
     public function testRegisterClassesWithDuplicatedAsAlias(string $resource, string $expectedExceptionMessage)
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php
index 1c757ee..941b0c9 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) {
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 72ededf..5de9cf8 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php
@@ -103,9 +103,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');
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php
index f962fa1..009c518 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();
@@ -815,9 +813,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();
@@ -1219,9 +1215,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();
@@ -1335,9 +1329,8 @@ class XmlFileLoaderTest extends TestCase
         $loader->load('key_type_wrong_constant.xml');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDeprecatedTagged()
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php
index 54900e4..6c2de2c 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php
@@ -82,9 +82,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);
@@ -588,9 +586,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);
@@ -1212,9 +1208,8 @@ class YamlFileLoaderTest extends TestCase
         $this->assertEquals((new Definition('stdClass'))->setFactory([null, 'create']), $definition);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDeprecatedTagged()
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/FrozenParameterBagTest.php b/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/FrozenParameterBagTest.php
index 2a40401..e16ad4e 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 db5c58a..865bd9f 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php
@@ -83,10 +83,8 @@ class ParameterBagTest extends TestCase
         }
     }
 
-    /**
-     * @testWith [1001]
-     *           [10.0]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([1001])]
+    #[\PHPUnit\Framework\Attributes\TestWith([10.0])]
     public function testSetNumericName(int|float $name)
     {
         $bag = new ParameterBag();
@@ -97,10 +95,8 @@ class ParameterBagTest extends TestCase
         $bag->set($name, 'foo');
     }
 
-    /**
-     * @testWith [1001]
-     *           [10.0]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([1001])]
+    #[\PHPUnit\Framework\Attributes\TestWith([10.0])]
     public function testConstructorNumericName(int|float $name)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -109,9 +105,7 @@ class ParameterBagTest extends TestCase
         new ParameterBag([$name => 'foo']);
     }
 
-    /**
-     * @dataProvider provideGetThrowParameterNotFoundExceptionData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideGetThrowParameterNotFoundExceptionData')]
     public function testGetThrowParameterNotFoundException($parameterKey, $exceptionMessage)
     {
         $bag = new ParameterBag([
@@ -141,9 +135,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']);
@@ -157,9 +151,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']);
@@ -173,9 +167,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']);
@@ -380,9 +374,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 00e84b1..7c260e0 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 79b8b51..c486836 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 f295a82..5800e44 100644
--- a/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerAnySelectorTextContainsTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerAnySelectorTextContainsTest.php
@@ -18,9 +18,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 bbaacfc..f3cd02c 100644
--- a/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerAnySelectorTextSameTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerAnySelectorTextSameTest.php
@@ -18,9 +18,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 22913b7..8be9792 100644
--- a/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorAttributeValueSameTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorAttributeValueSameTest.php
@@ -18,9 +18,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 de40086..789c396 100644
--- a/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorExistsTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorExistsTest.php
@@ -18,9 +18,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 4a81ad7..664a0d43 100644
--- a/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorTextContainsTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorTextContainsTest.php
@@ -18,9 +18,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 daa842d..d5c581f 100644
--- a/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorTextSameTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/Test/Constraint/CrawlerSelectorTextSameTest.php
@@ -18,9 +18,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 28c0b48..cff717b 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'] = '';
@@ -275,9 +271,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/Emoji/Tests/EmojiTransliteratorTest.php b/src/Symfony/Component/Emoji/Tests/EmojiTransliteratorTest.php
index c77a04d..3c1bbc7 100644
--- a/src/Symfony/Component/Emoji/Tests/EmojiTransliteratorTest.php
+++ b/src/Symfony/Component/Emoji/Tests/EmojiTransliteratorTest.php
@@ -15,14 +15,10 @@ use PHPUnit\Framework\TestCase;
 use Symfony\Component\Emoji\EmojiTransliterator;
 use Symfony\Component\Finder\Finder;
 
-/**
- * @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);
@@ -87,9 +83,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/ErrorHandler/Tests/DebugClassLoaderTest.php b/src/Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php
index 5be389f..adae2e0 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 = [];
@@ -420,9 +410,7 @@ class DebugClassLoaderTest extends TestCase
         ], $deprecations);
     }
 
-    /**
-     * @requires PHP >= 8.3
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('>= 8.3')]
     public function testReturnTypePhp83()
     {
         $deprecations = [];
@@ -439,9 +427,7 @@ class DebugClassLoaderTest extends TestCase
         ], $deprecations);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testOverrideFinalProperty()
     {
         $deprecations = [];
@@ -463,9 +449,7 @@ class DebugClassLoaderTest extends TestCase
         ], $deprecations);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testOverrideFinalConstant()
     {
         $deprecations = [];
@@ -483,9 +467,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 38b0423..659a90c 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 b5a0d91..558aa88 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 e8aebd7..488df6b 100644
--- a/src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php
+++ b/src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php
@@ -89,9 +89,7 @@ class ErrorHandlerTest extends TestCase
         }
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testNotice()
     {
         ErrorHandler::register();
@@ -228,9 +226,7 @@ class ErrorHandlerTest extends TestCase
         }
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testHandleError()
     {
         try {
@@ -336,9 +332,7 @@ class ErrorHandlerTest extends TestCase
         }
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testHandleErrorWithAnonymousClass()
     {
         $anonymousObject = new class extends \stdClass {
@@ -379,9 +373,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 {
@@ -589,9 +581,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 {
@@ -643,9 +633,7 @@ class ErrorHandlerTest extends TestCase
         }
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testAssertQuietEval()
     {
         if ('-1' === \ini_get('zend.assertions')) {
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 e8ecfc5..8c1dc9f 100644
--- a/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php
+++ b/src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php
@@ -71,9 +71,7 @@ class ExpressionLanguageTest extends TestCase
         $this->assertSame($savedParsedExpression, $parsedExpression);
     }
 
-    /**
-     * @dataProvider basicPhpFunctionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('basicPhpFunctionProvider')]
     public function testBasicPhpFunction($expression, $expected, $compiled)
     {
         $expressionLanguage = new ExpressionLanguage();
@@ -137,9 +135,7 @@ class ExpressionLanguageTest extends TestCase
         $this->assertSame(FooBackedEnum::Bar, $result);
     }
 
-    /**
-     * @dataProvider providerTestCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerTestCases')]
     public function testProviders(iterable $providers)
     {
         $expressionLanguage = new ExpressionLanguage(null, $providers);
@@ -161,18 +157,14 @@ class ExpressionLanguageTest extends TestCase
         })()];
     }
 
-    /**
-     * @dataProvider shortCircuitProviderEvaluate
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('shortCircuitProviderEvaluate')]
     public function testShortCircuitOperatorsEvaluate($expression, array $values, $expected)
     {
         $expressionLanguage = new ExpressionLanguage();
         $this->assertSame($expected, $expressionLanguage->evaluate($expression, $values));
     }
 
-    /**
-     * @dataProvider shortCircuitProviderCompile
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('shortCircuitProviderCompile')]
     public function testShortCircuitOperatorsCompile($expression, array $names, $expected)
     {
         $result = null;
@@ -304,9 +296,7 @@ class ExpressionLanguageTest extends TestCase
         $this->assertTrue($result);
     }
 
-    /**
-     * @dataProvider getRegisterCallbacks
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRegisterCallbacks')]
     public function testRegisterAfterParse($registerCallback)
     {
         $this->expectException(\LogicException::class);
@@ -315,9 +305,7 @@ class ExpressionLanguageTest extends TestCase
         $registerCallback($el);
     }
 
-    /**
-     * @dataProvider getRegisterCallbacks
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRegisterCallbacks')]
     public function testRegisterAfterEval($registerCallback)
     {
         $this->expectException(\LogicException::class);
@@ -326,18 +314,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();
@@ -374,9 +358,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();
@@ -386,9 +368,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();
@@ -417,18 +397,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();
@@ -459,9 +435,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);
@@ -478,9 +452,7 @@ class ExpressionLanguageTest extends TestCase
         yield ["/* multi\nline */ 'foo'"];
     }
 
-    /**
-     * @dataProvider validCommentProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validCommentProvider')]
     public function testLintAllowsComments($expression)
     {
         $el = new ExpressionLanguage();
@@ -496,9 +468,7 @@ class ExpressionLanguageTest extends TestCase
         yield ['1 /* double closing */ */'];
     }
 
-    /**
-     * @dataProvider invalidCommentProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidCommentProvider')]
     public function testLintThrowsOnInvalidComments($expression)
     {
         $el = new ExpressionLanguage();
diff --git a/src/Symfony/Component/ExpressionLanguage/Tests/LexerTest.php b/src/Symfony/Component/ExpressionLanguage/Tests/LexerTest.php
index 2827cf6..06b49f4 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 375d0a1..9c51fc8 100644
--- a/src/Symfony/Component/ExpressionLanguage/Tests/Node/BinaryNodeTest.php
+++ b/src/Symfony/Component/ExpressionLanguage/Tests/Node/BinaryNodeTest.php
@@ -265,10 +265,8 @@ class BinaryNodeTest extends AbstractNodeTestCase
         $node->evaluate([], []);
     }
 
-    /**
-     * @testWith [1]
-     *           ["true"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([1])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['true'])]
     public function testInOperatorStrictness(mixed $value)
     {
         $array = new ArrayNode();
diff --git a/src/Symfony/Component/ExpressionLanguage/Tests/ParserTest.php b/src/Symfony/Component/ExpressionLanguage/Tests/ParserTest.php
index 0f1c893..f7f429f 100644
--- a/src/Symfony/Component/ExpressionLanguage/Tests/ParserTest.php
+++ b/src/Symfony/Component/ExpressionLanguage/Tests/ParserTest.php
@@ -59,9 +59,7 @@ class ParserTest extends TestCase
         $parser->parse($tokenized);
     }
 
-    /**
-     * @dataProvider getParseData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getParseData')]
     public function testParse($node, $expression, $names = [])
     {
         $lexer = new Lexer();
@@ -269,9 +267,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);
@@ -312,9 +308,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, int $checks = 0, ?string $exception = null)
     {
         if ($exception) {
diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
index 4c3355c..493bb3f 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 fb06771..d182094 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 09a2d5f..1c2cf2b 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 cac92ad..8b5eb5c 100644
--- a/src/Symfony/Component/Form/Tests/Command/DebugCommandTest.php
+++ b/src/Symfony/Component/Form/Tests/Command/DebugCommandTest.php
@@ -186,9 +186,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 456b433..2bf0a9c 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 f0ccd3f..fde2dd7 100644
--- a/src/Symfony/Component/Form/Tests/DependencyInjection/FormPassTest.php
+++ b/src/Symfony/Component/Form/Tests/DependencyInjection/FormPassTest.php
@@ -115,9 +115,7 @@ class FormPassTest extends TestCase
         $this->assertSame([__CLASS__.'_Type1' => 'the_token_id'], $csrfDefinition->getArgument(7));
     }
 
-    /**
-     * @dataProvider addTaggedTypeExtensionsDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('addTaggedTypeExtensionsDataProvider')]
     public function testAddTaggedTypeExtensions(array $extensions, array $expectedRegisteredExtensions, array $parameters = [])
     {
         $container = $this->createContainerBuilder();
@@ -280,9 +278,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 d0207bb..3f9351d 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php
@@ -90,9 +90,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');
@@ -193,6 +191,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');
@@ -206,9 +205,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(
@@ -341,10 +338,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);
@@ -358,9 +353,7 @@ class DateTimeToLocalizedStringTransformerTest extends BaseDateTimeTransformerTe
         }
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testReverseTransformWrapsIntlErrorsWithExceptions()
     {
         $initialUseExceptions = ini_set('intl.use_exceptions', 1);
@@ -374,10 +367,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 c69ba31..6597362 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php
@@ -57,9 +57,7 @@ class DateTimeToRfc3339TransformerTest extends BaseDateTimeTransformerTestCase
         ]);
     }
 
-    /**
-     * @dataProvider transformProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('transformProvider')]
     public function testTransform($fromTz, $toTz, $from, $to)
     {
         $transformer = new DateTimeToRfc3339Transformer($fromTz, $toTz);
@@ -67,9 +65,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);
@@ -84,9 +80,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);
@@ -113,9 +107,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/EventListener/ResizeFormListenerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/ResizeFormListenerTest.php
index 390f6b0..c06d395 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/ResizeFormListenerTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/EventListener/ResizeFormListenerTest.php
@@ -43,9 +43,7 @@ class ResizeFormListenerTest extends TestCase
         return new FormBuilder($name, null, new EventDispatcher(), $this->factory);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testPreSetDataResizesForm()
     {
         $this->builder->add($this->getBuilder('0'));
@@ -93,9 +91,7 @@ class ResizeFormListenerTest extends TestCase
         $this->assertSame('string', $form->get('2')->getData());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testPreSetDataRequiresArrayOrTraversable()
     {
         $this->expectException(UnexpectedTypeException::class);
@@ -119,9 +115,7 @@ class ResizeFormListenerTest extends TestCase
         $listener->postSetData($event);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testPreSetDataDealsWithNullData()
     {
         $data = 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 69fd0fd..bc1e192 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CheckboxTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CheckboxTypeTest.php
@@ -140,9 +140,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
@@ -171,9 +169,7 @@ class CheckboxTypeTest extends BaseTypeTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideCustomFalseValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCustomFalseValues')]
     public function testCustomFalseValues($falseValue)
     {
         $form = $this->factory->create(static::TESTED_TYPE, null, [
@@ -201,6 +197,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 977a870..3a00d03 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php
@@ -1671,9 +1671,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, [
@@ -1691,9 +1689,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, [
@@ -1946,9 +1942,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, [
@@ -2114,9 +2108,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, [
@@ -2141,9 +2133,7 @@ class ChoiceTypeTest extends BaseTypeTestCase
         }
     }
 
-    /**
-     * @dataProvider provideTrimCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTrimCases')]
     public function testSubmitValueWithWhiteSpace($multiple, $expanded)
     {
         $valueWhitWhiteSpace = '1 ';
@@ -2172,9 +2162,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 95e1d9c..8d19463 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php
@@ -552,11 +552,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 5cfab19..3ec0134 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ColorTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ColorTypeTest.php
@@ -19,9 +19,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, [
@@ -53,9 +51,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, [
@@ -84,6 +80,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 171a749..b4dac3a 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CountryTypeTest.php
@@ -39,9 +39,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
@@ -74,9 +72,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
@@ -108,11 +104,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 e5a1403..49f30a0 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CurrencyTypeTest.php
@@ -36,9 +36,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
@@ -53,11 +51,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 5067bb0..aa35322 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php
@@ -647,6 +647,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, [
@@ -701,9 +702,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, [
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 5b9d9d0..57b015d 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php
@@ -396,9 +396,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, [
@@ -955,9 +953,7 @@ class DateTypeTest extends BaseTypeTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideCompoundWidgets
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompoundWidgets')]
     public function testYearErrorsBubbleUp($widget)
     {
         $error = new FormError('Invalid!');
@@ -970,9 +966,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!');
@@ -985,9 +979,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!');
@@ -1055,6 +1047,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' => '']);
@@ -1086,9 +1079,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, [
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 85907b6..8ea5e18 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php
@@ -41,9 +41,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();
@@ -54,9 +52,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, [
@@ -72,9 +68,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, [
@@ -94,9 +88,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();
@@ -115,6 +107,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, '');
@@ -133,9 +126,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();
@@ -146,9 +137,7 @@ class FileTypeTest extends BaseTypeTestCase
         $this->assertSame('', $form->getViewData());
     }
 
-    /**
-     * @dataProvider requestHandlerProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('requestHandlerProvider')]
     public function testMultipleSubmittedFilePathsAreDropped(RequestHandlerInterface $requestHandler)
     {
         $form = $this->factory
@@ -166,9 +155,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
@@ -192,9 +179,7 @@ class FileTypeTest extends BaseTypeTestCase
         ];
     }
 
-    /**
-     * @dataProvider uploadFileErrorCodes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('uploadFileErrorCodes')]
     public function testFailedFileUploadIsTurnedIntoFormErrorUsingHttpFoundationRequestHandler($errorCode, $expectedErrorMessage)
     {
         $requestHandler = new HttpFoundationRequestHandler();
@@ -212,9 +197,7 @@ class FileTypeTest extends BaseTypeTestCase
         }
     }
 
-    /**
-     * @dataProvider uploadFileErrorCodes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('uploadFileErrorCodes')]
     public function testFailedFileUploadIsTurnedIntoFormErrorUsingNativeRequestHandler($errorCode, $expectedErrorMessage)
     {
         $form = $this->factory
@@ -237,9 +220,7 @@ class FileTypeTest extends BaseTypeTestCase
         }
     }
 
-    /**
-     * @dataProvider uploadFileErrorCodes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('uploadFileErrorCodes')]
     public function testMultipleSubmittedFailedFileUploadsAreTurnedIntoFormErrorUsingHttpFoundationRequestHandler($errorCode, $expectedErrorMessage)
     {
         $requestHandler = new HttpFoundationRequestHandler();
@@ -264,9 +245,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 fe19f3b..62b12f3 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 87605c2..67d0867 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/IntegerTypeTest.php
@@ -32,9 +32,7 @@ class IntegerTypeTest extends BaseTypeTestCase
         \Locale::setDefault($this->previousLocale);
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testArabicLocale()
     {
         \Locale::setDefault('ar');
@@ -46,9 +44,7 @@ class IntegerTypeTest extends BaseTypeTestCase
         $this->assertSame('123456', $form->getViewData());
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testArabicLocaleNonHtml5()
     {
         \Locale::setDefault('ar');
@@ -70,6 +66,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 50bd373..9d53a59 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/LanguageTypeTest.php
@@ -37,9 +37,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
@@ -69,9 +67,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
@@ -88,9 +84,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
@@ -108,9 +102,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
@@ -142,11 +134,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 381cc55..bb976cf 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/LocaleTypeTest.php
@@ -36,9 +36,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
@@ -53,11 +51,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 41d7534..a180e90 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 1720964..6733fcc 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/NumberTypeTest.php
@@ -108,6 +108,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 945437b..7131ab6 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/PasswordTypeTest.php
@@ -49,6 +49,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 2d19a06..507edb5 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/RepeatedTypeTest.php
@@ -92,9 +92,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, [
@@ -190,9 +188,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, [
@@ -246,6 +242,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 4832151..3780710 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TextTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TextTypeTest.php
@@ -17,6 +17,7 @@ class TextTypeTest extends BaseTypeTestCase
 {
     public const TESTED_TYPE = TextType::class;
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSubmitNull($expected = null, $norm = null, $view = null)
     {
         parent::testSubmitNull($expected, $norm, '');
@@ -44,10 +45,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, array_merge($this->getTestOptions(), [
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 8a2baf1..31b8f73 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php
@@ -907,9 +907,7 @@ class TimeTypeTest extends BaseTypeTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideCompoundWidgets
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompoundWidgets')]
     public function testHourErrorsBubbleUp($widget)
     {
         $error = new FormError('Invalid!');
@@ -922,9 +920,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!');
@@ -937,9 +933,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!');
@@ -1062,6 +1056,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' => ''];
@@ -1128,9 +1123,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, [
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 1c37229b..6539bed 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimezoneTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TimezoneTypeTest.php
@@ -29,6 +29,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, '');
@@ -74,9 +75,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']);
@@ -96,9 +95,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');
@@ -119,9 +116,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');
@@ -153,9 +148,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/UrlTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/UrlTypeTest.php
index a0d3356..1f92002 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/UrlTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/UrlTypeTest.php
@@ -21,9 +21,7 @@ class UrlTypeTest extends TextTypeTest
 
     public const TESTED_TYPE = UrlType::class;
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testSubmitAddsDefaultProtocolIfNoneIsIncluded()
     {
         $this->expectUserDeprecationMessage('Since symfony/form 7.1: Not configuring the "default_protocol" option when using the UrlType is deprecated. It will default to "null" in 8.0.');
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 b4d58fd..618f0b3 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/WeekTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/WeekTypeTest.php
@@ -300,9 +300,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 d5bce65..9a17383 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 07d1292..5a648e4 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 b0c7d71..847ab22 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 1d0e0f8..45e2127 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 8699879..835d262 100644
--- a/src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerAllTest.php
+++ b/src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerAllTest.php
@@ -31,9 +31,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));
@@ -64,9 +62,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 ef7de8d..e4b31d7 100644
--- a/src/Symfony/Component/HtmlSanitizer/Tests/Reference/W3CReferenceTest.php
+++ b/src/Symfony/Component/HtmlSanitizer/Tests/Reference/W3CReferenceTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\HtmlSanitizer\Reference\W3CReference;
  */
 class W3CReferenceTest extends TestCase
 {
-    /**
-     * @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)));
@@ -33,9 +31,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 b3cb83b..ffaf3d7 100644
--- a/src/Symfony/Component/HttpClient/Tests/AsyncDecoratorTraitTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/AsyncDecoratorTraitTest.php
@@ -55,6 +55,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 72cda50..338d477 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')) {
@@ -610,9 +611,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);
@@ -686,11 +685,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);
@@ -708,6 +705,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 cf15ce0..cdbda60 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 = [
@@ -112,13 +110,9 @@ class HttpClientTraitTest extends TestCase
         $this->assertSame($expected, $result);
     }
 
-    /**
-     * @group network
-     *
-     * @requires extension openssl
-     *
-     * @dataProvider provideNormalizeBodyMultipartForwardStream
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('openssl')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNormalizeBodyMultipartForwardStream')]
+    #[\PHPUnit\Framework\Attributes\Group('network')]
     public function testNormalizeBodyMultipartForwardStream($stream)
     {
         $body = [
@@ -157,9 +151,7 @@ class HttpClientTraitTest extends TestCase
         yield 'symfony' => [static fn () => 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))));
@@ -247,18 +239,17 @@ class HttpClientTraitTest extends TestCase
         self::resolveUrl(self::parseUrl('/foo'), self::parseUrl('localhost:8081'));
     }
 
-    /**
-     * @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 testParseMalformedUrl(string $url)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -266,9 +257,7 @@ class HttpClientTraitTest extends TestCase
         self::parseUrl($url);
     }
 
-    /**
-     * @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);
@@ -297,9 +286,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));
@@ -362,9 +349,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);
@@ -381,9 +366,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 906dfc5..ab8785c 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 f76b52c..39e4ac0 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);
@@ -495,16 +488,19 @@ 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.');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testUnixSocket()
     {
         $this->markTestSkipped('MockHttpClient doesn\'t support binding to unix sockets.');
diff --git a/src/Symfony/Component/HttpClient/Tests/NativeHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/NativeHttpClientTest.php
index e9ddfff..2b523da 100644
--- a/src/Symfony/Component/HttpClient/Tests/NativeHttpClientTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/NativeHttpClientTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\HttpClient\NativeHttpClient;
 use Symfony\Contracts\HttpClient\HttpClientInterface;
 use Symfony\Contracts\HttpClient\Test\TestHttpServer;
 
-/**
- * @group dns-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('dns-sensitive')]
 class NativeHttpClientTest extends HttpClientTestCase
 {
     protected function getHttpClient(string $testCase): HttpClientInterface
@@ -26,26 +24,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.');
@@ -72,6 +75,7 @@ class NativeHttpClientTest extends HttpClientTestCase
         DnsMock::withMockedHosts([]);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testUnixSocket()
     {
         $this->markTestSkipped('NativeHttpClient doesn\'t support binding to unix sockets.');
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 efdaa7f..87ccf0e 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 909b3de..9019b27 100644
--- a/src/Symfony/Component/HttpClient/Tests/Response/MockResponseTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/Response/MockResponseTest.php
@@ -47,9 +47,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/RetryableHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/RetryableHttpClientTest.php
index 4cc36a8..0780fc6 100644
--- a/src/Symfony/Component/HttpClient/Tests/RetryableHttpClientTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/RetryableHttpClientTest.php
@@ -149,9 +149,7 @@ class RetryableHttpClientTest extends TestCase
         }
     }
 
-    /**
-     * @group network
-     */
+    #[\PHPUnit\Framework\Attributes\Group('network')]
     public function testRetryWithDnsIssue()
     {
         $client = new RetryableHttpClient(
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 7627cd5..20cb7a2 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/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 9c18ad1..d3eeae0 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/IpUtilsTest.php b/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php
index 5ed3e7b..20b7b8b 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 anonymizedIpDataWithBytes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('anonymizedIpDataWithBytes')]
     public function testAnonymizeWithBytes($ip, $expected, $bytesForV4, $bytesForV6)
     {
         $this->assertSame($expected, IpUtils::anonymize($ip, $bytesForV4, $bytesForV6));
@@ -215,9 +203,7 @@ class IpUtilsTest extends TestCase
         IpUtils::anonymize('anything', 1, 17);
     }
 
-    /**
-     * @dataProvider getIp4SubnetMaskZeroData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getIp4SubnetMaskZeroData')]
     public function testIp4SubnetMaskZero($matches, $remoteAddr, $cidr)
     {
         $this->assertSame($matches, IpUtils::checkIp4($remoteAddr, $cidr));
@@ -232,9 +218,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/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/HeaderRequestMatcherTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/HeaderRequestMatcherTest.php
index 47a5c7e..6bb20ab 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/HeaderRequestMatcherTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/HeaderRequestMatcherTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\HttpFoundation\RequestMatcher\HeaderRequestMatcher;
 
 class HeaderRequestMatcherTest extends TestCase
 {
-    /**
-     * @dataProvider getDataForArray
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDataForArray')]
     public function testArray(array $headers, bool $matches)
     {
         $matcher = new HeaderRequestMatcher(['x-foo', 'bar']);
@@ -32,9 +30,7 @@ class HeaderRequestMatcherTest extends TestCase
         $this->assertSame($matches, $matcher->matches($request));
     }
 
-    /**
-     * @dataProvider getDataForArray
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDataForArray')]
     public function testCommaSeparatedString(array $headers, bool $matches)
     {
         $matcher = new HeaderRequestMatcher('x-foo, bar');
@@ -47,9 +43,7 @@ class HeaderRequestMatcherTest extends TestCase
         $this->assertSame($matches, $matcher->matches($request));
     }
 
-    /**
-     * @dataProvider getDataForSingleString
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDataForSingleString')]
     public function testSingleString(array $headers, bool $matches)
     {
         $matcher = new HeaderRequestMatcher('x-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/QueryParameterRequestMatcherTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/QueryParameterRequestMatcherTest.php
index 202ca64..9a2da0c 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/QueryParameterRequestMatcherTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/QueryParameterRequestMatcherTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\HttpFoundation\RequestMatcher\QueryParameterRequestMatcher
 
 class QueryParameterRequestMatcherTest extends TestCase
 {
-    /**
-     * @dataProvider getDataForArray
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDataForArray')]
     public function testArray(string $uri, bool $matches)
     {
         $matcher = new QueryParameterRequestMatcher(['foo', 'bar']);
@@ -27,9 +25,7 @@ class QueryParameterRequestMatcherTest extends TestCase
         $this->assertSame($matches, $matcher->matches($request));
     }
 
-    /**
-     * @dataProvider getDataForArray
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDataForArray')]
     public function testCommaSeparatedString(string $uri, bool $matches)
     {
         $matcher = new QueryParameterRequestMatcher('foo, bar');
@@ -37,9 +33,7 @@ class QueryParameterRequestMatcherTest extends TestCase
         $this->assertSame($matches, $matcher->matches($request));
     }
 
-    /**
-     * @dataProvider getDataForSingleString
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDataForSingleString')]
     public function testSingleString(string $uri, bool $matches)
     {
         $matcher = new QueryParameterRequestMatcher('foo');
diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/SchemeRequestMatcherTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestMatcher/SchemeRequestMatcherTest.php
index 933b3d6..fc05ec9 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/RequestTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
index 5cfb980..c04a619 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
@@ -301,18 +301,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);
@@ -321,9 +320,7 @@ class RequestTest extends TestCase
         Request::create($uri);
     }
 
-    /**
-     * @dataProvider getRequestUriData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getRequestUriData')]
     public function testGetRequestUri($serverRequestUri, $expected, $message)
     {
         $request = new Request();
@@ -461,9 +458,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();
@@ -489,18 +484,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));
@@ -755,9 +746,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));
@@ -815,9 +804,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();
@@ -1013,9 +1000,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);
@@ -1023,9 +1008,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);
@@ -1033,9 +1016,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);
@@ -1111,9 +1092,7 @@ class RequestTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getClientIpsWithConflictingHeadersProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getClientIpsWithConflictingHeadersProvider')]
     public function testGetClientIpsWithConflictingHeaders($httpForwarded, $httpXForwardedFor)
     {
         $this->expectException(ConflictingHeadersException::class);
@@ -1132,9 +1111,7 @@ class RequestTest extends TestCase
         $request->getClientIps();
     }
 
-    /**
-     * @dataProvider getClientIpsWithConflictingHeadersProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getClientIpsWithConflictingHeadersProvider')]
     public function testGetClientIpsOnlyXHttpForwardedForTrusted($httpForwarded, $httpXForwardedFor)
     {
         $request = new Request();
@@ -1164,9 +1141,7 @@ class RequestTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getClientIpsWithAgreeingHeadersProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getClientIpsWithAgreeingHeadersProvider')]
     public function testGetClientIpsWithAgreeingHeaders($httpForwarded, $httpXForwardedFor, $expectedIps)
     {
         $request = new Request();
@@ -1243,9 +1218,7 @@ class RequestTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getContentCanBeCalledTwiceWithResourcesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getContentCanBeCalledTwiceWithResourcesProvider')]
     public function testGetContentCanBeCalledTwiceWithResources($first, $second)
     {
         $req = new Request();
@@ -1323,9 +1296,7 @@ class RequestTest extends TestCase
         $this->assertSame([], $req->getPayload()->all());
     }
 
-    /**
-     * @dataProvider provideOverloadedMethods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideOverloadedMethods')]
     public function testCreateFromGlobals($method)
     {
         $normalizedMethod = strtoupper($method);
@@ -1529,9 +1500,7 @@ class RequestTest extends TestCase
         $this->assertNull($request->getPreferredLanguage());
     }
 
-    /**
-     * @dataProvider providePreferredLanguage
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePreferredLanguage')]
     public function testPreferredLanguageWithLocales(?string $expectedLocale, ?string $acceptLanguage, array $locales)
     {
         $request = new Request();
@@ -1578,9 +1547,7 @@ class RequestTest extends TestCase
         $this->assertFalse($request->isXmlHttpRequest());
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testIntlLocale()
     {
         $request = new Request();
@@ -1642,9 +1609,7 @@ class RequestTest extends TestCase
         $this->assertEquals(['application/vnd.wap.wmlscriptc', 'text/vnd.wap.wml', 'application/vnd.wap.xhtml+xml', 'application/xhtml+xml', 'text/html', 'multipart/mixed', '*/*'], $request->getAcceptableContentTypes());
     }
 
-    /**
-     * @dataProvider provideLanguages
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLanguages')]
     public function testGetLanguages(array $expectedLocales, ?string $acceptLanguage)
     {
         $request = new Request();
@@ -1779,9 +1744,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);
@@ -1906,9 +1869,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);
@@ -1962,9 +1923,7 @@ class RequestTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider urlencodedStringPrefixData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('urlencodedStringPrefixData')]
     public function testUrlencodedStringPrefix($string, $prefix, $expect)
     {
         $request = new Request();
@@ -2133,9 +2092,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();
@@ -2252,9 +2209,7 @@ class RequestTest extends TestCase
         Request::setFactory(null);
     }
 
-    /**
-     * @dataProvider getLongHostNames
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLongHostNames')]
     public function testVeryLongHosts($host)
     {
         $start = microtime(true);
@@ -2265,9 +2220,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('/');
@@ -2307,9 +2260,7 @@ class RequestTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider methodIdempotentProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('methodIdempotentProvider')]
     public function testMethodIdempotent($method, $idempotent)
     {
         $request = new Request();
@@ -2333,9 +2284,7 @@ class RequestTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider methodSafeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('methodSafeProvider')]
     public function testMethodSafe($method, $safe)
     {
         $request = new Request();
@@ -2359,9 +2308,7 @@ class RequestTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider methodCacheableProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('methodCacheableProvider')]
     public function testMethodCacheable($method, $cacheable)
     {
         $request = new Request();
@@ -2385,9 +2332,7 @@ class RequestTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider protocolVersionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('protocolVersionProvider')]
     public function testProtocolVersion($serverProtocol, $trustedProxy, $via, $expected)
     {
         if ($trustedProxy) {
@@ -2448,9 +2393,7 @@ class RequestTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider nonstandardRequestsData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('nonstandardRequestsData')]
     public function testNonstandardRequests($requestUri, $queryString, $expectedPathInfo, $expectedUri, $expectedBasePath = '', $expectedBaseUrl = null)
     {
         $expectedBaseUrl ??= $expectedBasePath;
@@ -2581,9 +2524,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;
@@ -2601,10 +2542,8 @@ class RequestTest extends TestCase
         ];
     }
 
-    /**
-     * @testWith ["PRIVATE_SUBNETS"]
-     *           ["private_ranges"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['PRIVATE_SUBNETS'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['private_ranges'])]
     public function testTrustedProxiesPrivateSubnets(string $key)
     {
         Request::setTrustedProxies([$key], Request::HEADER_X_FORWARDED_FOR);
@@ -2628,9 +2567,7 @@ class RequestTest extends TestCase
         $this->assertFalse($request->isSecure());
     }
 
-    /**
-     * @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 2c761a4..38fdeab 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 ba489bd..4949643 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php
@@ -15,9 +15,7 @@ use PHPUnit\Framework\TestCase;
 use Relay\Relay;
 use Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 abstract class AbstractRedisSessionHandlerTestCase extends TestCase
 {
     protected const PREFIX = 'prefix_';
@@ -108,9 +106,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 {
@@ -132,9 +128,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 3580bbd..3b0b797 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_';
@@ -123,9 +120,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 fa07bd3..2400499 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';
@@ -89,7 +89,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 0ee76ae..61e9916 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;
@@ -259,9 +256,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);
@@ -309,9 +304,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 3acdcfc..039782d 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;
@@ -85,6 +84,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 0ad64ab..8fd2720 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php
@@ -27,10 +27,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
 {
     use ExpectUserDeprecationMessageTrait;
@@ -221,12 +221,9 @@ class NativeSessionStorageTest extends TestCase
         $this->assertSame('200', \ini_get('session.cache_expire'));
     }
 
-    /**
-     * @group legacy
-     * @group nophpunit11
-     *
-     * The test must only be removed when the "session.trans_sid_tags" option is removed from PHP or when the "trans_sid_tags" option is no longer supported by the native session storage.
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11
+The test must only be removed when the "session.trans_sid_tags" option is removed from PHP or when the "trans_sid_tags" option is no longer supported by the native session storage.')]
     public function testTransSidTagsOption()
     {
         $this->expectUserDeprecationMessage('Since symfony/http-foundation 7.2: NativeSessionStorage\'s "trans_sid_tags" option is deprecated and will be ignored in Symfony 8.0.');
@@ -301,6 +298,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();
@@ -310,6 +308,7 @@ class NativeSessionStorageTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSetSessionOptionsOnceSessionStartedIsIgnored()
     {
         session_start();
@@ -361,6 +360,7 @@ class NativeSessionStorageTest extends TestCase
         $this->assertSame('&~[', session_id());
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSaveHandlesNullSessionGracefully()
     {
         $storage = $this->getStorage();
@@ -370,10 +370,9 @@ class NativeSessionStorageTest extends TestCase
         $this->addToAssertionCount(1);
     }
 
-    /**
-     * @group legacy
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testPassingDeprecatedOptions()
     {
         $this->expectUserDeprecationMessage('Since symfony/http-foundation 7.2: NativeSessionStorage\'s "sid_length" option is deprecated and will be ignored in Symfony 8.0.');
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 c1e2464..c030646 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/RequestAttributeValueSameTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/RequestAttributeValueSameTest.php
@@ -18,9 +18,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 abe73c8..3a8a159 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseCookieValueSameTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseCookieValueSameTest.php
@@ -19,9 +19,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 487e53a..4d15016 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseFormatSameTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseFormatSameTest.php
@@ -22,9 +22,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();
@@ -40,9 +38,7 @@ class ResponseFormatSameTest extends TestCase
         $constraint->evaluate(new Response('', 200, ['Content-Type' => 'application/ld+json']));
     }
 
-    /**
-     * @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 d4fdc74..b91d4cb 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHasCookieTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHasCookieTest.php
@@ -19,9 +19,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 59706bf..c7dd95c 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHasHeaderTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHasHeaderTest.php
@@ -18,9 +18,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 28e4fcf..034e310 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHeaderSameTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseHeaderSameTest.php
@@ -18,9 +18,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 35aa401..dcb7129 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseIsRedirectedTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseIsRedirectedTest.php
@@ -18,9 +18,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 ceaff6c..e1fa432 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseIsSuccessfulTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseIsSuccessfulTest.php
@@ -18,9 +18,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 97d0d60..da9d049 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseStatusCodeSameTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Test/Constraint/ResponseStatusCodeSameTest.php
@@ -18,9 +18,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/UriSignerTest.php b/src/Symfony/Component/HttpFoundation/Tests/UriSignerTest.php
index 81b35c2..afa1516 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/UriSignerTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/UriSignerTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\HttpFoundation\Exception\UnverifiedSignedUriException;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\UriSigner;
 
-/**
- * @group time-sensitive
- */
+#[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
 class UriSignerTest extends TestCase
 {
     public function testSign()
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 6b0f402..added50 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/BackedEnumValueResolverTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/BackedEnumValueResolverTest.php
@@ -21,9 +21,7 @@ use Symfony\Component\HttpKernel\Tests\Fixtures\Suit;
 
 class BackedEnumValueResolverTest extends TestCase
 {
-    /**
-     * @dataProvider provideTestSupportsData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTestSupportsData')]
     public function testSupports(Request $request, ArgumentMetadata $metadata, bool $expectedSupport)
     {
         $resolver = new BackedEnumValueResolver();
@@ -68,9 +66,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 636c811..1163dbc 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/DateTimeValueResolverTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/DateTimeValueResolverTest.php
@@ -59,9 +59,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);
@@ -78,9 +76,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);
@@ -112,9 +108,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');
@@ -133,9 +128,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');
@@ -155,9 +149,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();
@@ -187,9 +180,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);
@@ -206,9 +197,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);
@@ -245,9 +234,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/QueryParameterValueResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/QueryParameterValueResolverTest.php
index 2b887db..4f5e83a 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/QueryParameterValueResolverTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/QueryParameterValueResolverTest.php
@@ -40,17 +40,13 @@ class QueryParameterValueResolverTest extends TestCase
         $this->assertSame([], $this->resolver->resolve(Request::create('/'), $metadata));
     }
 
-    /**
-     * @dataProvider validDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validDataProvider')]
     public function testResolvingSuccessfully(Request $request, ArgumentMetadata $metadata, array $expected)
     {
         $this->assertEquals($expected, $this->resolver->resolve($request, $metadata));
     }
 
-    /**
-     * @dataProvider invalidArgumentTypeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidArgumentTypeProvider')]
     public function testResolvingWithInvalidArgumentType(Request $request, ArgumentMetadata $metadata, string $exceptionMessage)
     {
         $this->expectException(\LogicException::class);
@@ -59,9 +55,7 @@ class QueryParameterValueResolverTest extends TestCase
         $this->resolver->resolve($request, $metadata);
     }
 
-    /**
-     * @dataProvider invalidOrMissingArgumentProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidOrMissingArgumentProvider')]
     public function testResolvingWithInvalidOrMissingArgument(Request $request, ArgumentMetadata $metadata, HttpException $expectedException)
     {
         try {
diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/RequestPayloadValueResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/RequestPayloadValueResolverTest.php
index 77cf7d9..6581515 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/RequestPayloadValueResolverTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/RequestPayloadValueResolverTest.php
@@ -340,10 +340,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);
@@ -572,9 +570,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()];
@@ -636,9 +632,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()]);
@@ -702,9 +696,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'];
@@ -731,9 +723,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'];
@@ -858,9 +848,7 @@ class RequestPayloadValueResolverTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provideBoolArgument
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBoolArgument')]
     public function testBoolArgumentInQueryString(mixed $expectedValue, ?string $parameterValue)
     {
         $serializer = new Serializer([new ObjectNormalizer()]);
@@ -881,9 +869,7 @@ class RequestPayloadValueResolverTest extends TestCase
         $this->assertSame($expectedValue, $event->getArguments()[0]->value);
     }
 
-    /**
-     * @dataProvider provideBoolArgument
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBoolArgument')]
     public function testBoolArgumentInBody(mixed $expectedValue, ?string $parameterValue)
     {
         $serializer = new Serializer([new ObjectNormalizer()]);
diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/UidValueResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/UidValueResolverTest.php
index 1da4d97..3003a57 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/UidValueResolverTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/UidValueResolverTest.php
@@ -24,9 +24,7 @@ use Symfony\Component\Uid\UuidV4;
 
 class UidValueResolverTest extends TestCase
 {
-    /**
-     * @dataProvider provideSupports
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSupports')]
     public function testSupports(bool $expected, Request $request, ArgumentMetadata $argument)
     {
         $this->assertCount((int) $expected, (new UidValueResolver())->resolve($request, $argument));
@@ -47,9 +45,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(
@@ -73,9 +69,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/ArgumentResolver/UploadedFileValueResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/UploadedFileValueResolverTest.php
index c000532..1293598 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/UploadedFileValueResolverTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/UploadedFileValueResolverTest.php
@@ -28,9 +28,7 @@ class UploadedFileValueResolverTest extends TestCase
 {
     private const FIXTURES_BASE_PATH = __DIR__.'/../../Fixtures/Controller/ArgumentResolver/UploadedFile';
 
-    /**
-     * @dataProvider provideContext
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideContext')]
     public function testDefaults(RequestPayloadValueResolver $resolver, Request $request)
     {
         $attribute = new MapUploadedFile();
@@ -60,9 +58,7 @@ class UploadedFileValueResolverTest extends TestCase
         $this->assertSame(36, $data->getSize());
     }
 
-    /**
-     * @dataProvider provideContext
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideContext')]
     public function testEmpty(RequestPayloadValueResolver $resolver, Request $request)
     {
         $attribute = new MapUploadedFile();
@@ -88,9 +84,7 @@ class UploadedFileValueResolverTest extends TestCase
         $resolver->onKernelControllerArguments($event);
     }
 
-    /**
-     * @dataProvider provideContext
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideContext')]
     public function testEmptyArrayArgument(RequestPayloadValueResolver $resolver, Request $request)
     {
         $attribute = new MapUploadedFile();
@@ -117,9 +111,7 @@ class UploadedFileValueResolverTest extends TestCase
         $this->assertSame([], $data);
     }
 
-    /**
-     * @dataProvider provideContext
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideContext')]
     public function testCustomName(RequestPayloadValueResolver $resolver, Request $request)
     {
         $attribute = new MapUploadedFile(name: 'bar');
@@ -149,9 +141,7 @@ class UploadedFileValueResolverTest extends TestCase
         $this->assertSame(71, $data->getSize());
     }
 
-    /**
-     * @dataProvider provideContext
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideContext')]
     public function testConstraintsWithoutViolation(RequestPayloadValueResolver $resolver, Request $request)
     {
         $attribute = new MapUploadedFile(constraints: new Assert\File(maxSize: 100));
@@ -181,9 +171,7 @@ class UploadedFileValueResolverTest extends TestCase
         $this->assertSame(71, $data->getSize());
     }
 
-    /**
-     * @dataProvider provideContext
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideContext')]
     public function testConstraintsWithViolation(RequestPayloadValueResolver $resolver, Request $request)
     {
         $attribute = new MapUploadedFile(constraints: new Assert\File(maxSize: 50));
@@ -210,9 +198,7 @@ class UploadedFileValueResolverTest extends TestCase
         $resolver->onKernelControllerArguments($event);
     }
 
-    /**
-     * @dataProvider provideContext
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideContext')]
     public function testMultipleFilesArray(RequestPayloadValueResolver $resolver, Request $request)
     {
         $attribute = new MapUploadedFile();
@@ -244,9 +230,7 @@ class UploadedFileValueResolverTest extends TestCase
         $this->assertSame(71, $data[1]->getSize());
     }
 
-    /**
-     * @dataProvider provideContext
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideContext')]
     public function testMultipleFilesArrayConstraints(RequestPayloadValueResolver $resolver, Request $request)
     {
         $attribute = new MapUploadedFile(constraints: new Assert\File(maxSize: 50));
@@ -273,9 +257,7 @@ class UploadedFileValueResolverTest extends TestCase
         $resolver->onKernelControllerArguments($event);
     }
 
-    /**
-     * @dataProvider provideContext
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideContext')]
     public function testMultipleFilesVariadic(RequestPayloadValueResolver $resolver, Request $request)
     {
         $attribute = new MapUploadedFile();
@@ -307,9 +289,7 @@ class UploadedFileValueResolverTest extends TestCase
         $this->assertSame(71, $data[1]->getSize());
     }
 
-    /**
-     * @dataProvider provideContext
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideContext')]
     public function testMultipleFilesVariadicConstraints(RequestPayloadValueResolver $resolver, Request $request)
     {
         $attribute = new MapUploadedFile(constraints: new Assert\File(maxSize: 50));
@@ -336,9 +316,7 @@ class UploadedFileValueResolverTest extends TestCase
         $resolver->onKernelControllerArguments($event);
     }
 
-    /**
-     * @dataProvider provideContext
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideContext')]
     public function testShouldAllowEmptyWhenNullable(RequestPayloadValueResolver $resolver, Request $request)
     {
         $attribute = new MapUploadedFile();
@@ -366,9 +344,7 @@ class UploadedFileValueResolverTest extends TestCase
         $this->assertNull($data);
     }
 
-    /**
-     * @dataProvider provideContext
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideContext')]
     public function testShouldAllowEmptyWhenNullableArray(RequestPayloadValueResolver $resolver, Request $request)
     {
         $attribute = new MapUploadedFile();
@@ -396,9 +372,7 @@ class UploadedFileValueResolverTest extends TestCase
         $this->assertNull($data);
     }
 
-    /**
-     * @dataProvider provideContext
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideContext')]
     public function testShouldAllowEmptyWhenHasDefaultValue(RequestPayloadValueResolver $resolver, Request $request)
     {
         $attribute = new MapUploadedFile();
diff --git a/src/Symfony/Component/HttpKernel/Tests/Controller/ContainerControllerResolverTest.php b/src/Symfony/Component/HttpKernel/Tests/Controller/ContainerControllerResolverTest.php
index 675ea5b..76e7c0a 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Controller/ContainerControllerResolverTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Controller/ContainerControllerResolverTest.php
@@ -68,9 +68,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 0698dda..769b591 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 93ba4c1..4eaf4e3 100644
--- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php
@@ -76,9 +76,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();
@@ -414,9 +412,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();
@@ -442,9 +438,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/AddAnnotatedClassesToCachePassTest.php b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/AddAnnotatedClassesToCachePassTest.php
index e57c349..bc10769 100644
--- a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/AddAnnotatedClassesToCachePassTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/AddAnnotatedClassesToCachePassTest.php
@@ -14,9 +14,7 @@ namespace Symfony\Component\HttpKernel\Tests\DependencyInjection;
 use PHPUnit\Framework\TestCase;
 use Symfony\Component\HttpKernel\DependencyInjection\AddAnnotatedClassesToCachePass;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class AddAnnotatedClassesToCachePassTest extends TestCase
 {
     public function testExpandClasses()
diff --git a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php
index b281c87..15860e4 100644
--- a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php
@@ -309,9 +309,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();
@@ -341,9 +339,7 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideBindScalarValueToControllerArgument
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBindScalarValueToControllerArgument')]
     public function testBindScalarValueToControllerArgument($bindingKey)
     {
         $container = new ContainerBuilder();
@@ -519,9 +515,7 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase
         $this->assertFalse($locator->has('service2'));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testTaggedIteratorAndTaggedLocatorAttributes()
     {
         $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 d2c8ed0..4c86b34 100644
--- a/src/Symfony/Component/HttpKernel/Tests/EventListener/CacheAttributeListenerTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/CacheAttributeListenerTest.php
@@ -217,10 +217,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();
@@ -238,10 +236,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();
@@ -264,10 +260,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();
@@ -285,10 +279,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();
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 7fdda59..74f8be4 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();
@@ -234,9 +229,7 @@ class ErrorListenerTest extends TestCase
         $this->assertCount(1, $logger->getLogsForLevel('info'));
     }
 
-    /**
-     * @dataProvider exceptionWithAttributeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('exceptionWithAttributeProvider')]
     public function testHandleHttpAttribute(\Throwable $exception, int $expectedStatusCode, array $expectedHeaders)
     {
         $request = new Request();
@@ -333,9 +326,7 @@ class ErrorListenerTest extends TestCase
         $listener->onKernelException($event);
     }
 
-    /**
-     * @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 f980984..e2df9c0 100644
--- a/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php
@@ -37,9 +37,7 @@ use Symfony\Component\Routing\RequestContext;
 
 class RouterListenerTest extends TestCase
 {
-    /**
-     * @dataProvider getPortData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPortData')]
     public function testPort($defaultHttpPort, $defaultHttpsPort, $uri, $expectedHttpPort, $expectedHttpsPort)
     {
         $urlMatcher = $this->createMock(UrlMatcherInterface::class);
@@ -122,9 +120,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);
@@ -265,9 +261,7 @@ class RouterListenerTest extends TestCase
         $listener->onKernelRequest($event);
     }
 
-    /**
-     * @dataProvider provideRouteMapping
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRouteMapping')]
     public function testRouteMapping(array $expected, array $parameters)
     {
         $kernel = $this->createMock(HttpKernelInterface::class);
diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/SessionListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/SessionListenerTest.php
index fda957b..d4eaf85 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();
@@ -497,7 +480,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');
@@ -507,7 +490,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);
@@ -880,9 +863,7 @@ class SessionListenerTest extends TestCase
         (new SessionListener($container, true))->onSessionUsage();
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testReset()
     {
         session_start();
@@ -901,9 +882,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 b31bd75..8dbef3d 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();
@@ -63,9 +59,7 @@ class HttpExceptionTest extends TestCase
         $this->assertSame($previous, $exception->getPrevious());
     }
 
-    /**
-     * @dataProvider provideStatusCode
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideStatusCode')]
     public function testFromStatusCode(int $statusCode)
     {
         $exception = HttpException::fromStatusCode($statusCode);
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 8266458..24c9b4c 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 9f03f6d..0d8a191 100644
--- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php
@@ -22,16 +22,12 @@ 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
 {
     public function testTerminateDelegatesTerminationOnlyForTerminableInterface()
     {
-        $storeMock = $this->getMockBuilder(StoreInterface::class)
-            ->disableOriginalConstructor()
-            ->getMock();
+        $storeMock = $this->createMock(StoreInterface::class);
 
         // does not implement TerminableInterface
         $kernel = new TestKernel();
@@ -1642,9 +1638,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);
@@ -1671,9 +1665,7 @@ class HttpCacheTest extends HttpCacheTestCase
         ];
     }
 
-    /**
-     * @dataProvider getForwardedData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getForwardedData')]
     public function testForwarderHeaderForForwardedRequests($forwarded, $expected)
     {
         $this->setNextResponse();
@@ -1849,9 +1841,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 = [
@@ -1892,9 +1882,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 58e6ab5..47c4b7b 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 f650c33..b400248 100644
--- a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php
@@ -203,9 +203,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')
@@ -225,9 +223,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())
@@ -455,9 +451,7 @@ class KernelTest extends TestCase
 
     public function testServicesResetter()
     {
-        $httpKernelMock = $this->getMockBuilder(HttpKernelInterface::class)
-            ->disableOriginalConstructor()
-            ->getMock();
+        $httpKernelMock = $this->createMock(HttpKernelInterface::class);
         $httpKernelMock
             ->expects($this->exactly(2))
             ->method('handle');
@@ -485,9 +479,7 @@ class KernelTest extends TestCase
         $this->assertEquals(1, ResettableService::$counter);
     }
 
-    /**
-     * @group time-sensitive
-     */
+    #[\PHPUnit\Framework\Attributes\Group('time-sensitive')]
     public function testKernelStartTimeIsResetWhileBootingAlreadyBootedKernel()
     {
         $kernel = $this->getKernel(['initializeBundles'], [], true);
diff --git a/src/Symfony/Component/HttpKernel/Tests/Log/LoggerTest.php b/src/Symfony/Component/HttpKernel/Tests/Log/LoggerTest.php
index b70733d..bfba8b8 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 eb8f99c..d7fdfee 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/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 a3dfcb6..c5e017d 100644
--- a/src/Symfony/Component/Intl/Tests/IntlTest.php
+++ b/src/Symfony/Component/Intl/Tests/IntlTest.php
@@ -28,9 +28,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 889ac57..1fcb897 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 34579be..5056f07 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 fbdae2b..94de877 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 62441a5..d5b0d9d 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/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/JsonPath/Tests/JsonCrawlerTest.php b/src/Symfony/Component/JsonPath/Tests/JsonCrawlerTest.php
index b1357d7..9c0485c 100644
--- a/src/Symfony/Component/JsonPath/Tests/JsonCrawlerTest.php
+++ b/src/Symfony/Component/JsonPath/Tests/JsonCrawlerTest.php
@@ -568,9 +568,7 @@ JSON);
         $this->assertSame(['a' => 1, 'b' => 2], $result[0]);
     }
 
-    /**
-     * @dataProvider provideUnicodeEscapeSequencesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUnicodeEscapeSequencesProvider')]
     public function testUnicodeEscapeSequences(string $jsonPath, array $expected)
     {
         $this->assertSame($expected, self::getUnicodeDocumentCrawler()->find($jsonPath));
@@ -622,9 +620,7 @@ JSON);
         ];
     }
 
-    /**
-     * @dataProvider provideSingleQuotedStringProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSingleQuotedStringProvider')]
     public function testSingleQuotedStrings(string $jsonPath, array $expected)
     {
         $this->assertSame($expected, self::getUnicodeDocumentCrawler()->find($jsonPath));
@@ -676,9 +672,7 @@ JSON);
         ];
     }
 
-    /**
-     * @dataProvider provideFilterWithUnicodeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFilterWithUnicodeProvider')]
     public function testFilterWithUnicodeStrings(string $jsonPath, int $expectedCount, string $expectedCountry)
     {
         $result = self::getUnicodeDocumentCrawler()->find($jsonPath);
@@ -721,9 +715,7 @@ JSON);
         ];
     }
 
-    /**
-     * @dataProvider provideComplexUnicodePath
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideComplexUnicodePath')]
     public function testComplexUnicodePaths(string $jsonPath, array $expected)
     {
         $complexJson = [
diff --git a/src/Symfony/Component/JsonPath/Tests/JsonPathComplianceTestSuiteTest.php b/src/Symfony/Component/JsonPath/Tests/JsonPathComplianceTestSuiteTest.php
index a3454e6..db692c8 100644
--- a/src/Symfony/Component/JsonPath/Tests/JsonPathComplianceTestSuiteTest.php
+++ b/src/Symfony/Component/JsonPath/Tests/JsonPathComplianceTestSuiteTest.php
@@ -139,9 +139,7 @@ final class JsonPathComplianceTestSuiteTest extends TestCase
         'filter, group terms, left',
     ];
 
-    /**
-     * @dataProvider complianceCaseProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('complianceCaseProvider')]
     public function testComplianceTestCase(string $selector, array $document, array $expectedResults, bool $invalidSelector)
     {
         $jsonCrawler = new JsonCrawler(json_encode($document));
diff --git a/src/Symfony/Component/JsonPath/Tests/JsonPathTest.php b/src/Symfony/Component/JsonPath/Tests/JsonPathTest.php
index cbe6f20..47287c7 100644
--- a/src/Symfony/Component/JsonPath/Tests/JsonPathTest.php
+++ b/src/Symfony/Component/JsonPath/Tests/JsonPathTest.php
@@ -63,9 +63,7 @@ class JsonPathTest extends TestCase
         $this->assertSame('$["users"][-1]', (string) $path);
     }
 
-    /**
-     * @dataProvider provideKeysToEscape
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideKeysToEscape')]
     public function testEscapedKey(string $key, string $expectedPath)
     {
         $path = new JsonPath();
diff --git a/src/Symfony/Component/JsonPath/Tests/Tokenizer/JsonPathTokenizerTest.php b/src/Symfony/Component/JsonPath/Tests/Tokenizer/JsonPathTokenizerTest.php
index fdbd36d..44eaa74 100644
--- a/src/Symfony/Component/JsonPath/Tests/Tokenizer/JsonPathTokenizerTest.php
+++ b/src/Symfony/Component/JsonPath/Tests/Tokenizer/JsonPathTokenizerTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\JsonPath\Tokenizer\TokenType;
 
 class JsonPathTokenizerTest extends TestCase
 {
-    /**
-     * @dataProvider simplePathProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('simplePathProvider')]
     public function testSimplePath(string $path, array $expectedTokens)
     {
         $jsonPath = new JsonPath($path);
@@ -62,9 +60,7 @@ class JsonPathTokenizerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider bracketNotationProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('bracketNotationProvider')]
     public function testBracketNotation(string $path, array $expectedTokens)
     {
         $jsonPath = new JsonPath($path);
@@ -102,9 +98,7 @@ class JsonPathTokenizerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider filterExpressionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('filterExpressionProvider')]
     public function testFilterExpressions(string $path, array $expectedTokens)
     {
         $jsonPath = new JsonPath($path);
@@ -147,9 +141,7 @@ class JsonPathTokenizerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider complexPathProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('complexPathProvider')]
     public function testComplexPaths(string $path, array $expectedTokens)
     {
         $jsonPath = new JsonPath($path);
@@ -310,9 +302,7 @@ class JsonPathTokenizerTest extends TestCase
         JsonPathTokenizer::tokenize(new JsonPath('$.store...name'));
     }
 
-    /**
-     * @dataProvider provideValidUtf8Chars
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidUtf8Chars')]
     public function testUtf8ValidChars(string $propertyName)
     {
         $jsonPath = new JsonPath(\sprintf('$.%s', $propertyName));
@@ -337,9 +327,7 @@ class JsonPathTokenizerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideInvalidUtf8PropertyName
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidUtf8PropertyName')]
     public function testUtf8InvalidPropertyName(string $propertyName)
     {
         $this->expectException(InvalidJsonPathException::class);
diff --git a/src/Symfony/Component/JsonStreamer/Tests/CacheWarmer/LazyGhostCacheWarmerTest.php b/src/Symfony/Component/JsonStreamer/Tests/CacheWarmer/LazyGhostCacheWarmerTest.php
index fb10cc1..4ec8f48 100644
--- a/src/Symfony/Component/JsonStreamer/Tests/CacheWarmer/LazyGhostCacheWarmerTest.php
+++ b/src/Symfony/Component/JsonStreamer/Tests/CacheWarmer/LazyGhostCacheWarmerTest.php
@@ -15,9 +15,7 @@ use PHPUnit\Framework\TestCase;
 use Symfony\Component\JsonStreamer\CacheWarmer\LazyGhostCacheWarmer;
 use Symfony\Component\JsonStreamer\Tests\Fixtures\Model\ClassicDummy;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class LazyGhostCacheWarmerTest extends TestCase
 {
     private string $lazyGhostsDir;
diff --git a/src/Symfony/Component/JsonStreamer/Tests/JsonStreamWriterTest.php b/src/Symfony/Component/JsonStreamer/Tests/JsonStreamWriterTest.php
index 88efd38..2d359c3 100644
--- a/src/Symfony/Component/JsonStreamer/Tests/JsonStreamWriterTest.php
+++ b/src/Symfony/Component/JsonStreamer/Tests/JsonStreamWriterTest.php
@@ -216,9 +216,7 @@ class JsonStreamWriterTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider throwWhenMaxDepthIsReachedDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('throwWhenMaxDepthIsReachedDataProvider')]
     public function testThrowWhenMaxDepthIsReached(Type $type, mixed $data)
     {
         $writer = JsonStreamWriter::create(streamWritersDir: $this->streamWritersDir);
diff --git a/src/Symfony/Component/JsonStreamer/Tests/Read/LazyInstantiatorTest.php b/src/Symfony/Component/JsonStreamer/Tests/Read/LazyInstantiatorTest.php
index 90e5f49..fbb9936 100644
--- a/src/Symfony/Component/JsonStreamer/Tests/Read/LazyInstantiatorTest.php
+++ b/src/Symfony/Component/JsonStreamer/Tests/Read/LazyInstantiatorTest.php
@@ -32,9 +32,7 @@ class LazyInstantiatorTest extends TestCase
         }
     }
 
-    /**
-     * @requires PHP < 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.4')]
     public function testCreateLazyGhostUsingVarExporter()
     {
         $ghost = (new LazyInstantiator($this->lazyGhostsDir))->instantiate(ClassicDummy::class, function (ClassicDummy $object): void {
@@ -44,9 +42,7 @@ class LazyInstantiatorTest extends TestCase
         $this->assertSame(123, $ghost->id);
     }
 
-    /**
-     * @requires PHP < 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.4')]
     public function testCreateCacheFile()
     {
         // use DummyForLazyInstantiation class to be sure that the instantiated object is not already in cache.
@@ -55,18 +51,14 @@ class LazyInstantiatorTest extends TestCase
         $this->assertCount(1, glob($this->lazyGhostsDir.'/*'));
     }
 
-    /**
-     * @requires PHP < 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.4')]
     public function testThrowIfLazyGhostDirNotDefined()
     {
         $this->expectException(InvalidArgumentException::class);
         new LazyInstantiator();
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testCreateLazyGhostUsingPhp()
     {
         $ghost = (new LazyInstantiator())->instantiate(ClassicDummy::class, function (ClassicDummy $object): void {
diff --git a/src/Symfony/Component/JsonStreamer/Tests/Read/LexerTest.php b/src/Symfony/Component/JsonStreamer/Tests/Read/LexerTest.php
index 0442e98..596b375 100644
--- a/src/Symfony/Component/JsonStreamer/Tests/Read/LexerTest.php
+++ b/src/Symfony/Component/JsonStreamer/Tests/Read/LexerTest.php
@@ -44,9 +44,9 @@ class LexerTest extends TestCase
 
     /**
      * Ensures that the lexer is compliant with RFC 8259.
-     *
-     * @dataProvider jsonDataProvider
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('jsonDataProvider')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testValidJson(string $name, string $json, bool $valid)
     {
         $resource = fopen('php://temp', 'w');
diff --git a/src/Symfony/Component/JsonStreamer/Tests/Read/SplitterTest.php b/src/Symfony/Component/JsonStreamer/Tests/Read/SplitterTest.php
index 02cd23e..d6a910d 100644
--- a/src/Symfony/Component/JsonStreamer/Tests/Read/SplitterTest.php
+++ b/src/Symfony/Component/JsonStreamer/Tests/Read/SplitterTest.php
@@ -39,9 +39,7 @@ class SplitterTest extends TestCase
         $this->assertDictBoundaries(['k' => [5, 4]], '{"k":[10]}');
     }
 
-    /**
-     * @dataProvider splitDictInvalidDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('splitDictInvalidDataProvider')]
     public function testSplitDictInvalidThrowException(string $expectedMessage, string $content)
     {
         $this->expectException(InvalidStreamException::class);
@@ -74,9 +72,7 @@ class SplitterTest extends TestCase
         yield ['Expected end, but got ""x"".', '{"a": true} "x"'];
     }
 
-    /**
-     * @dataProvider splitListInvalidDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('splitListInvalidDataProvider')]
     public function testSplitListInvalidThrowException(string $expectedMessage, string $content)
     {
         $this->expectException(InvalidStreamException::class);
diff --git a/src/Symfony/Component/JsonStreamer/Tests/Read/StreamReaderGeneratorTest.php b/src/Symfony/Component/JsonStreamer/Tests/Read/StreamReaderGeneratorTest.php
index 7215f22..209e9a0 100644
--- a/src/Symfony/Component/JsonStreamer/Tests/Read/StreamReaderGeneratorTest.php
+++ b/src/Symfony/Component/JsonStreamer/Tests/Read/StreamReaderGeneratorTest.php
@@ -51,9 +51,7 @@ class StreamReaderGeneratorTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider generatedStreamReaderDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('generatedStreamReaderDataProvider')]
     public function testGeneratedStreamReader(string $fixture, Type $type)
     {
         $propertyMetadataLoader = new GenericTypePropertyMetadataLoader(
diff --git a/src/Symfony/Component/JsonStreamer/Tests/Write/StreamWriterGeneratorTest.php b/src/Symfony/Component/JsonStreamer/Tests/Write/StreamWriterGeneratorTest.php
index 6f10243..9301b82 100644
--- a/src/Symfony/Component/JsonStreamer/Tests/Write/StreamWriterGeneratorTest.php
+++ b/src/Symfony/Component/JsonStreamer/Tests/Write/StreamWriterGeneratorTest.php
@@ -53,9 +53,7 @@ class StreamWriterGeneratorTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider generatedStreamWriterDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('generatedStreamWriterDataProvider')]
     public function testGeneratedStreamWriter(string $fixture, Type $type)
     {
         $propertyMetadataLoader = new GenericTypePropertyMetadataLoader(
diff --git a/src/Symfony/Component/Ldap/Tests/Adapter/AbstractQueryTest.php b/src/Symfony/Component/Ldap/Tests/Adapter/AbstractQueryTest.php
index ca5c2e0..f83e8d3 100644
--- a/src/Symfony/Component/Ldap/Tests/Adapter/AbstractQueryTest.php
+++ b/src/Symfony/Component/Ldap/Tests/Adapter/AbstractQueryTest.php
@@ -21,9 +21,8 @@ class AbstractQueryTest extends TestCase
 {
     use ExpectUserDeprecationMessageTrait;
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testSizeLimitIsDeprecated()
     {
         $this->expectUserDeprecationMessage('Since symfony/ldap 7.2: The "sizeLimit" option is deprecated and will be removed in Symfony 8.0.');
diff --git a/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/AdapterTest.php b/src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/AdapterTest.php
index 6b9eb53..41f30cb 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 testSaslBind()
     {
         $h = @ldap_connect('ldap://'.getenv('LDAP_HOST').':'.getenv('LDAP_PORT'));
@@ -59,9 +54,7 @@ class AdapterTest extends LdapTestCase
         $this->assertEquals('cn=admin,dc=symfony,dc=com', $ldap->getConnection()->whoami());
     }
 
-    /**
-     * @group functional
-     */
+    #[\PHPUnit\Framework\Attributes\Group('functional')]
     public function testWhoamiWithoutSaslBind()
     {
         $ldap = new Adapter($this->getLdapConfig());
@@ -72,9 +65,7 @@ class AdapterTest extends LdapTestCase
         $ldap->getConnection()->whoami();
     }
 
-    /**
-     * @group functional
-     */
+    #[\PHPUnit\Framework\Attributes\Group('functional')]
     public function testLdapQuery()
     {
         $ldap = new Adapter($this->getLdapConfig());
@@ -92,9 +83,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());
@@ -110,9 +99,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());
@@ -121,9 +108,7 @@ class AdapterTest extends LdapTestCase
         $query->execute();
     }
 
-    /**
-     * @group network
-     */
+    #[\PHPUnit\Framework\Attributes\Group('network')]
     public function testLdapQueryScopeBase()
     {
         $ldap = new Adapter($this->getLdapConfig());
@@ -140,9 +125,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 6e69ffe..0644ae9 100644
--- a/src/Symfony/Component/Ldap/Tests/Security/CheckLdapCredentialsListenerTest.php
+++ b/src/Symfony/Component/Ldap/Tests/Security/CheckLdapCredentialsListenerTest.php
@@ -44,9 +44,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');
@@ -88,9 +86,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);
diff --git a/src/Symfony/Component/Ldap/Tests/Security/LdapUserProviderTest.php b/src/Symfony/Component/Ldap/Tests/Security/LdapUserProviderTest.php
index 0e35c32..5dd61dc 100644
--- a/src/Symfony/Component/Ldap/Tests/Security/LdapUserProviderTest.php
+++ b/src/Symfony/Component/Ldap/Tests/Security/LdapUserProviderTest.php
@@ -24,9 +24,7 @@ use Symfony\Component\Ldap\Security\RoleFetcherInterface;
 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 bf1787f..2061650 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(__METHOD__);
@@ -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(__METHOD__);
@@ -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(__METHOD__);
@@ -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(__METHOD__);
diff --git a/src/Symfony/Component/Lock/Tests/Store/AbstractStoreTestCase.php b/src/Symfony/Component/Lock/Tests/Store/AbstractStoreTestCase.php
index c240e77..dd5ea00 100644
--- a/src/Symfony/Component/Lock/Tests/Store/AbstractStoreTestCase.php
+++ b/src/Symfony/Component/Lock/Tests/Store/AbstractStoreTestCase.php
@@ -94,6 +94,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 6a19805..1d060a0 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 de81c8a..63cf6a1 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 bb4ed1d..2276719 100644
--- a/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php
@@ -25,9 +25,8 @@ use Symfony\Component\Lock\Store\DoctrineDbalStore;
 
 /**
  * @author Jérémy Derussé <jeremy@derusse.com>
- *
- * @requires extension pdo_sqlite
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pdo_sqlite')]
 class DoctrineDbalStoreTest extends AbstractStoreTestCase
 {
     use ExpiringStoreTestTrait;
@@ -65,14 +64,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(__METHOD__);
@@ -97,11 +95,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')) {
@@ -123,9 +118,8 @@ class DoctrineDbalStoreTest extends AbstractStoreTestCase
 
     /**
      * @param class-string<AbstractPlatform>
-     *
-     * @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 b8b80f0..f7c5ce6 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(__METHOD__);
@@ -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 880be26..31c4778 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(__METHOD__);
@@ -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 95ca8b0..5b6ab85 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/PredisStoreWithExceptionsTest.php b/src/Symfony/Component/Lock/Tests/Store/PredisStoreWithExceptionsTest.php
index 6b24711..fa886ba 100644
--- a/src/Symfony/Component/Lock/Tests/Store/PredisStoreWithExceptionsTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/PredisStoreWithExceptionsTest.php
@@ -11,9 +11,7 @@
 
 namespace Symfony\Component\Lock\Tests\Store;
 
-/**
- * @group integration
- */
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class PredisStoreWithExceptionsTest extends AbstractRedisStoreTestCase
 {
     public static function setUpBeforeClass(): void
diff --git a/src/Symfony/Component/Lock/Tests/Store/PredisStoreWithoutExceptionsTest.php b/src/Symfony/Component/Lock/Tests/Store/PredisStoreWithoutExceptionsTest.php
index bb135a4..8bbeb47 100644
--- a/src/Symfony/Component/Lock/Tests/Store/PredisStoreWithoutExceptionsTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/PredisStoreWithoutExceptionsTest.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 PredisStoreWithoutExceptionsTest 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/RelayClusterStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/RelayClusterStoreTest.php
index d25bbc4..0597dbf 100644
--- a/src/Symfony/Component/Lock/Tests/Store/RelayClusterStoreTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/RelayClusterStoreTest.php
@@ -14,11 +14,8 @@ namespace Store;
 use Relay\Cluster as RelayCluster;
 use Symfony\Component\Lock\Tests\Store\AbstractRedisStoreTestCase;
 
-/**
- * @requires extension relay
- *
- * @group integration
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('relay')]
+#[\PHPUnit\Framework\Attributes\Group('integration')]
 class RelayClusterStoreTest extends AbstractRedisStoreTestCase
 {
     protected function setUp(): void
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 100beac..7b1f79c 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 77df609..281df51 100644
--- a/src/Symfony/Component/Lock/Tests/Store/StoreFactoryTest.php
+++ b/src/Symfony/Component/Lock/Tests/Store/StoreFactoryTest.php
@@ -32,9 +32,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/AhaSend/Tests/Transport/AhaSendApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/AhaSend/Tests/Transport/AhaSendApiTransportTest.php
index 2f9e09e..bf9ae2f 100644
--- a/src/Symfony/Component/Mailer/Bridge/AhaSend/Tests/Transport/AhaSendApiTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/AhaSend/Tests/Transport/AhaSendApiTransportTest.php
@@ -26,9 +26,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
 
 class AhaSendApiTransportTest extends TestCase
 {
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(AhaSendApiTransport $transport, string $expected)
     {
         $this->assertSame($expected, (string) $transport);
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 8610a9d..2908d20 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 0a3bbbe..ede1aa2 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/Azure/Tests/Transport/AzureApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Azure/Tests/Transport/AzureApiTransportTest.php
index 1ed89fd..3e820a3 100644
--- a/src/Symfony/Component/Mailer/Bridge/Azure/Tests/Transport/AzureApiTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Azure/Tests/Transport/AzureApiTransportTest.php
@@ -24,9 +24,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
 
 class AzureApiTransportTest extends TestCase
 {
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(AzureApiTransport $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/Mailomat/Tests/Transport/MailomatApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Mailomat/Tests/Transport/MailomatApiTransportTest.php
index b75f3bd..db264f6 100644
--- a/src/Symfony/Component/Mailer/Bridge/Mailomat/Tests/Transport/MailomatApiTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Mailomat/Tests/Transport/MailomatApiTransportTest.php
@@ -24,9 +24,7 @@ class MailomatApiTransportTest extends TestCase
 {
     private const KEY = 'K3Y';
 
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(MailomatApiTransport $transport, string $expected)
     {
         $this->assertSame($expected, (string) $transport);
diff --git a/src/Symfony/Component/Mailer/Bridge/Mailtrap/Tests/Transport/MailtrapApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Mailtrap/Tests/Transport/MailtrapApiTransportTest.php
index 286f577..40c5068 100644
--- a/src/Symfony/Component/Mailer/Bridge/Mailtrap/Tests/Transport/MailtrapApiTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Mailtrap/Tests/Transport/MailtrapApiTransportTest.php
@@ -26,9 +26,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
 
 class MailtrapApiTransportTest extends TestCase
 {
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(MailtrapApiTransport $transport, string $expected)
     {
         $this->assertSame($expected, (string) $transport);
diff --git a/src/Symfony/Component/Mailer/Bridge/Postal/Tests/Transport/PostalApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Postal/Tests/Transport/PostalApiTransportTest.php
index b064380..bdfb8f2 100644
--- a/src/Symfony/Component/Mailer/Bridge/Postal/Tests/Transport/PostalApiTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Postal/Tests/Transport/PostalApiTransportTest.php
@@ -23,9 +23,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
 
 class PostalApiTransportTest extends TestCase
 {
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(PostalApiTransport $transport, string $expected)
     {
         $this->assertSame($expected, (string) $transport);
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 e692357..7e75e86 100644
--- a/src/Symfony/Component/Mailer/Bridge/Postmark/Tests/Transport/PostmarkApiTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Postmark/Tests/Transport/PostmarkApiTransportTest.php
@@ -29,9 +29,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/Resend/Tests/Transport/ResendApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Resend/Tests/Transport/ResendApiTransportTest.php
index 38f0773..ba8daf3 100644
--- a/src/Symfony/Component/Mailer/Bridge/Resend/Tests/Transport/ResendApiTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Resend/Tests/Transport/ResendApiTransportTest.php
@@ -26,9 +26,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
 
 class ResendApiTransportTest extends TestCase
 {
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(ResendApiTransport $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 37dd459..871d772 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/Transport/SendgridSmtpTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Transport/SendgridSmtpTransportTest.php
index 77e5135..90a8a39 100644
--- a/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Transport/SendgridSmtpTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Transport/SendgridSmtpTransportTest.php
@@ -16,9 +16,7 @@ use Symfony\Component\Mailer\Bridge\Sendgrid\Transport\SendgridSmtpTransport;
 
 class SendgridSmtpTransportTest extends TestCase
 {
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(SendgridSmtpTransport $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 b39c8ff..94aaf38 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
 {
     private const PRIVATE_KEY = <<<'KEY'
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/Sweego/Tests/Transport/SweegoApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Sweego/Tests/Transport/SweegoApiTransportTest.php
index 3f943ed..44d8cde 100644
--- a/src/Symfony/Component/Mailer/Bridge/Sweego/Tests/Transport/SweegoApiTransportTest.php
+++ b/src/Symfony/Component/Mailer/Bridge/Sweego/Tests/Transport/SweegoApiTransportTest.php
@@ -24,9 +24,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface;
 
 class SweegoApiTransportTest extends TestCase
 {
-    /**
-     * @dataProvider getTransportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransportData')]
     public function testToString(SweegoApiTransport $transport, string $expected)
     {
         $this->assertSame($expected, (string) $transport);
diff --git a/src/Symfony/Component/Mailer/Test/AbstractTransportFactoryTestCase.php b/src/Symfony/Component/Mailer/Test/AbstractTransportFactoryTestCase.php
index c378948..b00f003 100644
--- a/src/Symfony/Component/Mailer/Test/AbstractTransportFactoryTestCase.php
+++ b/src/Symfony/Component/Mailer/Test/AbstractTransportFactoryTestCase.php
@@ -40,10 +40,8 @@ abstract class AbstractTransportFactoryTestCase extends TestCase
      */
     abstract public static function unsupportedSchemeProvider(): iterable;
 
-    /**
-     * @dataProvider supportsProvider
-     */
     #[DataProvider('supportsProvider')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('supportsProvider')]
     public function testSupports(Dsn $dsn, bool $supports)
     {
         $factory = $this->getFactory();
@@ -51,10 +49,8 @@ abstract class AbstractTransportFactoryTestCase extends TestCase
         $this->assertSame($supports, $factory->supports($dsn));
     }
 
-    /**
-     * @dataProvider createProvider
-     */
     #[DataProvider('createProvider')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('createProvider')]
     public function testCreate(Dsn $dsn, TransportInterface $transport)
     {
         $factory = $this->getFactory();
@@ -65,10 +61,8 @@ abstract class AbstractTransportFactoryTestCase extends TestCase
         }
     }
 
-    /**
-     * @dataProvider unsupportedSchemeProvider
-     */
     #[DataProvider('unsupportedSchemeProvider')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('unsupportedSchemeProvider')]
     public function testUnsupportedSchemeException(Dsn $dsn, ?string $message = null)
     {
         $factory = $this->getFactory();
diff --git a/src/Symfony/Component/Mailer/Tests/EventListener/DkimSignedMessageListenerTest.php b/src/Symfony/Component/Mailer/Tests/EventListener/DkimSignedMessageListenerTest.php
index 5419cfb..f287efb 100644
--- a/src/Symfony/Component/Mailer/Tests/EventListener/DkimSignedMessageListenerTest.php
+++ b/src/Symfony/Component/Mailer/Tests/EventListener/DkimSignedMessageListenerTest.php
@@ -24,9 +24,7 @@ use Symfony\Component\Mime\Part\TextPart;
 
 class DkimSignedMessageListenerTest extends TestCase
 {
-    /**
-     * @requires extension openssl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('openssl')]
     public function testDkimMessageSigningProcess()
     {
         $signer = new DkimSigner(<<<KEY
diff --git a/src/Symfony/Component/Mailer/Tests/EventListener/EnvelopeListenerTest.php b/src/Symfony/Component/Mailer/Tests/EventListener/EnvelopeListenerTest.php
index 4a8d8ff..9e0c77f 100644
--- a/src/Symfony/Component/Mailer/Tests/EventListener/EnvelopeListenerTest.php
+++ b/src/Symfony/Component/Mailer/Tests/EventListener/EnvelopeListenerTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\Mime\RawMessage;
 
 class EnvelopeListenerTest extends TestCase
 {
-    /**
-     * @dataProvider provideRecipientsTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRecipientsTests')]
     public function testRecipients(array $expected, ?array $recipients = null, array $allowedRecipients = [])
     {
         $listener = new EnvelopeListener(null, $recipients, $allowedRecipients);
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/EventListener/SmimeEncryptedMessageListenerTest.php b/src/Symfony/Component/Mailer/Tests/EventListener/SmimeEncryptedMessageListenerTest.php
index a4c4af7..bc81674 100644
--- a/src/Symfony/Component/Mailer/Tests/EventListener/SmimeEncryptedMessageListenerTest.php
+++ b/src/Symfony/Component/Mailer/Tests/EventListener/SmimeEncryptedMessageListenerTest.php
@@ -26,9 +26,7 @@ use Symfony\Component\Mime\Part\TextPart;
 
 class SmimeEncryptedMessageListenerTest extends TestCase
 {
-    /**
-     * @requires extension openssl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('openssl')]
     public function testSmimeMessageEncryptionProcess()
     {
         $repository = $this->createMock(SmimeCertificateRepositoryInterface::class);
@@ -51,9 +49,7 @@ class SmimeEncryptedMessageListenerTest extends TestCase
         $this->assertFalse($event->getMessage()->getHeaders()->has('X-SMime-Encrypt'));
     }
 
-    /**
-     * @requires extension openssl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('openssl')]
     public function testMessageNotEncryptedWhenOneRecipientCertificateIsMissing()
     {
         $repository = $this->createMock(SmimeCertificateRepositoryInterface::class);
@@ -78,9 +74,7 @@ class SmimeEncryptedMessageListenerTest extends TestCase
         $this->assertInstanceOf(TextPart::class, $event->getMessage()->getBody());
     }
 
-    /**
-     * @requires extension openssl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('openssl')]
     public function testMessageNotExplicitlyAskedForNonEncryption()
     {
         $repository = $this->createMock(SmimeCertificateRepositoryInterface::class);
diff --git a/src/Symfony/Component/Mailer/Tests/EventListener/SmimeSignedMessageListenerTest.php b/src/Symfony/Component/Mailer/Tests/EventListener/SmimeSignedMessageListenerTest.php
index 178c04c..326d26e 100644
--- a/src/Symfony/Component/Mailer/Tests/EventListener/SmimeSignedMessageListenerTest.php
+++ b/src/Symfony/Component/Mailer/Tests/EventListener/SmimeSignedMessageListenerTest.php
@@ -25,9 +25,7 @@ use Symfony\Component\Mime\Part\TextPart;
 
 class SmimeSignedMessageListenerTest extends TestCase
 {
-    /**
-     * @requires extension openssl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('openssl')]
     public function testSmimeMessageSigningProcess()
     {
         $signer = new SMimeSigner(\dirname(__DIR__).'/Fixtures/sign.crt', \dirname(__DIR__).'/Fixtures/sign.key');
diff --git a/src/Symfony/Component/Mailer/Tests/Exception/UnsupportedSchemeExceptionTest.php b/src/Symfony/Component/Mailer/Tests/Exception/UnsupportedSchemeExceptionTest.php
index f6a19ce..4b8593f 100644
--- a/src/Symfony/Component/Mailer/Tests/Exception/UnsupportedSchemeExceptionTest.php
+++ b/src/Symfony/Component/Mailer/Tests/Exception/UnsupportedSchemeExceptionTest.php
@@ -35,9 +35,7 @@ use Symfony\Component\Mailer\Bridge\Sweego\Transport\SweegoTransportFactory;
 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
@@ -66,9 +64,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');
@@ -102,9 +98,7 @@ final class UnsupportedSchemeExceptionTest extends TestCase
         yield ['sweego', 'symfony/sweego-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 3949fa5..615a64f 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);
@@ -106,9 +102,7 @@ class DsnTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getBooleanOptionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getBooleanOptionProvider')]
     public function testGetBooleanOption(bool $expected, string $dsnString, string $option, bool $default)
     {
         $dsn = Dsn::fromString($dsnString);
diff --git a/src/Symfony/Component/Mailer/Tests/Transport/FailoverTransportTest.php b/src/Symfony/Component/Mailer/Tests/Transport/FailoverTransportTest.php
index f340127..1210ce3 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);
@@ -131,9 +127,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);
@@ -161,9 +155,7 @@ class FailoverTransportTest extends TestCase
         $t->send(new RawMessage(''));
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testSendOneDeadButRecover()
     {
         $t1 = $this->createMock(TransportInterface::class);
diff --git a/src/Symfony/Component/Mailer/Tests/Transport/NativeTransportFactoryTest.php b/src/Symfony/Component/Mailer/Tests/Transport/NativeTransportFactoryTest.php
index 1571766..654c8ef 100644
--- a/src/Symfony/Component/Mailer/Tests/Transport/NativeTransportFactoryTest.php
+++ b/src/Symfony/Component/Mailer/Tests/Transport/NativeTransportFactoryTest.php
@@ -71,9 +71,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) {
@@ -111,9 +109,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 a3d1bc8..890362f 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);
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 978ada6..79fc336 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()]);
@@ -65,9 +63,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));
@@ -81,9 +77,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 357cbdd..9bebcca 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 91f6e84..3080e72 100644
--- a/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/ConnectionTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/ConnectionTest.php
@@ -285,9 +285,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);
@@ -305,9 +303,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 d7592d0..deb7adf 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
@@ -301,7 +298,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 5308908..af70a2e 100644
--- a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpReceiverTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpReceiverTest.php
@@ -27,9 +27,7 @@ use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer;
 use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
 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 74529ed..3d79ae7 100644
--- a/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpSenderTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/AmqpSenderTest.php
@@ -21,9 +21,7 @@ use Symfony\Component\Messenger\Exception\TransportException;
 use Symfony\Component\Messenger\Stamp\TransportMessageIdStamp;
 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 e2d94d6..abaec9a 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';
@@ -222,9 +219,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/Beanstalkd/Tests/Transport/BeanstalkdReceiverTest.php b/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Tests/Transport/BeanstalkdReceiverTest.php
index eeab949..567e58c 100644
--- a/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Tests/Transport/BeanstalkdReceiverTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Tests/Transport/BeanstalkdReceiverTest.php
@@ -90,9 +90,7 @@ final class BeanstalkdReceiverTest extends TestCase
         $receiver->get();
     }
 
-    /**
-     * @dataProvider provideRejectCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRejectCases')]
     public function testReject(array $stamps, ?int $priority, bool $forceDelete)
     {
         $serializer = $this->createSerializer();
diff --git a/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Tests/Transport/ConnectionTest.php b/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Tests/Transport/ConnectionTest.php
index 9ebea2d..ca6e808 100644
--- a/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Tests/Transport/ConnectionTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Beanstalkd/Tests/Transport/ConnectionTest.php
@@ -266,11 +266,9 @@ final class ConnectionTest extends TestCase
         $connection->ack($id);
     }
 
-    /**
-     * @testWith [false, false]
-     *           [false, true]
-     *           [true, true]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([false, false])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false, true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([true, true])]
     public function testReject(bool $buryOnReject, bool $forceDelete)
     {
         $id = '123456';
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 c8b07fc..db7b5ea 100644
--- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/ConnectionTest.php
@@ -456,9 +456,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);
@@ -642,9 +640,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);
@@ -807,9 +803,7 @@ class ConnectionTest extends TestCase
         $this->assertSame([], $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 fbb50bf..37672c4 100644
--- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php
@@ -19,9 +19,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 579f0e6..971c7f8 100644
--- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlFilterIntegrationTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlFilterIntegrationTest.php
@@ -27,10 +27,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 392f991..88f9d01 100644
--- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlIntegrationTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrinePostgreSqlIntegrationTest.php
@@ -20,11 +20,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 7d449f7..0b95886 100644
--- a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/ConnectionTest.php
@@ -16,9 +16,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()
@@ -131,9 +129,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();
@@ -384,9 +380,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 d1b9b67..57f1c12 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;
@@ -220,9 +217,7 @@ class RedisExtIntegrationTest extends TestCase
         $connection->ack($message['id']);
     }
 
-    /**
-     * @dataProvider sentinelOptionNames
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('sentinelOptionNames')]
     public function testSentinel(string $sentinelOptionName)
     {
         if (!$hosts = getenv('REDIS_SENTINEL_HOSTS')) {
@@ -354,9 +349,7 @@ class RedisExtIntegrationTest extends TestCase
         }
     }
 
-    /**
-     * @group transient-on-windows
-     */
+    #[\PHPUnit\Framework\Attributes\Group('transient-on-windows')]
     public function testGetNonBlocking()
     {
         $redis = $this->createRedisClient();
@@ -373,9 +366,7 @@ class RedisExtIntegrationTest extends TestCase
         }
     }
 
-    /**
-     * @group transient-on-windows
-     */
+    #[\PHPUnit\Framework\Attributes\Group('transient-on-windows')]
     public function testGetAfterReject()
     {
         $redis = $this->createRedisClient();
@@ -395,9 +386,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 90fb4c4..428f6f6 100644
--- a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisReceiverTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisReceiverTest.php
@@ -30,9 +30,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);
@@ -51,9 +49,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 571de6e..7fa5242 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()
@@ -35,12 +33,9 @@ class RedisTransportFactoryTest extends TestCase
         $this->assertFalse($factory->supports('invalid-dsn', []));
     }
 
-    /**
-     * @group integration
-     * @group network
-     *
-     * @dataProvider createTransportProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('createTransportProvider')]
+    #[\PHPUnit\Framework\Attributes\Group('integration')]
+    #[\PHPUnit\Framework\Attributes\Group('network')]
     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 e6ec50c..e73fa9d 100644
--- a/src/Symfony/Component/Messenger/Tests/Command/ConsumeMessagesCommandTest.php
+++ b/src/Symfony/Component/Messenger/Tests/Command/ConsumeMessagesCommandTest.php
@@ -109,9 +109,7 @@ class ConsumeMessagesCommandTest extends TestCase
         yield [false];
     }
 
-    /**
-     * @dataProvider provideRunWithResetServicesOption
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRunWithResetServicesOption')]
     public function testRunWithResetServicesOption(bool $shouldReset)
     {
         $envelope = new Envelope(new \stdClass());
@@ -147,9 +145,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 = new Container();
@@ -287,9 +283,7 @@ class ConsumeMessagesCommandTest extends TestCase
         $this->assertStringContainsString('[OK] Consuming messages from transports "dummy-receiver1, dummy-receiver2"', $tester->getDisplay());
     }
 
-    /**
-     * @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/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/SendFailedMessageForRetryListenerTest.php b/src/Symfony/Component/Messenger/Tests/EventListener/SendFailedMessageForRetryListenerTest.php
index 4d1f487..bbacbe3 100644
--- a/src/Symfony/Component/Messenger/Tests/EventListener/SendFailedMessageForRetryListenerTest.php
+++ b/src/Symfony/Component/Messenger/Tests/EventListener/SendFailedMessageForRetryListenerTest.php
@@ -146,9 +146,7 @@ class SendFailedMessageForRetryListenerTest extends TestCase
         $listener->onMessageFailed($event);
     }
 
-    /**
-     * @dataProvider provideRetryDelays
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRetryDelays')]
     public function testWrappedRecoverableExceptionRetryDelayOverridesStrategy(array $retries, int $expectedDelay)
     {
         $sender = $this->createMock(SenderInterface::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 0bd47f8..fa84555 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');
@@ -129,9 +127,7 @@ class DispatchAfterCurrentBusMiddlewareTest extends TestCase
         $messageBus->dispatch($message);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testLongChainWithExceptions()
     {
         $command = new DummyMessage('Level 0');
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 7332f3f..8b971bf 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');
@@ -138,6 +136,7 @@ class SendMessageMiddlewareTest extends MiddlewareTestCase
         $middleware->handle($envelope, $this->getStackMock(false));
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testItCallsTheNextMiddlewareWhenNoSenderForThisMessage()
     {
         $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 d89153e..20822bf 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, 0);
@@ -98,9 +96,7 @@ class MultiplierRetryStrategyTest extends TestCase
         yield [1000, 1.5555, 5000, 2, 2420];
     }
 
-    /**
-     * @dataProvider getJitterTest
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getJitterTest')]
     public function testJitter(float $jitter, int $maxMin, int $maxMax)
     {
         $strategy = new MultiplierRetryStrategy(3, 1000, 1, 0, $jitter);
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/Sender/SendersLocatorTest.php b/src/Symfony/Component/Messenger/Tests/Transport/Sender/SendersLocatorTest.php
index d47c166..a7c59db 100644
--- a/src/Symfony/Component/Messenger/Tests/Transport/Sender/SendersLocatorTest.php
+++ b/src/Symfony/Component/Messenger/Tests/Transport/Sender/SendersLocatorTest.php
@@ -55,11 +55,9 @@ class SendersLocatorTest extends TestCase
         $this->assertSame([], iterator_to_array($locator->getSenders(new Envelope(new SecondMessage()))));
     }
 
-    /**
-     * @testWith ["\\Symfony\\Component\\Messenger\\Tests\\Fixtures\\DummyMessageWithAttribute", ["first_sender", "second_sender"]]
-     *           ["\\Symfony\\Component\\Messenger\\Tests\\Fixtures\\DummyMessageWithParentWithAttribute", ["third_sender", "first_sender", "second_sender"]]
-     *           ["\\Symfony\\Component\\Messenger\\Tests\\Fixtures\\DummyMessageWithInterfaceWithAttribute", ["first_sender", "third_sender", "second_sender"]]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['\Symfony\Component\Messenger\Tests\Fixtures\DummyMessageWithAttribute', ['first_sender', 'second_sender']])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['\Symfony\Component\Messenger\Tests\Fixtures\DummyMessageWithParentWithAttribute', ['third_sender', 'first_sender', 'second_sender']])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['\Symfony\Component\Messenger\Tests\Fixtures\DummyMessageWithInterfaceWithAttribute', ['first_sender', 'third_sender', 'second_sender']])]
     public function testItReturnsTheSenderBasedOnAsMessageAttribute(string $messageClass, array $expectedSenders)
     {
         $firstSender = $this->createMock(SenderInterface::class);
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/Transport/TransportFactoryTest.php b/src/Symfony/Component/Messenger/Tests/Transport/TransportFactoryTest.php
index b3a8647..1c2933e 100644
--- a/src/Symfony/Component/Messenger/Tests/Transport/TransportFactoryTest.php
+++ b/src/Symfony/Component/Messenger/Tests/Transport/TransportFactoryTest.php
@@ -20,9 +20,7 @@ use Symfony\Component\Messenger\Transport\TransportInterface;
 
 class TransportFactoryTest extends TestCase
 {
-    /**
-     * @dataProvider provideThrowsExceptionOnUnsupportedTransport
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideThrowsExceptionOnUnsupportedTransport')]
     public function testThrowsExceptionOnUnsupportedTransport(array $transportSupport, string $dsn, ?string $expectedMessage)
     {
         if (null !== $expectedMessage) {
diff --git a/src/Symfony/Component/Messenger/Tests/WorkerTest.php b/src/Symfony/Component/Messenger/Tests/WorkerTest.php
index 0ceb9a1..495100e 100644
--- a/src/Symfony/Component/Messenger/Tests/WorkerTest.php
+++ b/src/Symfony/Component/Messenger/Tests/WorkerTest.php
@@ -55,9 +55,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()
@@ -700,9 +698,7 @@ class WorkerTest extends TestCase
         $this->assertTrue($after < $before);
     }
 
-    /**
-     * @requires extension pcntl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('pcntl')]
     public function testKeepalive()
     {
         ClockMock::withClockMock(false);
diff --git a/src/Symfony/Component/Mime/Tests/AddressTest.php b/src/Symfony/Component/Mime/Tests/AddressTest.php
index 58c9016..23f307c 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);
@@ -94,9 +92,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 baded24..56ee701 100644
--- a/src/Symfony/Component/Mime/Tests/Part/TextPartTest.php
+++ b/src/Symfony/Component/Mime/Tests/Part/TextPartTest.php
@@ -58,9 +58,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 2ba54a5..fe5b76e 100644
--- a/src/Symfony/Component/Mime/Tests/RawMessageTest.php
+++ b/src/Symfony/Component/Mime/Tests/RawMessageTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Mime\RawMessage;
 
 class RawMessageTest extends TestCase
 {
-    /**
-     * @dataProvider provideMessages
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMessages')]
     public function testToString(mixed $messageParameter, bool $supportReuse)
     {
         $message = new RawMessage($messageParameter);
@@ -33,9 +31,7 @@ class RawMessageTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provideMessages
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMessages')]
     public function testSerialization(mixed $messageParameter, bool $supportReuse)
     {
         $message = new RawMessage($messageParameter);
@@ -47,9 +43,7 @@ class RawMessageTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provideMessages
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMessages')]
     public function testToIterable(mixed $messageParameter, bool $supportReuse)
     {
         $message = new RawMessage($messageParameter);
@@ -61,9 +55,7 @@ class RawMessageTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider provideMessages
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMessages')]
     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/Bluesky/Tests/BlueskyTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Bluesky/Tests/BlueskyTransportTest.php
index b3aad04..625e3a9 100644
--- a/src/Symfony/Component/Notifier/Bridge/Bluesky/Tests/BlueskyTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Bluesky/Tests/BlueskyTransportTest.php
@@ -274,9 +274,7 @@ final class BlueskyTransportTest extends TransportTestCase
         $this->assertEquals($expected, $this->parseFacets($input));
     }
 
-    /**
-     * @dataProvider sendMessageWithEmbedDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('sendMessageWithEmbedDataProvider')]
     public function testWithEmbed(BlueskyOptions $blueskyOptions, string $expectedJsonResponse)
     {
         // realistic sample values taken from https://docs.bsky.app/docs/advanced-guides/posts#post-record-structure
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/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 40b07f1..5747f0c 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/OvhCloud/Tests/OvhCloudTransportTest.php b/src/Symfony/Component/Notifier/Bridge/OvhCloud/Tests/OvhCloudTransportTest.php
index ba01de5..ba1771f 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/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/Sipgate/Tests/SipgateTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Sipgate/Tests/SipgateTransportTest.php
index 0f82eb6..6e98470 100644
--- a/src/Symfony/Component/Notifier/Bridge/Sipgate/Tests/SipgateTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Sipgate/Tests/SipgateTransportTest.php
@@ -57,9 +57,7 @@ class SipgateTransportTest extends TransportTestCase
         $this->assertInstanceOf(SentMessage::class, $sentMessage);
     }
 
-    /**
-     * @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/Slack/Tests/SlackOptionsTest.php b/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackOptionsTest.php
index c80d263..e10e3b4 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/Sms77/Tests/Sms77TransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Sms77/Tests/Sms77TransportFactoryTest.php
index 6d00014..68de306 100644
--- a/src/Symfony/Component/Notifier/Bridge/Sms77/Tests/Sms77TransportFactoryTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Sms77/Tests/Sms77TransportFactoryTest.php
@@ -15,9 +15,7 @@ use Symfony\Component\Notifier\Bridge\Sms77\Sms77TransportFactory;
 use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
 use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 final class Sms77TransportFactoryTest extends AbstractTransportFactoryTestCase
 {
     use IncompleteDsnTestTrait;
diff --git a/src/Symfony/Component/Notifier/Bridge/Sms77/Tests/Sms77TransportTest.php b/src/Symfony/Component/Notifier/Bridge/Sms77/Tests/Sms77TransportTest.php
index 0d45b84..c0b43d5 100644
--- a/src/Symfony/Component/Notifier/Bridge/Sms77/Tests/Sms77TransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Sms77/Tests/Sms77TransportTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\Notifier\Test\TransportTestCase;
 use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
 use Symfony\Contracts\HttpClient\HttpClientInterface;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 final class Sms77TransportTest extends TransportTestCase
 {
     public static function createTransport(?HttpClientInterface $client = null, ?string $from = null): Sms77Transport
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/Smsbox/Tests/SmsboxOptionsTest.php b/src/Symfony/Component/Notifier/Bridge/Smsbox/Tests/SmsboxOptionsTest.php
index 2482753..bf91704 100644
--- a/src/Symfony/Component/Notifier/Bridge/Smsbox/Tests/SmsboxOptionsTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Smsbox/Tests/SmsboxOptionsTest.php
@@ -130,10 +130,8 @@ class SmsboxOptionsTest extends TestCase
             ->dateTime(new \DateTimeImmutable('-1 day'));
     }
 
-    /**
-     * @testWith [0]
-     *           [9]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([0])]
+    #[\PHPUnit\Framework\Attributes\TestWith([9])]
     public function testMaxPartIsInvalid(int $maxPart)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -143,10 +141,8 @@ class SmsboxOptionsTest extends TestCase
             ->maxParts($maxPart);
     }
 
-    /**
-     * @testWith [4]
-     *           [1441]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([4])]
+    #[\PHPUnit\Framework\Attributes\TestWith([1441])]
     public function testValidityIsInvalid(int $validity)
     {
         $this->expectException(InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Notifier/Bridge/Smsense/Tests/SmsenseTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Smsense/Tests/SmsenseTransportTest.php
index f74ee03..5f65980 100644
--- a/src/Symfony/Component/Notifier/Bridge/Smsense/Tests/SmsenseTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Smsense/Tests/SmsenseTransportTest.php
@@ -68,9 +68,7 @@ class SmsenseTransportTest extends TransportTestCase
         $this->assertSame('63444830-5857-50da-d5f6-69f3719aa916', $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/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/AbstractTransportFactoryTestCase.php b/src/Symfony/Component/Notifier/Test/AbstractTransportFactoryTestCase.php
index 557cfc2..b8fd596 100644
--- a/src/Symfony/Component/Notifier/Test/AbstractTransportFactoryTestCase.php
+++ b/src/Symfony/Component/Notifier/Test/AbstractTransportFactoryTestCase.php
@@ -37,10 +37,8 @@ abstract class AbstractTransportFactoryTestCase extends TestCase
      */
     abstract public static function unsupportedSchemeProvider(): iterable;
 
-    /**
-     * @dataProvider supportsProvider
-     */
     #[DataProvider('supportsProvider')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('supportsProvider')]
     public function testSupports(bool $expected, string $dsn)
     {
         $factory = $this->createFactory();
@@ -48,10 +46,8 @@ abstract class AbstractTransportFactoryTestCase extends TestCase
         $this->assertSame($expected, $factory->supports(new Dsn($dsn)));
     }
 
-    /**
-     * @dataProvider createProvider
-     */
     #[DataProvider('createProvider')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('createProvider')]
     public function testCreate(string $expected, string $dsn)
     {
         $factory = $this->createFactory();
@@ -60,10 +56,8 @@ abstract class AbstractTransportFactoryTestCase extends TestCase
         $this->assertSame($expected, (string) $transport);
     }
 
-    /**
-     * @dataProvider unsupportedSchemeProvider
-     */
     #[DataProvider('unsupportedSchemeProvider')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('unsupportedSchemeProvider')]
     public function testUnsupportedSchemeException(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 a0a85c0..12e5f51 100644
--- a/src/Symfony/Component/Notifier/Test/TransportTestCase.php
+++ b/src/Symfony/Component/Notifier/Test/TransportTestCase.php
@@ -45,19 +45,15 @@ abstract class TransportTestCase extends TestCase
      */
     abstract public static function unsupportedMessagesProvider(): iterable;
 
-    /**
-     * @dataProvider toStringProvider
-     */
     #[DataProvider('toStringProvider')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('toStringProvider')]
     public function testToString(string $expected, TransportInterface $transport)
     {
         $this->assertSame($expected, (string) $transport);
     }
 
-    /**
-     * @dataProvider supportedMessagesProvider
-     */
     #[DataProvider('supportedMessagesProvider')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('supportedMessagesProvider')]
     public function testSupportedMessages(MessageInterface $message, ?TransportInterface $transport = null)
     {
         $transport ??= $this->createTransport();
@@ -65,10 +61,8 @@ abstract class TransportTestCase extends TestCase
         $this->assertTrue($transport->supports($message));
     }
 
-    /**
-     * @dataProvider unsupportedMessagesProvider
-     */
     #[DataProvider('unsupportedMessagesProvider')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('unsupportedMessagesProvider')]
     public function testUnsupportedMessages(MessageInterface $message, ?TransportInterface $transport = null)
     {
         $transport ??= $this->createTransport();
@@ -76,10 +70,8 @@ abstract class TransportTestCase extends TestCase
         $this->assertFalse($transport->supports($message));
     }
 
-    /**
-     * @dataProvider unsupportedMessagesProvider
-     */
     #[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 c29f291..7d742a5 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 c115b5d..4cb5a99 100644
--- a/src/Symfony/Component/Notifier/Tests/Event/FailedMessageEventTest.php
+++ b/src/Symfony/Component/Notifier/Tests/Event/FailedMessageEventTest.php
@@ -25,25 +25,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 7170a34..ca6288c 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
@@ -110,9 +108,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));
@@ -203,9 +199,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 6da5693..e4f88f1 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));
@@ -260,9 +250,7 @@ final class DsnTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getBooleanOptionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getBooleanOptionProvider')]
     public function testGetBooleanOption(bool $expected, string $dsnString, string $option, bool $default)
     {
         $dsn = new Dsn($dsnString);
diff --git a/src/Symfony/Component/Notifier/Tests/Transport/FailoverTransportTest.php b/src/Symfony/Component/Notifier/Tests/Transport/FailoverTransportTest.php
index 90702bb..8b8e6a5 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();
@@ -148,9 +144,7 @@ class FailoverTransportTest extends TestCase
         $t->send($message);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testSendOneDeadButRecover()
     {
         $message = new DummyMessage();
diff --git a/src/Symfony/Component/ObjectMapper/Tests/ObjectMapperTest.php b/src/Symfony/Component/ObjectMapper/Tests/ObjectMapperTest.php
index fe9c54d..13f824c 100644
--- a/src/Symfony/Component/ObjectMapper/Tests/ObjectMapperTest.php
+++ b/src/Symfony/Component/ObjectMapper/Tests/ObjectMapperTest.php
@@ -72,9 +72,7 @@ use Symfony\Component\PropertyAccess\PropertyAccess;
 
 final class ObjectMapperTest extends TestCase
 {
-    /**
-     * @dataProvider mapProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('mapProvider')]
     public function testMap($expect, $args, array $deps = [])
     {
         $mapper = new ObjectMapper(...$deps);
@@ -357,9 +355,7 @@ final class ObjectMapperTest extends TestCase
         $this->assertNull($b->optional);
     }
 
-    /**
-     * @dataProvider objectMapperProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('objectMapperProvider')]
     public function testUpdateObjectWithConstructorPromotedProperties(ObjectMapperInterface $mapper)
     {
         $a = new PromotedConstructorSource(1, 'foo');
@@ -368,9 +364,7 @@ final class ObjectMapperTest extends TestCase
         $this->assertSame($v->name, 'foo');
     }
 
-    /**
-     * @dataProvider objectMapperProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('objectMapperProvider')]
     public function testUpdateMappedObjectWithAdditionalConstructorPromotedProperties(ObjectMapperInterface $mapper)
     {
         $a = new PromotedConstructorWithMetadataSource(3, 'foo-will-get-updated');
@@ -399,9 +393,7 @@ final class ObjectMapperTest extends TestCase
         $this->assertTrue($lazy->isLazyObjectInitialized());
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testMapInitializesNativePhp84LazyObject()
     {
         $initialized = false;
@@ -423,9 +415,7 @@ final class ObjectMapperTest extends TestCase
         $this->assertTrue($initialized);
     }
 
-    /**
-     * @dataProvider validPartialInputProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validPartialInputProvider')]
     public function testMapPartially(PartialInput $actual, FinalInput $expected)
     {
         $mapper = new ObjectMapper();
diff --git a/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php b/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php
index 30107e6..71867cb 100644
--- a/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php
+++ b/src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php
@@ -36,9 +36,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
@@ -544,9 +542,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;
@@ -910,9 +906,7 @@ class OptionsResolverTest extends TestCase
         ]);
     }
 
-    /**
-     * @dataProvider provideInvalidTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidTypes')]
     public function testResolveFailsIfInvalidType($actualType, $allowedType, $exceptionMessage)
     {
         $this->resolver->setDefined('option');
@@ -1094,9 +1088,7 @@ class OptionsResolverTest extends TestCase
         $this->resolver->resolve();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyResolveFailsIfInvalidValueFromNestedOption()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -1113,9 +1105,7 @@ class OptionsResolverTest extends TestCase
         $this->resolver->resolve(['foo' => ['bar' => 'invalid value']]);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyResolveFailsIfInvalidTypeFromNestedOption()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2109,9 +2099,7 @@ class OptionsResolverTest extends TestCase
         ]);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyIsNestedOption()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2124,9 +2112,7 @@ class OptionsResolverTest extends TestCase
         $this->assertTrue($this->resolver->isNested('database'));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyFailsIfUndefinedNestedOption()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2146,9 +2132,7 @@ class OptionsResolverTest extends TestCase
         ]);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyFailsIfMissingRequiredNestedOption()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2168,9 +2152,7 @@ class OptionsResolverTest extends TestCase
         ]);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyFailsIfInvalidTypeNestedOption()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2192,9 +2174,7 @@ class OptionsResolverTest extends TestCase
         ]);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyFailsIfNotArrayIsGivenForNestedOptions()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2214,9 +2194,7 @@ class OptionsResolverTest extends TestCase
         ]);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyResolveNestedOptionsWithoutDefault()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2235,9 +2213,7 @@ class OptionsResolverTest extends TestCase
         $this->assertSame($expectedOptions, $actualOptions);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyResolveNestedOptionsWithDefault()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2262,9 +2238,7 @@ class OptionsResolverTest extends TestCase
         $this->assertSame($expectedOptions, $actualOptions);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyResolveMultipleNestedOptions()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2306,9 +2280,7 @@ class OptionsResolverTest extends TestCase
         $this->assertSame($expectedOptions, $actualOptions);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyResolveLazyOptionUsingNestedOption()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2327,9 +2299,7 @@ class OptionsResolverTest extends TestCase
         $this->assertSame($expectedOptions, $actualOptions);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyNormalizeNestedOptionValue()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2358,9 +2328,7 @@ class OptionsResolverTest extends TestCase
         $this->assertSame($expectedOptions, $actualOptions);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testOverwrittenNestedOptionNotEvaluatedIfLazyDefault()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2374,9 +2342,7 @@ class OptionsResolverTest extends TestCase
         $this->assertSame(['foo' => 'lazy'], $this->resolver->resolve());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testOverwrittenNestedOptionNotEvaluatedIfScalarDefault()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2390,9 +2356,7 @@ class OptionsResolverTest extends TestCase
         $this->assertSame(['foo' => 'bar'], $this->resolver->resolve());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testOverwrittenLazyOptionNotEvaluatedIfNestedOption()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2408,9 +2372,7 @@ class OptionsResolverTest extends TestCase
         $this->assertSame(['foo' => ['bar' => 'baz']], $this->resolver->resolve());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyResolveAllNestedOptionDefinitions()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2430,9 +2392,7 @@ class OptionsResolverTest extends TestCase
         $this->assertSame(['foo' => ['ping' => 'pong', 'bar' => 'baz']], $this->resolver->resolve());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyNormalizeNestedValue()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2450,9 +2410,7 @@ class OptionsResolverTest extends TestCase
         $this->assertSame(['foo' => ['bar' => 'baz']], $this->resolver->resolve());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyFailsIfCyclicDependencyBetweenSameNestedOption()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2466,9 +2424,7 @@ class OptionsResolverTest extends TestCase
         $this->resolver->resolve();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyFailsIfCyclicDependencyBetweenNestedOptionAndParentLazyOption()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2485,9 +2441,7 @@ class OptionsResolverTest extends TestCase
         $this->resolver->resolve();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyFailsIfCyclicDependencyBetweenNormalizerAndNestedOption()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2506,9 +2460,7 @@ class OptionsResolverTest extends TestCase
         $this->resolver->resolve();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyFailsIfCyclicDependencyBetweenNestedOptions()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2525,9 +2477,7 @@ class OptionsResolverTest extends TestCase
         $this->resolver->resolve();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyGetAccessToParentOptionFromNestedOption()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2559,9 +2509,7 @@ class OptionsResolverTest extends TestCase
         $this->assertSame(['foo' => $closure], $this->resolver->resolve());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyResolveLazyOptionWithTransitiveDefaultDependency()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2588,9 +2536,7 @@ class OptionsResolverTest extends TestCase
         $this->assertSame($expectedOptions, $actualOptions);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyAccessToParentOptionFromNestedNormalizerAndLazyOption()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2719,9 +2665,7 @@ class OptionsResolverTest extends TestCase
         $this->resolver->resolve(['expires' => new \DateTimeImmutable('-1 hour')]);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyInvalidValueForPrototypeDefinition()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2739,9 +2683,7 @@ class OptionsResolverTest extends TestCase
         $this->resolver->resolve(['connections' => ['foo']]);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyMissingOptionForPrototypeDefinition()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
@@ -2770,9 +2712,7 @@ class OptionsResolverTest extends TestCase
         $this->resolver->setPrototype(true);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyPrototypeDefinition()
     {
         $this->expectUserDeprecationMessage('Since symfony/options-resolver 7.3: Defining nested options via "Symfony\Component\OptionsResolver\OptionsResolver::setDefault()" is deprecated and will be removed in Symfony 8.0, use "setOptions()" method instead.');
diff --git a/src/Symfony/Component/PasswordHasher/Tests/Command/UserPasswordHashCommandTest.php b/src/Symfony/Component/PasswordHasher/Tests/Command/UserPasswordHashCommandTest.php
index 819a928..ea63f6a 100644
--- a/src/Symfony/Component/PasswordHasher/Tests/Command/UserPasswordHashCommandTest.php
+++ b/src/Symfony/Component/PasswordHasher/Tests/Command/UserPasswordHashCommandTest.php
@@ -277,7 +277,7 @@ EOTXT
 
     public function testThrowsExceptionOnNoConfiguredHashers()
     {
-        $tester = new CommandTester(new UserPasswordHashCommand($this->getMockBuilder(PasswordHasherFactoryInterface::class)->getMock(), []));
+        $tester = new CommandTester(new UserPasswordHashCommand($this->createMock(PasswordHasherFactoryInterface::class), []));
 
         $this->expectException(\RuntimeException::class);
         $this->expectExceptionMessage('There are no configured password hashers for the "security" extension.');
@@ -287,9 +287,7 @@ EOTXT
         ], ['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 a21b6d6..ca5d12c 100644
--- a/src/Symfony/Component/PasswordHasher/Tests/Hasher/NativePasswordHasherTest.php
+++ b/src/Symfony/Component/PasswordHasher/Tests/Hasher/NativePasswordHasherTest.php
@@ -32,9 +32,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));
@@ -99,9 +97,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);
@@ -169,10 +165,8 @@ class NativePasswordHasherTest extends TestCase
         new NativePasswordHasher(3, 9999);
     }
 
-    /**
-     * @testWith [1]
-     *           [40]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([1])]
+    #[\PHPUnit\Framework\Attributes\TestWith([40])]
     public function testInvalidCostThrows(int $cost)
     {
         $this->expectException(\InvalidArgumentException::class);
diff --git a/src/Symfony/Component/PasswordHasher/Tests/Hasher/SodiumPasswordHasherTest.php b/src/Symfony/Component/PasswordHasher/Tests/Hasher/SodiumPasswordHasherTest.php
index 0a8b7ea..76001e0 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 cdc60a9..dd7c549 100644
--- a/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php
+++ b/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php
@@ -110,9 +110,7 @@ class ExecutableFinderTest extends TestCase
         $this->assertSamePath($fixturesDir.\DIRECTORY_SEPARATOR.$name.$suffix, $result);
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testFindWithOpenBaseDir()
     {
         if ('\\' === \DIRECTORY_SEPARATOR) {
@@ -136,9 +134,7 @@ class ExecutableFinderTest extends TestCase
         }
     }
 
-    /**
-     * @runInSeparateProcess
-     */
+    #[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
     public function testFindBatchExecutableOnWindows()
     {
         if (\ini_get('open_basedir')) {
@@ -169,9 +165,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 79bf012..0e15144 100644
--- a/src/Symfony/Component/Process/Tests/ProcessTest.php
+++ b/src/Symfony/Component/Process/Tests/ProcessTest.php
@@ -66,9 +66,7 @@ class ProcessTest extends TestCase
         $cmd->run();
     }
 
-    /**
-     * @dataProvider invalidProcessProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidProcessProvider')]
     public function testInvalidCommand(Process $process)
     {
         // An invalid command should not fail during start
@@ -83,10 +81,8 @@ class ProcessTest extends TestCase
         ];
     }
 
-    /**
-     * @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);
@@ -124,9 +120,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]);
@@ -148,9 +142,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']);
@@ -234,9 +226,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);
@@ -247,9 +238,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).'!';
@@ -263,9 +253,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).'!';
@@ -320,9 +308,7 @@ class ProcessTest extends TestCase
         throw $e;
     }
 
-    /**
-     * @dataProvider provideInvalidInputValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidInputValues')]
     public function testInvalidInput(array|object $value)
     {
         $process = $this->getProcess('foo');
@@ -341,9 +327,7 @@ class ProcessTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideInputValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInputValues')]
     public function testValidInput(?string $expected, float|string|null $value)
     {
         $process = $this->getProcess('foo');
@@ -374,9 +358,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));
@@ -426,9 +408,7 @@ class ProcessTest extends TestCase
         $this->assertSame('', $p->getErrorOutput());
     }
 
-    /**
-     * @dataProvider provideIncrementalOutput
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideIncrementalOutput')]
     public function testIncrementalOutput($getOutput, $getIncrementalOutput, $uri)
     {
         $lock = tempnam(sys_get_temp_dir(), __FUNCTION__);
@@ -505,9 +485,7 @@ class ProcessTest extends TestCase
         $this->assertGreaterThan(0, $process->getExitCode());
     }
 
-    /**
-     * @group tty
-     */
+    #[\PHPUnit\Framework\Attributes\Group('tty')]
     public function testTTYCommand()
     {
         if ('\\' === \DIRECTORY_SEPARATOR) {
@@ -527,9 +505,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) {
@@ -547,9 +523,7 @@ class ProcessTest extends TestCase
         $this->assertTrue($process->isSuccessful());
     }
 
-    /**
-     * @group tty
-     */
+    #[\PHPUnit\Framework\Attributes\Group('tty')]
     public function testTTYInWindowsEnvironment()
     {
         $this->expectException(RuntimeException::class);
@@ -959,9 +933,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']);
@@ -976,9 +948,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');
@@ -1005,9 +975,7 @@ class ProcessTest extends TestCase
         $process->signal(1); // SIGHUP
     }
 
-    /**
-     * @dataProvider provideMethodsThatNeedARunningProcess
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMethodsThatNeedARunningProcess')]
     public function testMethodsThatNeedARunningProcess($method)
     {
         $process = $this->getProcess('foo');
@@ -1029,9 +997,7 @@ class ProcessTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideMethodsThatNeedATerminatedProcess
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMethodsThatNeedATerminatedProcess')]
     public function testMethodsThatNeedATerminatedProcess($method)
     {
         $this->expectException(LogicException::class);
@@ -1149,9 +1115,7 @@ class ProcessTest extends TestCase
         $this->assertSame($process, $process->setIdleTimeout(null));
     }
 
-    /**
-     * @dataProvider provideOutputFetchingMethods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideOutputFetchingMethods')]
     public function testGetOutputWhileDisabled($fetchMethod)
     {
         $p = $this->getProcessForCode('sleep(41);');
@@ -1235,9 +1199,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);
@@ -1505,9 +1467,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]);
@@ -1647,9 +1607,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);"');
@@ -1662,9 +1620,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);"');
@@ -1677,9 +1633,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');
@@ -1690,9 +1644,7 @@ class ProcessTest extends TestCase
         $this->assertFalse($process->isRunning());
     }
 
-    /**
-     * @group network
-     */
+    #[\PHPUnit\Framework\Attributes\Group('network')]
     public function testIgnoringSignal()
     {
         if (!\function_exists('pcntl_signal')) {
@@ -1709,9 +1661,7 @@ class ProcessTest extends TestCase
     }
 
     // This test ensure that the previous test is reliable, in case of the sleep command ignoring the SIGTERM signal
-    /**
-     * @group network
-     */
+    #[\PHPUnit\Framework\Attributes\Group('network')]
     public function testNotIgnoringSignal()
     {
         if (!\function_exists('pcntl_signal')) {
diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTestCase.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorArrayAccessTestCase.php
index 9cc79f2..249c89f 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));
@@ -64,9 +62,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');
@@ -74,25 +70,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 9c85e55..a2b1bad 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()
     {
         $car = $this->createMock(__CLASS__.'_CarNoAdderAndRemover');
diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
index bb8043d..54d0a20 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(array|object $objectOrArray, string $path, ?string $value)
     {
         $this->assertSame($value, $this->propertyAccessor->getValue($objectOrArray, $path));
     }
 
-    /**
-     * @dataProvider getPathsWithMissingProperty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingProperty')]
     public function testGetValueThrowsExceptionIfPropertyNotFound(array|object $objectOrArray, string $path)
     {
         $this->expectException(NoSuchPropertyException::class);
         $this->propertyAccessor->getValue($objectOrArray, $path);
     }
 
-    /**
-     * @dataProvider getPathsWithMissingProperty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingProperty')]
     public function testGetValueReturnsNullIfPropertyNotFoundAndExceptionIsDisabled(array|object $objectOrArray, string $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(array|object $objectOrArray, string $path)
     {
         $this->assertNull($this->propertyAccessor->getValue($objectOrArray, $path));
     }
 
-    /**
-     * @dataProvider getPathsWithMissingIndex
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingIndex')]
     public function testGetValueThrowsExceptionIfIndexNotFoundAndIndexExceptionsEnabled(array|object $objectOrArray, string $path)
     {
         $this->propertyAccessor = new PropertyAccessor(PropertyAccessor::DISALLOW_MAGIC_METHODS, PropertyAccessor::THROW_ON_INVALID_INDEX | PropertyAccessor::THROW_ON_INVALID_PROPERTY_PATH);
@@ -315,9 +305,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(array|object $objectOrArray, string $path)
     {
         $this->propertyAccessor->setValue($objectOrArray, $path, 'Updated');
@@ -325,18 +313,14 @@ class PropertyAccessorTest extends TestCase
         $this->assertSame('Updated', $this->propertyAccessor->getValue($objectOrArray, $path));
     }
 
-    /**
-     * @dataProvider getPathsWithMissingProperty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingProperty')]
     public function testSetValueThrowsExceptionIfPropertyNotFound(array|object $objectOrArray, string $path)
     {
         $this->expectException(NoSuchPropertyException::class);
         $this->propertyAccessor->setValue($objectOrArray, $path, 'Updated');
     }
 
-    /**
-     * @dataProvider getPathsWithMissingIndex
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingIndex')]
     public function testSetValueThrowsNoExceptionIfIndexNotFound(array|object $objectOrArray, string $path)
     {
         $this->propertyAccessor->setValue($objectOrArray, $path, 'Updated');
@@ -344,9 +328,7 @@ class PropertyAccessorTest extends TestCase
         $this->assertSame('Updated', $this->propertyAccessor->getValue($objectOrArray, $path));
     }
 
-    /**
-     * @dataProvider getPathsWithMissingIndex
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingIndex')]
     public function testSetValueThrowsNoExceptionIfIndexNotFoundAndIndexExceptionsEnabled(array|object $objectOrArray, string $path)
     {
         $this->propertyAccessor = new PropertyAccessor(PropertyAccessor::DISALLOW_MAGIC_METHODS, PropertyAccessor::THROW_ON_INVALID_INDEX | PropertyAccessor::THROW_ON_INVALID_PROPERTY_PATH);
@@ -419,34 +401,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(array|object $objectOrArray, string $path)
     {
         $this->assertTrue($this->propertyAccessor->isReadable($objectOrArray, $path));
     }
 
-    /**
-     * @dataProvider getPathsWithMissingProperty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingProperty')]
     public function testIsReadableReturnsFalseIfPropertyNotFound(array|object $objectOrArray, string $path)
     {
         $this->assertFalse($this->propertyAccessor->isReadable($objectOrArray, $path));
     }
 
-    /**
-     * @dataProvider getPathsWithMissingIndex
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingIndex')]
     public function testIsReadableReturnsTrueIfIndexNotFound(array|object $objectOrArray, string $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(array|object $objectOrArray, string $path)
     {
         $this->propertyAccessor = new PropertyAccessor(PropertyAccessor::DISALLOW_MAGIC_METHODS, PropertyAccessor::THROW_ON_INVALID_INDEX | PropertyAccessor::THROW_ON_INVALID_PROPERTY_PATH);
@@ -472,34 +446,26 @@ class PropertyAccessorTest extends TestCase
         $this->assertTrue($this->propertyAccessor->isReadable(new TestClassMagicCall('Bernhard'), 'magicCallProperty'));
     }
 
-    /**
-     * @dataProvider getValidWritePropertyPaths
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidWritePropertyPaths')]
     public function testIsWritable(array|object $objectOrArray, string $path)
     {
         $this->assertTrue($this->propertyAccessor->isWritable($objectOrArray, $path));
     }
 
-    /**
-     * @dataProvider getPathsWithMissingProperty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingProperty')]
     public function testIsWritableReturnsFalseIfPropertyNotFound(array|object $objectOrArray, string $path)
     {
         $this->assertFalse($this->propertyAccessor->isWritable($objectOrArray, $path));
     }
 
-    /**
-     * @dataProvider getPathsWithMissingIndex
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsWithMissingIndex')]
     public function testIsWritableReturnsTrueIfIndexNotFound(array|object $objectOrArray, string $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(array|object $objectOrArray, string $path)
     {
         $this->propertyAccessor = new PropertyAccessor(PropertyAccessor::DISALLOW_MAGIC_METHODS, PropertyAccessor::THROW_ON_INVALID_INDEX | PropertyAccessor::THROW_ON_INVALID_PROPERTY_PATH);
@@ -596,9 +562,7 @@ class PropertyAccessorTest extends TestCase
         yield [['foo' => ['firstName' => 'Bernhard']], '[foo][bar?][baz?]', null];
     }
 
-    /**
-     * @dataProvider getNullSafeIndexPaths
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNullSafeIndexPaths')]
     public function testNullSafeIndexWithThrowOnInvalidIndex(array|object $objectOrArray, string $path, ?string $value)
     {
         $this->propertyAccessor = new PropertyAccessor(PropertyAccessor::DISALLOW_MAGIC_METHODS, PropertyAccessor::THROW_ON_INVALID_INDEX | PropertyAccessor::THROW_ON_INVALID_PROPERTY_PATH);
@@ -634,9 +598,7 @@ class PropertyAccessorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getReferenceChainObjectsForSetValue
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getReferenceChainObjectsForSetValue')]
     public function testSetValueForReferenceChainIssue($object, $path, $value)
     {
         $this->propertyAccessor->setValue($object, $path, $value);
@@ -653,9 +615,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));
@@ -1052,9 +1012,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();
@@ -1066,9 +1024,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();
@@ -1080,11 +1036,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 fe21325..f68691e 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(int $offset)
     {
         $this->expectException(\OutOfBoundsException::class);
diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php
index 9257229..496c6e9 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(string $path)
     {
         $this->expectException(InvalidPropertyPathException::class);
diff --git a/src/Symfony/Component/PropertyInfo/Tests/AbstractPropertyInfoExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/AbstractPropertyInfoExtractorTest.php
index 6f5c671..8346f36 100644
--- a/src/Symfony/Component/PropertyInfo/Tests/AbstractPropertyInfoExtractorTest.php
+++ b/src/Symfony/Component/PropertyInfo/Tests/AbstractPropertyInfoExtractorTest.php
@@ -60,9 +60,7 @@ class AbstractPropertyInfoExtractorTest extends TestCase
         $this->assertEquals(Type::int(), $this->propertyInfo->getType('Foo', 'bar', []));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGetTypes()
     {
         $this->assertEquals([new LegacyType(LegacyType::BUILTIN_TYPE_INT)], $this->propertyInfo->getTypes('Foo', 'bar', []));
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/ConstructorExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractor/ConstructorExtractorTest.php
index 6f6b784..6e60f40 100644
--- a/src/Symfony/Component/PropertyInfo/Tests/Extractor/ConstructorExtractorTest.php
+++ b/src/Symfony/Component/PropertyInfo/Tests/Extractor/ConstructorExtractorTest.php
@@ -48,9 +48,7 @@ class ConstructorExtractorTest extends TestCase
         $this->assertNull($extractor->getType('Foo', 'bar', []));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGetTypes()
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\ConstructorExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\ConstructorExtractor::getType()" instead.');
@@ -58,9 +56,7 @@ class ConstructorExtractorTest extends TestCase
         $this->assertEquals([new LegacyType(LegacyType::BUILTIN_TYPE_STRING)], $this->extractor->getTypes('Foo', 'bar', []));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGetTypesIfNoExtractors()
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\ConstructorExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\ConstructorExtractor::getType()" instead.');
diff --git a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php
index f86527a..f345319 100644
--- a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php
+++ b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php
@@ -44,11 +44,8 @@ class PhpDocExtractorTest extends TestCase
         $this->extractor = new PhpDocExtractor();
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyTypes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractLegacy($property, ?array $type, $shortDescription, $longDescription)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getType()" instead.');
@@ -71,9 +68,7 @@ class PhpDocExtractorTest extends TestCase
         $this->assertNull($docBlock);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testParamTagTypeIsOmittedLegacy()
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getType()" instead.');
@@ -90,11 +85,8 @@ class PhpDocExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyInvalidTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyInvalidTypes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidLegacy($property, $shortDescription, $longDescription)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getType()" instead.');
@@ -104,9 +96,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 testEmptyParamAnnotationLegacy()
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getType()" instead.');
@@ -116,11 +106,8 @@ class PhpDocExtractorTest extends TestCase
         $this->assertNull($this->extractor->getLongDescription('Symfony\Component\PropertyInfo\Tests\Fixtures\InvalidDummy', 'foo'));
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyTypesWithNoPrefixes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyTypesWithNoPrefixes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractTypesWithNoPrefixesLegacy($property, ?array $type = null)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getType()" instead.');
@@ -182,11 +169,8 @@ class PhpDocExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyCollectionTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyCollectionTypes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractCollectionLegacy($property, ?array $type, $shortDescription, $longDescription)
     {
         $this->testExtractLegacy($property, $type, $shortDescription, $longDescription);
@@ -246,11 +230,8 @@ class PhpDocExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyTypesWithCustomPrefixes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyTypesWithCustomPrefixes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractTypesWithCustomPrefixesLegacy($property, ?array $type = null)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getType()" instead.');
@@ -364,11 +345,8 @@ class PhpDocExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyDockBlockFallbackTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyDockBlockFallbackTypes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testDocBlockFallbackLegacy($property, $types)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getType()" instead.');
@@ -376,11 +354,8 @@ class PhpDocExtractorTest extends TestCase
         $this->assertEquals($types, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\DockBlockFallback', $property));
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyPropertiesDefinedByTraits
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyPropertiesDefinedByTraits')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testPropertiesDefinedByTraitsLegacy(string $property, LegacyType $type)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getType()" instead.');
@@ -400,11 +375,8 @@ class PhpDocExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyMethodsDefinedByTraits
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyMethodsDefinedByTraits')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testMethodsDefinedByTraitsLegacy(string $property, LegacyType $type)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getType()" instead.');
@@ -424,11 +396,8 @@ class PhpDocExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyPropertiesStaticType
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyPropertiesStaticType')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testPropertiesStaticTypeLegacy(string $class, string $property, LegacyType $type)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getType()" instead.');
@@ -444,11 +413,8 @@ class PhpDocExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyPropertiesParentType
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyPropertiesParentType')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testPropertiesParentTypeLegacy(string $class, string $property, ?array $types)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getType()" instead.');
@@ -464,9 +430,7 @@ class PhpDocExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testUnknownPseudoTypeLegacy()
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getType()" instead.');
@@ -474,9 +438,7 @@ class PhpDocExtractorTest extends TestCase
         $this->assertEquals([new LegacyType(LegacyType::BUILTIN_TYPE_OBJECT, false, 'scalar')], $this->extractor->getTypes(PseudoTypeDummy::class, 'unknownPseudoType'));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGenericInterface()
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getType()" instead.');
@@ -484,11 +446,8 @@ class PhpDocExtractorTest extends TestCase
         $this->assertNull($this->extractor->getTypes(Dummy::class, 'genericInterface'));
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyConstructorTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyConstructorTypes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractConstructorTypesLegacy($property, ?array $type = null)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getTypesFromConstructor()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getTypeFromConstructor()" instead.');
@@ -508,11 +467,8 @@ class PhpDocExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyPseudoTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyPseudoTypes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testPseudoTypesLegacy($property, array $type)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getType()" instead.');
@@ -535,11 +491,8 @@ class PhpDocExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyPromotedProperty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyPromotedProperty')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractPromotedPropertyLegacy(string $property, ?array $types)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getType()" instead.');
@@ -560,9 +513,7 @@ class PhpDocExtractorTest extends TestCase
         $this->assertNull($this->extractor->getType(OmittedParamTagTypeDocBlock::class, 'omittedType'));
     }
 
-    /**
-     * @dataProvider typeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('typeProvider')]
     public function testExtract(string $property, ?Type $type, ?string $shortDescription, ?string $longDescription)
     {
         $this->assertEquals($type, $this->extractor->getType(Dummy::class, $property));
@@ -622,9 +573,7 @@ class PhpDocExtractorTest extends TestCase
         yield ['collectionAsObject', Type::collection(Type::object(DummyCollection::class), Type::string(), Type::int()), null, null];
     }
 
-    /**
-     * @dataProvider invalidTypeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidTypeProvider')]
     public function testInvalid(string $property, ?string $shortDescription, ?string $longDescription)
     {
         $this->assertNull($this->extractor->getType(InvalidDummy::class, $property));
@@ -642,9 +591,7 @@ class PhpDocExtractorTest extends TestCase
         yield 'bar' => ['bar', 'Bar.', null];
     }
 
-    /**
-     * @dataProvider typeWithNoPrefixesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('typeWithNoPrefixesProvider')]
     public function testExtractTypesWithNoPrefixes(string $property, ?Type $type)
     {
         $noPrefixExtractor = new PhpDocExtractor(null, [], [], []);
@@ -690,9 +637,7 @@ class PhpDocExtractorTest extends TestCase
         yield ['staticSetter', null];
     }
 
-    /**
-     * @dataProvider provideCollectionTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCollectionTypes')]
     public function testExtractCollection(string $property, ?Type $type)
     {
         $this->testExtract($property, $type, null, null);
@@ -710,9 +655,7 @@ class PhpDocExtractorTest extends TestCase
         yield ['arrayWithKeysAndComplexValue', Type::dict(Type::nullable(Type::array(Type::nullable(Type::string()), Type::int()))), null, null];
     }
 
-    /**
-     * @dataProvider typeWithCustomPrefixesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('typeWithCustomPrefixesProvider')]
     public function testExtractTypeWithCustomPrefixes(string $property, ?Type $type)
     {
         $customExtractor = new PhpDocExtractor(null, ['add', 'remove'], ['is', 'can']);
@@ -763,9 +706,7 @@ class PhpDocExtractorTest extends TestCase
         yield ['staticSetter', null];
     }
 
-    /**
-     * @dataProvider dockBlockFallbackTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dockBlockFallbackTypesProvider')]
     public function testDocBlockFallback(string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType(DockBlockFallback::class, $property));
@@ -781,9 +722,7 @@ class PhpDocExtractorTest extends TestCase
         yield ['protMut', Type::bool()];
     }
 
-    /**
-     * @dataProvider propertiesDefinedByTraitsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('propertiesDefinedByTraitsProvider')]
     public function testPropertiesDefinedByTraits(string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType(DummyUsingTrait::class, $property));
@@ -802,9 +741,7 @@ class PhpDocExtractorTest extends TestCase
         yield ['propertyInExternalTraitObjectDifferentNamespace', Type::object(DummyUsedInTrait::class)];
     }
 
-    /**
-     * @dataProvider methodsDefinedByTraitsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('methodsDefinedByTraitsProvider')]
     public function testMethodsDefinedByTraits(string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType(DummyUsingTrait::class, $property));
@@ -825,9 +762,8 @@ class PhpDocExtractorTest extends TestCase
 
     /**
      * @param class-string $class
-     *
-     * @dataProvider propertiesStaticTypeProvider
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('propertiesStaticTypeProvider')]
     public function testPropertiesStaticType(string $class, string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType($class, $property));
@@ -844,9 +780,8 @@ class PhpDocExtractorTest extends TestCase
 
     /**
      * @param class-string $class
-     *
-     * @dataProvider propertiesParentTypeProvider
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('propertiesParentTypeProvider')]
     public function testPropertiesParentType(string $class, string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType($class, $property));
@@ -866,9 +801,7 @@ class PhpDocExtractorTest extends TestCase
         $this->assertEquals(Type::object('scalar'), $this->extractor->getType(PseudoTypeDummy::class, 'unknownPseudoType'));
     }
 
-    /**
-     * @dataProvider constructorTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('constructorTypesProvider')]
     public function testExtractConstructorType(string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getTypeFromConstructor(ConstructorDummy::class, $property));
@@ -887,9 +820,7 @@ class PhpDocExtractorTest extends TestCase
         yield ['mixed', Type::mixed()];
     }
 
-    /**
-     * @dataProvider pseudoTypeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('pseudoTypeProvider')]
     public function testPseudoType(string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType(PseudoTypesDummy::class, $property));
@@ -911,9 +842,7 @@ class PhpDocExtractorTest extends TestCase
         yield ['positiveInt', Type::int()];
     }
 
-    /**
-     * @dataProvider promotedPropertyProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('promotedPropertyProvider')]
     public function testExtractPromotedProperty(string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType(Php80Dummy::class, $property));
diff --git a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php
index 9a4924f..8e8517c 100644
--- a/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php
+++ b/src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php
@@ -60,11 +60,8 @@ class PhpStanExtractorTest extends TestCase
         $this->phpDocExtractor = new PhpDocExtractor();
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyTypes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractLegacy($property, ?array $type = null)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getType()" instead.');
@@ -72,9 +69,7 @@ class PhpStanExtractorTest extends TestCase
         $this->assertEquals($type, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy', $property));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testParamTagTypeIsOmittedLegacy()
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getType()" instead.');
@@ -92,11 +87,8 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyInvalidTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyInvalidTypes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidLegacy($property)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getType()" instead.');
@@ -104,11 +96,8 @@ class PhpStanExtractorTest extends TestCase
         $this->assertNull($this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\InvalidDummy', $property));
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyTypesWithNoPrefixes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyTypesWithNoPrefixes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractTypesWithNoPrefixesLegacy($property, ?array $type = null)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getType()" instead.');
@@ -164,11 +153,8 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyCollectionTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyCollectionTypes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractCollectionLegacy($property, ?array $type = null)
     {
         $this->testExtractLegacy($property, $type);
@@ -222,11 +208,8 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyTypesWithCustomPrefixes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyTypesWithCustomPrefixes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractTypesWithCustomPrefixesLegacy($property, ?array $type = null)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getType()" instead.');
@@ -327,11 +310,8 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyDockBlockFallbackTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyDockBlockFallbackTypes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testDocBlockFallbackLegacy($property, $types)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getType()" instead.');
@@ -339,11 +319,8 @@ class PhpStanExtractorTest extends TestCase
         $this->assertEquals($types, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\DockBlockFallback', $property));
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyPropertiesDefinedByTraits
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyPropertiesDefinedByTraits')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testPropertiesDefinedByTraitsLegacy(string $property, LegacyType $type)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getType()" instead.');
@@ -361,11 +338,8 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyPropertiesStaticType
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyPropertiesStaticType')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testPropertiesStaticTypeLegacy(string $class, string $property, LegacyType $type)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getType()" instead.');
@@ -381,11 +355,8 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyPropertiesParentType
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyPropertiesParentType')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testPropertiesParentTypeLegacy(string $class, string $property, ?array $types)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getType()" instead.');
@@ -401,11 +372,8 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyConstructorTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyConstructorTypes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractConstructorTypesLegacy($property, ?array $type = null)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypesFromConstructor()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypeFromConstructor()" instead.');
@@ -413,11 +381,8 @@ class PhpStanExtractorTest extends TestCase
         $this->assertEquals($type, $this->extractor->getTypesFromConstructor('Symfony\Component\PropertyInfo\Tests\Fixtures\ConstructorDummy', $property));
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyConstructorTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyConstructorTypes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractConstructorTypesReturnNullOnEmptyDocBlockLegacy($property)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypesFromConstructor()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypeFromConstructor()" instead.');
@@ -436,11 +401,8 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyUnionTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyUnionTypes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractorUnionTypesLegacy(string $property, ?array $types)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getType()" instead.');
@@ -461,11 +423,8 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyPseudoTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyPseudoTypes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testPseudoTypesLegacy($property, array $type)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getType()" instead.');
@@ -501,9 +460,7 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testDummyNamespaceLegacy()
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getType()" instead.');
@@ -514,9 +471,7 @@ class PhpStanExtractorTest extends TestCase
         );
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testDummyNamespaceWithPropertyLegacy()
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getType()" instead.');
@@ -528,11 +483,8 @@ class PhpStanExtractorTest extends TestCase
         $this->assertEquals($phpDocTypes[0]->getClassName(), $phpStanTypes[0]->getClassName());
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyIntRangeType
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyIntRangeType')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractorIntRangeTypeLegacy(string $property, ?array $types)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getType()" instead.');
@@ -549,11 +501,8 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyPhp80Types
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyPhp80Types')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractPhp80TypeLegacy(string $class, $property, ?array $type = null)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getType()" instead.');
@@ -573,11 +522,8 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider allowPrivateAccessLegacyProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('allowPrivateAccessLegacyProvider')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testAllowPrivateAccessLegacy(bool $allowPrivateAccess, array $expectedTypes)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getType()" instead.');
@@ -598,12 +544,12 @@ class PhpStanExtractorTest extends TestCase
     }
 
     /**
-     * @group legacy
      *
      * @param list<LegacyType> $expectedTypes
      *
-     * @dataProvider legacyGenericsProvider
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('legacyGenericsProvider')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGenericsLegacy(string $property, array $expectedTypes)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getType()" instead.');
@@ -672,9 +618,7 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider typesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('typesProvider')]
     public function testExtract(string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType(Dummy::class, $property));
@@ -723,9 +667,7 @@ class PhpStanExtractorTest extends TestCase
         $this->assertNull($this->extractor->getType(PhpStanOmittedParamTagTypeDocBlock::class, 'omittedType'));
     }
 
-    /**
-     * @dataProvider invalidTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('invalidTypesProvider')]
     public function testInvalid(string $property)
     {
         $this->assertNull($this->extractor->getType(InvalidDummy::class, $property));
@@ -743,9 +685,7 @@ class PhpStanExtractorTest extends TestCase
         yield 'baz' => ['baz'];
     }
 
-    /**
-     * @dataProvider typesWithNoPrefixesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('typesWithNoPrefixesProvider')]
     public function testExtractTypesWithNoPrefixes(string $property, ?Type $type)
     {
         $noPrefixExtractor = new PhpStanExtractor([], [], []);
@@ -786,9 +726,7 @@ class PhpStanExtractorTest extends TestCase
         yield ['staticSetter', null];
     }
 
-    /**
-     * @dataProvider provideCollectionTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCollectionTypes')]
     public function testExtractCollection($property, ?Type $type)
     {
         $this->testExtract($property, $type);
@@ -806,9 +744,7 @@ class PhpStanExtractorTest extends TestCase
         yield ['arrayWithKeysAndComplexValue', Type::dict(Type::nullable(Type::array(Type::nullable(Type::string()), Type::int()))), null, null];
     }
 
-    /**
-     * @dataProvider typesWithCustomPrefixesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('typesWithCustomPrefixesProvider')]
     public function testExtractTypesWithCustomPrefixes(string $property, ?Type $type)
     {
         $customExtractor = new PhpStanExtractor(['add', 'remove'], ['is', 'can']);
@@ -851,9 +787,7 @@ class PhpStanExtractorTest extends TestCase
         yield ['staticSetter', null];
     }
 
-    /**
-     * @dataProvider dockBlockFallbackTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dockBlockFallbackTypesProvider')]
     public function testDocBlockFallback(string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType(DockBlockFallback::class, $property));
@@ -869,9 +803,7 @@ class PhpStanExtractorTest extends TestCase
         yield ['protMut', Type::bool()];
     }
 
-    /**
-     * @dataProvider propertiesDefinedByTraitsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('propertiesDefinedByTraitsProvider')]
     public function testPropertiesDefinedByTraits(string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType(DummyUsingTrait::class, $property));
@@ -888,9 +820,7 @@ class PhpStanExtractorTest extends TestCase
         yield ['dummyInAnotherNamespace', Type::object(DummyInAnotherNamespace::class)];
     }
 
-    /**
-     * @dataProvider propertiesStaticTypeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('propertiesStaticTypeProvider')]
     public function testPropertiesStaticType(string $class, string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType($class, $property));
@@ -916,17 +846,13 @@ class PhpStanExtractorTest extends TestCase
         $this->extractor->getType(ParentDummy::class, 'parentAnnotationNoParent');
     }
 
-    /**
-     * @dataProvider constructorTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('constructorTypesProvider')]
     public function testExtractConstructorTypes(string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getTypeFromConstructor(ConstructorDummy::class, $property));
     }
 
-    /**
-     * @dataProvider constructorTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('constructorTypesProvider')]
     public function testExtractConstructorTypesReturnNullOnEmptyDocBlock(string $property)
     {
         $this->assertNull($this->extractor->getTypeFromConstructor(ConstructorDummyWithoutDocBlock::class, $property));
@@ -944,9 +870,7 @@ class PhpStanExtractorTest extends TestCase
         yield ['ddd', null];
     }
 
-    /**
-     * @dataProvider unionTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('unionTypesProvider')]
     public function testExtractorUnionTypes(string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType(DummyUnionType::class, $property));
@@ -977,9 +901,7 @@ class PhpStanExtractorTest extends TestCase
         yield ['g', Type::array(Type::union(Type::string(), Type::int()))];
     }
 
-    /**
-     * @dataProvider pseudoTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('pseudoTypesProvider')]
     public function testPseudoTypes(string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType(PhpStanPseudoTypesDummy::class, $property));
@@ -1032,9 +954,7 @@ class PhpStanExtractorTest extends TestCase
         $this->assertEquals($phpDocType->getClassName(), $phpStanType->getClassName());
     }
 
-    /**
-     * @dataProvider intRangeTypeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('intRangeTypeProvider')]
     public function testExtractorIntRangeType(string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType(IntRangeDummy::class, $property));
@@ -1050,9 +970,7 @@ class PhpStanExtractorTest extends TestCase
         yield ['c', Type::int()];
     }
 
-    /**
-     * @dataProvider php80TypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('php80TypesProvider')]
     public function testExtractPhp80Type(string $class, string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType($class, $property));
@@ -1069,9 +987,7 @@ class PhpStanExtractorTest extends TestCase
         yield [Php80PromotedDummy::class, 'promoted', null];
     }
 
-    /**
-     * @dataProvider allowPrivateAccessProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('allowPrivateAccessProvider')]
     public function testAllowPrivateAccess(bool $allowPrivateAccess, Type $expectedType)
     {
         $extractor = new PhpStanExtractor(allowPrivateAccess: $allowPrivateAccess);
@@ -1095,9 +1011,7 @@ class PhpStanExtractorTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider genericsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('genericsProvider')]
     public function testGenerics(string $property, Type $expectedType)
     {
         $this->assertEquals($expectedType, $this->extractor->getType(DummyGeneric::class, $property));
@@ -1126,9 +1040,7 @@ class PhpStanExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider descriptionsProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('descriptionsProvider')]
     public function testGetDescriptions(string $property, ?string $shortDescription, ?string $longDescription)
     {
         $this->assertEquals($shortDescription, $this->extractor->getShortDescription(Dummy::class, $property));
diff --git a/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php
index fbf365e..6fb1c37 100644
--- a/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php
+++ b/src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php
@@ -223,11 +223,8 @@ class ReflectionExtractorTest extends TestCase
         );
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyTypes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractorsLegacy($property, ?array $type = null)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getType()" instead.');
@@ -254,11 +251,8 @@ class ReflectionExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyPhp7Types
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyPhp7Types')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractPhp7TypeLegacy(string $class, string $property, ?array $type = null)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getType()" instead.');
@@ -279,11 +273,8 @@ class ReflectionExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyPhp71Types
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyPhp71Types')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractPhp71TypeLegacy($property, ?array $type = null)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getType()" instead.');
@@ -302,11 +293,8 @@ class ReflectionExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyPhp80Types
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyPhp80Types')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractPhp80TypeLegacy(string $property, ?array $type = null)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getType()" instead.');
@@ -328,11 +316,8 @@ class ReflectionExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyPhp81Types
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyPhp81Types')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractPhp81TypeLegacy(string $property, ?array $type = null)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getType()" instead.');
@@ -353,11 +338,8 @@ class ReflectionExtractorTest extends TestCase
         $this->assertFalse($this->extractor->isWritable(Php81Dummy::class, 'foo'));
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyPhp82Types
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyPhp82Types')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractPhp82TypeLegacy(string $property, ?array $type = null)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getType()" instead.');
@@ -376,11 +358,8 @@ class ReflectionExtractorTest extends TestCase
         yield ['someCollection', null];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyDefaultValue
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyDefaultValue')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractWithDefaultValueLegacy($property, $type)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getType()" instead.');
@@ -399,9 +378,7 @@ class ReflectionExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getReadableProperties
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getReadableProperties')]
     public function testIsReadable($property, $expected)
     {
         $this->assertSame(
@@ -430,9 +407,7 @@ class ReflectionExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getWritableProperties
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getWritableProperties')]
     public function testIsWritable($property, $expected)
     {
         $this->assertSame(
@@ -501,9 +476,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));
@@ -521,11 +494,8 @@ class ReflectionExtractorTest extends TestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyConstructorTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyConstructorTypes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractTypeConstructorLegacy(string $class, string $property, ?array $type = null)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getType()" instead.');
@@ -563,9 +533,7 @@ class ReflectionExtractorTest extends TestCase
         $this->assertEquals(PropertyWriteInfo::TYPE_NONE, $bazMutator->getType());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testTypedPropertiesLegacy()
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getType()" instead.');
@@ -578,9 +546,7 @@ class ReflectionExtractorTest extends TestCase
         $this->assertEquals([new LegacyType(LegacyType::BUILTIN_TYPE_ARRAY, true, null, true, new LegacyType(LegacyType::BUILTIN_TYPE_INT), new LegacyType(LegacyType::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);
@@ -613,9 +579,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);
@@ -701,11 +665,8 @@ class ReflectionExtractorTest extends TestCase
         $this->assertSame(PropertyWriteInfo::TYPE_NONE, $writeMutatorWithoutConstructor->getType());
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyExtractConstructorTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyExtractConstructorTypes')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExtractConstructorTypesLegacy(string $property, ?array $type = null)
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getTypesFromConstructor()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getTypeFromConstructor()" instead.');
@@ -724,9 +685,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'));
@@ -737,9 +696,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);
@@ -752,9 +709,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);
@@ -767,9 +722,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);
@@ -782,9 +735,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'));
@@ -795,11 +746,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);
@@ -821,11 +769,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);
@@ -847,9 +792,7 @@ class ReflectionExtractorTest extends TestCase
         yield ['virtualHook', PropertyReadInfo::VISIBILITY_PUBLIC, PropertyWriteInfo::VISIBILITY_PUBLIC];
     }
 
-    /**
-     * @dataProvider typesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('typesProvider')]
     public function testExtractors(string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType(Dummy::class, $property));
@@ -873,9 +816,7 @@ class ReflectionExtractorTest extends TestCase
         yield ['dates', Type::list(Type::object(\DateTimeImmutable::class))];
     }
 
-    /**
-     * @dataProvider php7TypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('php7TypesProvider')]
     public function testExtractPhp7Type(string $class, string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType($class, $property));
@@ -895,9 +836,7 @@ class ReflectionExtractorTest extends TestCase
         yield [Php7ParentDummy::class, 'parent', Type::object(\stdClass::class)];
     }
 
-    /**
-     * @dataProvider php71TypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('php71TypesProvider')]
     public function testExtractPhp71Type(string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType(Php71Dummy::class, $property));
@@ -915,9 +854,7 @@ class ReflectionExtractorTest extends TestCase
         yield ['donotexist', null];
     }
 
-    /**
-     * @dataProvider php80TypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('php80TypesProvider')]
     public function testExtractPhp80Type(string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType(Php80Dummy::class, $property));
@@ -945,9 +882,7 @@ class ReflectionExtractorTest extends TestCase
         yield ['mixedProperty', Type::mixed()];
     }
 
-    /**
-     * @dataProvider php81TypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('php81TypesProvider')]
     public function testExtractPhp81Type(string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType(Php81Dummy::class, $property));
@@ -962,9 +897,7 @@ class ReflectionExtractorTest extends TestCase
         yield ['collection', Type::intersection(Type::object(\Traversable::class), Type::object(\Countable::class))];
     }
 
-    /**
-     * @dataProvider php82TypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('php82TypesProvider')]
     public function testExtractPhp82Type(string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType(Php82Dummy::class, $property));
@@ -981,9 +914,7 @@ class ReflectionExtractorTest extends TestCase
         yield ['someCollection', Type::union(Type::intersection(Type::object(\Traversable::class), Type::object(\Countable::class)), Type::null())];
     }
 
-    /**
-     * @dataProvider defaultValueProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('defaultValueProvider')]
     public function testExtractWithDefaultValue(string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getType(DefaultValue::class, $property));
@@ -1001,9 +932,7 @@ class ReflectionExtractorTest extends TestCase
         yield ['defaultNull', null];
     }
 
-    /**
-     * @dataProvider constructorTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('constructorTypesProvider')]
     public function testExtractTypeConstructor(string $class, string $property, ?Type $type)
     {
         /* Check that constructor extractions works by default, and if passed in via context.
@@ -1039,9 +968,7 @@ class ReflectionExtractorTest extends TestCase
         $this->assertEquals(Type::nullable(Type::list(Type::object(Dummy::class))), $this->extractor->getType(Php74Dummy::class, 'nullableTypedCollection'));
     }
 
-    /**
-     * @dataProvider extractConstructorTypesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('extractConstructorTypesProvider')]
     public function testExtractConstructorType(string $property, ?Type $type)
     {
         $this->assertEquals($type, $this->extractor->getTypeFromConstructor(ConstructorDummy::class, $property));
diff --git a/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoCacheExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoCacheExtractorTest.php
index fda169d..92b34e9 100644
--- a/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoCacheExtractorTest.php
+++ b/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoCacheExtractorTest.php
@@ -35,27 +35,29 @@ 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 testGetType()
     {
         parent::testGetType();
         parent::testGetType();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testGetTypes()
     {
         $this->expectUserDeprecationMessage('Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\PropertyInfoCacheExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\PropertyInfoCacheExtractor::getType()" instead.');
@@ -64,35 +66,36 @@ class PropertyInfoCacheExtractorTest extends AbstractPropertyInfoExtractorTest
         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();
         parent::testIsInitializable();
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideNestedExtractorWithoutGetTypeImplementationData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNestedExtractorWithoutGetTypeImplementationData')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testNestedExtractorWithoutGetTypeImplementation(string $property, ?Type $expectedType)
     {
         $propertyInfoCacheExtractor = new PropertyInfoCacheExtractor(new class implements PropertyInfoExtractorInterface {
diff --git a/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoExtractorTest.php b/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoExtractorTest.php
index 33e8062..9301c95 100644
--- a/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoExtractorTest.php
+++ b/src/Symfony/Component/PropertyInfo/Tests/PropertyInfoExtractorTest.php
@@ -23,11 +23,8 @@ use Symfony\Component\TypeInfo\Type;
  */
 class PropertyInfoExtractorTest extends AbstractPropertyInfoExtractorTest
 {
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideNestedExtractorWithoutGetTypeImplementationData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNestedExtractorWithoutGetTypeImplementationData')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testNestedExtractorWithoutGetTypeImplementation(string $property, ?Type $expectedType)
     {
         $propertyInfoExtractor = new PropertyInfoExtractor([], [new class implements PropertyTypeExtractorInterface {
diff --git a/src/Symfony/Component/PropertyInfo/Tests/TypeTest.php b/src/Symfony/Component/PropertyInfo/Tests/TypeTest.php
index afe4bb5..6f19c34 100644
--- a/src/Symfony/Component/PropertyInfo/Tests/TypeTest.php
+++ b/src/Symfony/Component/PropertyInfo/Tests/TypeTest.php
@@ -16,9 +16,8 @@ use Symfony\Component\PropertyInfo\Type;
 
 /**
  * @author Kévin Dunglas <dunglas@gmail.com>
- *
- * @group legacy
  */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class TypeTest extends TestCase
 {
     public function testConstruct()
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 bbdc299..c6d6d67 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 7c2739f..ce9ba4b 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 bbaa756..6f4dfd5 100644
--- a/src/Symfony/Component/Routing/Tests/Attribute/RouteTest.php
+++ b/src/Symfony/Component/Routing/Tests/Attribute/RouteTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Routing\Tests\Fixtures\AttributeFixtures\FooController;
 
 class RouteTest extends TestCase
 {
-    /**
-     * @dataProvider getValidParameters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidParameters')]
     public function testLoadFromAttribute(string $methodName, string $getter, mixed $expectedReturn)
     {
         $route = (new \ReflectionMethod(FooController::class, $methodName))->getAttributes(Route::class)[0]->newInstance();
diff --git a/src/Symfony/Component/Routing/Tests/Generator/Dumper/CompiledUrlGeneratorDumperTest.php b/src/Symfony/Component/Routing/Tests/Generator/Dumper/CompiledUrlGeneratorDumperTest.php
index 8edc49a..a04a599 100644
--- a/src/Symfony/Component/Routing/Tests/Generator/Dumper/CompiledUrlGeneratorDumperTest.php
+++ b/src/Symfony/Component/Routing/Tests/Generator/Dumper/CompiledUrlGeneratorDumperTest.php
@@ -338,9 +338,8 @@ class CompiledUrlGeneratorDumperTest extends TestCase
         $this->generatorDumper->dump();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDeprecatedAlias()
     {
         $this->expectUserDeprecationMessage('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.');
@@ -356,9 +355,8 @@ class CompiledUrlGeneratorDumperTest extends TestCase
         $compiledUrlGenerator->generate('b');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testDeprecatedAliasWithCustomMessage()
     {
         $this->expectUserDeprecationMessage('Since foo/bar 1.0.0: foo b.');
@@ -374,9 +372,8 @@ class CompiledUrlGeneratorDumperTest extends TestCase
         $compiledUrlGenerator->generate('b');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testTargettingADeprecatedAliasShouldTriggerDeprecation()
     {
         $this->expectUserDeprecationMessage('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 25a4c67..b86f6de 100644
--- a/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php
+++ b/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php
@@ -110,9 +110,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'));
@@ -121,9 +119,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'));
@@ -806,9 +802,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->expectUserDeprecationMessage('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.');
@@ -821,9 +816,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->expectUserDeprecationMessage('Since foo/bar 1.0.0: foo b.');
@@ -836,9 +830,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->expectUserDeprecationMessage('Since foo/bar 1.0.0: foo b.');
@@ -890,9 +883,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));
@@ -1031,9 +1022,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/AttributeClassLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/AttributeClassLoaderTest.php
index 50a10a1..be9331b 100644
--- a/src/Symfony/Component/Routing/Tests/Loader/AttributeClassLoaderTest.php
+++ b/src/Symfony/Component/Routing/Tests/Loader/AttributeClassLoaderTest.php
@@ -67,9 +67,7 @@ class AttributeClassLoaderTest extends TestCase
         $loader->getResolver();
     }
 
-    /**
-     * @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');
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 4315588..d187a45 100644
--- a/src/Symfony/Component/Routing/Tests/Loader/DirectoryLoaderTest.php
+++ b/src/Symfony/Component/Routing/Tests/Loader/DirectoryLoaderTest.php
@@ -36,6 +36,7 @@ class DirectoryLoaderTest extends TestCase
         $this->loader->setResolver($resolver);
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadDirectory()
     {
         $collection = $this->loader->load(__DIR__.'/../Fixtures/directory', 'directory');
diff --git a/src/Symfony/Component/Routing/Tests/Loader/ObjectLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/ObjectLoaderTest.php
index 42743fe..f4506e2 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)
     {
         $loader = new TestObjectLoader();
diff --git a/src/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php
index 16071e5..65c1868 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 0720cac..324908d 100644
--- a/src/Symfony/Component/Routing/Tests/Loader/Psr4DirectoryLoaderTest.php
+++ b/src/Symfony/Component/Routing/Tests/Loader/Psr4DirectoryLoaderTest.php
@@ -66,9 +66,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()
@@ -91,9 +89,7 @@ class Psr4DirectoryLoaderTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideInvalidPsr4Namespaces
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidPsr4Namespaces')]
     public function testInvalidPsr4Namespace(string $namespace, string $expectedExceptionMessage)
     {
         $this->expectException(InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php
index 7afc3d2..733cdf7 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)
     {
         $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures']));
@@ -226,9 +224,7 @@ class XmlFileLoaderTest extends TestCase
         $loader->load($filePath);
     }
 
-    /**
-     * @dataProvider getPathsToInvalidFiles
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPathsToInvalidFiles')]
     public function testLoadThrowsExceptionWithInvalidFileEvenWithoutSchemaValidation(string $filePath)
     {
         $loader = new CustomXmlFileLoader(new FileLocator([__DIR__.'/../Fixtures']));
@@ -472,9 +468,7 @@ class XmlFileLoaderTest extends TestCase
         $loader->load('override_defaults.xml');
     }
 
-    /**
-     * @dataProvider provideFilesImportingRoutesWithControllers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFilesImportingRoutesWithControllers')]
     public function testImportRouteWithController(string $file)
     {
         $loader = new XmlFileLoader(new FileLocator([__DIR__.'/../Fixtures/controller']));
@@ -617,9 +611,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 4f6ed3a..e6d164e 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(string $filePath)
     {
         $loader = new YamlFileLoader(new FileLocator([__DIR__.'/../Fixtures']));
@@ -161,9 +159,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']));
@@ -522,9 +518,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 d6be915..80059b7 100644
--- a/src/Symfony/Component/Routing/Tests/Matcher/Dumper/CompiledUrlMatcherDumperTest.php
+++ b/src/Symfony/Component/Routing/Tests/Matcher/Dumper/CompiledUrlMatcherDumperTest.php
@@ -47,9 +47,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/RequestContextTest.php b/src/Symfony/Component/Routing/Tests/RequestContextTest.php
index fcc42ff..0f0a94c 100644
--- a/src/Symfony/Component/Routing/Tests/RequestContextTest.php
+++ b/src/Symfony/Component/Routing/Tests/RequestContextTest.php
@@ -85,18 +85,17 @@ class RequestContextTest extends TestCase
         $this->assertSame('/', $requestContext->getPathInfo());
     }
 
-    /**
-     * @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 testFromBadUri(string $uri)
     {
         $context = RequestContext::fromUri($uri);
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 d7e0ba0..2e62aa1 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,10 +121,8 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    ["67c8b7d295c70befc3070bf2"]
-     *              ["000000000000000000000000"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['67c8b7d295c70befc3070bf2'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['000000000000000000000000'])]
     public function testMongoDbIdOK(string $id)
     {
         $this->assertMatchesRegularExpression(
@@ -149,12 +131,10 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    ["67C8b7D295C70BEFC3070BF2"]
-     *              ["67c8b7d295c70befc3070bg2"]
-     *              ["67c8b7d295c70befc3070bf2a"]
-     *              ["67c8b7d295c70befc3070bf"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['67C8b7D295C70BEFC3070BF2'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['67c8b7d295c70befc3070bg2'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['67c8b7d295c70befc3070bf2a'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['67c8b7d295c70befc3070bf'])]
     public function testMongoDbIdKO(string $id)
     {
         $this->assertDoesNotMatchRegularExpression(
@@ -163,12 +143,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(
@@ -177,14 +155,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(
@@ -193,12 +169,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(
@@ -207,12 +181,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(
@@ -221,12 +193,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(
@@ -235,12 +205,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(
@@ -249,9 +217,7 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideUidRfc4122
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUidRfc4122')]
     public function testUidRfc4122OK(string $uid)
     {
         $this->assertMatchesRegularExpression(
@@ -260,9 +226,7 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideUidRfc4122KO
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUidRfc4122KO')]
     public function testUidRfc4122KO(string $uid)
     {
         $this->assertDoesNotMatchRegularExpression(
@@ -271,9 +235,7 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideUidRfc4122
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUidRfc4122')]
     public function testUidRfc9562OK(string $uid)
     {
         $this->assertMatchesRegularExpression(
@@ -282,9 +244,7 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideUidRfc4122KO
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUidRfc4122KO')]
     public function testUidRfc9562KO(string $uid)
     {
         $this->assertDoesNotMatchRegularExpression(
@@ -310,11 +270,9 @@ class RequirementTest extends TestCase
         yield ['01802c4ec4099f07863cf025ca7766a0'];
     }
 
-    /**
-     * @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(
@@ -323,12 +281,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(
@@ -337,15 +293,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(
@@ -354,15 +308,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(
@@ -371,13 +323,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(
@@ -386,14 +336,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(
@@ -402,12 +350,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(
@@ -416,14 +362,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(
@@ -432,12 +376,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(
@@ -446,14 +388,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(
@@ -462,12 +402,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(
@@ -476,14 +414,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(
@@ -492,13 +428,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(
@@ -507,14 +441,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(
@@ -523,11 +455,9 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    ["00000000-0000-7000-8000-000000000000"]
-     *              ["ffffffff-ffff-7fff-bfff-ffffffffffff"]
-     *              ["01910577-4898-7c47-966e-68d127dde2ac"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['00000000-0000-7000-8000-000000000000'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['ffffffff-ffff-7fff-bfff-ffffffffffff'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['01910577-4898-7c47-966e-68d127dde2ac'])]
     public function testUuidV7OK(string $uuid)
     {
         $this->assertMatchesRegularExpression(
@@ -536,14 +466,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 testUuidV7KO(string $uuid)
     {
         $this->assertDoesNotMatchRegularExpression(
@@ -552,11 +480,9 @@ class RequirementTest extends TestCase
         );
     }
 
-    /**
-     * @testWith    ["00000000-0000-8000-8000-000000000000"]
-     *              ["ffffffff-ffff-8fff-bfff-ffffffffffff"]
-     *              ["01910577-4898-8c47-966e-68d127dde2ac"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith(['00000000-0000-8000-8000-000000000000'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['ffffffff-ffff-8fff-bfff-ffffffffffff'])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['01910577-4898-8c47-966e-68d127dde2ac'])]
     public function testUuidV8OK(string $uuid)
     {
         $this->assertMatchesRegularExpression(
@@ -565,14 +491,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 testUuidV8KO(string $uuid)
     {
         $this->assertDoesNotMatchRegularExpression(
diff --git a/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php b/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php
index 0a75659..b0373ab 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)
     {
         $this->expectException(\LogicException::class);
@@ -277,9 +273,7 @@ class RouteCompilerTest extends TestCase
         $route->compile();
     }
 
-    /**
-     * @dataProvider getVariableNamesStartingWithADigit
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getVariableNamesStartingWithADigit')]
     public function testRouteWithVariableNameStartingWithADigit(string $name)
     {
         $this->expectException(\DomainException::class);
@@ -296,9 +290,7 @@ class RouteCompilerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideCompileWithHostData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCompileWithHostData')]
     public function testCompileWithHost(string $name, array $arguments, string $prefix, string $regex, array $variables, array $pathVariables, array $tokens, string $hostRegex, array $hostVariables, array $hostTokens)
     {
         $r = new \ReflectionClass(Route::class);
@@ -376,9 +368,7 @@ class RouteCompilerTest extends TestCase
         $route->compile();
     }
 
-    /**
-     * @dataProvider provideRemoveCapturingGroup
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideRemoveCapturingGroup')]
     public function testRemoveCapturingGroup(string $regex, string $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 3472804..8db4b69 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)
     {
         $route = new Route('/{foo}');
@@ -226,9 +224,7 @@ class RouteTest extends TestCase
         $this->assertNotSame($route, $unserialized);
     }
 
-    /**
-     * @dataProvider provideInlineDefaultAndRequirementCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInlineDefaultAndRequirementCases')]
     public function testInlineDefaultAndRequirement(Route $route, string $expectedPath, string $expectedHost, array $expectedDefaults, array $expectedRequirements)
     {
         self::assertSame($expectedPath, $route->getPath());
@@ -323,9 +319,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'));
@@ -333,9 +327,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');
@@ -345,9 +337,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'));
@@ -355,9 +345,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/DependencyInjection/AddScheduleMessengerPassTest.php b/src/Symfony/Component/Scheduler/Tests/DependencyInjection/AddScheduleMessengerPassTest.php
index 6d59825..fd12bfd 100644
--- a/src/Symfony/Component/Scheduler/Tests/DependencyInjection/AddScheduleMessengerPassTest.php
+++ b/src/Symfony/Component/Scheduler/Tests/DependencyInjection/AddScheduleMessengerPassTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\Scheduler\DependencyInjection\AddScheduleMessengerPass;
 
 class AddScheduleMessengerPassTest extends TestCase
 {
-    /**
-     * @dataProvider processSchedulerTaskCommandProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('processSchedulerTaskCommandProvider')]
     public function testProcessSchedulerTaskCommand(array $arguments, string $exceptedCommand)
     {
         $container = new ContainerBuilder();
diff --git a/src/Symfony/Component/Scheduler/Tests/Generator/MessageGeneratorTest.php b/src/Symfony/Component/Scheduler/Tests/Generator/MessageGeneratorTest.php
index 43d966c..2b8596b 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/Messenger/Serializer/Normalizer/SchedulerTriggerNormalizerTest.php b/src/Symfony/Component/Scheduler/Tests/Messenger/Serializer/Normalizer/SchedulerTriggerNormalizerTest.php
index 9885a65..3a7f49d 100644
--- a/src/Symfony/Component/Scheduler/Tests/Messenger/Serializer/Normalizer/SchedulerTriggerNormalizerTest.php
+++ b/src/Symfony/Component/Scheduler/Tests/Messenger/Serializer/Normalizer/SchedulerTriggerNormalizerTest.php
@@ -26,9 +26,7 @@ class SchedulerTriggerNormalizerTest extends TestCase
         $this->normalizer = new SchedulerTriggerNormalizer();
     }
 
-    /**
-     * @dataProvider normalizeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('normalizeProvider')]
     public function testNormalize(mixed $data, mixed $expected)
     {
         self::assertSame($expected, $this->normalizer->normalize($data));
@@ -40,9 +38,7 @@ class SchedulerTriggerNormalizerTest extends TestCase
         yield 'PeriodicalTrigger' => [new PeriodicalTrigger(5), 'every 5 seconds'];
     }
 
-    /**
-     * @dataProvider supportsNormalizationProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('supportsNormalizationProvider')]
     public function testSupportsNormalization(mixed $data, array $context, bool $expected)
     {
         self::assertSame($expected, $this->normalizer->supportsNormalization($data, 'json', $context));
@@ -58,9 +54,7 @@ class SchedulerTriggerNormalizerTest extends TestCase
         yield 'stdClass, normal context' => [new \stdClass(), [], false];
     }
 
-    /**
-     * @dataProvider supportsDenormalizationProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('supportsDenormalizationProvider')]
     public function testSupportsDenormalization(mixed $data, string $type, array $context, bool $expected)
     {
         self::assertSame($expected, $this->normalizer->supportsDenormalization($data, $type, 'json', $context));
diff --git a/src/Symfony/Component/Scheduler/Tests/Trigger/CronExpressionTriggerTest.php b/src/Symfony/Component/Scheduler/Tests/Trigger/CronExpressionTriggerTest.php
index a700372..4509974 100644
--- a/src/Symfony/Component/Scheduler/Tests/Trigger/CronExpressionTriggerTest.php
+++ b/src/Symfony/Component/Scheduler/Tests/Trigger/CronExpressionTriggerTest.php
@@ -16,9 +16,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 f8724e5..4e053cf 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);
@@ -102,9 +96,7 @@ class PeriodicalTriggerTest extends TestCase
         yield ['last day of next month', new PeriodicalTrigger(\DateInterval::createFromDateString('last day of next month'), $from, $until)];
     }
 
-    /**
-     * @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));
@@ -155,9 +147,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 563a613..a4d7085 100644
--- a/src/Symfony/Component/Security/Core/Test/AccessDecisionStrategyTestCase.php
+++ b/src/Symfony/Component/Security/Core/Test/AccessDecisionStrategyTestCase.php
@@ -27,11 +27,10 @@ use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
 abstract class AccessDecisionStrategyTestCase extends TestCase
 {
     /**
-     * @dataProvider provideStrategyTests
-     *
      * @param VoterInterface[] $voters
      */
     #[DataProvider('provideStrategyTests')]
+    #[\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 3972b1c..5832829 100644
--- a/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php
@@ -22,9 +22,7 @@ class AbstractTokenTest extends TestCase
 {
     use ExpectUserDeprecationMessageTrait;
 
-    /**
-     * @dataProvider provideUsers
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUsers')]
     public function testGetUserIdentifier($user, string $username)
     {
         $token = new ConcreteToken(['ROLE_FOO']);
@@ -37,9 +35,7 @@ class AbstractTokenTest extends TestCase
         yield [new InMemoryUser('fabien', null), 'fabien'];
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testEraseCredentials()
     {
         $token = new ConcreteToken(['ROLE_FOO']);
@@ -92,9 +88,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/RememberMeTokenTest.php b/src/Symfony/Component/Security/Core/Tests/Authentication/Token/RememberMeTokenTest.php
index b0cdbaf..9d6aa99 100644
--- a/src/Symfony/Component/Security/Core/Tests/Authentication/Token/RememberMeTokenTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Authentication/Token/RememberMeTokenTest.php
@@ -27,9 +27,7 @@ class RememberMeTokenTest extends TestCase
         $this->assertSame($user, $token->getUser());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testSecret()
     {
         $user = $this->getUser();
diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php
index 00f0f50..fadb565 100644
--- a/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Authorization/AuthorizationCheckerTest.php
@@ -44,9 +44,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']);
@@ -79,9 +77,7 @@ class AuthorizationCheckerTest extends TestCase
         $this->assertTrue($this->authorizationChecker->isGranted($attribute));
     }
 
-    /**
-     * @dataProvider isGrantedForUserProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('isGrantedForUserProvider')]
     public function testIsGrantedForUser(bool $decide, array $roles)
     {
         $user = new InMemoryUser('username', 'password', $roles);
diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php
index 1a4db41..28ce59c 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 496d970..62e6a6a 100644
--- a/src/Symfony/Component/Security/Core/Tests/Authorization/TraceableAccessDecisionManagerTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Authorization/TraceableAccessDecisionManagerTest.php
@@ -23,9 +23,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);
@@ -290,9 +288,7 @@ class TraceableAccessDecisionManagerTest extends TestCase
         $traceableAccessDecisionManager->decide($tokenMock, ['attr1', 'attr2']);
     }
 
-    /**
-     * @dataProvider allowMultipleAttributesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('allowMultipleAttributesProvider')]
     public function testAllowMultipleAttributes(array $attributes, bool $allowMultipleAttributes)
     {
         $accessDecisionManager = new AccessDecisionManager();
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 b5e0bf4..2a27021 100644
--- a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php
@@ -25,9 +25,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());
@@ -55,9 +53,7 @@ class AuthenticatedVoterTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideAttributes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAttributes')]
     public function testSupportsAttribute(string $attribute, bool $expected)
     {
         $voter = new AuthenticatedVoter(new AuthenticationTrustResolver());
@@ -87,9 +83,7 @@ class AuthenticatedVoterTest extends TestCase
         $this->assertTrue($voter->supportsType(get_debug_type(new \stdClass())));
     }
 
-    /**
-     * @dataProvider provideOfflineAttributes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideOfflineAttributes')]
     public function testOfflineToken($attributes, $expected)
     {
         $voter = new AuthenticatedVoter(new AuthenticationTrustResolver());
@@ -103,9 +97,7 @@ class AuthenticatedVoterTest extends TestCase
         yield [['ROLE_FOO'], VoterInterface::ACCESS_ABSTAIN];
     }
 
-    /**
-     * @dataProvider provideUnsupportedOfflineAttributes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUnsupportedOfflineAttributes')]
     public function testUnsupportedOfflineToken(string $attribute)
     {
         $voter = new AuthenticatedVoter(new AuthenticationTrustResolver());
@@ -144,7 +136,7 @@ class AuthenticatedVoterTest extends TestCase
         }
 
         if ('impersonated' === $authenticated) {
-            return $this->getMockBuilder(SwitchUserToken::class)->disableOriginalConstructor()->getMock();
+            return $this->createMock(SwitchUserToken::class);
         }
 
         if ('offline' === $authenticated) {
diff --git a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/ClosureVoterTest.php b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/ClosureVoterTest.php
index 7a22f2d..766b9b9 100644
--- a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/ClosureVoterTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/ClosureVoterTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
 use Symfony\Component\Security\Core\User\UserInterface;
 use Symfony\Component\Security\Http\Attribute\IsGrantedContext;
 
-/**
- * @requires function Symfony\Component\Security\Http\Attribute\IsGrantedContext::isGranted
- */
+#[\PHPUnit\Framework\Attributes\RequiresMethod(Symfony\Component\Security\Http\Attribute\IsGrantedContext::class, 'isGranted')]
 class ClosureVoterTest extends TestCase
 {
     private ClosureVoter $voter;
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 eaada30..5970b3d 100644
--- a/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/VoterTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/Authorization/Voter/VoterTest.php
@@ -68,9 +68,7 @@ class VoterTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTests')]
     public function testVote(VoterInterface $voter, array $attributes, $expectedVote, $object, $message, ?Vote $vote = null)
     {
         $this->assertSame($expectedVote, $voter->vote($this->token, $object, $attributes, $vote), $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/User/InMemoryUserTest.php b/src/Symfony/Component/Security/Core/Tests/User/InMemoryUserTest.php
index 3c4fdd4..7ae34f9 100644
--- a/src/Symfony/Component/Security/Core/Tests/User/InMemoryUserTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/User/InMemoryUserTest.php
@@ -56,9 +56,7 @@ class InMemoryUserTest extends TestCase
         $this->assertFalse($user->isEnabled());
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testEraseCredentials()
     {
         $this->markTestSkipped('Test failing on current Debian.');
@@ -75,12 +73,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 c78f6b5..0383912 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/SameOriginCsrfTokenManagerTest.php b/src/Symfony/Component/Security/Csrf/Tests/SameOriginCsrfTokenManagerTest.php
index 0a215d2..5f62960 100644
--- a/src/Symfony/Component/Security/Csrf/Tests/SameOriginCsrfTokenManagerTest.php
+++ b/src/Symfony/Component/Security/Csrf/Tests/SameOriginCsrfTokenManagerTest.php
@@ -180,11 +180,9 @@ class SameOriginCsrfTokenManagerTest extends TestCase
         $this->assertFalse($csrfTokenManager->isTokenValid(new CsrfToken('test_token', str_repeat('b', 24))));
     }
 
-    /**
-     * @testWith [0]
-     *           [1]
-     *           [2]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([0])]
+    #[\PHPUnit\Framework\Attributes\TestWith([1])]
+    #[\PHPUnit\Framework\Attributes\TestWith([2])]
     public function testValidOriginMissingDoubleSubmit(int $checkHeader)
     {
         $csrfTokenManager = new SameOriginCsrfTokenManager($this->requestStack, $this->logger, null, [], $checkHeader);
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 1bb9e1c..b006350 100644
--- a/src/Symfony/Component/Security/Http/Tests/AccessToken/Oidc/OidcTokenHandlerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/AccessToken/Oidc/OidcTokenHandlerTest.php
@@ -25,17 +25,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();
@@ -77,9 +73,7 @@ class OidcTokenHandlerTest extends TestCase
         yield ['email', 'foo@example.com'];
     }
 
-    /**
-     * @group jwt
-     */
+    #[\PHPUnit\Framework\Attributes\Group('jwt')]
     public function testThrowsAnErrorIfTokenIsInvalid(string $token)
     {
         $loggerMock = $this->createMock(LoggerInterface::class);
@@ -128,9 +122,7 @@ class OidcTokenHandlerTest extends TestCase
         ];
     }
 
-    /**
-     * @group jwt
-     */
+    #[\PHPUnit\Framework\Attributes\Group('jwt')]
     public function testThrowsAnErrorIfUserPropertyIsMissing()
     {
         $loggerMock = $this->createMock(LoggerInterface::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 b141368..cb04df5 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/AuthenticatorManagerBCTest.php b/src/Symfony/Component/Security/Http/Tests/Authentication/AuthenticatorManagerBCTest.php
index 9775e5a..b3f6eb0 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authentication/AuthenticatorManagerBCTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authentication/AuthenticatorManagerBCTest.php
@@ -60,11 +60,8 @@ class AuthenticatorManagerBCTest extends TestCase
         $this->response = $this->createMock(Response::class);
     }
 
-    /**
-     * @dataProvider provideSupportsData
-     *
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSupportsData')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testSupports($authenticators, $result)
     {
         $manager = $this->createManager($authenticators, hideUserNotFoundExceptions: true);
@@ -84,9 +81,7 @@ class AuthenticatorManagerBCTest extends TestCase
         yield [[], false];
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testSupportsInvalidAuthenticator()
     {
         $manager = $this->createManager([new \stdClass()], hideUserNotFoundExceptions: true);
@@ -98,9 +93,7 @@ class AuthenticatorManagerBCTest extends TestCase
         $manager->supports($this->request);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testSupportCheckedUponRequestAuthentication()
     {
         // the attribute stores the supported authenticators, returning false now
@@ -115,11 +108,8 @@ class AuthenticatorManagerBCTest extends TestCase
         $manager->authenticateRequest($this->request);
     }
 
-    /**
-     * @dataProvider provideMatchingAuthenticatorIndex
-     *
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMatchingAuthenticatorIndex')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testAuthenticateRequest($matchingAuthenticatorIndex)
     {
         $authenticators = [$this->createAuthenticator(0 === $matchingAuthenticatorIndex), $this->createAuthenticator(1 === $matchingAuthenticatorIndex)];
@@ -151,9 +141,7 @@ class AuthenticatorManagerBCTest extends TestCase
         yield [1];
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testNoCredentialsValidated()
     {
         $authenticator = $this->createAuthenticator();
@@ -169,9 +157,7 @@ class AuthenticatorManagerBCTest extends TestCase
         $manager->authenticateRequest($this->request);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testRequiredBadgeMissing()
     {
         $authenticator = $this->createAuthenticator();
@@ -185,9 +171,7 @@ class AuthenticatorManagerBCTest extends TestCase
         $manager->authenticateRequest($this->request);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testAllRequiredBadgesPresent()
     {
         $authenticator = $this->createAuthenticator();
@@ -204,11 +188,8 @@ class AuthenticatorManagerBCTest extends TestCase
         $manager->authenticateRequest($this->request);
     }
 
-    /**
-     * @dataProvider provideEraseCredentialsData
-     *
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEraseCredentialsData')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testEraseCredentials($eraseCredentials)
     {
         $authenticator = $this->createAuthenticator();
@@ -230,9 +211,7 @@ class AuthenticatorManagerBCTest extends TestCase
         yield [false];
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testAuthenticateRequestCanModifyTokenFromEvent()
     {
         $authenticator = $this->createAuthenticator();
@@ -257,9 +236,7 @@ class AuthenticatorManagerBCTest extends TestCase
         $this->assertTrue($listenerCalled, 'The AuthenticationTokenCreatedEvent listener is not called');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testAuthenticateUser()
     {
         $authenticator = $this->createAuthenticator();
@@ -283,9 +260,7 @@ class AuthenticatorManagerBCTest extends TestCase
         $manager->authenticateUser($this->user, $authenticator, $this->request, [$badge], ['attr' => 'foo', 'attr2' => 'bar']);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testAuthenticateUserCanModifyTokenFromEvent()
     {
         $authenticator = $this->createAuthenticator();
@@ -307,9 +282,7 @@ class AuthenticatorManagerBCTest extends TestCase
         $this->assertTrue($listenerCalled, 'The AuthenticationTokenCreatedEvent listener is not called');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInteractiveAuthenticator()
     {
         $authenticator = $this->createMock(TestInteractiveBCAuthenticator::class);
@@ -331,9 +304,7 @@ class AuthenticatorManagerBCTest extends TestCase
         $this->assertSame($this->response, $response);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLegacyInteractiveAuthenticator()
     {
         $authenticator = $this->createMock(InteractiveAuthenticatorInterface::class);
@@ -355,9 +326,7 @@ class AuthenticatorManagerBCTest extends TestCase
         $this->assertSame($this->response, $response);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testAuthenticateRequestHidesInvalidUserExceptions()
     {
         $invalidUserException = new UserNotFoundException();
@@ -376,9 +345,7 @@ class AuthenticatorManagerBCTest extends TestCase
         $this->assertSame($this->response, $response);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testAuthenticateRequestShowsAccountStatusException()
     {
         $invalidUserException = new LockedException();
@@ -397,9 +364,7 @@ class AuthenticatorManagerBCTest extends TestCase
         $this->assertSame($this->response, $response);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testAuthenticateRequestHidesInvalidAccountStatusException()
     {
         $invalidUserException = new LockedException();
@@ -418,9 +383,7 @@ class AuthenticatorManagerBCTest extends TestCase
         $this->assertSame($this->response, $response);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLogsUseTheDecoratedAuthenticatorWhenItIsTraceable()
     {
         $authenticator = $this->createMock(TestInteractiveBCAuthenticator::class);
diff --git a/src/Symfony/Component/Security/Http/Tests/Authentication/AuthenticatorManagerTest.php b/src/Symfony/Component/Security/Http/Tests/Authentication/AuthenticatorManagerTest.php
index 3c9f450..4555d07 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authentication/AuthenticatorManagerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authentication/AuthenticatorManagerTest.php
@@ -62,9 +62,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, exposeSecurityErrors: ExposeSecurityLevel::None);
@@ -109,9 +107,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)];
@@ -187,11 +183,8 @@ class AuthenticatorManagerTest extends TestCase
         $manager->authenticateRequest($this->request);
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideEraseCredentialsData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEraseCredentialsData')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testEraseCredentials($eraseCredentials)
     {
         $authenticator = $this->createAuthenticator();
@@ -390,9 +383,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 b69ef75..8636776 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/ChainedAccessTokenExtractorsTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/ChainedAccessTokenExtractorsTest.php
@@ -37,9 +37,7 @@ class ChainedAccessTokenExtractorsTest extends TestCase
         $this->accessTokenHandler = new InMemoryAccessTokenHandler();
     }
 
-    /**
-     * @dataProvider provideSupportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSupportData')]
     public function testSupport($request)
     {
         $this->setUpAuthenticator();
@@ -63,9 +61,7 @@ class ChainedAccessTokenExtractorsTest extends TestCase
         $this->assertInstanceOf(SelfValidatingPassport::class, $passport);
     }
 
-    /**
-     * @dataProvider provideInvalidAuthenticateData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidAuthenticateData')]
     public function testAuthenticateInvalid(Request $request, string $errorMessage, string $exceptionType)
     {
         $this->setUpAuthenticator();
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 5980fe9..536be80 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/FormEncodedBodyAccessTokenAuthenticatorTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/FormEncodedBodyAccessTokenAuthenticatorTest.php
@@ -78,9 +78,7 @@ class FormEncodedBodyAccessTokenAuthenticatorTest extends TestCase
         $this->assertInstanceOf(SelfValidatingPassport::class, $passport);
     }
 
-    /**
-     * @dataProvider provideInvalidAuthenticateData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidAuthenticateData')]
     public function testAuthenticateInvalid(Request $request, string $errorMessage, string $exceptionType)
     {
         $this->setUpAuthenticator();
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 82fe159..3a70e6a 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/HeaderAccessTokenAuthenticatorTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/HeaderAccessTokenAuthenticatorTest.php
@@ -34,9 +34,7 @@ class HeaderAccessTokenAuthenticatorTest extends TestCase
         $this->accessTokenHandler = new InMemoryAccessTokenHandler();
     }
 
-    /**
-     * @dataProvider provideSupportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSupportData')]
     public function testSupport($request)
     {
         $this->setUpAuthenticator();
@@ -50,9 +48,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');
@@ -68,9 +64,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');
@@ -106,9 +100,7 @@ class HeaderAccessTokenAuthenticatorTest extends TestCase
         $this->assertInstanceOf(SelfValidatingPassport::class, $passport);
     }
 
-    /**
-     * @dataProvider provideInvalidAuthenticateData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidAuthenticateData')]
     public function testAuthenticateInvalid(Request $request, string $errorMessage, string $exceptionType)
     {
         $this->setUpAuthenticator();
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 60a28e7..33a180b 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/QueryAccessTokenAuthenticatorTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessToken/QueryAccessTokenAuthenticatorTest.php
@@ -74,9 +74,7 @@ class QueryAccessTokenAuthenticatorTest extends TestCase
         $this->assertInstanceOf(SelfValidatingPassport::class, $passport);
     }
 
-    /**
-     * @dataProvider provideInvalidAuthenticateData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidAuthenticateData')]
     public function testAuthenticateInvalid(Request $request, string $errorMessage, string $exceptionType)
     {
         $this->setUpAuthenticator();
diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessTokenAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/AccessTokenAuthenticatorTest.php
index be6cc4e..bd61e73 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 2cab6f2..62d3a25 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/FormLoginAuthenticatorTest.php
@@ -66,9 +66,7 @@ class FormLoginAuthenticatorTest extends TestCase
         $this->authenticator->authenticate($request);
     }
 
-    /**
-     * @dataProvider provideUsernamesForLength
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUsernamesForLength')]
     public function testHandleWhenUsernameLength($username, $ok)
     {
         if ($ok) {
@@ -91,9 +89,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)
     {
         $request = Request::create('/login_check', 'POST', ['_username' => []]);
@@ -107,9 +103,7 @@ class FormLoginAuthenticatorTest extends TestCase
         $this->authenticator->authenticate($request);
     }
 
-    /**
-     * @dataProvider postOnlyDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('postOnlyDataProvider')]
     public function testHandleNonStringUsernameWithInt($postOnly)
     {
         $request = Request::create('/login_check', 'POST', ['_username' => 42]);
@@ -123,9 +117,7 @@ class FormLoginAuthenticatorTest extends TestCase
         $this->authenticator->authenticate($request);
     }
 
-    /**
-     * @dataProvider postOnlyDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('postOnlyDataProvider')]
     public function testHandleNonStringUsernameWithObject($postOnly)
     {
         $request = Request::create('/login_check', 'POST', ['_username' => new \stdClass()]);
@@ -139,9 +131,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);
@@ -154,9 +144,7 @@ class FormLoginAuthenticatorTest extends TestCase
         $this->authenticator->authenticate($request);
     }
 
-    /**
-     * @dataProvider postOnlyDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('postOnlyDataProvider')]
     public function testHandleNonStringPasswordWithArray(bool $postOnly)
     {
         $request = Request::create('/login_check', 'POST', ['_username' => 'foo', '_password' => []]);
@@ -170,9 +158,7 @@ class FormLoginAuthenticatorTest extends TestCase
         $this->authenticator->authenticate($request);
     }
 
-    /**
-     * @dataProvider postOnlyDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('postOnlyDataProvider')]
     public function testHandleNonStringPasswordWithToString(bool $postOnly)
     {
         $passwordObject = new class {
@@ -193,9 +179,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' => []]);
@@ -209,9 +193,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]);
@@ -225,9 +207,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()]);
@@ -271,9 +251,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 ced46da..4d60dcb 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authenticator/JsonLoginAuthenticatorTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/JsonLoginAuthenticatorTest.php
@@ -34,9 +34,7 @@ class JsonLoginAuthenticatorTest extends TestCase
         $this->userProvider = new InMemoryUserProvider();
     }
 
-    /**
-     * @dataProvider provideSupportData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSupportData')]
     public function testSupport($request)
     {
         $this->setUpAuthenticator();
@@ -53,9 +51,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']);
@@ -90,9 +86,7 @@ class JsonLoginAuthenticatorTest extends TestCase
         $this->assertEquals('foo', $passport->getBadge(PasswordCredentials::class)->getPassword());
     }
 
-    /**
-     * @dataProvider provideInvalidAuthenticateData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidAuthenticateData')]
     public function testAuthenticateInvalid(Request $request, string $errorMessage, string $exceptionType = BadRequestHttpException::class)
     {
         $this->setUpAuthenticator();
diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/LoginLinkAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/LoginLinkAuthenticatorTest.php
index 08af3a3..ae1685f 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/Passport/Badge/UserBadgeTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/Passport/Badge/UserBadgeTest.php
index f648d04..24de9d9 100644
--- a/src/Symfony/Component/Security/Http/Tests/Authenticator/Passport/Badge/UserBadgeTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Authenticator/Passport/Badge/UserBadgeTest.php
@@ -31,9 +31,8 @@ class UserBadgeTest extends TestCase
         $badge->getUser();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testEmptyUserIdentifier()
     {
         $this->expectUserDeprecationMessage('Since symfony/security-http 7.2: Using an empty string as user identifier is deprecated and will throw an exception in Symfony 8.0.');
@@ -41,9 +40,7 @@ class UserBadgeTest extends TestCase
         new UserBadge('', fn () => null);
     }
 
-    /**
-     * @dataProvider provideUserIdentifierNormalizationData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideUserIdentifierNormalizationData')]
     public function testUserIdentifierNormalization(string $identifier, string $expectedNormalizedIdentifier, callable $normalizer)
     {
         $badge = new UserBadge($identifier, fn () => null, identifierNormalizer: $normalizer);
diff --git a/src/Symfony/Component/Security/Http/Tests/Authenticator/RememberMeAuthenticatorTest.php b/src/Symfony/Component/Security/Http/Tests/Authenticator/RememberMeAuthenticatorTest.php
index fe262c2..8cd47ad 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 9e44355..3251d3e 100644
--- a/src/Symfony/Component/Security/Http/Tests/Controller/UserValueResolverTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Controller/UserValueResolverTest.php
@@ -109,9 +109,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 1ade1bf..da97e16 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(string $password, bool $passwordValid, bool $result)
     {
         $hasher = $this->createMock(PasswordHasherInterface::class);
@@ -83,9 +81,7 @@ class CheckCredentialsListenerTest extends TestCase
         $this->listener->checkPassport($event);
     }
 
-    /**
-     * @dataProvider provideCustomAuthenticatedResults
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCustomAuthenticatedResults')]
     public function testCustomAuthenticated(bool $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 d34b31f..3e483a2 100644
--- a/src/Symfony/Component/Security/Http/Tests/EventListener/IsGrantedAttributeListenerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/EventListener/IsGrantedAttributeListenerTest.php
@@ -216,9 +216,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 = new AuthorizationChecker(new TokenStorage(), new AccessDecisionManager((function () use (&$authChecker) {
diff --git a/src/Symfony/Component/Security/Http/Tests/EventListener/IsGrantedAttributeWithClosureListenerTest.php b/src/Symfony/Component/Security/Http/Tests/EventListener/IsGrantedAttributeWithClosureListenerTest.php
index 2ea375a..0f50b20 100644
--- a/src/Symfony/Component/Security/Http/Tests/EventListener/IsGrantedAttributeWithClosureListenerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/EventListener/IsGrantedAttributeWithClosureListenerTest.php
@@ -26,9 +26,7 @@ use Symfony\Component\Security\Http\EventListener\IsGrantedAttributeListener;
 use Symfony\Component\Security\Http\Tests\Fixtures\IsGrantedAttributeMethodsWithClosureController;
 use Symfony\Component\Security\Http\Tests\Fixtures\IsGrantedAttributeWithClosureController;
 
-/**
- * @requires PHP 8.5
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhp('8.5')]
 class IsGrantedAttributeWithClosureListenerTest extends TestCase
 {
     public function testAttribute()
@@ -213,9 +211,7 @@ class IsGrantedAttributeWithClosureListenerTest extends TestCase
         $listener->onKernelControllerArguments($event);
     }
 
-    /**
-     * @dataProvider getAccessDeniedMessageTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAccessDeniedMessageTests')]
     public function testAccessDeniedMessages(string|array|null $subject, string $method, int $numOfArguments, string $expectedMessage)
     {
         $authChecker = new AuthorizationChecker(new TokenStorage(), new AccessDecisionManager((function () use (&$authChecker) {
diff --git a/src/Symfony/Component/Security/Http/Tests/EventListener/PasswordMigratingListenerTest.php b/src/Symfony/Component/Security/Http/Tests/EventListener/PasswordMigratingListenerTest.php
index 1567169..2a00803 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 585fca8..d8523de 100644
--- a/src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php
+++ b/src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php
@@ -159,9 +159,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);
@@ -377,11 +375,9 @@ class ContextListenerTest extends TestCase
         $this->assertSame([], $dispatcher->getListeners());
     }
 
-    /**
-     * @testWith [true]
-     *           [false]
-     *           [null]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([true])]
+    #[\PHPUnit\Framework\Attributes\TestWith([false])]
+    #[\PHPUnit\Framework\Attributes\TestWith([null])]
     public function testNullOrHashedPasswordInSessionDoesntInvalidateTheToken(?bool $hashPassword)
     {
         $user = new CustomUser('user', ['ROLE_USER'], 'pass', $hashPassword);
diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php
index 0797837..cb054d6 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);
@@ -75,9 +71,7 @@ class ExceptionListenerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getAccessDeniedExceptionProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getAccessDeniedExceptionProvider')]
     public function testAccessDeniedExceptionFullFledgedAndWithoutAccessDeniedHandlerAndWithoutErrorPage(\Exception $exception, ?\Exception $eventException = null)
     {
         $event = $this->createEvent($exception);
@@ -89,9 +83,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);
@@ -112,9 +104,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);
@@ -129,9 +119,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 c7cdc7a..b9e61d1 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)
     {
         $tokenManager = $this->getTokenManager();
diff --git a/src/Symfony/Component/Security/Http/Tests/HttpUtilsTest.php b/src/Symfony/Component/Security/Http/Tests/HttpUtilsTest.php
index ccb538f..551b301 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 0683233..3d9458c 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/RelayClusterStoreTest.php b/src/Symfony/Component/Semaphore/Tests/Store/RelayClusterStoreTest.php
index 6f0615f..b25e13a 100644
--- a/src/Symfony/Component/Semaphore/Tests/Store/RelayClusterStoreTest.php
+++ b/src/Symfony/Component/Semaphore/Tests/Store/RelayClusterStoreTest.php
@@ -13,9 +13,7 @@ namespace Symfony\Component\Semaphore\Tests\Store;
 
 use Relay\Cluster as RelayCluster;
 
-/**
- * @requires extension relay
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('relay')]
 class RelayClusterStoreTest extends AbstractRedisStoreTestCase
 {
     public static function setUpBeforeClass(): 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/Attribute/ContextTest.php b/src/Symfony/Component/Serializer/Tests/Attribute/ContextTest.php
index e012f7b..812a896 100644
--- a/src/Symfony/Component/Serializer/Tests/Attribute/ContextTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Attribute/ContextTest.php
@@ -65,9 +65,7 @@ class ContextTest extends TestCase
         self::assertSame([], $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/Attribute/MaxDepthTest.php b/src/Symfony/Component/Serializer/Tests/Attribute/MaxDepthTest.php
index e611bfb..ac13360 100644
--- a/src/Symfony/Component/Serializer/Tests/Attribute/MaxDepthTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Attribute/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/CacheWarmer/CompiledClassMetadataCacheWarmerTest.php b/src/Symfony/Component/Serializer/Tests/CacheWarmer/CompiledClassMetadataCacheWarmerTest.php
index c9f5081..8900f3a 100644
--- a/src/Symfony/Component/Serializer/Tests/CacheWarmer/CompiledClassMetadataCacheWarmerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/CacheWarmer/CompiledClassMetadataCacheWarmerTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\Serializer\CacheWarmer\CompiledClassMetadataCacheWarmer;
 use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryCompiler;
 use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 final class CompiledClassMetadataCacheWarmerTest extends TestCase
 {
     public function testItImplementsCacheWarmerInterface()
diff --git a/src/Symfony/Component/Serializer/Tests/Context/Encoder/CsvEncoderContextBuilderTest.php b/src/Symfony/Component/Serializer/Tests/Context/Encoder/CsvEncoderContextBuilderTest.php
index fe39feb..59cb233 100644
--- a/src/Symfony/Component/Serializer/Tests/Context/Encoder/CsvEncoderContextBuilderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Context/Encoder/CsvEncoderContextBuilderTest.php
@@ -32,10 +32,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
@@ -122,9 +121,7 @@ class CsvEncoderContextBuilderTest extends TestCase
         $this->contextBuilder->withEnclosure('ọ');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testCannotSetMultipleBytesAsEscapeChar()
     {
         $this->expectUserDeprecationMessage('Since symfony/serializer 7.2: The "Symfony\Component\Serializer\Context\Encoder\CsvEncoderContextBuilder::withEscapeChar" method is deprecated. It will be removed in 8.0.');
@@ -133,9 +130,7 @@ class CsvEncoderContextBuilderTest extends TestCase
         $this->contextBuilder->withEscapeChar('ọ');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testWithEscapeCharIsDeprecated()
     {
         $this->expectUserDeprecationMessage('Since symfony/serializer 7.2: The "Symfony\Component\Serializer\Context\Encoder\CsvEncoderContextBuilder::withEscapeChar" method is deprecated. It will be removed in 8.0.');
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 4175751..6c7a0e8 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 ac4badc..018ad5c 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/DependencyInjection/SerializerPassTest.php b/src/Symfony/Component/Serializer/Tests/DependencyInjection/SerializerPassTest.php
index 4945eaa..4bb2889 100644
--- a/src/Symfony/Component/Serializer/Tests/DependencyInjection/SerializerPassTest.php
+++ b/src/Symfony/Component/Serializer/Tests/DependencyInjection/SerializerPassTest.php
@@ -102,13 +102,11 @@ class SerializerPassTest extends TestCase
         $this->assertEquals($context, $container->getDefinition('serializer')->getArgument('$defaultContext'));
     }
 
-    /**
-     * @testWith [{}, {}]
-     *           [{"serializer.default_context": {"enable_max_depth": true}}, {"enable_max_depth": true}]
-     *           [{".serializer.circular_reference_handler": "foo"}, {"circular_reference_handler": "foo"}]
-     *           [{".serializer.max_depth_handler": "bar"}, {"max_depth_handler": "bar"}]
-     *           [{"serializer.default_context": {"enable_max_depth": true}, ".serializer.circular_reference_handler": "foo", ".serializer.max_depth_handler": "bar"}, {"enable_max_depth": true, "circular_reference_handler": "foo", "max_depth_handler": "bar"}]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([[], []])]
+    #[\PHPUnit\Framework\Attributes\TestWith([['serializer.default_context' => ['enable_max_depth' => true]], ['enable_max_depth' => true]])]
+    #[\PHPUnit\Framework\Attributes\TestWith([['.serializer.circular_reference_handler' => 'foo'], ['circular_reference_handler' => 'foo']])]
+    #[\PHPUnit\Framework\Attributes\TestWith([['.serializer.max_depth_handler' => 'bar'], ['max_depth_handler' => 'bar']])]
+    #[\PHPUnit\Framework\Attributes\TestWith([['serializer.default_context' => ['enable_max_depth' => true], '.serializer.circular_reference_handler' => 'foo', '.serializer.max_depth_handler' => 'bar'], ['enable_max_depth' => true, 'circular_reference_handler' => 'foo', 'max_depth_handler' => 'bar']])]
     public function testBindObjectNormalizerDefaultContext(array $parameters, array $context)
     {
         $container = new ContainerBuilder();
@@ -156,9 +154,7 @@ class SerializerPassTest extends TestCase
         $this->assertSame('default', $traceableEncoderDefinition->getArgument(2));
     }
 
-    /**
-     * @dataProvider provideDefaultSerializerTagsData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDefaultSerializerTagsData')]
     public function testDefaultSerializerTagsAreResolvedCorrectly(
         array $normalizerTagAttributes,
         array $encoderTagAttributes,
@@ -243,9 +239,7 @@ class SerializerPassTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideNamedSerializerTagsData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNamedSerializerTagsData')]
     public function testNamedSerializerTagsAreResolvedCorrectly(
         array $config,
         array $normalizerTagAttributes,
@@ -381,9 +375,7 @@ class SerializerPassTest extends TestCase
         $this->assertCount(2, $encoderDefinition->getTag('serializer.encoder.api2'));
     }
 
-    /**
-     * @dataProvider provideEmptyTagsData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideEmptyTagsData')]
     public function testEmptyTagsAreIgnoredWhenNonEmptyArePresent(
         array $tagAttributesList,
         array $expectedDefaultTags,
@@ -477,10 +469,8 @@ class SerializerPassTest extends TestCase
         $serializerPass->process($container);
     }
 
-    /**
-     * @testWith [null]
-     *           ["some.converter"]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([null])]
+    #[\PHPUnit\Framework\Attributes\TestWith(['some.converter'])]
     public function testChildNameConverterIsNotBuiltWhenExpected(?string $nameConverter)
     {
         $container = new ContainerBuilder();
@@ -500,9 +490,7 @@ class SerializerPassTest extends TestCase
         $this->assertFalse($container->hasDefinition('serializer.name_converter.metadata_aware.'.ContainerBuilder::hash($nameConverter)));
     }
 
-    /**
-     * @dataProvider provideChildNameConverterCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideChildNameConverterCases')]
     public function testChildNameConverterIsBuiltWhenExpected(
         ?string $defaultSerializerNameConverter,
         ?string $namedSerializerNameConverter,
@@ -538,9 +526,7 @@ class SerializerPassTest extends TestCase
         yield ['some.converter', null, $withConverter, $withNull, []];
     }
 
-    /**
-     * @dataProvider provideDifferentNamedSerializerConfigsCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDifferentNamedSerializerConfigsCases')]
     public function testNamedSerializersCreateNewServices(
         array $defaultSerializerDefaultContext,
         ?string $defaultSerializerNameConverter,
@@ -661,13 +647,11 @@ class SerializerPassTest extends TestCase
         $this->assertEquals($defaultContext, $container->getDefinition('serializer.api')->getArgument('$defaultContext'));
     }
 
-    /**
-     * @testWith [{}, {}, {}]
-     *           [{"enable_max_depth": true}, {}, {"enable_max_depth": true}]
-     *           [{}, {".serializer.circular_reference_handler": "foo"}, {"circular_reference_handler": "foo"}]
-     *           [{}, {".serializer.max_depth_handler": "bar"}, {"max_depth_handler": "bar"}]
-     *           [{"enable_max_depth": true}, {".serializer.circular_reference_handler": "foo", ".serializer.max_depth_handler": "bar"}, {"enable_max_depth": true, "circular_reference_handler": "foo", "max_depth_handler": "bar"}]
-     */
+    #[\PHPUnit\Framework\Attributes\TestWith([[], [], []])]
+    #[\PHPUnit\Framework\Attributes\TestWith([['enable_max_depth' => true], [], ['enable_max_depth' => true]])]
+    #[\PHPUnit\Framework\Attributes\TestWith([[], ['.serializer.circular_reference_handler' => 'foo'], ['circular_reference_handler' => 'foo']])]
+    #[\PHPUnit\Framework\Attributes\TestWith([[], ['.serializer.max_depth_handler' => 'bar'], ['max_depth_handler' => 'bar']])]
+    #[\PHPUnit\Framework\Attributes\TestWith([['enable_max_depth' => true], ['.serializer.circular_reference_handler' => 'foo', '.serializer.max_depth_handler' => 'bar'], ['enable_max_depth' => true, 'circular_reference_handler' => 'foo', 'max_depth_handler' => 'bar']])]
     public function testBindNamedSerializerObjectNormalizerDefaultContext(array $defaultContext, array $parameters, array $context)
     {
         $container = new ContainerBuilder();
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 34cc940..4659a23 100644
--- a/src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Encoder/CsvEncoderTest.php
@@ -708,7 +708,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'
@@ -732,9 +732,7 @@ CSV;
         yield 'generator' => [(fn (): \Generator => yield from $data)()];
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testPassingNonEmptyEscapeCharIsDeprecated()
     {
         $this->expectUserDeprecationMessage('Since symfony/serializer 7.2: Setting the "csv_escape_char" option is deprecated. The option will be removed in 8.0.');
diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/JsonDecodeTest.php
index f336bcd..851afa6 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(
@@ -53,9 +51,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/Encoder/XmlEncoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php
index 7869998..6a63a46 100644
--- a/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php
@@ -39,9 +39,7 @@ class XmlEncoderTest extends TestCase
         $this->encoder->setSerializer($serializer);
     }
 
-    /**
-     * @dataProvider validEncodeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validEncodeProvider')]
     public function testEncode(string $expected, mixed $data, array $context = [])
     {
         $this->assertSame($expected, $this->encoder->encode($data, 'xml', $context));
diff --git a/src/Symfony/Component/Serializer/Tests/Mapping/Factory/CompiledClassMetadataFactoryTest.php b/src/Symfony/Component/Serializer/Tests/Mapping/Factory/CompiledClassMetadataFactoryTest.php
index e77a8bf..a19baf1 100644
--- a/src/Symfony/Component/Serializer/Tests/Mapping/Factory/CompiledClassMetadataFactoryTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Mapping/Factory/CompiledClassMetadataFactoryTest.php
@@ -21,9 +21,8 @@ use Symfony\Component\Serializer\Tests\Fixtures\Dummy;
 
 /**
  * @author Fabien Bourigault <bourigaultfabien@gmail.com>
- *
- * @group legacy
  */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 final class CompiledClassMetadataFactoryTest extends TestCase
 {
     public function testItImplementsClassMetadataFactoryInterface()
@@ -54,9 +53,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);
@@ -101,9 +98,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/NameConverter/CamelCaseToSnakeCaseNameConverterTest.php b/src/Symfony/Component/Serializer/Tests/NameConverter/CamelCaseToSnakeCaseNameConverterTest.php
index d1edc23..c75e5fe 100644
--- a/src/Symfony/Component/Serializer/Tests/NameConverter/CamelCaseToSnakeCaseNameConverterTest.php
+++ b/src/Symfony/Component/Serializer/Tests/NameConverter/CamelCaseToSnakeCaseNameConverterTest.php
@@ -28,18 +28,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/NameConverter/SnakeCaseToCamelCaseNameConverterTest.php b/src/Symfony/Component/Serializer/Tests/NameConverter/SnakeCaseToCamelCaseNameConverterTest.php
index 2d2799e..1faf7e7 100644
--- a/src/Symfony/Component/Serializer/Tests/NameConverter/SnakeCaseToCamelCaseNameConverterTest.php
+++ b/src/Symfony/Component/Serializer/Tests/NameConverter/SnakeCaseToCamelCaseNameConverterTest.php
@@ -28,18 +28,14 @@ class SnakeCaseToCamelCaseNameConverterTest extends TestCase
         $this->assertInstanceOf(NameConverterInterface::class, $attributeMetadata);
     }
 
-    /**
-     * @dataProvider Symfony\Component\Serializer\Tests\NameConverter\CamelCaseToSnakeCaseNameConverterTest::attributeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProviderExternal(\Symfony\Component\Serializer\Tests\NameConverter\CamelCaseToSnakeCaseNameConverterTest::class, 'attributeProvider')]
     public function testNormalize($underscored, $camelCased, $useLowerCamelCase)
     {
         $nameConverter = new SnakeCaseToCamelCaseNameConverter(null, $useLowerCamelCase);
         $this->assertEquals($camelCased, $nameConverter->normalize($underscored));
     }
 
-    /**
-     * @dataProvider Symfony\Component\Serializer\Tests\NameConverter\CamelCaseToSnakeCaseNameConverterTest::attributeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProviderExternal(\Symfony\Component\Serializer\Tests\NameConverter\CamelCaseToSnakeCaseNameConverterTest::class, 'attributeProvider')]
     public function testDenormalize($underscored, $camelCased, $useLowerCamelCase)
     {
         $nameConverter = new SnakeCaseToCamelCaseNameConverter(null, $useLowerCamelCase);
diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractNormalizerTest.php
index 74ca3d6..8e974c4 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();
diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php
index a7cef4a..a6b6138 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php
@@ -528,9 +528,7 @@ class AbstractObjectNormalizerTest extends TestCase
         return $denormalizer;
     }
 
-    /**
-     * @dataProvider provideInvalidDiscriminatorTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidDiscriminatorTypes')]
     public function testDenormalizeWithDiscriminatorMapHandlesInvalidTypeValue(mixed $typeValue, bool $shouldFail)
     {
         if ($shouldFail) {
@@ -1285,9 +1283,7 @@ class AbstractObjectNormalizerTest extends TestCase
         $this->assertEquals($expected, $normalizer->denormalize(['foo' => 'bar'], MixedPropertyDummy::class));
     }
 
-    /**
-     * @dataProvider provideBooleanTypesData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideBooleanTypesData')]
     public function testDenormalizeBooleanTypesWithNotMatchingData(array $data, string $type)
     {
         $normalizer = new AbstractObjectNormalizerWithMetadataAndPropertyTypeExtractors();
@@ -1324,9 +1320,7 @@ class AbstractObjectNormalizerTest extends TestCase
         $this->assertEquals($example, $deserialized);
     }
 
-    /**
-     * @dataProvider provideDenormalizeWithFilterBoolData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDenormalizeWithFilterBoolData')]
     public function testDenormalizeBooleanTypeWithFilterBool(array $data, ?bool $expectedFoo)
     {
         $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 7e9af43..722d8eb 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(?string $uri)
     {
         $this->expectException(UnexpectedValueException::class);
@@ -145,9 +137,7 @@ class DataUriNormalizerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider validUriProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('validUriProvider')]
     public function testValidData(string $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 eed5db0..8428eee 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(
@@ -154,9 +150,7 @@ class DateTimeNormalizerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideNormalizeUsingCastCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNormalizeUsingCastCases')]
     public function testNormalizeUsingCastPassedInConstructor(\DateTimeInterface $value, string $format, ?string $cast, string|int|float $expectedResult)
     {
         $normalizer = new DateTimeNormalizer([DateTimeNormalizer::CAST_KEY => $cast]);
@@ -164,9 +158,7 @@ class DateTimeNormalizerTest extends TestCase
         $this->assertSame($normalizer->normalize($value, null, [DateTimeNormalizer::FORMAT_KEY => $format]), $expectedResult);
     }
 
-    /**
-     * @dataProvider provideNormalizeUsingCastCases
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNormalizeUsingCastCases')]
     public function testNormalizeUsingCastPassedInContext(\DateTimeInterface $value, string $format, ?string $cast, string|int|float $expectedResult)
     {
         $this->assertSame($this->normalizer->normalize($value, null, [DateTimeNormalizer::FORMAT_KEY => $format, DateTimeNormalizer::CAST_KEY => $cast]), $expectedResult);
@@ -269,9 +261,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 80788a0..7ea36bc 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php
@@ -357,6 +357,7 @@ class GetSetMethodNormalizerTest extends TestCase
         return $normalizer;
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testRejectInvalidKey()
     {
         $this->markTestSkipped('This test makes no sense with the GetSetMethodNormalizer');
@@ -436,9 +437,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()));
@@ -558,10 +558,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/NumberNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/NumberNormalizerTest.php
index 56d4776..1b1cbdc 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/NumberNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/NumberNormalizerTest.php
@@ -26,9 +26,7 @@ class NumberNormalizerTest extends TestCase
         $this->normalizer = new NumberNormalizer();
     }
 
-    /**
-     * @dataProvider supportsNormalizationProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('supportsNormalizationProvider')]
     public function testSupportsNormalization(mixed $data, bool $expected)
     {
         $this->assertSame($expected, $this->normalizer->supportsNormalization($data));
@@ -51,12 +49,9 @@ class NumberNormalizerTest extends TestCase
         yield 'null' => [null, false];
     }
 
-    /**
-     * @requires PHP 8.4
-     * @requires extension bcmath
-     *
-     * @dataProvider normalizeGoodBcMathNumberValueProvider
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('bcmath')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('normalizeGoodBcMathNumberValueProvider')]
     public function testNormalizeBcMathNumber(Number $data, string $expected)
     {
         $this->assertSame($expected, $this->normalizer->normalize($data));
@@ -71,11 +66,8 @@ class NumberNormalizerTest extends TestCase
         }
     }
 
-    /**
-     * @requires extension gmp
-     *
-     * @dataProvider normalizeGoodGmpValueProvider
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('gmp')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('normalizeGoodGmpValueProvider')]
     public function testNormalizeGmp(\GMP $data, string $expected)
     {
         $this->assertSame($expected, $this->normalizer->normalize($data));
@@ -89,9 +81,7 @@ class NumberNormalizerTest extends TestCase
         }
     }
 
-    /**
-     * @dataProvider normalizeBadValueProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('normalizeBadValueProvider')]
     public function testNormalizeBadValueThrows(mixed $data)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -107,18 +97,14 @@ class NumberNormalizerTest extends TestCase
         yield 'null' => [null];
     }
 
-    /**
-     * @requires PHP 8.4
-     * @requires extension bcmath
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('bcmath')]
     public function testSupportsBcMathNumberDenormalization()
     {
         $this->assertFalse($this->normalizer->supportsDenormalization(null, Number::class));
     }
 
-    /**
-     * @requires extension gmp
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('gmp')]
     public function testSupportsGmpDenormalization()
     {
         $this->assertFalse($this->normalizer->supportsDenormalization(null, \GMP::class));
@@ -129,12 +115,9 @@ class NumberNormalizerTest extends TestCase
         $this->assertFalse($this->normalizer->supportsDenormalization(null, \stdClass::class));
     }
 
-    /**
-     * @requires PHP 8.4
-     * @requires extension bcmath
-     *
-     * @dataProvider denormalizeGoodBcMathNumberValueProvider
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('bcmath')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('denormalizeGoodBcMathNumberValueProvider')]
     public function testDenormalizeBcMathNumber(string|int $data, string $type, Number $expected)
     {
         $this->assertEquals($expected, $this->normalizer->denormalize($data, $type));
@@ -149,11 +132,8 @@ class NumberNormalizerTest extends TestCase
         }
     }
 
-    /**
-     * @requires extension gmp
-     *
-     * @dataProvider denormalizeGoodGmpValueProvider
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('gmp')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('denormalizeGoodGmpValueProvider')]
     public function testDenormalizeGmp(string|int $data, string $type, \GMP $expected)
     {
         $this->assertEquals($expected, $this->normalizer->denormalize($data, $type));
@@ -167,12 +147,9 @@ class NumberNormalizerTest extends TestCase
         }
     }
 
-    /**
-     * @requires PHP 8.4
-     * @requires extension bcmath
-     *
-     * @dataProvider denormalizeBadBcMathNumberValueProvider
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('bcmath')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('denormalizeBadBcMathNumberValueProvider')]
     public function testDenormalizeBadBcMathNumberValueThrows(mixed $data, string $type, string $expectedException, string $expectedExceptionMessage)
     {
         $this->expectException($expectedException);
@@ -191,11 +168,8 @@ class NumberNormalizerTest extends TestCase
         yield 'Number, float' => [1.23, Number::class, NotNormalizableValueException::class, $stringOrDecimalExpectedMessage];
     }
 
-    /**
-     * @requires extension gmp
-     *
-     * @dataProvider denormalizeBadGmpValueProvider
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('gmp')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('denormalizeBadGmpValueProvider')]
     public function testDenormalizeBadGmpValueThrows(mixed $data, string $type, string $expectedException, string $expectedExceptionMessage)
     {
         $this->expectException($expectedException);
diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php
index 30b8f85..0aa627a 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php
@@ -178,9 +178,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 */
@@ -194,9 +192,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 */
@@ -402,6 +398,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 734b15b..30073b0 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/UidNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/UidNormalizerTest.php
@@ -104,9 +104,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 ? [
@@ -127,9 +125,7 @@ class UidNormalizerTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider dataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('dataProvider')]
     public function testSupportsDenormalization($uuidString, $class)
     {
         $this->assertTrue($this->normalizer->supportsDenormalization($uuidString, $class));
@@ -150,9 +146,7 @@ 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));
diff --git a/src/Symfony/Component/Serializer/Tests/SerializerTest.php b/src/Symfony/Component/Serializer/Tests/SerializerTest.php
index 255a745..637da8a 100644
--- a/src/Symfony/Component/Serializer/Tests/SerializerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/SerializerTest.php
@@ -639,14 +639,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":[]}}';
@@ -655,7 +655,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":{}}}';
@@ -664,7 +664,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":{}}}';
@@ -924,9 +924,7 @@ class SerializerTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideCollectDenormalizationErrors
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCollectDenormalizationErrors')]
     public function testCollectDenormalizationErrors(?ClassMetadataFactory $classMetadataFactory)
     {
         $json = '
@@ -1163,9 +1161,7 @@ class SerializerTest extends TestCase
         $this->assertSame($expected, $exceptionsAsArray);
     }
 
-    /**
-     * @dataProvider provideCollectDenormalizationErrors
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideCollectDenormalizationErrors')]
     public function testCollectDenormalizationErrors2(?ClassMetadataFactory $classMetadataFactory)
     {
         $json = '
@@ -1298,9 +1294,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 98149cb..1b02800 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 f9b532e..d200b41 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 e673f27..3039c5c 100644
--- a/src/Symfony/Component/String/Tests/AbstractAsciiTestCase.php
+++ b/src/Symfony/Component/String/Tests/AbstractAsciiTestCase.php
@@ -44,9 +44,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) {
@@ -69,9 +67,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);
@@ -79,9 +75,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);
@@ -100,9 +94,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);
@@ -144,9 +136,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideWrap
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideWrap')]
     public function testWrap(array $expected, array $values)
     {
         $s = static::createFromString('');
@@ -169,9 +159,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) {
@@ -196,9 +184,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);
@@ -227,9 +213,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);
@@ -259,9 +243,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);
@@ -286,9 +268,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);
@@ -317,9 +297,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));
@@ -428,9 +406,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideInvalidChunkLength
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidChunkLength')]
     public function testInvalidChunkLength(int $length)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -447,9 +423,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));
@@ -519,9 +493,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();
@@ -543,9 +515,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();
@@ -567,9 +537,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideTitle
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTitle')]
     public function testTitle(string $expected, string $origin, bool $allWords)
     {
         $this->assertEquals(
@@ -593,9 +561,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(
@@ -621,9 +587,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(
@@ -649,9 +613,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideAppend
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAppend')]
     public function testAppend(string $expected, array $suffixes)
     {
         $instance = static::createFromString('');
@@ -684,9 +646,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideAppend
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideAppend')]
     public function testPrepend(string $expected, array $prefixes)
     {
         $instance = static::createFromString('');
@@ -701,9 +661,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);
@@ -752,9 +710,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);
@@ -788,9 +744,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);
@@ -820,9 +774,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);
@@ -848,9 +800,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();
@@ -876,9 +826,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);
@@ -905,9 +853,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();
@@ -935,9 +881,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideFolded
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFolded')]
     public function testFolded(string $expected, string $origin)
     {
         $this->assertEquals(
@@ -954,9 +898,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);
@@ -977,9 +919,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);
@@ -1003,9 +943,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);
@@ -1026,9 +964,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();
@@ -1052,9 +988,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();
@@ -1089,9 +1023,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider provideKebab
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideKebab')]
     public function testKebab(string $expectedString, string $origin)
     {
         $instance = static::createFromString($origin)->kebab();
@@ -1118,9 +1050,7 @@ abstract class AbstractAsciiTestCase extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider providePascal
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providePascal')]
     public function testPascal(string $expectedString, string $origin)
     {
         $instance = static::createFromString($origin)->pascal();
@@ -1145,9 +1075,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);
@@ -1174,9 +1102,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));
@@ -1199,9 +1125,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);
@@ -1228,9 +1152,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));
@@ -1253,9 +1175,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);
@@ -1279,9 +1199,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);
@@ -1304,9 +1222,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);
@@ -1330,9 +1246,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);
@@ -1355,9 +1269,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();
@@ -1376,9 +1288,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));
@@ -1402,9 +1312,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));
@@ -1427,9 +1335,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());
@@ -1445,9 +1351,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);
@@ -1471,9 +1375,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);
@@ -1492,9 +1394,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);
@@ -1516,9 +1416,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);
@@ -1539,9 +1437,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);
@@ -1562,9 +1458,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|TruncateMode $cut = TruncateMode::Char)
     {
         $instance = static::createFromString($origin)->truncate($length, $ellipsis, $cut);
@@ -1637,9 +1531,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();
@@ -1656,9 +1548,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));
@@ -1687,9 +1577,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 2433f89..194a104 100644
--- a/src/Symfony/Component/String/Tests/AbstractUnicodeTestCase.php
+++ b/src/Symfony/Component/String/Tests/AbstractUnicodeTestCase.php
@@ -50,11 +50,8 @@ END'],
         $this->assertSame('Dieser Wert sollte grOEsser oder gleich', (string) $s->ascii([$rule]));
     }
 
-    /**
-     * @dataProvider provideLocaleLower
-     *
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocaleLower')]
     public function testLocaleLower(string $locale, string $expected, string $origin)
     {
         $instance = static::createFromString($origin)->localeLower($locale);
@@ -64,11 +61,8 @@ END'],
         $this->assertSame($expected, (string) $instance);
     }
 
-    /**
-     * @dataProvider provideLocaleUpper
-     *
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocaleUpper')]
     public function testLocaleUpper(string $locale, string $expected, string $origin)
     {
         $instance = static::createFromString($origin)->localeUpper($locale);
@@ -78,11 +72,8 @@ END'],
         $this->assertSame($expected, (string) $instance);
     }
 
-    /**
-     * @dataProvider provideLocaleTitle
-     *
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLocaleTitle')]
     public function testLocaleTitle(string $locale, string $expected, string $origin)
     {
         $instance = static::createFromString($origin)->localeTitle($locale);
@@ -117,9 +108,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/Inflector/SpanishInflectorTest.php b/src/Symfony/Component/String/Tests/Inflector/SpanishInflectorTest.php
index b10509a..86b187a 100644
--- a/src/Symfony/Component/String/Tests/Inflector/SpanishInflectorTest.php
+++ b/src/Symfony/Component/String/Tests/Inflector/SpanishInflectorTest.php
@@ -123,9 +123,7 @@ class SpanishInflectorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider singularizeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('singularizeProvider')]
     public function testSingularize(string $plural, $singular)
     {
         $this->assertSame(
@@ -134,9 +132,7 @@ class SpanishInflectorTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider pluralizeProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('pluralizeProvider')]
     public function testPluralize(string $singular, $plural)
     {
         $this->assertSame(
@@ -145,9 +141,7 @@ class SpanishInflectorTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider uninflectedProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('uninflectedProvider')]
     public function testUninflected(string $word)
     {
         $this->assertSame(
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 ed81b33..79f6e20 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/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 3addc29..cb1dd64 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 2f974dc..fa7d99d 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/PhraseProviderTest.php b/src/Symfony/Component/Translation/Bridge/Phrase/Tests/PhraseProviderTest.php
index 137ba39..240489f 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);
@@ -380,10 +370,8 @@ class PhraseProviderTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider readProviderExceptionsProvider
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('readProviderExceptionsProvider')]
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testReadProviderExceptions(int $statusCode, string $expectedExceptionMessage, string $expectedLoggerMessage)
     {
         $this->getLogger()
@@ -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->getLogger()
@@ -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->getLogger()
@@ -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->getLogger()
@@ -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->getLogger()
diff --git a/src/Symfony/Component/Translation/Test/AbstractProviderFactoryTestCase.php b/src/Symfony/Component/Translation/Test/AbstractProviderFactoryTestCase.php
index 75e7dd2..6f27b54 100644
--- a/src/Symfony/Component/Translation/Test/AbstractProviderFactoryTestCase.php
+++ b/src/Symfony/Component/Translation/Test/AbstractProviderFactoryTestCase.php
@@ -36,10 +36,8 @@ abstract class AbstractProviderFactoryTestCase extends TestCase
      */
     abstract public static function unsupportedSchemeProvider(): iterable;
 
-    /**
-     * @dataProvider supportsProvider
-     */
     #[DataProvider('supportsProvider')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('supportsProvider')]
     public function testSupports(bool $expected, string $dsn)
     {
         $factory = $this->createFactory();
@@ -47,10 +45,8 @@ abstract class AbstractProviderFactoryTestCase extends TestCase
         $this->assertSame($expected, $factory->supports(new Dsn($dsn)));
     }
 
-    /**
-     * @dataProvider createProvider
-     */
     #[DataProvider('createProvider')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('createProvider')]
     public function testCreate(string $expected, string $dsn)
     {
         $factory = $this->createFactory();
@@ -59,10 +55,8 @@ abstract class AbstractProviderFactoryTestCase extends TestCase
         $this->assertSame($expected, (string) $provider);
     }
 
-    /**
-     * @dataProvider unsupportedSchemeProvider
-     */
     #[DataProvider('unsupportedSchemeProvider')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('unsupportedSchemeProvider')]
     public function testUnsupportedSchemeException(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 7907986..a5e3db6 100644
--- a/src/Symfony/Component/Translation/Test/ProviderTestCase.php
+++ b/src/Symfony/Component/Translation/Test/ProviderTestCase.php
@@ -43,10 +43,8 @@ abstract class ProviderTestCase extends TestCase
      */
     abstract public static function toStringProvider(): iterable;
 
-    /**
-     * @dataProvider toStringProvider
-     */
     #[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/TranslationLintCommandTest.php b/src/Symfony/Component/Translation/Tests/Command/TranslationLintCommandTest.php
index 2f67a31..247cd57 100644
--- a/src/Symfony/Component/Translation/Tests/Command/TranslationLintCommandTest.php
+++ b/src/Symfony/Component/Translation/Tests/Command/TranslationLintCommandTest.php
@@ -21,9 +21,7 @@ use Symfony\Component\Translation\Translator;
 
 final class TranslationLintCommandTest extends TestCase
 {
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testLintCorrectTranslations()
     {
         $translator = new Translator('en');
@@ -62,9 +60,7 @@ final class TranslationLintCommandTest extends TestCase
         $this->assertStringContainsString('[OK] All translations are valid.', $display);
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testLintMalformedIcuTranslations()
     {
         $this->markTestSkipped('Test failing on current Debian.');
diff --git a/src/Symfony/Component/Translation/Tests/Command/TranslationPullCommandTest.php b/src/Symfony/Component/Translation/Tests/Command/TranslationPullCommandTest.php
index c8ecf1c..caadd31 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 7b9fd1a..84f7ea4 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);
@@ -253,9 +251,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 64af128..b2483f5 100644
--- a/src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php
+++ b/src/Symfony/Component/Translation/Tests/DataCollector/TranslationDataCollectorTest.php
@@ -155,10 +155,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 658164a..3d1b6e4 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/Formatter/IntlFormatterTest.php b/src/Symfony/Component/Translation/Tests/Formatter/IntlFormatterTest.php
index e5697fb..2a424ef 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)));
@@ -90,9 +86,7 @@ _MSG_;
         ];
     }
 
-    /**
-     * @dataProvider percentAndBracketsAreTrimmedProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('percentAndBracketsAreTrimmedProvider')]
     public function testPercentsAndBracketsAreTrimmed(string $expected, string $message, array $parameters)
     {
         $formatter = new IntlFormatter();
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/CsvFileLoaderTest.php b/src/Symfony/Component/Translation/Tests/Loader/CsvFileLoaderTest.php
index cae8091..3605079 100644
--- a/src/Symfony/Component/Translation/Tests/Loader/CsvFileLoaderTest.php
+++ b/src/Symfony/Component/Translation/Tests/Loader/CsvFileLoaderTest.php
@@ -58,9 +58,8 @@ class CsvFileLoaderTest extends TestCase
         (new CsvFileLoader())->load('http://example.com/resources.csv', 'en', 'domain1');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testEscapeCharInCsvControlIsDeprecated()
     {
         $loader = new CsvFileLoader();
diff --git a/src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php b/src/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php
index 15fe11b..4893e77 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 066c072..88ec49b 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 eb3beee..f63ea2b 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 c4dee1b..03e5cab 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(string $locale)
     {
         $translator = new Translator('fr');
@@ -78,9 +72,7 @@ class TranslatorTest extends TestCase
         $translator->setLocale($locale);
     }
 
-    /**
-     * @dataProvider getValidLocalesTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalesTests')]
     public function testSetValidLocale(string $locale)
     {
         $translator = new Translator($locale);
@@ -151,9 +143,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);
@@ -161,9 +151,7 @@ class TranslatorTest extends TestCase
         $translator->setFallbackLocales(['fr', $locale]);
     }
 
-    /**
-     * @dataProvider getValidLocalesTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalesTests')]
     public function testSetFallbackValidLocales($locale)
     {
         $translator = new Translator($locale);
@@ -183,9 +171,7 @@ class TranslatorTest extends TestCase
         $this->assertEquals('foobar', $translator->trans('bar'));
     }
 
-    /**
-     * @dataProvider getInvalidLocalesTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidLocalesTests')]
     public function testAddResourceInvalidLocales($locale)
     {
         $translator = new Translator('fr');
@@ -195,9 +181,7 @@ class TranslatorTest extends TestCase
         $translator->addResource('array', ['foo' => 'foofoo'], $locale);
     }
 
-    /**
-     * @dataProvider getValidLocalesTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalesTests')]
     public function testAddResourceValidLocales(string $locale)
     {
         $translator = new Translator('fr');
@@ -220,9 +204,7 @@ class TranslatorTest extends TestCase
         $this->assertEquals('foobar', $translator->trans('bar'));
     }
 
-    /**
-     * @dataProvider getTransFileTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransFileTests')]
     public function testTransWithoutFallbackLocaleFile(string $format, string $loader)
     {
         $loaderClass = 'Symfony\\Component\\Translation\\Loader\\'.$loader;
@@ -237,9 +219,7 @@ class TranslatorTest extends TestCase
         $translator->trans('foo');
     }
 
-    /**
-     * @dataProvider getTransFileTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransFileTests')]
     public function testTransWithFallbackLocaleFile(string $format, string $loader)
     {
         $loaderClass = 'Symfony\\Component\\Translation\\Loader\\'.$loader;
@@ -293,9 +273,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);
@@ -386,9 +364,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');
@@ -398,9 +374,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)) {
@@ -410,9 +384,7 @@ class TranslatorTest extends TestCase
         $this->testTrans(...$args);
     }
 
-    /**
-     * @dataProvider getInvalidLocalesTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidLocalesTests')]
     public function testTransInvalidLocale($locale)
     {
         $translator = new Translator('en');
@@ -424,9 +396,7 @@ class TranslatorTest extends TestCase
         $translator->trans('foo', [], '', $locale);
     }
 
-    /**
-     * @dataProvider getValidLocalesTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalesTests')]
     public function testTransValidLocale(string $locale)
     {
         $translator = new Translator($locale);
@@ -437,9 +407,7 @@ class TranslatorTest extends TestCase
         $this->assertEquals('OK', $translator->trans('test', [], null, $locale));
     }
 
-    /**
-     * @dataProvider getFlattenedTransTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFlattenedTransTests')]
     public function testFlattenedTrans(string $expected, $messages, $id)
     {
         $translator = new Translator('en');
@@ -557,9 +525,7 @@ class TranslatorTest extends TestCase
         ];
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testIntlFormattedDomain()
     {
         $translator = new Translator('en');
@@ -635,9 +601,7 @@ class TranslatorTest extends TestCase
         $this->assertSame('Bienvenue sur autre.fr!', $translator->trans('welcome', ['{link}' => 'autre.fr'], null, 'fr'));
     }
 
-    /**
-     * @requires extension intl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testTransICUWithGlobalParameters()
     {
         $domain = 'test.'.MessageCatalogue::INTL_DOMAIN_SUFFIX;
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/TypeInfo/Tests/Type/ArrayShapeTypeTest.php b/src/Symfony/Component/TypeInfo/Tests/Type/ArrayShapeTypeTest.php
index 006a5f1..6fb3963 100644
--- a/src/Symfony/Component/TypeInfo/Tests/Type/ArrayShapeTypeTest.php
+++ b/src/Symfony/Component/TypeInfo/Tests/Type/ArrayShapeTypeTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\TypeInfo\Type\ArrayShapeType;
 
 class ArrayShapeTypeTest extends TestCase
 {
-    /**
-     * @dataProvider cannotConstructWithInvalidExtraDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('cannotConstructWithInvalidExtraDataProvider')]
     public function testCannotConstructWithInvalidExtra(string $expectedMessage, ?Type $extraKeyType, ?Type $extraValueType)
     {
         $this->expectException(InvalidArgumentException::class);
diff --git a/src/Symfony/Component/TypeInfo/Tests/Type/CollectionTypeTest.php b/src/Symfony/Component/TypeInfo/Tests/Type/CollectionTypeTest.php
index 7d03498..261d4fd 100644
--- a/src/Symfony/Component/TypeInfo/Tests/Type/CollectionTypeTest.php
+++ b/src/Symfony/Component/TypeInfo/Tests/Type/CollectionTypeTest.php
@@ -129,9 +129,8 @@ class CollectionTypeTest extends TestCase
         $this->assertFalse($type->accepts(new \ArrayObject([0 => true, 1 => 'string'])));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCannotCreateIterableList()
     {
         $this->expectUserDeprecationMessage('Since symfony/type-info 7.3: Creating a "Symfony\Component\TypeInfo\Type\CollectionType" that is a list and not an array is deprecated and will throw a "Symfony\Component\TypeInfo\Exception\InvalidArgumentException" in 8.0.');
diff --git a/src/Symfony/Component/TypeInfo/Tests/Type/IntersectionTypeTest.php b/src/Symfony/Component/TypeInfo/Tests/Type/IntersectionTypeTest.php
index 5ae38ea..8c01c02 100644
--- a/src/Symfony/Component/TypeInfo/Tests/Type/IntersectionTypeTest.php
+++ b/src/Symfony/Component/TypeInfo/Tests/Type/IntersectionTypeTest.php
@@ -50,6 +50,7 @@ class IntersectionTypeTest extends TestCase
         new IntersectionType(Type::object(\DateTime::class), Type::nullable(Type::object(\Stringable::class)));
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCanCreateWithWrappingTypes()
     {
         new IntersectionType(Type::collection(Type::object(\Iterator::class)), Type::generic(Type::object(\Iterator::class)));
diff --git a/src/Symfony/Component/TypeInfo/Tests/TypeFactoryTest.php b/src/Symfony/Component/TypeInfo/Tests/TypeFactoryTest.php
index 9a59134..99167e5 100644
--- a/src/Symfony/Component/TypeInfo/Tests/TypeFactoryTest.php
+++ b/src/Symfony/Component/TypeInfo/Tests/TypeFactoryTest.php
@@ -227,9 +227,7 @@ class TypeFactoryTest extends TestCase
         $this->assertEquals(new UnionType(Type::int(), Type::string()), Type::arrayKey());
     }
 
-    /**
-     * @dataProvider createFromValueProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('createFromValueProvider')]
     public function testCreateFromValue(Type $expected, mixed $value)
     {
         $this->assertEquals($expected, Type::fromValue($value));
@@ -288,9 +286,8 @@ class TypeFactoryTest extends TestCase
         yield [Type::collection(Type::object($arrayAccess::class)), $arrayAccess];
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCannotCreateIterableList()
     {
         $this->expectUserDeprecationMessage('Since symfony/type-info 7.3: The third argument of "Symfony\Component\TypeInfo\TypeFactoryTrait::iterable()" is deprecated. Use the "Symfony\Component\TypeInfo\Type::list()" method to create a list instead.');
diff --git a/src/Symfony/Component/TypeInfo/Tests/TypeResolver/PhpDocAwareReflectionTypeResolverTest.php b/src/Symfony/Component/TypeInfo/Tests/TypeResolver/PhpDocAwareReflectionTypeResolverTest.php
index 04c5cba..7ee6c70 100644
--- a/src/Symfony/Component/TypeInfo/Tests/TypeResolver/PhpDocAwareReflectionTypeResolverTest.php
+++ b/src/Symfony/Component/TypeInfo/Tests/TypeResolver/PhpDocAwareReflectionTypeResolverTest.php
@@ -22,9 +22,7 @@ use Symfony\Component\TypeInfo\TypeResolver\TypeResolver;
 
 class PhpDocAwareReflectionTypeResolverTest extends TestCase
 {
-    /**
-     * @dataProvider readPhpDocDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('readPhpDocDataProvider')]
     public function testReadPhpDoc(Type $expected, \Reflector $reflector)
     {
         $resolver = new PhpDocAwareReflectionTypeResolver(TypeResolver::create(), new StringTypeResolver(), new TypeContextFactory(new StringTypeResolver()));
diff --git a/src/Symfony/Component/TypeInfo/Tests/TypeResolver/ReflectionTypeResolverTest.php b/src/Symfony/Component/TypeInfo/Tests/TypeResolver/ReflectionTypeResolverTest.php
index caf168a..26baa6f 100644
--- a/src/Symfony/Component/TypeInfo/Tests/TypeResolver/ReflectionTypeResolverTest.php
+++ b/src/Symfony/Component/TypeInfo/Tests/TypeResolver/ReflectionTypeResolverTest.php
@@ -34,9 +34,7 @@ class ReflectionTypeResolverTest extends TestCase
         $this->resolver = new ReflectionTypeResolver();
     }
 
-    /**
-     * @dataProvider resolveDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('resolveDataProvider')]
     public function testResolve(Type $expectedType, \ReflectionType $reflection, ?TypeContext $typeContext = null)
     {
         $this->assertEquals($expectedType, $this->resolver->resolve($reflection, $typeContext));
diff --git a/src/Symfony/Component/TypeInfo/Tests/TypeResolver/StringTypeResolverTest.php b/src/Symfony/Component/TypeInfo/Tests/TypeResolver/StringTypeResolverTest.php
index cca88b5..a7c5e88 100644
--- a/src/Symfony/Component/TypeInfo/Tests/TypeResolver/StringTypeResolverTest.php
+++ b/src/Symfony/Component/TypeInfo/Tests/TypeResolver/StringTypeResolverTest.php
@@ -36,17 +36,13 @@ class StringTypeResolverTest extends TestCase
         $this->resolver = new StringTypeResolver();
     }
 
-    /**
-     * @dataProvider resolveDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('resolveDataProvider')]
     public function testResolve(Type $expectedType, string $string, ?TypeContext $typeContext = null)
     {
         $this->assertEquals($expectedType, $this->resolver->resolve($string, $typeContext));
     }
 
-    /**
-     * @dataProvider resolveDataProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('resolveDataProvider')]
     public function testResolveStringable(Type $expectedType, string $string, ?TypeContext $typeContext = null)
     {
         $this->assertEquals($expectedType, $this->resolver->resolve(new class($string) implements \Stringable {
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 0242a81..fd06b8e 100644
--- a/src/Symfony/Component/Uid/Tests/UlidTest.php
+++ b/src/Symfony/Component/Uid/Tests/UlidTest.php
@@ -21,10 +21,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();
@@ -88,9 +86,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');
@@ -122,9 +118,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();
@@ -149,9 +143,7 @@ class UlidTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideInvalidBinaryFormat
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidBinaryFormat')]
     public function testFromBinaryInvalidFormat(string $ulid)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -176,9 +168,7 @@ class UlidTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideInvalidBase58Format
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidBase58Format')]
     public function testFromBase58InvalidFormat(string $ulid)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -203,9 +193,7 @@ class UlidTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideInvalidBase32Format
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidBase32Format')]
     public function testFromBase32InvalidFormat(string $ulid)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -230,9 +218,7 @@ class UlidTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideInvalidRfc4122Format
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidRfc4122Format')]
     public function testFromRfc4122InvalidFormat(string $ulid)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -259,11 +245,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);
@@ -277,10 +261,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 b6986b0..be4edd2 100644
--- a/src/Symfony/Component/Uid/Tests/UuidTest.php
+++ b/src/Symfony/Component/Uid/Tests/UuidTest.php
@@ -31,9 +31,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);
@@ -48,9 +46,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);
@@ -279,9 +275,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));
@@ -303,7 +297,7 @@ class UuidTest extends TestCase
         $this->assertSame($uuid1->hash(), $uuid2->hash());
     }
 
-    /** @requires extension ds */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('ds')]
     public function testDsCompatibility()
     {
         $uuid1 = new UuidV4(self::A_UUID_V4);
@@ -334,11 +328,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);
@@ -352,10 +344,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);
@@ -377,9 +367,7 @@ class UuidTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideInvalidBinaryFormat
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidBinaryFormat')]
     public function testFromBinaryInvalidFormat(string $ulid)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -404,9 +392,7 @@ class UuidTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideInvalidBase58Format
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidBase58Format')]
     public function testFromBase58InvalidFormat(string $ulid)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -431,9 +417,7 @@ class UuidTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideInvalidBase32Format
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidBase32Format')]
     public function testFromBase32InvalidFormat(string $ulid)
     {
         $this->expectException(InvalidArgumentException::class);
@@ -458,9 +442,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 3d23d91..fd93fb4 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php
@@ -75,9 +75,7 @@ abstract class AbstractComparisonValidatorTestCase extends ConstraintValidatorTe
         ];
     }
 
-    /**
-     * @dataProvider provideInvalidConstraintOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidConstraintOptions')]
     public function testThrowsConstraintExceptionIfNoValueOrPropertyPath($options)
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -95,9 +93,7 @@ abstract class AbstractComparisonValidatorTestCase extends ConstraintValidatorTe
         ]);
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testValidComparisonToPropertyPath($comparedValue)
     {
         $constraint = $this->createConstraint(['propertyPath' => 'value']);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/AllValidatorTest.php
index ee6a291..064aad0 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 22b53dd..275f3e5 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(
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php
index 315cb85..603162d 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/BicValidatorTest.php
@@ -189,9 +189,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());
@@ -212,9 +210,7 @@ class BicValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidBics
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidBics')]
     public function testInvalidBics($bic, $code)
     {
         $constraint = new Bic(
@@ -229,9 +225,7 @@ class BicValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getInvalidBics
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidBics')]
     public function testInvalidBicsNamed($bic, $code)
     {
         $constraint = new Bic(message: 'myMessage');
@@ -269,12 +263,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);
@@ -313,9 +302,7 @@ class BicValidatorTest extends ConstraintValidatorTestCase
         yield ['CAIXEABBXXX', 'ES79 2100 0813 6101 2345 6789'];
     }
 
-    /**
-     * @dataProvider getValidBicsWithNormalizerToUpper
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidBicsWithNormalizerToUpper')]
     public function testValidBicsWithNormalizerToUpper($bic)
     {
         $this->validator->validate($bic, new Bic(mode: Bic::VALIDATION_MODE_CASE_INSENSITIVE));
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/BlankValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/BlankValidatorTest.php
index 21d3fc8..32d5484 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 d704578..b81b82a 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/CascadeTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CascadeTest.php
index fc4d7ce..4fa5713 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/CascadeTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/CascadeTest.php
@@ -35,9 +35,7 @@ class CascadeTest extends TestCase
         self::assertSame(['foo' => 0, 'bar' => 1], $constraint->exclude);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testExcludePropertiesDoctrineStyle()
     {
         $constraint = new Cascade(['exclude' => ['foo', 'bar']]);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CharsetValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CharsetValidatorTest.php
index 5c2f2c8..7d6d21e 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/CharsetValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/CharsetValidatorTest.php
@@ -24,9 +24,7 @@ class CharsetValidatorTest extends ConstraintValidatorTestCase
         return new CharsetValidator();
     }
 
-    /**
-     * @dataProvider provideValidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidValues')]
     public function testEncodingIsValid(string|\Stringable $value, array|string $encodings)
     {
         $this->validator->validate($value, new Charset(encodings: $encodings));
@@ -34,9 +32,7 @@ class CharsetValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider provideInvalidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidValues')]
     public function testInvalidValues(string $value, array|string $encodings)
     {
         $this->validator->validate($value, new Charset(encodings: $encodings));
@@ -48,9 +44,7 @@ class CharsetValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider provideInvalidTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidTypes')]
     public function testNonStringValues(mixed $value)
     {
         $this->expectException(UnexpectedValueException::class);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php
index 39affe4..2b3c7d4 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php
@@ -74,9 +74,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);
@@ -90,11 +88,8 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase
         yield 'named arguments' => [new Choice(choices: ['foo', 'bar'])];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyConstraintsWithChoicesArrayDoctrineStyle
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyConstraintsWithChoicesArrayDoctrineStyle')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValidChoiceArrayDoctrineStyle(Choice $constraint)
     {
         $this->validator->validate('bar', $constraint);
@@ -108,9 +103,7 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase
         yield 'Doctrine default option' => [new Choice(['value' => ['foo', 'bar']])];
     }
 
-    /**
-     * @dataProvider provideConstraintsWithCallbackFunction
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideConstraintsWithCallbackFunction')]
     public function testValidChoiceCallbackFunction(Choice $constraint)
     {
         $this->validator->validate('bar', $constraint);
@@ -125,11 +118,8 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase
         yield 'named arguments, static method' => [new Choice(callback: [__CLASS__, 'staticCallback'])];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider provideLegacyConstraintsWithCallbackFunctionDoctrineStyle
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideLegacyConstraintsWithCallbackFunctionDoctrineStyle')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValidChoiceCallbackFunctionDoctrineStyle(Choice $constraint)
     {
         $this->validator->validate('bar', $constraint);
@@ -193,9 +183,7 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testMultipleChoicesDoctrineStyle()
     {
         $this->validator->validate(['baz', 'bar'], new Choice([
@@ -217,9 +205,7 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidChoiceDoctrineStyle()
     {
         $this->validator->validate('baz', new Choice(['choices' => ['foo', 'bar'], 'message' => 'myMessage']));
@@ -265,9 +251,7 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidChoiceMultipleDoctrineStyle()
     {
         $this->validator->validate(['foo', 'baz'], new Choice([
@@ -305,9 +289,7 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testTooFewChoicesDoctrineStyle()
     {
         $value = ['foo'];
@@ -350,9 +332,7 @@ class ChoiceValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testTooManyChoicesDoctrineStyle()
     {
         $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 2505910..25a3a82 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/CidrTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/CidrTest.php
@@ -65,9 +65,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(
@@ -81,9 +79,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 6dfdc49..b300427 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/CidrValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/CidrValidatorTest.php
@@ -55,9 +55,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());
@@ -68,9 +66,7 @@ class CidrValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getWithInvalidIps
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getWithInvalidIps')]
     public function testInvalidIpValue(string $cidr)
     {
         $this->validator->validate($cidr, new Cidr());
@@ -81,9 +77,7 @@ class CidrValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValid
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValid')]
     public function testValidCidr(string|\Stringable $cidr, string $version)
     {
         $this->validator->validate($cidr, new Cidr(version: $version));
@@ -91,9 +85,7 @@ class CidrValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getWithInvalidMasksAndIps
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getWithInvalidMasksAndIps')]
     public function testInvalidIpAddressAndNetmask(string|\Stringable $cidr)
     {
         $this->validator->validate($cidr, new Cidr());
@@ -103,9 +95,7 @@ class CidrValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getOutOfRangeNetmask
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getOutOfRangeNetmask')]
     public function testOutOfRangeNetmask(string $cidr, int $maxExpected, ?string $version = null, ?int $min = null, ?int $max = null)
     {
         $cidrConstraint = new Cidr(
@@ -123,9 +113,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 c1c32f9..286771c 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/CollectionTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/CollectionTest.php
@@ -26,9 +26,7 @@ use Symfony\Component\Validator\Exception\MissingOptionsException;
  */
 class CollectionTest extends TestCase
 {
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testRejectNonConstraints()
     {
         $this->expectException(InvalidOptionsException::class);
@@ -103,9 +101,7 @@ class CollectionTest extends TestCase
         $this->assertEquals(['Default'], $constraint->fields['bar']->groups);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testOnlySomeKeysAreKnowOptions()
     {
         $constraint = new Collection([
@@ -166,10 +162,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(
@@ -189,10 +183,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/CompoundTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CompoundTest.php
index 9b515a4..abfcf5d 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/CompoundTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/CompoundTest.php
@@ -19,9 +19,7 @@ use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
 
 class CompoundTest extends TestCase
 {
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testItCannotRedefineConstraintsOption()
     {
         $this->expectException(ConstraintDefinitionException::class);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CountValidatorTestCase.php b/src/Symfony/Component/Validator/Tests/Constraints/CountValidatorTestCase.php
index da319cd..47506c9 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/CountValidatorTestCase.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/CountValidatorTestCase.php
@@ -69,11 +69,8 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getThreeOrLessElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getThreeOrLessElements')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValidValuesMax($value)
     {
         $constraint = new Count(['max' => 3]);
@@ -82,9 +79,7 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getThreeOrLessElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getThreeOrLessElements')]
     public function testValidValuesMaxNamed($value)
     {
         $constraint = new Count(max: 3);
@@ -93,11 +88,8 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getFiveOrMoreElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFiveOrMoreElements')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValidValuesMin($value)
     {
         $constraint = new Count(['min' => 5]);
@@ -106,9 +98,7 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getFiveOrMoreElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFiveOrMoreElements')]
     public function testValidValuesMinNamed($value)
     {
         $constraint = new Count(min: 5);
@@ -117,11 +107,8 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getFourElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFourElements')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValidValuesExact($value)
     {
         $constraint = new Count(4);
@@ -130,9 +117,7 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getFourElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFourElements')]
     public function testValidValuesExactNamed($value)
     {
         $constraint = new Count(exactly: 4);
@@ -141,11 +126,8 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getFiveOrMoreElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFiveOrMoreElements')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testTooManyValues($value)
     {
         $constraint = new Count([
@@ -164,9 +146,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');
@@ -182,11 +162,8 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getThreeOrLessElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getThreeOrLessElements')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testTooFewValues($value)
     {
         $constraint = new Count([
@@ -205,9 +182,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');
@@ -223,11 +198,8 @@ abstract class CountValidatorTestCase extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getFiveOrMoreElements
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFiveOrMoreElements')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testTooManyValuesExact($value)
     {
         $constraint = new Count([
@@ -247,9 +219,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');
@@ -265,9 +235,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 d6fa0c3..5040c63 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(message: 'myMessage');
@@ -102,9 +98,7 @@ class CountryValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidAlpha3Countries
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidAlpha3Countries')]
     public function testValidAlpha3Countries($country)
     {
         $this->validator->validate($country, new Country(alpha3: true));
@@ -121,9 +115,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 bc1087c..460227c 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/CssColorValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/CssColorValidatorTest.php
@@ -44,18 +44,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'));
@@ -85,9 +81,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));
@@ -99,9 +93,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));
@@ -113,9 +105,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));
@@ -127,9 +117,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));
@@ -141,9 +129,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));
@@ -158,9 +144,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));
@@ -175,9 +159,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));
@@ -193,9 +175,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));
@@ -207,9 +187,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));
@@ -225,9 +203,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));
@@ -244,9 +220,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));
@@ -262,9 +236,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));
@@ -281,9 +253,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');
@@ -300,9 +270,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'));
@@ -318,9 +286,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([
@@ -341,9 +307,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         return [['fabpot'], ['ngrekas'], ['symfony'], ['FABPOT'], ['NGREKAS'], ['SYMFONY'], [new StringableValue('SYMFONY')]];
     }
 
-    /**
-     * @dataProvider getInvalidRGB
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidRGB')]
     public function testInvalidRGB($cssColor)
     {
         $this->validator->validate($cssColor, new CssColor([
@@ -364,9 +328,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([
@@ -392,9 +354,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidHSL
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidHSL')]
     public function testInvalidHSL($cssColor)
     {
         $this->validator->validate($cssColor, new CssColor([
@@ -415,9 +375,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([
@@ -444,9 +402,7 @@ final class CssColorValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @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 af4c20f..a345a4c 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(message: 'myMessage');
@@ -110,9 +104,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 383f062..6a37bfc 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/DateTimeValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/DateTimeValidatorTest.php
@@ -58,9 +58,7 @@ class DateTimeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidDateTimes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidDateTimes')]
     public function testValidDateTimes($format, $dateTime)
     {
         $constraint = new DateTime(format: $format);
@@ -81,9 +79,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 65909ef..fcc4562 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(message: 'myMessage');
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/DisableAutoMappingTest.php b/src/Symfony/Component/Validator/Tests/Constraints/DisableAutoMappingTest.php
index e7b6a8d..85a81e3 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/DisableAutoMappingTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/DisableAutoMappingTest.php
@@ -23,9 +23,7 @@ use Symfony\Component\Validator\Mapping\Loader\AttributeLoader;
  */
 class DisableAutoMappingTest extends TestCase
 {
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGroups()
     {
         $this->expectException(ConstraintDefinitionException::class);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/DivisibleByValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/DivisibleByValidatorTest.php
index be96ad2..66898b2 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/DivisibleByValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/DivisibleByValidatorTest.php
@@ -90,9 +90,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/EmailTest.php b/src/Symfony/Component/Validator/Tests/Constraints/EmailTest.php
index 9436b4b..2079750 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/EmailTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/EmailTest.php
@@ -54,9 +54,7 @@ class EmailTest extends TestCase
         $this->assertEquals('trim', $email->normalizer);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidNormalizerThrowsException()
     {
         $this->expectException(InvalidArgumentException::class);
@@ -64,9 +62,7 @@ class EmailTest extends TestCase
         new Email(['normalizer' => 'Unknown Callable']);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidNormalizerObjectThrowsException()
     {
         $this->expectException(InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php
index 483b534..bb1215e 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php
@@ -16,9 +16,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
 {
     protected function createValidator(): EmailValidator
@@ -60,9 +58,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());
@@ -70,9 +66,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());
@@ -92,9 +86,7 @@ class EmailValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidEmailsWithWhitespaces
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidEmailsWithWhitespaces')]
     public function testValidNormalizedEmails($email)
     {
         $this->validator->validate($email, new Email(normalizer: 'trim'));
@@ -110,9 +102,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));
@@ -130,9 +120,7 @@ class EmailValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidEmails
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidEmails')]
     public function testInvalidEmails($email)
     {
         $constraint = new Email(message: 'myMessage');
@@ -155,9 +143,7 @@ class EmailValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidHtml5Emails
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidHtml5Emails')]
     public function testInvalidHtml5Emails($email)
     {
         $constraint = new Email(
@@ -195,9 +181,7 @@ class EmailValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidAllowNoTldEmails
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidAllowNoTldEmails')]
     public function testInvalidAllowNoTldEmails($email)
     {
         $constraint = new Email(
@@ -265,9 +249,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/EnableAutoMappingTest.php b/src/Symfony/Component/Validator/Tests/Constraints/EnableAutoMappingTest.php
index 525a62e..fe49750 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/EnableAutoMappingTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/EnableAutoMappingTest.php
@@ -23,9 +23,7 @@ use Symfony\Component\Validator\Mapping\Loader\AttributeLoader;
  */
 class EnableAutoMappingTest extends TestCase
 {
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testGroups()
     {
         $this->expectException(ConstraintDefinitionException::class);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/ExpressionSyntaxTest.php b/src/Symfony/Component/Validator/Tests/Constraints/ExpressionSyntaxTest.php
index 8731a5d..f99ec90 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());
@@ -44,9 +42,7 @@ class ExpressionSyntaxTest extends TestCase
         yield 'attribute' => [$metadata->properties['b']->constraints[0]];
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValidatedByServiceDoctrineStyle()
     {
         $constraint = new ExpressionSyntax(['service' => 'my_service']);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/ExpressionTest.php b/src/Symfony/Component/Validator/Tests/Constraints/ExpressionTest.php
index 07abb07..773c243 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/ExpressionTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/ExpressionTest.php
@@ -51,9 +51,7 @@ class ExpressionTest extends TestCase
         new Expression(null);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testMissingPatternDoctrineStyle()
     {
         $this->expectException(MissingOptionsException::class);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/ExpressionValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/ExpressionValidatorTest.php
index 21c9eb6..2f6055e 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 3e03f78..9d196c5 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/FileTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/FileTest.php
@@ -20,9 +20,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);
@@ -41,9 +39,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();
@@ -53,9 +49,7 @@ class FileTest extends TestCase
         $this->assertSame($binaryFormat, $file->binaryFormat);
     }
 
-    /**
-     * @dataProvider provideInvalidSizes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidSizes')]
     public function testInvalidValueForMaxSizeThrowsExceptionAfterInitialization($maxSize)
     {
         $file = new File(maxSize: 1000);
@@ -65,9 +59,7 @@ class FileTest extends TestCase
         $file->maxSize = $maxSize;
     }
 
-    /**
-     * @dataProvider provideInvalidSizes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidSizes')]
     public function testMaxSizeCannotBeSetToInvalidValueAfterInitialization($maxSize)
     {
         $file = new File(maxSize: 1000);
@@ -105,9 +97,7 @@ class FileTest extends TestCase
         $file = new File(filenameCountUnit: 'nonExistentCountUnit');
     }
 
-    /**
-     * @dataProvider provideInValidSizes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInValidSizes')]
     public function testInvalidMaxSize($maxSize)
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -146,9 +136,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 b1ebf53..b2ef6ce 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);
@@ -258,9 +254,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);
@@ -375,9 +369,7 @@ abstract class FileValidatorTestCase extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidMimeTypeDoctrineStyle()
     {
         $file = $this
@@ -451,9 +443,7 @@ abstract class FileValidatorTestCase extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testDisallowEmptyDoctrineStyle()
     {
         ftruncate($this->file, 0);
@@ -469,9 +459,7 @@ abstract class FileValidatorTestCase extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @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);
@@ -544,9 +532,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;
@@ -573,9 +559,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;
@@ -672,9 +656,7 @@ abstract class FileValidatorTestCase extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider provideFilenameMaxLengthIsTooLong
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFilenameMaxLengthIsTooLong')]
     public function testFilenameMaxLengthIsTooLong(File $constraintFile, string $filename, string $messageViolation)
     {
         file_put_contents($this->path, '1');
@@ -718,9 +700,7 @@ abstract class FileValidatorTestCase extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider provideFilenameCountUnit
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFilenameCountUnit')]
     public function testValidCountUnitFilenameMaxLength(int $maxLength, string $countUnit)
     {
         file_put_contents($this->path, '1');
@@ -731,9 +711,7 @@ abstract class FileValidatorTestCase extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider provideFilenameCharset
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideFilenameCharset')]
     public function testFilenameCharset(string $filename, string $charset, bool $isValid)
     {
         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 47f1908..75738ec 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest.php
@@ -61,9 +61,7 @@ class GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest extends Abstra
         ];
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testThrowsConstraintExceptionIfPropertyPath()
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -72,9 +70,7 @@ class GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest extends Abstra
         return new PositiveOrZero(['propertyPath' => 'field']);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testThrowsConstraintExceptionIfValue()
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -83,37 +79,39 @@ class GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest extends Abstra
         return new PositiveOrZero(['value' => 0]);
     }
 
-    /**
-     * @dataProvider provideInvalidConstraintOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidConstraintOptions')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testThrowsConstraintExceptionIfNoValueOrPropertyPath($options)
     {
         $this->markTestSkipped('Value option always set for PositiveOrZero constraint');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testThrowsConstraintExceptionIfBothValueAndPropertyPath()
     {
         $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');
     }
 
-    /**
-     * @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');
     }
 
+    #[\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 6b58bff..c5a5faf 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorWithPositiveConstraintTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorWithPositiveConstraintTest.php
@@ -58,9 +58,7 @@ class GreaterThanValidatorWithPositiveConstraintTest extends AbstractComparisonV
         ];
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testThrowsConstraintExceptionIfPropertyPath()
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -69,9 +67,7 @@ class GreaterThanValidatorWithPositiveConstraintTest extends AbstractComparisonV
         return new Positive(['propertyPath' => 'field']);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testThrowsConstraintExceptionIfValue()
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -80,37 +76,39 @@ class GreaterThanValidatorWithPositiveConstraintTest extends AbstractComparisonV
         return new Positive(['value' => 0]);
     }
 
-    /**
-     * @dataProvider provideInvalidConstraintOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidConstraintOptions')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testThrowsConstraintExceptionIfNoValueOrPropertyPath($options)
     {
         $this->markTestSkipped('Value option always set for Positive constraint.');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testThrowsConstraintExceptionIfBothValueAndPropertyPath()
     {
         $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');
     }
 
-    /**
-     * @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');
     }
 
+    #[\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 2471fe0..dcf2481 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(message: 'myMessage'));
@@ -89,9 +83,7 @@ class HostnameValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getInvalidDomains
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidDomains')]
     public function testInvalidDomainsRaiseViolationIfTldNotRequired($domain)
     {
         $this->validator->validate($domain, new Hostname(
@@ -116,9 +108,7 @@ class HostnameValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getReservedDomains
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getReservedDomains')]
     public function testReservedDomainsPassValidationIfTldNotRequired($domain)
     {
         $this->validator->validate($domain, new Hostname(requireTld: false));
@@ -126,9 +116,7 @@ class HostnameValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getReservedDomains
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getReservedDomains')]
     public function testReservedDomainsRaiseViolationIfTldRequired($domain)
     {
         $this->validator->validate($domain, new Hostname(
@@ -169,9 +157,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));
@@ -179,9 +165,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 184924d..52555d1 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());
@@ -193,9 +189,7 @@ class IbanValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getIbansWithInvalidFormat
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getIbansWithInvalidFormat')]
     public function testIbansWithInvalidFormat($iban)
     {
         $this->assertViolationRaised($iban, Iban::INVALID_FORMAT_ERROR);
@@ -312,9 +306,7 @@ class IbanValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getIbansWithValidFormatButIncorrectChecksum
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getIbansWithValidFormatButIncorrectChecksum')]
     public function testIbansWithValidFormatButIncorrectChecksum($iban)
     {
         $this->assertViolationRaised($iban, Iban::CHECKSUM_FAILED_ERROR);
@@ -430,9 +422,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);
@@ -454,9 +444,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 7a7aa91..16152c8 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php
@@ -18,10 +18,9 @@ use Symfony\Component\Validator\Constraints\ImageValidator;
 use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
 
 /**
- * @requires extension fileinfo
- *
  * @extends ConstraintValidatorTestCase<ImageValidator>
  */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('fileinfo')]
 class ImageValidatorTest extends ConstraintValidatorTestCase
 {
     protected string $path;
@@ -87,9 +86,8 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
 
     /**
      * Checks that the logic from FileValidator still works.
-     *
-     * @group legacy
      */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testFileNotFoundDoctrineStyle()
     {
         $this->validator->validate('foobar', new Image([
@@ -127,9 +125,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testWidthTooSmallDoctrineStyle()
     {
         $this->validator->validate($this->image, new Image([
@@ -155,9 +151,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testWidthTooBigDoctrineStyle()
     {
         $this->validator->validate($this->image, new Image([
@@ -183,9 +177,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testHeightTooSmallDoctrineStyle()
     {
         $this->validator->validate($this->image, new Image([
@@ -211,9 +203,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testHeightTooBigDoctrineStyle()
     {
         $this->validator->validate($this->image, new Image([
@@ -241,9 +231,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testPixelsTooFewDoctrineStyle()
     {
         $this->validator->validate($this->image, new Image([
@@ -273,9 +261,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testPixelsTooManyDoctrineStyle()
     {
         $this->validator->validate($this->image, new Image([
@@ -303,9 +289,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testRatioTooSmallDoctrineStyle()
     {
         $this->validator->validate($this->image, new Image([
@@ -331,9 +315,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testRatioTooBigDoctrineStyle()
     {
         $this->validator->validate($this->image, new Image([
@@ -386,9 +368,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testSquareNotAllowedDoctrineStyle()
     {
         $this->validator->validate($this->image, new Image([
@@ -414,9 +394,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testLandscapeNotAllowedDoctrineStyle()
     {
         $this->validator->validate($this->imageLandscape, new Image([
@@ -442,9 +420,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testPortraitNotAllowedDoctrineStyle()
     {
         $this->validator->validate($this->imagePortrait, new Image([
@@ -478,9 +454,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testCorruptedDoctrineStyle()
     {
         if (!\function_exists('imagecreatefromstring')) {
@@ -534,9 +508,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidMimeTypeWithNarrowedSetDoctrineStyle()
     {
         $this->validator->validate($this->image, new Image([
@@ -555,7 +527,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /** @dataProvider provideSvgWithViolation */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSvgWithViolation')]
     public function testSvgWithViolation(string $image, Image $constraint, string $violation, array $parameters = [])
     {
         $this->validator->validate($image, $constraint);
@@ -655,7 +627,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /** @dataProvider provideSvgWithoutViolation */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideSvgWithoutViolation')]
     public function testSvgWithoutViolation(string $image, Image $constraint)
     {
         $this->validator->validate($image, $constraint);
@@ -691,9 +663,7 @@ class ImageValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider providerValidExtension
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('providerValidExtension')]
     public function testExtensionValid(string $name)
     {
         if (!class_exists(MimeTypes::class)) {
@@ -713,9 +683,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/IpTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IpTest.php
index 2d740ae..3fb3123 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/IpTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/IpTest.php
@@ -29,9 +29,7 @@ class IpTest extends TestCase
         $this->assertEquals('trim', $ip->normalizer);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidNormalizerThrowsException()
     {
         $this->expectException(InvalidArgumentException::class);
@@ -39,9 +37,7 @@ class IpTest extends TestCase
         new Ip(['normalizer' => 'Unknown Callable']);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidNormalizerObjectThrowsException()
     {
         $this->expectException(InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php
index e37d61b..f396534 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/IpValidatorTest.php
@@ -50,9 +50,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         new Ip(version: 666);
     }
 
-    /**
-     * @dataProvider getValidIpsV4
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidIpsV4')]
     public function testValidIpsV4($ip)
     {
         $this->validator->validate($ip, new Ip(version: Ip::V4));
@@ -74,9 +72,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidIpsV4WithWhitespaces
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidIpsV4WithWhitespaces')]
     public function testValidIpsV4WithWhitespaces($ip)
     {
         $this->validator->validate($ip, new Ip(
@@ -109,9 +105,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidIpsV6
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidIpsV6')]
     public function testValidIpsV6($ip)
     {
         $this->validator->validate($ip, new Ip(version: Ip::V6));
@@ -144,9 +138,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidIpsAll
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidIpsAll')]
     public function testValidIpsAll($ip)
     {
         $this->validator->validate($ip, new Ip(version: Ip::ALL));
@@ -159,9 +151,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(
@@ -177,9 +167,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidPublicIpsV4
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidPublicIpsV4')]
     public function testInvalidNoPublicIpsV4($ip)
     {
         $constraint = new Ip(
@@ -219,9 +207,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidPrivateIpsV4
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidPrivateIpsV4')]
     public function testValidPrivateIpsV4($ip)
     {
         $this->validator->validate($ip, new Ip(version: Ip::V4_ONLY_PRIVATE));
@@ -229,9 +215,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidPrivateIpsV4
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidPrivateIpsV4')]
     public function testInvalidPrivateIpsV4($ip)
     {
         $constraint = new Ip(
@@ -247,9 +231,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getInvalidPrivateIpsV4
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidPrivateIpsV4')]
     public function testInvalidOnlyPrivateIpsV4($ip)
     {
         $constraint = new Ip(
@@ -279,9 +261,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         return array_merge(self::getValidPublicIpsV4(), self::getValidReservedIpsV4());
     }
 
-    /**
-     * @dataProvider getValidReservedIpsV4
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidReservedIpsV4')]
     public function testValidReservedIpsV4($ip)
     {
         $this->validator->validate($ip, new Ip(version: Ip::V4_ONLY_RESERVED));
@@ -289,9 +269,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidReservedIpsV4
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidReservedIpsV4')]
     public function testInvalidReservedIpsV4($ip)
     {
         $constraint = new Ip(
@@ -307,9 +285,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getInvalidReservedIpsV4
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidReservedIpsV4')]
     public function testInvalidOnlyReservedIpsV4($ip)
     {
         $constraint = new Ip(
@@ -339,9 +315,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         return array_merge(self::getValidPublicIpsV4(), self::getValidPrivateIpsV4());
     }
 
-    /**
-     * @dataProvider getInvalidPublicIpsV4
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidPublicIpsV4')]
     public function testInvalidPublicIpsV4($ip)
     {
         $constraint = new Ip(
@@ -362,9 +336,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         return array_merge(self::getValidPrivateIpsV4(), self::getValidReservedIpsV4());
     }
 
-    /**
-     * @dataProvider getInvalidIpsV6
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidIpsV6')]
     public function testInvalidIpsV6($ip)
     {
         $constraint = new Ip(
@@ -399,9 +371,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidPrivateIpsV6
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidPrivateIpsV6')]
     public function testInvalidPrivateIpsV6($ip)
     {
         $constraint = new Ip(
@@ -426,9 +396,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidReservedIpsV6
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidReservedIpsV6')]
     public function testInvalidReservedIpsV6($ip)
     {
         $constraint = new Ip(
@@ -452,9 +420,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         return self::getInvalidIpsV6();
     }
 
-    /**
-     * @dataProvider getInvalidPublicIpsV6
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidPublicIpsV6')]
     public function testInvalidPublicIpsV6($ip)
     {
         $constraint = new Ip(
@@ -475,9 +441,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(
@@ -498,9 +462,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(
@@ -521,9 +483,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         return array_merge(self::getValidPrivateIpsV4(), self::getInvalidPrivateIpsV6());
     }
 
-    /**
-     * @dataProvider getInvalidReservedIpsAll
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidReservedIpsAll')]
     public function testInvalidReservedIpsAll($ip)
     {
         $constraint = new Ip(
@@ -544,9 +504,7 @@ class IpValidatorTest extends ConstraintValidatorTestCase
         return array_merge(self::getValidReservedIpsV4(), 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 c6e2ccef..e615794 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/IsFalseValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/IsFalseValidatorTest.php
@@ -46,9 +46,7 @@ class IsFalseValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testTrueIsInvalidDoctrineStyle()
     {
         $constraint = new IsFalse([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IsNullValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IsNullValidatorTest.php
index ed6beff..b4ce1e3 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(message: 'myMessage');
@@ -44,9 +42,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 4a9eb77..83ace80 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/IsTrueValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/IsTrueValidatorTest.php
@@ -46,9 +46,7 @@ class IsTrueValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testFalseIsInvalidDoctrineStyle()
     {
         $this->validator->validate(false, new IsTrue([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php
index 3ae3864..20aaa0b 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(type: 'isbn10');
@@ -157,11 +155,8 @@ class IsbnValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getInvalidIsbn10
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidIsbn10')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidIsbn10($isbn, $code)
     {
         $constraint = new Isbn([
@@ -190,9 +185,7 @@ class IsbnValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidIsbn13
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidIsbn13')]
     public function testValidIsbn13($isbn)
     {
         $constraint = new Isbn(type: 'isbn13');
@@ -202,11 +195,8 @@ class IsbnValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getInvalidIsbn13
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidIsbn13')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidIsbn13($isbn, $code)
     {
         $constraint = new Isbn([
@@ -222,9 +212,7 @@ class IsbnValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getInvalidIsbn13
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidIsbn13')]
     public function testInvalidIsbn13Named($isbn, $code)
     {
         $constraint = new Isbn(
@@ -240,9 +228,7 @@ class IsbnValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidIsbn
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidIsbn')]
     public function testValidIsbnAny($isbn)
     {
         $constraint = new Isbn();
@@ -252,9 +238,7 @@ class IsbnValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getInvalidIsbn10
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidIsbn10')]
     public function testInvalidIsbnAnyIsbn10($isbn, $code)
     {
         $constraint = new Isbn(bothIsbnMessage: 'myMessage');
@@ -272,9 +256,7 @@ class IsbnValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getInvalidIsbn13
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidIsbn13')]
     public function testInvalidIsbnAnyIsbn13($isbn, $code)
     {
         $constraint = new Isbn(bothIsbnMessage: 'myMessage');
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/IsinValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/IsinValidatorTest.php
index b1ac3be..36ead61 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 6351ab6..3f5fe9d 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(message: 'myMessage');
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/JsonValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/JsonValidatorTest.php
index 123cb95..dfee46f 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(message: 'myMessageTest');
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php
index 9522fba..633ac44 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(message: 'myMessage');
@@ -101,9 +97,7 @@ class LanguageValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidAlpha3Languages
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidAlpha3Languages')]
     public function testValidAlpha3Languages($language)
     {
         $this->validator->validate($language, new Language(alpha3: true));
@@ -120,9 +114,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/LengthTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LengthTest.php
index 6e292cb..b51f51c 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/LengthTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/LengthTest.php
@@ -33,9 +33,7 @@ class LengthTest extends TestCase
         $this->assertEquals('trim', $length->normalizer);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidNormalizerThrowsException()
     {
         $this->expectException(InvalidArgumentException::class);
@@ -43,9 +41,7 @@ class LengthTest extends TestCase
         new Length(['min' => 0, 'max' => 10, 'normalizer' => 'Unknown Callable']);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidNormalizerObjectThrowsException()
     {
         $this->expectException(InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LengthValidatorTest.php
index 10f61f5..b30ad7b 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(int|string $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(int|string $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(int|string $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(int|string $value, int $valueLength)
     {
         $constraint = new Length(
@@ -203,9 +193,7 @@ class LengthValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getThreeOrLessCharacters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getThreeOrLessCharacters')]
     public function testInvalidValuesMinNamed(int|string $value, int $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(int|string $value, int $valueLength)
     {
         $constraint = new Length(
@@ -244,9 +230,7 @@ class LengthValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getFiveOrMoreCharacters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getFiveOrMoreCharacters')]
     public function testInvalidValuesMaxNamed(int|string $value, int $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(int|string $value, int $valueLength)
     {
         $constraint = new Length(
@@ -286,9 +268,7 @@ class LengthValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getThreeOrLessCharacters
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getThreeOrLessCharacters')]
     public function testInvalidValuesExactLessThanFourNamed(int|string $value, int $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(int|string $value, int $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 685bb58..924785a 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest.php
@@ -59,9 +59,7 @@ class LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest extends AbstractC
         ];
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testThrowsConstraintExceptionIfPropertyPath()
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -70,9 +68,7 @@ class LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest extends AbstractC
         return new NegativeOrZero(['propertyPath' => 'field']);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testThrowsConstraintExceptionIfValue()
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -81,37 +77,39 @@ class LessThanOrEqualValidatorWithNegativeOrZeroConstraintTest extends AbstractC
         return new NegativeOrZero(['value' => 0]);
     }
 
-    /**
-     * @dataProvider provideInvalidConstraintOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidConstraintOptions')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testThrowsConstraintExceptionIfNoValueOrPropertyPath($options)
     {
         $this->markTestSkipped('Value option always set for NegativeOrZero constraint');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testThrowsConstraintExceptionIfBothValueAndPropertyPath()
     {
         $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');
     }
 
-    /**
-     * @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');
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorWithNegativeConstraintTest.php b/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorWithNegativeConstraintTest.php
index 5174a95..fadf7fc 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorWithNegativeConstraintTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorWithNegativeConstraintTest.php
@@ -58,9 +58,7 @@ class LessThanValidatorWithNegativeConstraintTest extends AbstractComparisonVali
         ];
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testThrowsConstraintExceptionIfPropertyPath()
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -69,9 +67,7 @@ class LessThanValidatorWithNegativeConstraintTest extends AbstractComparisonVali
         return new Negative(['propertyPath' => 'field']);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testThrowsConstraintExceptionIfValue()
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -80,37 +76,39 @@ class LessThanValidatorWithNegativeConstraintTest extends AbstractComparisonVali
         return new Negative(['value' => 0]);
     }
 
-    /**
-     * @dataProvider provideInvalidConstraintOptions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidConstraintOptions')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testThrowsConstraintExceptionIfNoValueOrPropertyPath($options)
     {
         $this->markTestSkipped('Value option always set for Negative constraint');
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testThrowsConstraintExceptionIfBothValueAndPropertyPath()
     {
         $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');
     }
 
-    /**
-     * @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');
     }
 
+    #[\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 3b38195..da9c362 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(message: 'myMessage');
@@ -102,9 +98,7 @@ class LocaleValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getUncanonicalizedLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getUncanonicalizedLocales')]
     public function testValidLocalesWithCanonicalization(string $locale)
     {
         $constraint = new Locale(message: 'myMessage');
@@ -114,9 +108,7 @@ class LocaleValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidLocales
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocales')]
     public function testValidLocalesWithoutCanonicalization(string $locale)
     {
         $constraint = new Locale(
@@ -129,9 +121,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 9eb33bd..4f4b260 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(message: 'myMessage');
@@ -97,9 +93,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/MacAddressValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/MacAddressValidatorTest.php
index 5abb748..e121167 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/MacAddressValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/MacAddressValidatorTest.php
@@ -53,9 +53,7 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
         new MacAddress(type: 666);
     }
 
-    /**
-     * @dataProvider getValidMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidMacs')]
     public function testValidMac($mac)
     {
         $this->validator->validate($mac, new MacAddress());
@@ -63,9 +61,7 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getNotValidMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNotValidMacs')]
     public function testNotValidMac($mac)
     {
         $this->validator->validate($mac, new MacAddress());
@@ -153,12 +149,10 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidLocalUnicastMacs
-     * @dataProvider getValidLocalMulticastMacs
-     * @dataProvider getValidUniversalUnicastMacs
-     * @dataProvider getValidUniversalMulticastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalUnicastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalMulticastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalUnicastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalMulticastMacs')]
     public function testValidAllNoBroadcastMacs($mac)
     {
         $this->validator->validate($mac, new MacAddress(type: MacAddress::ALL_NO_BROADCAST));
@@ -166,9 +160,7 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidBroadcastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidBroadcastMacs')]
     public function testInvalidAllNoBroadcastMacs($mac)
     {
         $constraint = new MacAddress('myMessage', type: MacAddress::ALL_NO_BROADCAST);
@@ -181,11 +173,9 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidLocalUnicastMacs
-     * @dataProvider getValidLocalMulticastMacs
-     * @dataProvider getValidBroadcastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalUnicastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalMulticastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidBroadcastMacs')]
     public function testValidLocalMacs($mac)
     {
         $this->validator->validate($mac, new MacAddress(type: MacAddress::LOCAL_ALL));
@@ -193,10 +183,8 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidUniversalUnicastMacs
-     * @dataProvider getValidUniversalMulticastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalUnicastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalMulticastMacs')]
     public function testInvalidLocalMacs($mac)
     {
         $constraint = new MacAddress('myMessage', type: MacAddress::LOCAL_ALL);
@@ -209,10 +197,8 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidLocalUnicastMacs
-     * @dataProvider getValidLocalMulticastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalUnicastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalMulticastMacs')]
     public function testValidLocalNoBroadcastMacs($mac)
     {
         $this->validator->validate($mac, new MacAddress(type: MacAddress::LOCAL_NO_BROADCAST));
@@ -220,11 +206,9 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidUniversalUnicastMacs
-     * @dataProvider getValidUniversalMulticastMacs
-     * @dataProvider getValidBroadcastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalUnicastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalMulticastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidBroadcastMacs')]
     public function testInvalidLocalNoBroadcastMacs($mac)
     {
         $constraint = new MacAddress('myMessage', type: MacAddress::LOCAL_NO_BROADCAST);
@@ -237,9 +221,7 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidLocalUnicastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalUnicastMacs')]
     public function testValidLocalUnicastMacs($mac)
     {
         $this->validator->validate($mac, new MacAddress(type: MacAddress::LOCAL_UNICAST));
@@ -247,11 +229,9 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidLocalMulticastMacs
-     * @dataProvider getValidUniversalUnicastMacs
-     * @dataProvider getValidUniversalMulticastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalMulticastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalUnicastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalMulticastMacs')]
     public function testInvalidLocalUnicastMacs($mac)
     {
         $constraint = new MacAddress('myMessage', type: MacAddress::LOCAL_UNICAST);
@@ -264,10 +244,8 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidLocalMulticastMacs
-     * @dataProvider getValidBroadcastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalMulticastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidBroadcastMacs')]
     public function testValidLocalMulticastMacs($mac)
     {
         $this->validator->validate($mac, new MacAddress(type: MacAddress::LOCAL_MULTICAST));
@@ -275,11 +253,9 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidLocalUnicastMacs
-     * @dataProvider getValidUniversalUnicastMacs
-     * @dataProvider getValidUniversalMulticastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalUnicastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalUnicastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalMulticastMacs')]
     public function testInvalidLocalMulticastMacs($mac)
     {
         $constraint = new MacAddress('myMessage', type: MacAddress::LOCAL_MULTICAST);
@@ -292,9 +268,7 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidLocalMulticastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalMulticastMacs')]
     public function testValidLocalMulticastNoBroadcastMacs($mac)
     {
         $this->validator->validate($mac, new MacAddress(type: MacAddress::LOCAL_MULTICAST_NO_BROADCAST));
@@ -302,12 +276,10 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidLocalUnicastMacs
-     * @dataProvider getValidUniversalUnicastMacs
-     * @dataProvider getValidUniversalMulticastMacs
-     * @dataProvider getValidBroadcastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalUnicastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalUnicastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalMulticastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidBroadcastMacs')]
     public function testInvalidLocalMulticastNoBroadcastMacs($mac)
     {
         $constraint = new MacAddress('myMessage', type: MacAddress::LOCAL_MULTICAST_NO_BROADCAST);
@@ -320,10 +292,8 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidUniversalUnicastMacs
-     * @dataProvider getValidUniversalMulticastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalUnicastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalMulticastMacs')]
     public function testValidUniversalMacs($mac)
     {
         $this->validator->validate($mac, new MacAddress(type: MacAddress::UNIVERSAL_ALL));
@@ -331,10 +301,8 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidLocalUnicastMacs
-     * @dataProvider getValidLocalMulticastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalUnicastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalMulticastMacs')]
     public function testInvalidUniversalMacs($mac)
     {
         $constraint = new MacAddress('myMessage', type: MacAddress::UNIVERSAL_ALL);
@@ -347,9 +315,7 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidUniversalUnicastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalUnicastMacs')]
     public function testValidUniversalUnicastMacs($mac)
     {
         $this->validator->validate($mac, new MacAddress(type: MacAddress::UNIVERSAL_UNICAST));
@@ -357,11 +323,9 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidLocalUnicastMacs
-     * @dataProvider getValidLocalMulticastMacs
-     * @dataProvider getValidUniversalMulticastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalUnicastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalMulticastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalMulticastMacs')]
     public function testInvalidUniversalUnicastMacs($mac)
     {
         $constraint = new MacAddress('myMessage', type: MacAddress::UNIVERSAL_UNICAST);
@@ -374,9 +338,7 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidUniversalMulticastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalMulticastMacs')]
     public function testValidUniversalMulticastMacs($mac)
     {
         $this->validator->validate($mac, new MacAddress(type: MacAddress::UNIVERSAL_MULTICAST));
@@ -384,11 +346,9 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidLocalUnicastMacs
-     * @dataProvider getValidLocalMulticastMacs
-     * @dataProvider getValidUniversalUnicastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalUnicastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalMulticastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalUnicastMacs')]
     public function testInvalidUniversalMulticastMacs($mac)
     {
         $constraint = new MacAddress('myMessage', type: MacAddress::UNIVERSAL_MULTICAST);
@@ -401,10 +361,8 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidLocalUnicastMacs
-     * @dataProvider getValidUniversalUnicastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalUnicastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalUnicastMacs')]
     public function testUnicastMacs($mac)
     {
         $this->validator->validate($mac, new MacAddress(type: MacAddress::UNICAST_ALL));
@@ -412,10 +370,8 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidLocalMulticastMacs
-     * @dataProvider getValidUniversalMulticastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalMulticastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalMulticastMacs')]
     public function testInvalidUnicastMacs($mac)
     {
         $constraint = new MacAddress('myMessage', type: MacAddress::UNICAST_ALL);
@@ -428,11 +384,9 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidLocalMulticastMacs
-     * @dataProvider getValidUniversalMulticastMacs
-     * @dataProvider getValidBroadcastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalMulticastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalMulticastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidBroadcastMacs')]
     public function testMulticastMacs($mac)
     {
         $this->validator->validate($mac, new MacAddress(type: MacAddress::MULTICAST_ALL));
@@ -440,10 +394,8 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidLocalUnicastMacs
-     * @dataProvider getValidUniversalUnicastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalUnicastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalUnicastMacs')]
     public function testInvalidMulticastMacs($mac)
     {
         $constraint = new MacAddress('myMessage', type: MacAddress::MULTICAST_ALL);
@@ -456,10 +408,8 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidLocalMulticastMacs
-     * @dataProvider getValidUniversalMulticastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalMulticastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalMulticastMacs')]
     public function testMulticastNoBroadcastMacs($mac)
     {
         $this->validator->validate($mac, new MacAddress(type: MacAddress::MULTICAST_NO_BROADCAST));
@@ -467,11 +417,9 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidLocalUnicastMacs
-     * @dataProvider getValidUniversalUnicastMacs
-     * @dataProvider getValidBroadcastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalUnicastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalUnicastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidBroadcastMacs')]
     public function testInvalidMulticastNoBroadcastMacs($mac)
     {
         $constraint = new MacAddress('myMessage', type: MacAddress::MULTICAST_NO_BROADCAST);
@@ -484,9 +432,7 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidBroadcastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidBroadcastMacs')]
     public function testBroadcastMacs($mac)
     {
         $this->validator->validate($mac, new MacAddress(type: MacAddress::BROADCAST));
@@ -494,12 +440,10 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getValidLocalUnicastMacs
-     * @dataProvider getValidLocalMulticastMacs
-     * @dataProvider getValidUniversalUnicastMacs
-     * @dataProvider getValidUniversalMulticastMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalUnicastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidLocalMulticastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalUnicastMacs')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUniversalMulticastMacs')]
     public function testInvalidBroadcastMacs($mac)
     {
         $constraint = new MacAddress('myMessage', type: MacAddress::BROADCAST);
@@ -512,9 +456,7 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidMacsWithWhitespaces
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidMacsWithWhitespaces')]
     public function testValidMacsWithWhitespaces($mac)
     {
         $this->validator->validate($mac, new MacAddress(normalizer: 'trim'));
@@ -534,9 +476,7 @@ class MacAddressValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidMacs
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidMacs')]
     public function testInvalidMacs($mac)
     {
         $constraint = new MacAddress('myMessage');
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/NoSuspiciousCharactersValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/NoSuspiciousCharactersValidatorTest.php
index c38a431..25eba62 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/NotBlankTest.php b/src/Symfony/Component/Validator/Tests/Constraints/NotBlankTest.php
index d04a65f..2cb15fe 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/NotBlankTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/NotBlankTest.php
@@ -45,9 +45,7 @@ class NotBlankTest extends TestCase
         self::assertSame('myMessage', $bConstraint->message);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidNormalizerThrowsException()
     {
         $this->expectException(InvalidArgumentException::class);
@@ -55,9 +53,7 @@ class NotBlankTest extends TestCase
         new NotBlank(['normalizer' => 'Unknown Callable']);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidNormalizerObjectThrowsException()
     {
         $this->expectException(InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/NotBlankValidatorTest.php
index 42d5f3a..24c9feb 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());
@@ -117,9 +115,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 11c325d..698d0bd 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/NotCompromisedPasswordValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/NotCompromisedPasswordValidatorTest.php
@@ -102,9 +102,7 @@ class NotCompromisedPasswordValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testThresholdNotReachedDoctrineStyle()
     {
         $this->validator->validate(self::PASSWORD_LEAKED, new NotCompromisedPassword(['threshold' => 10]));
@@ -216,9 +214,7 @@ class NotCompromisedPasswordValidatorTest extends ConstraintValidatorTestCase
         $this->validator->validate(self::PASSWORD_TRIGGERING_AN_ERROR, new NotCompromisedPassword(skipOnError: true));
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testApiErrorSkippedDoctrineStyle()
     {
         $this->expectNotToPerformAssertions();
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/NotNullValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/NotNullValidatorTest.php
index fec2ec1..e19c80d 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());
@@ -52,9 +50,7 @@ class NotNullValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testNullIsInvalidDoctrineStyle()
     {
         $this->validator->validate(null, new NotNull([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/PasswordStrengthValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/PasswordStrengthValidatorTest.php
index fb063f4..255f761 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/PasswordStrengthValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/PasswordStrengthValidatorTest.php
@@ -23,9 +23,7 @@ class PasswordStrengthValidatorTest extends ConstraintValidatorTestCase
         return new PasswordStrengthValidator();
     }
 
-    /**
-     * @dataProvider getValidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValues')]
     public function testValidValues(string|\Stringable $value, int $expectedStrength)
     {
         $this->validator->validate($value, new PasswordStrength(minScore: $expectedStrength));
@@ -53,9 +51,7 @@ class PasswordStrengthValidatorTest extends ConstraintValidatorTestCase
         yield [new StringableValue('How-is-this'), PasswordStrength::STRENGTH_WEAK];
     }
 
-    /**
-     * @dataProvider provideInvalidConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidConstraints')]
     public function testThePasswordIsWeak(PasswordStrength $constraint, string $password, string $expectedMessage, string $expectedCode, string $strength)
     {
         $this->validator->validate($password, $constraint);
@@ -93,9 +89,7 @@ class PasswordStrengthValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getPasswordValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPasswordValues')]
     public function testStrengthEstimator(string $password, int $expectedStrength)
     {
         self::assertSame($expectedStrength, PasswordStrengthValidator::estimateStrength((string) $password));
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/PasswordStrengthValidatorWithClosureTest.php b/src/Symfony/Component/Validator/Tests/Constraints/PasswordStrengthValidatorWithClosureTest.php
index 3d24e8c..dcaeb51 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/PasswordStrengthValidatorWithClosureTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/PasswordStrengthValidatorWithClosureTest.php
@@ -33,9 +33,7 @@ class PasswordStrengthValidatorWithClosureTest extends ConstraintValidatorTestCa
         });
     }
 
-    /**
-     * @dataProvider getValidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValues')]
     public function testValidValues(string|\Stringable $value, int $expectedStrength)
     {
         $this->validator->validate($value, new PasswordStrength(minScore: $expectedStrength));
@@ -62,9 +60,7 @@ class PasswordStrengthValidatorWithClosureTest extends ConstraintValidatorTestCa
         yield [new StringableValue('HeloW0rld'), PasswordStrength::STRENGTH_WEAK];
     }
 
-    /**
-     * @dataProvider provideInvalidConstraints
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidConstraints')]
     public function testThePasswordIsWeak(PasswordStrength $constraint, string $password, string $expectedMessage, string $expectedCode, string $strength)
     {
         $this->validator->validate($password, $constraint);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php b/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php
index 01481e8..7fef7d0 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/RangeTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\Validator\Exception\MissingOptionsException;
 
 class RangeTest extends TestCase
 {
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testThrowsConstraintExceptionIfBothMinLimitAndPropertyPath()
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -38,9 +36,7 @@ class RangeTest extends TestCase
         new Range(min: 'min', minPropertyPath: 'minPropertyPath');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testThrowsConstraintExceptionIfBothMaxLimitAndPropertyPath()
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -92,9 +88,7 @@ class RangeTest extends TestCase
         new Range(min: 'min', max: 'max', maxMessage: 'maxMessage');
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testThrowsConstraintDefinitionExceptionIfBothMinAndMaxAndMinMessageAndMaxMessageOptions()
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -107,9 +101,7 @@ class RangeTest extends TestCase
         ]);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testThrowsConstraintDefinitionExceptionIfBothMinAndMaxAndMinMessageOptions()
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -121,9 +113,7 @@ class RangeTest extends TestCase
         ]);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testThrowsConstraintDefinitionExceptionIfBothMinAndMaxAndMaxMessageOptions()
     {
         $this->expectException(ConstraintDefinitionException::class);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php
index 22fc77c..3b4bafa 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php
@@ -69,11 +69,8 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getTenToTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenToTwenty')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValidValuesMin($value)
     {
         $constraint = new Range(['min' => 10]);
@@ -82,9 +79,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getTenToTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenToTwenty')]
     public function testValidValuesMinNamed($value)
     {
         $constraint = new Range(min: 10);
@@ -93,11 +88,8 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getTenToTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenToTwenty')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValidValuesMax($value)
     {
         $constraint = new Range(['max' => 20]);
@@ -106,9 +98,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getTenToTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenToTwenty')]
     public function testValidValuesMaxNamed($value)
     {
         $constraint = new Range(max: 20);
@@ -117,11 +107,8 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getTenToTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenToTwenty')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValidValuesMinMax($value)
     {
         $constraint = new Range(['min' => 10, 'max' => 20]);
@@ -130,9 +117,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);
@@ -141,11 +126,8 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getLessThanTen
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLessThanTen')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidValuesMin($value, $formattedValue)
     {
         $constraint = new Range([
@@ -162,9 +144,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');
@@ -178,11 +158,8 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getMoreThanTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getMoreThanTwenty')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidValuesMax($value, $formattedValue)
     {
         $constraint = new Range([
@@ -199,9 +176,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');
@@ -215,11 +190,8 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getMoreThanTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getMoreThanTwenty')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidValuesCombinedMax($value, $formattedValue)
     {
         $constraint = new Range([
@@ -238,9 +210,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');
@@ -255,11 +225,8 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getLessThanTen
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLessThanTen')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidValuesCombinedMin($value, $formattedValue)
     {
         $constraint = new Range([
@@ -278,9 +245,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');
@@ -354,9 +319,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');
@@ -365,9 +328,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');
@@ -376,9 +337,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');
@@ -387,9 +346,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
@@ -410,9 +367,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
@@ -433,9 +388,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
@@ -458,9 +411,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
@@ -597,9 +548,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testThrowsOnInvalidStringDates($expectedMessage, $value, $min, $max)
     {
         $this->expectException(ConstraintDefinitionException::class);
@@ -634,11 +583,8 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getTenToTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenToTwenty')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValidValuesMinPropertyPath($value)
     {
         $this->setObject(new Limit(10));
@@ -650,9 +596,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getTenToTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenToTwenty')]
     public function testValidValuesMinPropertyPathNamed($value)
     {
         $this->setObject(new Limit(10));
@@ -662,9 +606,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getTenToTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenToTwenty')]
     public function testValidValuesMaxPropertyPath($value)
     {
         $this->setObject(new Limit(20));
@@ -676,9 +618,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getTenToTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenToTwenty')]
     public function testValidValuesMaxPropertyPathNamed($value)
     {
         $this->setObject(new Limit(20));
@@ -688,9 +628,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getTenToTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenToTwenty')]
     public function testValidValuesMinMaxPropertyPath($value)
     {
         $this->setObject(new MinMax(10, 20));
@@ -703,9 +641,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getLessThanTen
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLessThanTen')]
     public function testInvalidValuesMinPropertyPath($value, $formattedValue)
     {
         $this->setObject(new Limit(10));
@@ -725,9 +661,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getMoreThanTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getMoreThanTwenty')]
     public function testInvalidValuesMaxPropertyPath($value, $formattedValue)
     {
         $this->setObject(new Limit(20));
@@ -747,11 +681,8 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getMoreThanTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getMoreThanTwenty')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidValuesCombinedMaxPropertyPath($value, $formattedValue)
     {
         $this->setObject(new MinMax(10, 20));
@@ -774,9 +705,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getMoreThanTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getMoreThanTwenty')]
     public function testInvalidValuesCombinedMaxPropertyPathNamed($value, $formattedValue)
     {
         $this->setObject(new MinMax(10, 20));
@@ -799,11 +728,8 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getLessThanTen
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLessThanTen')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidValuesCombinedMinPropertyPath($value, $formattedValue)
     {
         $this->setObject(new MinMax(10, 20));
@@ -826,9 +752,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getLessThanTen
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLessThanTen')]
     public function testInvalidValuesCombinedMinPropertyPathNamed($value, $formattedValue)
     {
         $this->setObject(new MinMax(10, 20));
@@ -851,9 +775,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getLessThanTen
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getLessThanTen')]
     public function testViolationOnNullObjectWithDefinedMin($value, $formattedValue)
     {
         $this->setObject(null);
@@ -872,9 +794,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getMoreThanTwenty
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getMoreThanTwenty')]
     public function testViolationOnNullObjectWithDefinedMax($value, $formattedValue)
     {
         $this->setObject(null);
@@ -893,9 +813,7 @@ class RangeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getTenthToTwentiethMarch2014
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTenthToTwentiethMarch2014')]
     public function testValidDatesMinPropertyPath($value)
     {
         $this->setObject(new Limit('March 10, 2014'));
@@ -905,9 +823,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'));
@@ -918,9 +834,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'));
@@ -931,9 +845,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
@@ -957,9 +869,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
@@ -983,9 +893,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
@@ -1012,9 +920,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
@@ -1083,9 +989,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 853e0d7..3077559 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(
@@ -97,9 +95,7 @@ class RegexTest extends TestCase
         $this->assertEquals('trim', $regex->normalizer);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidNormalizerThrowsException()
     {
         $this->expectException(InvalidArgumentException::class);
@@ -107,9 +103,7 @@ class RegexTest extends TestCase
         new Regex(['pattern' => '/^[0-9]+$/', 'normalizer' => 'Unknown Callable']);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidNormalizerObjectThrowsException()
     {
         $this->expectException(InvalidArgumentException::class);
@@ -148,9 +142,7 @@ class RegexTest extends TestCase
         new Regex(null);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testMissingPatternDoctrineStyle()
     {
         $this->expectException(MissingOptionsException::class);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/RegexValidatorTest.php
index bafc752..eb8b356 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,11 +52,8 @@ class RegexValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getValidValuesWithWhitespaces
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValuesWithWhitespaces')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testValidValuesWithWhitespaces($value)
     {
         $constraint = new Regex(['pattern' => '/^[0-9]+$/', 'normalizer' => 'trim']);
@@ -67,9 +62,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');
@@ -106,11 +99,8 @@ class RegexValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @group legacy
-     *
-     * @dataProvider getInvalidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidValues')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidValues($value)
     {
         $constraint = new Regex([
@@ -127,9 +117,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 7c1a9fe..d536024 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(withSeconds: false));
@@ -92,9 +86,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));
@@ -114,9 +106,7 @@ class TimeValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidTimesWithoutSeconds
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidTimesWithoutSeconds')]
     public function testInvalidTimesWithoutSeconds(string $time)
     {
         $this->validator->validate($time, $constraint = new Time());
@@ -136,9 +126,7 @@ class TimeValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidTimes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidTimes')]
     public function testInvalidTimes($time, $code)
     {
         $constraint = new Time(message: 'myMessage');
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/TimezoneTest.php b/src/Symfony/Component/Validator/Tests/Constraints/TimezoneTest.php
index 41fed23..ec946ba 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 7ed4d79..037dfcc 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(zone: $zone);
@@ -118,9 +114,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(message: 'myMessage');
@@ -141,9 +135,7 @@ class TimezoneValidatorTest extends ConstraintValidatorTestCase
         yield ['foobar'];
     }
 
-    /**
-     * @dataProvider getInvalidGroupedTimezones
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidGroupedTimezones')]
     public function testInvalidGroupedTimezones(string $timezone, int $zone)
     {
         $constraint = new Timezone(
@@ -184,9 +176,7 @@ class TimezoneValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getValidGroupedTimezonesByCountry
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidGroupedTimezonesByCountry')]
     public function testValidGroupedTimezonesByCountry(string $timezone, string $country)
     {
         $constraint = new Timezone(
@@ -221,9 +211,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(
@@ -265,9 +253,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
@@ -282,9 +268,7 @@ class TimezoneValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getDeprecatedTimezones
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDeprecatedTimezones')]
     public function testDeprecatedTimezonesAreInvalidWithoutBC(string $timezone)
     {
         $constraint = new Timezone(message: 'myMessage');
@@ -315,9 +299,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 8e9e1aa..68e9034 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);
@@ -118,9 +116,7 @@ class TypeValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidValues')]
     public function testInvalidValues($value, $type, $valueAsString)
     {
         $constraint = new Type(
@@ -190,9 +186,7 @@ class TypeValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidValuesMultipleTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValuesMultipleTypes')]
     public function testValidValuesMultipleTypes($value, array $types)
     {
         $constraint = new Type(type: $types);
@@ -221,9 +215,7 @@ class TypeValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidValuesMultipleTypesDoctrineStyle()
     {
         $this->validator->validate('12345', new Type([
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/UlidValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/UlidValidatorTest.php
index 172ace1..e2d833a 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/UlidValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/UlidValidatorTest.php
@@ -67,9 +67,7 @@ class UlidValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getInvalidUlids
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidUlids')]
     public function testInvalidUlid(string $ulid, string $code)
     {
         $constraint = new Ulid(message: 'testMessage');
@@ -96,9 +94,7 @@ class UlidValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidBase58Ulids
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidBase58Ulids')]
     public function testInvalidBase58Ulid(string $ulid, string $code)
     {
         $constraint = new Ulid(message: 'testMessage', format: Ulid::FORMAT_BASE_58);
@@ -124,9 +120,7 @@ class UlidValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidRfc4122Ulids
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidRfc4122Ulids')]
     public function testInvalidInvalid4122Ulid(string $ulid, string $code)
     {
         $constraint = new Ulid(message: 'testMessage', format: Ulid::FORMAT_RFC_4122);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/UniqueTest.php b/src/Symfony/Component/Validator/Tests/Constraints/UniqueTest.php
index 9fe2599..3c1f6f4 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/UniqueTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/UniqueTest.php
@@ -37,9 +37,7 @@ class UniqueTest extends TestCase
         self::assertSame('intval', $dConstraint->normalizer);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidNormalizerThrowsException()
     {
         $this->expectException(InvalidArgumentException::class);
@@ -47,9 +45,7 @@ class UniqueTest extends TestCase
         new Unique(['normalizer' => 'Unknown Callable']);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidNormalizerObjectThrowsException()
     {
         $this->expectException(InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/UniqueValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/UniqueValidatorTest.php
index 12efb76..7f7a63d 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(message: 'myMessage');
@@ -97,9 +93,7 @@ class UniqueValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getCallback
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getCallback')]
     public function testExpectsUniqueObjects($callback)
     {
         $object1 = new \stdClass();
@@ -121,9 +115,7 @@ class UniqueValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getCallback
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getCallback')]
     public function testExpectsNonUniqueObjects($callback)
     {
         $object1 = new \stdClass();
@@ -215,9 +207,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);
@@ -235,9 +225,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/UrlTest.php b/src/Symfony/Component/Validator/Tests/Constraints/UrlTest.php
index cbc9bc1..2b75f75 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/UrlTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/UrlTest.php
@@ -29,9 +29,7 @@ class UrlTest extends TestCase
         $this->assertEquals('trim', $url->normalizer);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidNormalizerThrowsException()
     {
         $this->expectException(InvalidArgumentException::class);
@@ -39,9 +37,7 @@ class UrlTest extends TestCase
         new Url(['normalizer' => 'Unknown Callable', 'requireTld' => true]);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidNormalizerObjectThrowsException()
     {
         $this->expectException(InvalidArgumentException::class);
@@ -80,9 +76,7 @@ class UrlTest extends TestCase
         self::assertTrue($dConstraint->requireTld);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testRequireTldDefaultsToFalse()
     {
         $constraint = new Url();
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php
index 5eaca71..2d248d4 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(requireTld: true));
     }
 
-    /**
-     * @dataProvider getValidUrls
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidUrls')]
     public function testValidUrls($url)
     {
         $this->validator->validate($url, new Url(requireTld: false));
@@ -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(requireTld: false));
@@ -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(
@@ -86,10 +80,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(
@@ -102,10 +94,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(relativeProtocol: true, requireTld: false);
@@ -226,9 +216,7 @@ class UrlValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidUrls
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidUrls')]
     public function testInvalidUrls($url)
     {
         $constraint = new Url(
@@ -244,10 +232,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(
@@ -328,9 +314,7 @@ class UrlValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidCustomUrls
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidCustomUrls')]
     public function testCustomProtocolIsValid($url, $requireTld)
     {
         $constraint = new Url(
@@ -352,9 +336,7 @@ class UrlValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getUrlsForRequiredTld
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getUrlsForRequiredTld')]
     public function testRequiredTld(string $url, bool $requireTld, bool $isValid)
     {
         $constraint = new Url(requireTld: $requireTld);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/UuidTest.php b/src/Symfony/Component/Validator/Tests/Constraints/UuidTest.php
index 22901a9..2e87235 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/UuidTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/UuidTest.php
@@ -29,9 +29,7 @@ class UuidTest extends TestCase
         $this->assertEquals('trim', $uuid->normalizer);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidNormalizerThrowsException()
     {
         $this->expectException(InvalidArgumentException::class);
@@ -39,9 +37,7 @@ class UuidTest extends TestCase
         new Uuid(['normalizer' => 'Unknown Callable']);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testInvalidNormalizerObjectThrowsException()
     {
         $this->expectException(InvalidArgumentException::class);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php
index 84edc66..036e6d6 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/UuidValidatorTest.php
@@ -57,9 +57,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();
@@ -88,9 +86,7 @@ class UuidValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidStrictUuidsWithWhitespaces
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidStrictUuidsWithWhitespaces')]
     public function testValidStrictUuidsWithWhitespaces($uuid, $versions = null)
     {
         $constraint = new Uuid(normalizer: 'trim');
@@ -126,9 +122,7 @@ class UuidValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getInvalidStrictUuids
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidStrictUuids')]
     public function testInvalidStrictUuids($uuid, $code, $versions = null)
     {
         $constraint = new Uuid(message: 'testMessage');
@@ -188,9 +182,7 @@ class UuidValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getValidNonStrictUuids
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidNonStrictUuids')]
     public function testValidNonStrictUuids($uuid)
     {
         $constraint = new Uuid(strict: false);
@@ -217,9 +209,7 @@ class UuidValidatorTest extends ConstraintValidatorTestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidNonStrictUuids
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidNonStrictUuids')]
     public function testInvalidNonStrictUuids($uuid, $code)
     {
         $constraint = new Uuid(
@@ -261,9 +251,7 @@ class UuidValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider getUuidForTimeBasedAssertions
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getUuidForTimeBasedAssertions')]
     public function testTimeBasedUuid(string $uid, bool $expectedTimeBased)
     {
         $constraint = new Uuid(versions: Uuid::TIME_BASED_VERSIONS);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/WeekValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/WeekValidatorTest.php
index 0a5f093..e84782f 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/WeekValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/WeekValidatorTest.php
@@ -24,9 +24,7 @@ class WeekValidatorTest extends ConstraintValidatorTestCase
         return new WeekValidator();
     }
 
-    /**
-     * @dataProvider provideWeekNumber
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideWeekNumber')]
     public function testWeekIsValidWeekNumber(string|\Stringable $value, bool $expectedViolation)
     {
         $constraint = new Week();
@@ -96,9 +94,7 @@ class WeekValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider provideInvalidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidValues')]
     public function testInvalidValues(string $value)
     {
         $this->validator->validate($value, new Week());
@@ -108,9 +104,7 @@ class WeekValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider provideInvalidTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidTypes')]
     public function testNonStringValues(mixed $value)
     {
         $this->expectException(UnexpectedValueException::class);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/WhenTest.php b/src/Symfony/Component/Validator/Tests/Constraints/WhenTest.php
index 6f82c64..f6900b3 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/WhenTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/WhenTest.php
@@ -26,9 +26,7 @@ use Symfony\Component\Validator\Tests\Constraints\Fixtures\WhenTestWithClosure;
 
 final class WhenTest extends TestCase
 {
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
     public function testMissingOptionsExceptionIsThrown()
     {
         $this->expectException(MissingOptionsException::class);
@@ -121,9 +119,7 @@ final class WhenTest extends TestCase
         self::assertSame(['foo'], $quuxConstraint->groups);
     }
 
-    /**
-     * @requires PHP 8.5
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.5')]
     public function testAttributesWithClosure()
     {
         $loader = new AttributeLoader();
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/WhenValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/WhenValidatorTest.php
index 35d8b8c..a12bfa4 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/WhenValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/WhenValidatorTest.php
@@ -121,6 +121,7 @@ final class WhenValidatorTest extends ConstraintValidatorTestCase
         ));
     }
 
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testConstraintsAreExecutedWithObject()
     {
         $number = new \stdClass();
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/WordCountTest.php b/src/Symfony/Component/Validator/Tests/Constraints/WordCountTest.php
index 50ed808..dd20a9d 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/WordCountTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/WordCountTest.php
@@ -18,9 +18,7 @@ use Symfony\Component\Validator\Exception\MissingOptionsException;
 use Symfony\Component\Validator\Mapping\ClassMetadata;
 use Symfony\Component\Validator\Mapping\Loader\AttributeLoader;
 
-/**
- * @requires extension intl
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
 class WordCountTest extends TestCase
 {
     public function testLocaleIsSet()
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/WordCountValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/WordCountValidatorTest.php
index ce1256f..726f7fc 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/WordCountValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/WordCountValidatorTest.php
@@ -17,9 +17,7 @@ use Symfony\Component\Validator\Exception\UnexpectedValueException;
 use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
 use Symfony\Component\Validator\Tests\Constraints\Fixtures\StringableValue;
 
-/**
- * @requires extension intl
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
 class WordCountValidatorTest extends ConstraintValidatorTestCase
 {
     protected function createValidator(): WordCountValidator
@@ -27,9 +25,7 @@ class WordCountValidatorTest extends ConstraintValidatorTestCase
         return new WordCountValidator();
     }
 
-    /**
-     * @dataProvider provideValidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideValidValues')]
     public function testValidWordCount(string|\Stringable|null $value, int $expectedWordCount)
     {
         $this->validator->validate($value, new WordCount(min: $expectedWordCount, max: $expectedWordCount));
@@ -63,9 +59,7 @@ class WordCountValidatorTest extends ConstraintValidatorTestCase
             ->assertRaised();
     }
 
-    /**
-     * @dataProvider provideInvalidTypes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidTypes')]
     public function testNonStringValues(mixed $value)
     {
         $this->expectException(UnexpectedValueException::class);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/YamlValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/YamlValidatorTest.php
index a318926..fff3a2e 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/YamlValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/YamlValidatorTest.php
@@ -26,9 +26,7 @@ class YamlValidatorTest extends ConstraintValidatorTestCase
         return new YamlValidator();
     }
 
-    /**
-     * @dataProvider getValidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getValidValues')]
     public function testYamlIsValid($value)
     {
         $this->validator->validate($value, new Yaml());
@@ -42,9 +40,7 @@ class YamlValidatorTest extends ConstraintValidatorTestCase
         $this->assertNoViolation();
     }
 
-    /**
-     * @dataProvider getInvalidValues
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidValues')]
     public function testInvalidValues($value, $message, $line)
     {
         $constraint = new Yaml(
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/PropertyInfoLoaderTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Loader/PropertyInfoLoaderTest.php
index 8c06cd9..34b465e 100644
--- a/src/Symfony/Component/Validator/Tests/Mapping/Loader/PropertyInfoLoaderTest.php
+++ b/src/Symfony/Component/Validator/Tests/Mapping/Loader/PropertyInfoLoaderTest.php
@@ -36,9 +36,7 @@ use Symfony\Component\Validator\Validation;
  */
 class PropertyInfoLoaderTest extends TestCase
 {
-    /**
-     * @group nophpunit11
-     */
+    #[\PHPUnit\Framework\Attributes\Group('nophpunit11')]
     public function testLoadClassMetadata()
     {
         $propertyListExtractor = $this->createMock(PropertyListExtractorInterface::class);
@@ -227,9 +225,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)
     {
         $propertyListExtractor = $this->createMock(PropertyListExtractorInterface::class);
diff --git a/src/Symfony/Component/Validator/Tests/Mapping/Loader/XmlFileLoaderTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Loader/XmlFileLoaderTest.php
index 08a4bb8..1ead02f 100644
--- a/src/Symfony/Component/Validator/Tests/Mapping/Loader/XmlFileLoaderTest.php
+++ b/src/Symfony/Component/Validator/Tests/Mapping/Loader/XmlFileLoaderTest.php
@@ -176,9 +176,8 @@ class XmlFileLoaderTest extends TestCase
         }
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadConstraintWithoutNamedArgumentsSupport()
     {
         $loader = new XmlFileLoader(__DIR__.'/constraint-without-named-arguments-support.xml');
diff --git a/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php
index c3bbcb1..b2240ec 100644
--- a/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php
+++ b/src/Symfony/Component/Validator/Tests/Mapping/Loader/YamlFileLoaderTest.php
@@ -49,9 +49,7 @@ class YamlFileLoaderTest extends TestCase
         $this->assertSame([], $r->getValue($loader));
     }
 
-    /**
-     * @dataProvider provideInvalidYamlFiles
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideInvalidYamlFiles')]
     public function testInvalidYamlFiles($path)
     {
         $loader = new YamlFileLoader(__DIR__.'/'.$path);
@@ -192,9 +190,8 @@ class YamlFileLoaderTest extends TestCase
         $this->assertEquals($expected, $metadata);
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testLoadConstraintWithoutNamedArgumentsSupport()
     {
         $loader = new YamlFileLoader(__DIR__.'/constraint-without-named-arguments-support.yml');
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 1ae14ba..f58cbf6 100644
--- a/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidatorTest.php
@@ -541,9 +541,7 @@ class RecursiveValidatorTest extends TestCase
         $this->validate($entity);
     }
 
-    /**
-     * @dataProvider getConstraintMethods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConstraintMethods')]
     public function testArrayReference($constraintMethod)
     {
         $entity = new Entity();
@@ -582,9 +580,7 @@ class RecursiveValidatorTest extends TestCase
         $this->assertNull($violations[0]->getCode());
     }
 
-    /**
-     * @dataProvider getConstraintMethods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConstraintMethods')]
     public function testRecursiveArrayReference($constraintMethod)
     {
         $entity = new Entity();
@@ -647,9 +643,7 @@ class RecursiveValidatorTest extends TestCase
         $this->assertCount(0, $violations);
     }
 
-    /**
-     * @dataProvider getConstraintMethods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConstraintMethods')]
     public function testArrayTraversalCannotBeDisabled($constraintMethod)
     {
         $entity = new Entity();
@@ -670,9 +664,7 @@ class RecursiveValidatorTest extends TestCase
         $this->assertCount(1, $violations);
     }
 
-    /**
-     * @dataProvider getConstraintMethods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConstraintMethods')]
     public function testRecursiveArrayTraversalCannotBeDisabled($constraintMethod)
     {
         $entity = new Entity();
@@ -694,9 +686,7 @@ class RecursiveValidatorTest extends TestCase
         $this->assertCount(1, $violations);
     }
 
-    /**
-     * @dataProvider getConstraintMethods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConstraintMethods')]
     public function testIgnoreScalarsDuringArrayTraversal($constraintMethod)
     {
         $entity = new Entity();
@@ -710,9 +700,7 @@ class RecursiveValidatorTest extends TestCase
         $this->assertCount(0, $violations);
     }
 
-    /**
-     * @dataProvider getConstraintMethods
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getConstraintMethods')]
     public function testIgnoreNullDuringArrayTraversal($constraintMethod)
     {
         $entity = new Entity();
@@ -1228,9 +1216,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/VarDumper/Test/VarDumperTestTrait.php b/src/Symfony/Component/VarDumper/Test/VarDumperTestTrait.php
index e29121a..20b4d11 100644
--- a/src/Symfony/Component/VarDumper/Test/VarDumperTestTrait.php
+++ b/src/Symfony/Component/VarDumper/Test/VarDumperTestTrait.php
@@ -36,9 +36,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/AddressInfoCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/AddressInfoCasterTest.php
index 1a95ab7..315d05c 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/AddressInfoCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/AddressInfoCasterTest.php
@@ -14,9 +14,7 @@ namespace Symfony\Component\VarDumper\Tests\Caster;
 use PHPUnit\Framework\TestCase;
 use Symfony\Component\VarDumper\Test\VarDumperTestTrait;
 
-/**
- * @requires extension sockets
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('sockets')]
 class AddressInfoCasterTest extends TestCase
 {
     use VarDumperTestTrait;
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/CurlCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/CurlCasterTest.php
index a30e00a..c3d7d1a 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/CurlCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/CurlCasterTest.php
@@ -14,16 +14,12 @@ namespace Symfony\Component\VarDumper\Tests\Caster;
 use PHPUnit\Framework\TestCase;
 use Symfony\Component\VarDumper\Test\VarDumperTestTrait;
 
-/**
- * @requires extension curl
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('curl')]
 class CurlCasterTest extends TestCase
 {
     use VarDumperTestTrait;
 
-    /**
-     * @group network
-     */
+    #[\PHPUnit\Framework\Attributes\Group('network')]
     public function testCastCurl()
     {
         $ch = curl_init('http://example.com');
diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/DOMCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/DOMCasterTest.php
index 84c8789..cccab6b 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/DOMCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/DOMCasterTest.php
@@ -32,9 +32,7 @@ class DOMCasterTest extends TestCase
         );
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testCastModernImplementation()
     {
         $implementation = new \Dom\Implementation();
@@ -64,9 +62,7 @@ class DOMCasterTest extends TestCase
         );
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testCastModernNode()
     {
         $doc = \Dom\XMLDocument::createFromString('<foo><bar/></foo>');
@@ -100,9 +96,7 @@ class DOMCasterTest extends TestCase
         );
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testCastXMLDocument()
     {
         $doc = \Dom\XMLDocument::createFromString('<foo><bar/></foo>');
@@ -121,9 +115,7 @@ class DOMCasterTest extends TestCase
         );
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testCastHTMLDocument()
     {
         $doc = \Dom\HTMLDocument::createFromString('<!DOCTYPE html><html><body><p>foo</p></body></html>');
@@ -150,9 +142,7 @@ class DOMCasterTest extends TestCase
         );
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testCastModernText()
     {
         $text = \Dom\HTMLDocument::createEmpty()->createTextNode('foo');
@@ -178,9 +168,7 @@ class DOMCasterTest extends TestCase
         );
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testCastModernAttr()
     {
         $attr = \Dom\HTMLDocument::createEmpty()->createAttribute('attr');
@@ -207,9 +195,7 @@ class DOMCasterTest extends TestCase
         );
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testCastModernElement()
     {
         $attr = \Dom\HTMLDocument::createEmpty()->createElement('foo');
@@ -239,9 +225,7 @@ class DOMCasterTest extends TestCase
         );
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testCastModernDocumentType()
     {
         $implementation = new \Dom\Implementation();
@@ -269,9 +253,7 @@ class DOMCasterTest extends TestCase
         );
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testCastModernProcessingInstruction()
     {
         $entity = \Dom\HTMLDocument::createEmpty()->createProcessingInstruction('target', 'data');
@@ -299,9 +281,7 @@ class DOMCasterTest extends TestCase
         );
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testCastModernXPath()
     {
         $entity = new \Dom\XPath(\Dom\HTMLDocument::createEmpty());
diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php
index 9b895ed..68ffd1f 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php
@@ -37,9 +37,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));
@@ -53,9 +51,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));
@@ -69,9 +65,7 @@ EODUMP;
         $this->assertDumpEquals($xDump, $date);
     }
 
-    /**
-     * @dataProvider provideDateTimes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDateTimes')]
     public function testCastDateTime($time, $timezone, $xDate, $xTimestamp, $xInfos)
     {
         $stub = new Stub();
@@ -118,9 +112,7 @@ EODUMP;
         ];
     }
 
-    /**
-     * @dataProvider provideNoTimezoneDateTimes
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNoTimezoneDateTimes')]
     public function testCastDateTimeNoTimezone($time, $xDate, $xInfos)
     {
         date_default_timezone_set('UTC');
@@ -200,9 +192,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);
@@ -216,9 +206,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);
@@ -232,9 +220,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);
@@ -303,9 +289,7 @@ EODUMP;
         ];
     }
 
-    /**
-     * @dataProvider provideTimeZones
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTimeZones')]
     public function testDumpTimeZone($timezone, $expected)
     {
         $timezone = new \DateTimeZone($timezone);
@@ -319,9 +303,7 @@ EODUMP;
         $this->assertDumpMatchesFormat($xDump, $timezone);
     }
 
-    /**
-     * @dataProvider provideTimeZones
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideTimeZones')]
     public function testDumpTimeZoneExcludingVerbosity($timezone, $expected)
     {
         $timezone = new \DateTimeZone($timezone);
@@ -335,9 +317,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);
@@ -396,9 +376,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);
@@ -412,9 +390,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 5bf357d..ef17522 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/OpenSSLCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/OpenSSLCasterTest.php
index 188228b..a61192f 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/OpenSSLCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/OpenSSLCasterTest.php
@@ -14,9 +14,7 @@ namespace Symfony\Component\VarDumper\Tests\Caster;
 use PHPUnit\Framework\TestCase;
 use Symfony\Component\VarDumper\Test\VarDumperTestTrait;
 
-/**
- * @requires extension openssl
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('openssl')]
 class OpenSSLCasterTest 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 83dad9e..6f368a1 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php
@@ -404,9 +404,7 @@ EOTXT
         );
     }
 
-    /**
-     * @requires PHP 8.2
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.2')]
     public function testNullReturnType()
     {
         $className = Php82NullStandaloneReturnType::class;
@@ -460,9 +458,7 @@ EOTXT
         );
     }
 
-    /**
-     * @requires PHP < 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.4')]
     public function testGeneratorPriorTo84()
     {
         if (\extension_loaded('xdebug')) {
@@ -535,9 +531,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/ResourceCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/ResourceCasterTest.php
index 946db1d..88eaebf 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/ResourceCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/ResourceCasterTest.php
@@ -22,11 +22,9 @@ class ResourceCasterTest extends TestCase
     use ExpectUserDeprecationMessageTrait;
     use VarDumperTestTrait;
 
-    /**
-     * @group legacy
-     *
-     * @requires extension curl
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('curl')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCastCurlIsDeprecated()
     {
         $ch = curl_init('http://example.com');
@@ -38,11 +36,9 @@ class ResourceCasterTest extends TestCase
         ResourceCaster::castCurl($ch, [], new Stub(), false);
     }
 
-    /**
-     * @group legacy
-     *
-     * @requires extension gd
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('gd')]
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testCastGdIsDeprecated()
     {
         $gd = imagecreate(1, 1);
@@ -52,10 +48,8 @@ class ResourceCasterTest extends TestCase
         ResourceCaster::castGd($gd, [], new Stub(), false);
     }
 
-    /**
-     * @requires PHP < 8.4
-     * @requires extension dba
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.4')]
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('dba')]
     public function testCastDbaPriorToPhp84()
     {
         $dba = dba_open(sys_get_temp_dir().'/test.db', 'c');
@@ -68,10 +62,8 @@ dba resource {
 EODUMP, $dba);
     }
 
-    /**
-     * @requires PHP 8.4.2
-     * @requires extension dba
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4.2')]
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('dba')]
     public function testCastDba()
     {
         $dba = dba_open(sys_get_temp_dir().'/test.db', 'c');
@@ -84,10 +76,8 @@ Dba\Connection {
 EODUMP, $dba);
     }
 
-    /**
-     * @requires PHP 8.4
-     * @requires extension dba
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('dba')]
     public function testCastDbaOnBuggyPhp84()
     {
         if (\PHP_VERSION_ID >= 80402) {
diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/SocketCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/SocketCasterTest.php
index 741a9dd..dfa0416 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/SocketCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/SocketCasterTest.php
@@ -14,16 +14,12 @@ namespace Symfony\Component\VarDumper\Tests\Caster;
 use PHPUnit\Framework\TestCase;
 use Symfony\Component\VarDumper\Test\VarDumperTestTrait;
 
-/**
- * @requires extension sockets
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('sockets')]
 class SocketCasterTest extends TestCase
 {
     use VarDumperTestTrait;
 
-    /**
-     * @requires PHP 8.3
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.3')]
     public function testCastSocket()
     {
         $socket = socket_create(\AF_INET, \SOCK_DGRAM, \SOL_UDP);
@@ -39,9 +35,7 @@ Socket {
 EODUMP, $socket);
     }
 
-    /**
-     * @requires PHP < 8.3
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.3')]
     public function testCastSocketPriorToPhp83()
     {
         $socket = socket_create(\AF_INET, \SOCK_DGRAM, \SOL_UDP);
@@ -56,9 +50,7 @@ Socket {
 EODUMP, $socket);
     }
 
-    /**
-     * @requires PHP 8.3
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.3')]
     public function testCastSocketIpV6()
     {
         $socket = socket_create(\AF_INET6, \SOCK_STREAM, \SOL_TCP);
@@ -75,9 +67,7 @@ Socket {
 EODUMP, $socket);
     }
 
-    /**
-     * @requires PHP < 8.3
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.3')]
     public function testCastSocketIpV6PriorToPhp83()
     {
         $socket = socket_create(\AF_INET6, \SOCK_STREAM, \SOL_TCP);
@@ -93,9 +83,7 @@ Socket {
 EODUMP, $socket);
     }
 
-    /**
-     * @requires PHP 8.3
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.3')]
     public function testCastUnixSocket()
     {
         $socket = socket_create(\AF_UNIX, \SOCK_STREAM, 0);
@@ -112,9 +100,7 @@ Socket {
 EODUMP, $socket);
     }
 
-    /**
-     * @requires PHP < 8.3
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.3')]
     public function testCastUnixSocketPriorToPhp83()
     {
         $socket = socket_create(\AF_UNIX, \SOCK_STREAM, 0);
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/SqliteCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/SqliteCasterTest.php
index d616d2f..196acd6 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/SqliteCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/SqliteCasterTest.php
@@ -14,9 +14,7 @@ namespace Symfony\Component\VarDumper\Tests\Caster;
 use PHPUnit\Framework\TestCase;
 use Symfony\Component\VarDumper\Test\VarDumperTestTrait;
 
-/**
- * @requires extension sqlite3
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhpExtension('sqlite3')]
 class SqliteCasterTest extends TestCase
 {
     use VarDumperTestTrait;
diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/StubCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/StubCasterTest.php
index 1f76900..9f27690 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/StubCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/StubCasterTest.php
@@ -103,9 +103,7 @@ EODUMP;
         $this->assertDumpMatchesFormat($expectedDump, $args);
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testVirtualPropertyStub()
     {
         $class = new \ReflectionClass(VirtualProperty::class);
@@ -120,9 +118,7 @@ EODUMP;
         $this->assertDumpMatchesFormat($expectedDump, $args);
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testVirtualPropertyWithoutTypeStub()
     {
         $class = new \ReflectionClass(VirtualProperty::class);
diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php
index 67feddb..20fb84e 100644
--- a/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Caster/XmlReaderCasterTest.php
@@ -34,9 +34,7 @@ class XmlReaderCasterTest extends TestCase
         $this->reader->close();
     }
 
-    /**
-     * @requires PHP < 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.4')]
     public function testParserPropertyPriorToPhp84()
     {
         $this->reader->setParserProperty(\XMLReader::SUBST_ENTITIES, true);
@@ -55,9 +53,7 @@ EODUMP;
         $this->assertDumpMatchesFormat($expectedDump, $this->reader);
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testParserProperty()
     {
         $this->reader->setParserProperty(\XMLReader::SUBST_ENTITIES, true);
@@ -81,10 +77,10 @@ EODUMP;
      * This test only work before PHP 8.4. In PHP 8.4, XMLReader properties are virtual
      * and their values are not dumped.
      *
-     * @requires PHP < 8.4
      *
-     * @dataProvider provideNodes
      */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.4')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideNodes')]
     public function testNodes($seek, $expectedDump)
     {
         while ($seek--) {
@@ -275,9 +271,7 @@ EODUMP
         ];
     }
 
-    /**
-     * @requires PHP < 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.4')]
     public function testWithUninitializedXMLReaderPriorToPhp84()
     {
         $this->reader = new \XMLReader();
@@ -292,9 +286,7 @@ EODUMP;
         $this->assertDumpMatchesFormat($expectedDump, $this->reader);
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testWithUninitializedXMLReader()
     {
         $this->reader = new \XMLReader();
diff --git a/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php b/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php
index f33e13b..40f35e1 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 14b5380..2e98e5a 100644
--- a/src/Symfony/Component/VarDumper/Tests/Dumper/CliDumperTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Dumper/CliDumperTest.php
@@ -118,9 +118,7 @@ EOTXT
         );
     }
 
-    /**
-     * @dataProvider provideDumpWithCommaFlagTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideDumpWithCommaFlagTests')]
     public function testDumpWithCommaFlag($expected, $flags)
     {
         $dumper = new CliDumper(null, null, $flags);
@@ -305,9 +303,7 @@ EOTXT
         putenv('DUMP_STRING_LENGTH=');
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testVirtualProperties()
     {
         $this->assertDumpEquals(<<<EODUMP
@@ -452,9 +448,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 c5a2e4e..976c9ff 100644
--- a/src/Symfony/Component/VarDumper/Tests/Dumper/HtmlDumperTest.php
+++ b/src/Symfony/Component/VarDumper/Tests/Dumper/HtmlDumperTest.php
@@ -118,9 +118,7 @@ EOTXT
         );
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testVirtualProperties()
     {
         $dumper = new HtmlDumper('php://output');
@@ -191,9 +189,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/LazyProxyTraitTest.php b/src/Symfony/Component/VarExporter/Tests/LazyProxyTraitTest.php
index 9e0ab51..592831e 100644
--- a/src/Symfony/Component/VarExporter/Tests/LazyProxyTraitTest.php
+++ b/src/Symfony/Component/VarExporter/Tests/LazyProxyTraitTest.php
@@ -31,9 +31,7 @@ use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\TestUnserializeClass;
 use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\TestWakeupClass;
 use Symfony\Component\VarExporter\Tests\Fixtures\SimpleObject;
 
-/**
- * @requires PHP 8.4
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
 class LazyProxyTraitTest extends TestCase
 {
     public function testGetter()
@@ -292,9 +290,7 @@ class LazyProxyTraitTest extends TestCase
         $this->assertSame(234, $object->foo);
     }
 
-    /**
-     * @requires PHP 8.3
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.3')]
     public function testReinitReadonlyLazyProxy()
     {
         $object = $this->createLazyProxy(ReadOnlyClass::class, fn () => new ConcreteReadOnlyClass(123));
@@ -306,9 +302,7 @@ class LazyProxyTraitTest extends TestCase
         $this->assertSame(234, $object->foo);
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testConcretePropertyHooks()
     {
         $initialized = false;
@@ -335,9 +329,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;
@@ -369,9 +361,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/LegacyLazyGhostTraitTest.php b/src/Symfony/Component/VarExporter/Tests/LegacyLazyGhostTraitTest.php
index 2060e35..aa2ef30 100644
--- a/src/Symfony/Component/VarExporter/Tests/LegacyLazyGhostTraitTest.php
+++ b/src/Symfony/Component/VarExporter/Tests/LegacyLazyGhostTraitTest.php
@@ -29,9 +29,7 @@ use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\Hooked;
 use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\HookedWithDefaultValue;
 use Symfony\Component\VarExporter\Tests\Fixtures\SimpleObject;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class LegacyLazyGhostTraitTest extends TestCase
 {
     public function testGetPublic()
@@ -139,9 +137,7 @@ class LegacyLazyGhostTraitTest extends TestCase
         $this->assertTrue($clone->isLazyObjectInitialized());
     }
 
-    /**
-     * @dataProvider provideMagicClass
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideMagicClass')]
     public function testMagicClass(MagicClass $instance)
     {
         $this->assertSame('bar', $instance->foo);
@@ -241,9 +237,7 @@ class LegacyLazyGhostTraitTest 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));
@@ -297,9 +291,7 @@ class LegacyLazyGhostTraitTest extends TestCase
         $this->assertSame(3, $object->public);
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testPropertyHooks()
     {
         $initialized = false;
@@ -322,9 +314,7 @@ class LegacyLazyGhostTraitTest extends TestCase
         $this->assertSame(345, $object->backed);
     }
 
-    /**
-     * @requires PHP 8.4
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
     public function testPropertyHooksWithDefaultValue()
     {
         $initialized = false;
@@ -350,9 +340,7 @@ class LegacyLazyGhostTraitTest 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/LegacyLazyProxyTraitTest.php b/src/Symfony/Component/VarExporter/Tests/LegacyLazyProxyTraitTest.php
index 383b08f..02121ba 100644
--- a/src/Symfony/Component/VarExporter/Tests/LegacyLazyProxyTraitTest.php
+++ b/src/Symfony/Component/VarExporter/Tests/LegacyLazyProxyTraitTest.php
@@ -16,11 +16,8 @@ use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\FinalPublicClass;
 use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\TestClass;
 use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\TestOverwritePropClass;
 
-/**
- * @requires PHP < 8.4
- *
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.4')]
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class LegacyLazyProxyTraitTest extends LazyProxyTraitTest
 {
     public function testLazyDecoratorClass()
diff --git a/src/Symfony/Component/VarExporter/Tests/LegacyProxyHelperTest.php b/src/Symfony/Component/VarExporter/Tests/LegacyProxyHelperTest.php
index 71c46c4..63a944a 100644
--- a/src/Symfony/Component/VarExporter/Tests/LegacyProxyHelperTest.php
+++ b/src/Symfony/Component/VarExporter/Tests/LegacyProxyHelperTest.php
@@ -16,11 +16,8 @@ use Symfony\Component\VarExporter\ProxyHelper;
 use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\Php82NullStandaloneReturnType;
 use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\StringMagicGetClass;
 
-/**
- * @requires PHP < 8.4
- *
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhp('< 8.4')]
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class LegacyProxyHelperTest extends ProxyHelperTest
 {
     public function testGenerateLazyProxy()
diff --git a/src/Symfony/Component/VarExporter/Tests/ProxyHelperTest.php b/src/Symfony/Component/VarExporter/Tests/ProxyHelperTest.php
index ab396bc..7eacdb6 100644
--- a/src/Symfony/Component/VarExporter/Tests/ProxyHelperTest.php
+++ b/src/Symfony/Component/VarExporter/Tests/ProxyHelperTest.php
@@ -16,14 +16,10 @@ use Symfony\Component\VarExporter\ProxyHelper;
 use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\Hooked;
 use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\Php82NullStandaloneReturnType;
 
-/**
- * @requires PHP 8.4
- */
+#[\PHPUnit\Framework\Attributes\RequiresPhp('8.4')]
 class ProxyHelperTest extends TestCase
 {
-    /**
-     * @dataProvider provideExportSignature
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('provideExportSignature')]
     public function testExportSignature(string $expected, \ReflectionMethod $method)
     {
         $this->assertSame($expected, ProxyHelper::exportSignature($method));
@@ -208,9 +204,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)));
@@ -282,9 +276,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 ebabffd..17becfa 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 226bc3a..d37a3a9f 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 eadf2ac..4e5a5fa 100644
--- a/src/Symfony/Component/Webhook/Test/AbstractRequestParserTestCase.php
+++ b/src/Symfony/Component/Webhook/Test/AbstractRequestParserTestCase.php
@@ -22,10 +22,8 @@ use Symfony\Component\Webhook\Client\RequestParserInterface;
  */
 abstract class AbstractRequestParserTestCase extends TestCase
 {
-    /**
-     * @dataProvider getPayloads
-     */
     #[DataProvider('getPayloads')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getPayloads')]
     public function testParse(string $payload, RemoteEvent|array $expected)
     {
         $request = $this->createRequest($payload);
diff --git a/src/Symfony/Component/Webhook/Tests/Controller/WebhookControllerTest.php b/src/Symfony/Component/Webhook/Tests/Controller/WebhookControllerTest.php
index 1a3d519..20ba036 100644
--- a/src/Symfony/Component/Webhook/Tests/Controller/WebhookControllerTest.php
+++ b/src/Symfony/Component/Webhook/Tests/Controller/WebhookControllerTest.php
@@ -32,9 +32,7 @@ class WebhookControllerTest extends TestCase
         $this->assertSame(404, $response->getStatusCode());
     }
 
-    /**
-     * @dataProvider rejectedParseProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('rejectedParseProvider')]
     public function testParserRejectsPayload($return)
     {
         $secret = '1234';
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 257ad66..8da0d93 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/Event/EventNameTraitTest.php b/src/Symfony/Component/Workflow/Tests/Event/EventNameTraitTest.php
index 3c74523..4e1c705 100644
--- a/src/Symfony/Component/Workflow/Tests/Event/EventNameTraitTest.php
+++ b/src/Symfony/Component/Workflow/Tests/Event/EventNameTraitTest.php
@@ -23,10 +23,9 @@ use Symfony\Component\Workflow\Event\TransitionEvent;
 class EventNameTraitTest extends TestCase
 {
     /**
-     * @dataProvider getEvents
-     *
      * @param class-string $class
      */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getEvents')]
     public function testEventNames(string $class, ?string $workflowName, ?string $transitionOrPlaceName, string $expected)
     {
         $name = $class::getName($workflowName, $transitionOrPlaceName);
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 48e2209..765f980 100644
--- a/src/Symfony/Component/Workflow/Tests/WorkflowTest.php
+++ b/src/Symfony/Component/Workflow/Tests/WorkflowTest.php
@@ -439,9 +439,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 a501f48..f4d859e 100644
--- a/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php
+++ b/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php
@@ -152,9 +152,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 8eac4ae..e9b5c39 100644
--- a/src/Symfony/Component/Yaml/Tests/DumperTest.php
+++ b/src/Symfony/Component/Yaml/Tests/DumperTest.php
@@ -273,9 +273,7 @@ EOF;
         $this->assertSame('null', $this->dumper->dump(null, 2, flags: Yaml::DUMP_NULL_AS_EMPTY));
     }
 
-    /**
-     * @dataProvider getEscapeSequences
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getEscapeSequences')]
     public function testEscapedEscapeSequencesInQuotedScalar($input, $expected)
     {
         $this->assertSame($expected, $this->dumper->dump($input));
@@ -322,9 +320,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);
@@ -910,9 +906,7 @@ YAML;
         $this->assertSame('{ foo: ~ }', $this->dumper->dump(['foo' => null], 0, 0, Yaml::DUMP_NULL_AS_TILDE));
     }
 
-    /**
-     * @dataProvider getForceQuotesOnValuesData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getForceQuotesOnValuesData')]
     public function testCanForceQuotesOnValues(array $input, string $expected)
     {
         $this->assertSame($expected, $this->dumper->dump($input, 0, 0, Yaml::DUMP_FORCE_DOUBLE_QUOTES_ON_VALUES));
@@ -991,9 +985,7 @@ YAML;
         ];
     }
 
-    /**
-     * @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));
@@ -1096,9 +1088,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)));
@@ -1302,9 +1292,7 @@ YAML,
         ];
     }
 
-    /**
-     * @dataProvider getDumpCompactNestedMapping
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDumpCompactNestedMapping')]
     public function testDumpCompactNestedMapping(array $data, string $expected, int $indentation, int $inline = 10)
     {
         $dumper = new Dumper($indentation);
diff --git a/src/Symfony/Component/Yaml/Tests/InlineTest.php b/src/Symfony/Component/Yaml/Tests/InlineTest.php
index 8fa58da..bfdf311 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);
@@ -120,9 +114,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));
@@ -224,9 +216,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'];
@@ -272,9 +262,7 @@ class InlineTest extends TestCase
         Inline::parse('{ foo: * #foo }');
     }
 
-    /**
-     * @dataProvider getReservedIndicators
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getReservedIndicators')]
     public function testParseUnquotedScalarStartingWithReservedIndicator($indicator)
     {
         $this->expectException(ParseException::class);
@@ -288,9 +276,7 @@ class InlineTest extends TestCase
         return [['@'], ['`']];
     }
 
-    /**
-     * @dataProvider getScalarIndicators
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getScalarIndicators')]
     public function testParseUnquotedScalarStartingWithScalarIndicator($indicator)
     {
         $this->expectException(ParseException::class);
@@ -304,9 +290,7 @@ class InlineTest extends TestCase
         return [['|'], ['>'], ['%']];
     }
 
-    /**
-     * @dataProvider getDataForIsHash
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getDataForIsHash')]
     public function testIsHash($array, $expected)
     {
         $this->assertSame($expected, Inline::isHash($array));
@@ -569,18 +553,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))
@@ -603,9 +583,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))
@@ -627,17 +605,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));
@@ -760,9 +734,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));
@@ -777,9 +749,7 @@ class InlineTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getInvalidBinaryData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidBinaryData')]
     public function testParseInvalidBinaryData($data, $expectedMessage)
     {
         $this->expectException(ParseException::class);
@@ -822,9 +792,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));
@@ -843,9 +811,7 @@ class InlineTest extends TestCase
         $this->assertSame(['' => 'foo'], Inline::parse('{ "": foo }'));
     }
 
-    /**
-     * @dataProvider getNotPhpCompatibleMappingKeyData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNotPhpCompatibleMappingKeyData')]
     public function testImplicitStringCastingOfMappingKeysThrowsException(string $yaml)
     {
         $this->expectException(ParseException::class);
@@ -924,9 +890,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));
@@ -941,9 +905,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));
@@ -960,9 +922,7 @@ class InlineTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider phpObjectTagWithEmptyValueProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('phpObjectTagWithEmptyValueProvider')]
     public function testPhpObjectWithEmptyValue(string $value)
     {
         $this->expectException(ParseException::class);
@@ -983,9 +943,7 @@ class InlineTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider phpConstTagWithEmptyValueProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('phpConstTagWithEmptyValueProvider')]
     public function testPhpConstTagWithEmptyValue(string $value)
     {
         $this->expectException(ParseException::class);
@@ -994,9 +952,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);
@@ -1030,9 +986,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);
@@ -1064,9 +1018,7 @@ class InlineTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider quotedExclamationMarkProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('quotedExclamationMarkProvider')]
     public function testQuotedExclamationMark($expected, string $value)
     {
         $this->assertSame($expected, Inline::parse($value));
@@ -1095,9 +1047,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 836ec23..be6cd7c 100644
--- a/src/Symfony/Component/Yaml/Tests/ParserTest.php
+++ b/src/Symfony/Component/Yaml/Tests/ParserTest.php
@@ -145,9 +145,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);
@@ -163,9 +161,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);
@@ -209,9 +205,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);
@@ -558,9 +552,7 @@ EOF;
         return $tests;
     }
 
-    /**
-     * @dataProvider getBlockChompingTests
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getBlockChompingTests')]
     public function testBlockChomping($expected, $yaml)
     {
         $this->assertSame($expected, $this->parser->parse($yaml));
@@ -605,9 +597,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;
@@ -715,9 +705,7 @@ EOF;
         $this->assertSame($expected, $this->parser->parse($yaml));
     }
 
-    /**
-     * @requires extension iconv
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('iconv')]
     public function testNonUtf8Exception()
     {
         $yamls = [
@@ -892,9 +880,7 @@ EOT;
         return $tests;
     }
 
-    /**
-     * @dataProvider getParseExceptionNotAffectedMultiLineStringLastResortParsing
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getParseExceptionNotAffectedMultiLineStringLastResortParsing')]
     public function testParseExceptionNotAffectedByMultiLineStringLastResortParsing($yaml)
     {
         $this->expectException(ParseException::class);
@@ -991,9 +977,7 @@ EOD;
         Yaml::parse($input);
     }
 
-    /**
-     * @dataProvider getParseExceptionOnDuplicateData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getParseExceptionOnDuplicateData')]
     public function testParseExceptionOnDuplicate($input, $duplicateKey, $lineNumber)
     {
         $this->expectException(ParseException::class);
@@ -1059,9 +1043,8 @@ EOD;
         return $tests;
     }
 
-    /**
-     * @group legacy
-     */
+    #[\PHPUnit\Framework\Attributes\Group('legacy')]
+    #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
     public function testNullAsDuplicatedData()
     {
         $this->expectUserDeprecationMessage('Since symfony/yaml 7.2: Duplicate key "child" detected on line 4 whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated and will throw a ParseException in 8.0.');
@@ -1319,9 +1302,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));
@@ -1504,9 +1485,7 @@ EOT
         );
     }
 
-    /**
-     * @dataProvider getBinaryData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getBinaryData')]
     public function testParseBinaryData($data)
     {
         $this->assertSame(['data' => 'Hello world'], $this->parser->parse($data));
@@ -1533,9 +1512,7 @@ EOT,
         ];
     }
 
-    /**
-     * @dataProvider getInvalidBinaryData
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInvalidBinaryData')]
     public function testParseInvalidBinaryData($data, $expectedMessage)
     {
         $this->expectException(ParseException::class);
@@ -1608,9 +1585,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);
@@ -1755,9 +1730,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));
@@ -1796,9 +1769,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));
@@ -1859,9 +1830,7 @@ EOT;
         ];
     }
 
-    /**
-     * @dataProvider escapedQuotationCharactersInQuotedStrings
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('escapedQuotationCharactersInQuotedStrings')]
     public function testParseQuotedStringContainingEscapedQuotationCharacters(string $yaml, array $expected)
     {
         $this->assertSame($expected, $this->parser->parse($yaml));
@@ -1917,9 +1886,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));
@@ -1984,9 +1951,7 @@ EOF;
         return $tests;
     }
 
-    /**
-     * @dataProvider inlineNotationSpanningMultipleLinesProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('inlineNotationSpanningMultipleLinesProvider')]
     public function testInlineNotationSpanningMultipleLines($expected, string $yaml)
     {
         $this->assertSame($expected, $this->parser->parse($yaml));
@@ -2410,9 +2375,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));
@@ -2841,9 +2804,7 @@ EOE;
         $this->parser->parse($yaml);
     }
 
-    /**
-     * @dataProvider circularReferenceProvider
-     */
+    #[\PHPUnit\Framework\Attributes\DataProvider('circularReferenceProvider')]
     public function testDetectCircularReferences($yaml)
     {
         $this->expectException(ParseException::class);
@@ -2921,9 +2882,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 9a528f6..87de623 100644
--- a/src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php
+++ b/src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php
@@ -342,10 +342,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__);
@@ -1023,10 +1021,8 @@ abstract class HttpClientTestCase extends TestCase
         }
     }
 
-    /**
-     * @requires extension zlib
-     */
     #[RequiresPhpExtension('zlib')]
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('zlib')]
     public function testAutoEncodingRequest()
     {
         $client = $this->getHttpClient(__FUNCTION__);
@@ -1097,10 +1093,8 @@ abstract class HttpClientTestCase extends TestCase
         $this->assertContains('Link: </style.css>; rel=preload; as=style', $response->getInfo('response_headers'));
     }
 
-    /**
-     * @requires extension zlib
-     */
     #[RequiresPhpExtension('zlib')]
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('zlib')]
     public function testUserlandEncodingRequest()
     {
         $client = $this->getHttpClient(__FUNCTION__);
@@ -1120,10 +1114,8 @@ abstract class HttpClientTestCase extends TestCase
         $this->assertSame('gzip', $body['HTTP_ACCEPT_ENCODING']);
     }
 
-    /**
-     * @requires extension zlib
-     */
     #[RequiresPhpExtension('zlib')]
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('zlib')]
     public function testGzipBroken()
     {
         $client = $this->getHttpClient(__FUNCTION__);
diff --git a/src/Symfony/Contracts/Tests/Service/ServiceSubscriberTraitTest.php b/src/Symfony/Contracts/Tests/Service/ServiceSubscriberTraitTest.php
index bf0db2c..e253cec 100644
--- a/src/Symfony/Contracts/Tests/Service/ServiceSubscriberTraitTest.php
+++ b/src/Symfony/Contracts/Tests/Service/ServiceSubscriberTraitTest.php
@@ -19,9 +19,7 @@ use Symfony\Contracts\Service\ServiceLocatorTrait;
 use Symfony\Contracts\Service\ServiceSubscriberInterface;
 use Symfony\Contracts\Service\ServiceSubscriberTrait;
 
-/**
- * @group legacy
- */
+#[\PHPUnit\Framework\Attributes\Group('legacy')]
 class ServiceSubscriberTraitTest extends TestCase
 {
     public static function setUpBeforeClass(): void
diff --git a/src/Symfony/Contracts/Translation/Test/TranslatorTest.php b/src/Symfony/Contracts/Translation/Test/TranslatorTest.php
index 5342f5b..2381804 100644
--- a/src/Symfony/Contracts/Translation/Test/TranslatorTest.php
+++ b/src/Symfony/Contracts/Translation/Test/TranslatorTest.php
@@ -53,10 +53,8 @@ class TranslatorTest extends TestCase
         };
     }
 
-    /**
-     * @dataProvider getTransTests
-     */
     #[DataProvider('getTransTests')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransTests')]
     public function testTrans($expected, $id, $parameters)
     {
         $translator = $this->getTranslator();
@@ -64,10 +62,8 @@ class TranslatorTest extends TestCase
         $this->assertEquals($expected, $translator->trans($id, $parameters));
     }
 
-    /**
-     * @dataProvider getTransChoiceTests
-     */
     #[DataProvider('getTransChoiceTests')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransChoiceTests')]
     public function testTransChoiceWithExplicitLocale($expected, $id, $number)
     {
         $translator = $this->getTranslator();
@@ -75,13 +71,10 @@ class TranslatorTest extends TestCase
         $this->assertEquals($expected, $translator->trans($id, ['%count%' => $number]));
     }
 
-    /**
-     * @requires extension intl
-     *
-     * @dataProvider getTransChoiceTests
-     */
     #[DataProvider('getTransChoiceTests')]
     #[RequiresPhpExtension('intl')]
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransChoiceTests')]
     public function testTransChoiceWithDefaultLocale($expected, $id, $number)
     {
         $translator = $this->getTranslator();
@@ -89,10 +82,8 @@ class TranslatorTest extends TestCase
         $this->assertEquals($expected, $translator->trans($id, ['%count%' => $number]));
     }
 
-    /**
-     * @dataProvider getTransChoiceTests
-     */
     #[DataProvider('getTransChoiceTests')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getTransChoiceTests')]
     public function testTransChoiceWithEnUsPosix($expected, $id, $number)
     {
         $translator = $this->getTranslator();
@@ -108,10 +99,8 @@ class TranslatorTest extends TestCase
         $this->assertEquals('en', $translator->getLocale());
     }
 
-    /**
-     * @requires extension intl
-     */
     #[RequiresPhpExtension('intl')]
+    #[\PHPUnit\Framework\Attributes\RequiresPhpExtension('intl')]
     public function testGetLocaleReturnsDefaultLocaleIfNotSet()
     {
         $translator = $this->getTranslator();
@@ -147,10 +136,8 @@ class TranslatorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getInterval
-     */
     #[DataProvider('getInterval')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getInterval')]
     public function testInterval($expected, $number, $interval)
     {
         $translator = $this->getTranslator();
@@ -173,10 +160,8 @@ class TranslatorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider getChooseTests
-     */
     #[DataProvider('getChooseTests')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getChooseTests')]
     public function testChoose($expected, $id, $number, $locale = null)
     {
         $translator = $this->getTranslator();
@@ -191,10 +176,8 @@ class TranslatorTest extends TestCase
         $this->assertEquals('There are two apples', $translator->trans('There are two apples', ['%count%' => 2]));
     }
 
-    /**
-     * @dataProvider getNonMatchingMessages
-     */
     #[DataProvider('getNonMatchingMessages')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('getNonMatchingMessages')]
     public function testThrowExceptionIfMatchingMessageCannotBeFound($id, $number)
     {
         $translator = $this->getTranslator();
@@ -307,20 +290,16 @@ class TranslatorTest extends TestCase
         ];
     }
 
-    /**
-     * @dataProvider failingLangcodes
-     */
     #[DataProvider('failingLangcodes')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('failingLangcodes')]
     public function testFailedLangcodes($nplural, $langCodes)
     {
         $matrix = $this->generateTestData($langCodes);
         $this->validateMatrix($nplural, $matrix, false);
     }
 
-    /**
-     * @dataProvider successLangcodes
-     */
     #[DataProvider('successLangcodes')]
+    #[\PHPUnit\Framework\Attributes\DataProvider('successLangcodes')]
     public function testLangcodes($nplural, $langCodes)
     {
         $matrix = $this->generateTestData($langCodes);
