1111
1212namespace Symfony \Bridge \PhpUnit \Tests ;
1313
14+ use PHPUnit \Framework \Attributes \Group ;
1415use PHPUnit \Framework \Attributes \RequiresPhpunit ;
16+ use PHPUnit \Framework \Attributes \RunInSeparateProcess ;
1517use PHPUnit \Framework \TestCase ;
1618use Symfony \Bridge \PhpUnit \ExpectDeprecationTrait ;
1719
@@ -22,9 +24,8 @@ final class ExpectDeprecationTraitTest extends TestCase
2224
2325 /**
2426 * Do not remove this test in the next major version.
25- *
26- * @group legacy
2727 */
28+ #[Group('legacy ' )]
2829 public function testOne ()
2930 {
3031 $ this ->expectDeprecation ('foo ' );
@@ -33,11 +34,9 @@ public function testOne()
3334
3435 /**
3536 * Do not remove this test in the next major version.
36- *
37- * @group legacy
38- *
39- * @runInSeparateProcess
4037 */
38+ #[Group('legacy ' )]
39+ #[RunInSeparateProcess]
4140 public function testOneInIsolation ()
4241 {
4342 $ this ->expectDeprecation ('foo ' );
@@ -46,9 +45,8 @@ public function testOneInIsolation()
4645
4746 /**
4847 * Do not remove this test in the next major version.
49- *
50- * @group legacy
5148 */
49+ #[Group('legacy ' )]
5250 public function testMany ()
5351 {
5452 $ this ->expectDeprecation ('foo ' );
@@ -60,10 +58,9 @@ public function testMany()
6058 /**
6159 * Do not remove this test in the next major version.
6260 *
63- * @group legacy
64- *
6561 * @expectedDeprecation foo
6662 */
63+ #[Group('legacy ' )]
6764 public function testOneWithAnnotation ()
6865 {
6966 $ this ->expectDeprecation ('bar ' );
@@ -74,11 +71,10 @@ public function testOneWithAnnotation()
7471 /**
7572 * Do not remove this test in the next major version.
7673 *
77- * @group legacy
78- *
7974 * @expectedDeprecation foo
8075 * @expectedDeprecation bar
8176 */
77+ #[Group('legacy ' )]
8278 public function testManyWithAnnotation ()
8379 {
8480 $ this ->expectDeprecation ('ccc ' );
0 commit comments