diff -pruN 3.3.0-1/debian/changelog 3.3.0-2/debian/changelog
--- 3.3.0-1/debian/changelog	2025-08-26 06:58:44.000000000 +0000
+++ 3.3.0-2/debian/changelog	2025-09-02 09:57:02.000000000 +0000
@@ -1,3 +1,9 @@
+php-react-promise (3.3.0-2) unstable; urgency=medium
+
+  * Compatibility with recent PHPUnit (12)
+
+ -- David Prévot <taffit@debian.org>  Tue, 02 Sep 2025 11:57:02 +0200
+
 php-react-promise (3.3.0-1) unstable; urgency=medium
 
   [ Theodore Brown ]
diff -pruN 3.3.0-1/debian/patches/0002-Compatibility-with-recent-PHPUnit-12.patch 3.3.0-2/debian/patches/0002-Compatibility-with-recent-PHPUnit-12.patch
--- 3.3.0-1/debian/patches/0002-Compatibility-with-recent-PHPUnit-12.patch	1970-01-01 00:00:00.000000000 +0000
+++ 3.3.0-2/debian/patches/0002-Compatibility-with-recent-PHPUnit-12.patch	2025-09-02 09:57:02.000000000 +0000
@@ -0,0 +1,2106 @@
+From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
+Date: Fri, 22 Aug 2025 07:20:29 +0200
+Subject: Compatibility with recent PHPUnit (12)
+
+---
+ tests/DeferredTest.php                          |  9 ++-
+ tests/FunctionAllTest.php                       | 29 ++++++---
+ tests/FunctionAnyTest.php                       | 41 +++++++++----
+ tests/FunctionCheckTypehintTest.php             | 81 ++++++++++---------------
+ tests/FunctionRaceTest.php                      | 32 +++++++---
+ tests/FunctionRejectTest.php                    |  5 +-
+ tests/FunctionResolveTest.php                   | 22 ++++---
+ tests/Internal/CancellationQueueTest.php        | 20 +++---
+ tests/Internal/FulfilledPromiseTest.php         |  7 ++-
+ tests/PromiseTest.php                           | 50 ++++++++-------
+ tests/PromiseTest/CancelTestTrait.php           | 53 ++++++++++------
+ tests/PromiseTest/PromiseFulfilledTestTrait.php | 69 +++++++++++++--------
+ tests/PromiseTest/PromisePendingTestTrait.php   | 20 ++++--
+ tests/PromiseTest/PromiseRejectedTestTrait.php  | 80 ++++++++++++++++--------
+ tests/PromiseTest/PromiseSettledTestTrait.php   | 17 ++++--
+ tests/PromiseTest/RejectTestTrait.php           | 29 ++++++---
+ tests/PromiseTest/ResolveTestTrait.php          | 42 ++++++++-----
+ 17 files changed, 378 insertions(+), 228 deletions(-)
+
+diff --git a/tests/DeferredTest.php b/tests/DeferredTest.php
+index f63c0fd..0358cad 100644
+--- a/tests/DeferredTest.php
++++ b/tests/DeferredTest.php
+@@ -2,6 +2,8 @@
+ 
+ namespace React\Promise;
+ 
++use PHPUnit\Framework\Attributes\RequiresPhpunit;
++use PHPUnit\Framework\Attributes\Test;
+ use React\Promise\PromiseAdapter\CallbackPromiseAdapter;
+ 
+ /**
+@@ -26,7 +28,7 @@ class DeferredTest extends TestCase
+         ]);
+     }
+ 
+-    /** @test */
++    #[Test]
+     public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerRejectsWithException(): void
+     {
+         gc_collect_cycles();
+@@ -39,7 +41,7 @@ class DeferredTest extends TestCase
+         $this->assertSame(0, gc_collect_cycles());
+     }
+ 
+-    /** @test */
++    #[Test]
+     public function shouldRejectWithoutCreatingGarbageCyclesIfParentCancellerRejectsWithException(): void
+     {
+         gc_collect_cycles();
+@@ -54,7 +56,8 @@ class DeferredTest extends TestCase
+         $this->assertSame(0, gc_collect_cycles());
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerHoldsReferenceAndExplicitlyRejectWithException(): void
+     {
+         gc_collect_cycles();
+diff --git a/tests/FunctionAllTest.php b/tests/FunctionAllTest.php
+index 10cfa2f..4af30a9 100644
+--- a/tests/FunctionAllTest.php
++++ b/tests/FunctionAllTest.php
+@@ -3,10 +3,13 @@
+ namespace React\Promise;
+ 
+ use Exception;
++use PHPUnit\Framework\Attributes\RequiresPhpunit;
++use PHPUnit\Framework\Attributes\Test;
+ 
+ class FunctionAllTest extends TestCase
+ {
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldResolveEmptyInput(): void
+     {
+         $mock = $this->createCallableMock();
+@@ -19,7 +22,8 @@ class FunctionAllTest extends TestCase
+             ->then($mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldResolveValuesArray(): void
+     {
+         $mock = $this->createCallableMock();
+@@ -32,7 +36,8 @@ class FunctionAllTest extends TestCase
+             ->then($mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldResolvePromisesArray(): void
+     {
+         $mock = $this->createCallableMock();
+@@ -45,7 +50,8 @@ class FunctionAllTest extends TestCase
+             ->then($mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldResolveSparseArrayInput(): void
+     {
+         $mock = $this->createCallableMock();
+@@ -58,7 +64,8 @@ class FunctionAllTest extends TestCase
+             ->then($mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldResolveValuesGenerator(): void
+     {
+         $mock = $this->createCallableMock();
+@@ -76,7 +83,8 @@ class FunctionAllTest extends TestCase
+         all($gen)->then($mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldResolveValuesGeneratorEmpty(): void
+     {
+         $mock = $this->createCallableMock();
+@@ -94,7 +102,8 @@ class FunctionAllTest extends TestCase
+         all($gen)->then($mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldRejectIfAnyInputPromiseRejects(): void
+     {
+         $exception2 = new Exception();
+@@ -110,7 +119,8 @@ class FunctionAllTest extends TestCase
+             ->then($this->expectCallableNever(), $mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldRejectInfiteGeneratorOrRejectedPromises(): void
+     {
+         $mock = $this->createCallableMock();
+@@ -128,7 +138,8 @@ class FunctionAllTest extends TestCase
+         all($gen)->then(null, $mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldPreserveTheOrderOfArrayWhenResolvingAsyncPromises(): void
+     {
+         $mock = $this->createCallableMock();
+diff --git a/tests/FunctionAnyTest.php b/tests/FunctionAnyTest.php
+index 563f882..f305ba2 100644
+--- a/tests/FunctionAnyTest.php
++++ b/tests/FunctionAnyTest.php
+@@ -3,12 +3,15 @@
+ namespace React\Promise;
+ 
+ use Exception;
++use PHPUnit\Framework\Attributes\RequiresPhpunit;
++use PHPUnit\Framework\Attributes\Test;
+ use React\Promise\Exception\CompositeException;
+ use React\Promise\Exception\LengthException;
+ 
+ class FunctionAnyTest extends TestCase
+ {
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldRejectWithLengthExceptionWithEmptyInputArray(): void
+     {
+         $mock = $this->createCallableMock();
+@@ -26,7 +29,8 @@ class FunctionAnyTest extends TestCase
+             ->then($this->expectCallableNever(), $mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldRejectWithLengthExceptionWithEmptyInputGenerator(): void
+     {
+         $mock = $this->createCallableMock();
+@@ -44,7 +48,8 @@ class FunctionAnyTest extends TestCase
+         any($gen)->then($this->expectCallableNever(), $mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldResolveWithAnInputValue(): void
+     {
+         $mock = $this->createCallableMock();
+@@ -57,7 +62,8 @@ class FunctionAnyTest extends TestCase
+             ->then($mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldResolveWithAPromisedInputValue(): void
+     {
+         $mock = $this->createCallableMock();
+@@ -70,7 +76,8 @@ class FunctionAnyTest extends TestCase
+             ->then($mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldResolveWithAnInputValueFromDeferred(): void
+     {
+         $mock = $this->createCallableMock();
+@@ -86,7 +93,8 @@ class FunctionAnyTest extends TestCase
+         $deferred->resolve(1);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldResolveValuesGenerator(): void
+     {
+         $mock = $this->createCallableMock();
+@@ -104,7 +112,8 @@ class FunctionAnyTest extends TestCase
+         any($gen)->then($mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldResolveValuesInfiniteGenerator(): void
+     {
+         $mock = $this->createCallableMock();
+@@ -122,7 +131,8 @@ class FunctionAnyTest extends TestCase
+         any($gen)->then($mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldRejectWithAllRejectedInputValuesIfAllInputsAreRejected(): void
+     {
+         $exception1 = new Exception();
+@@ -144,7 +154,8 @@ class FunctionAnyTest extends TestCase
+             ->then($this->expectCallableNever(), $mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldRejectWithAllRejectedInputValuesIfInputIsRejectedFromDeferred(): void
+     {
+         $exception = new Exception();
+@@ -167,7 +178,8 @@ class FunctionAnyTest extends TestCase
+         $deferred->reject($exception);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldResolveWhenFirstInputPromiseResolves(): void
+     {
+         $exception2 = new Exception();
+@@ -183,7 +195,8 @@ class FunctionAnyTest extends TestCase
+             ->then($mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldNotRelyOnArryIndexesWhenUnwrappingToASingleResolutionValue(): void
+     {
+         $mock = $this->createCallableMock();
+@@ -202,7 +215,8 @@ class FunctionAnyTest extends TestCase
+         $d1->resolve(1);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldCancelInputArrayPromises(): void
+     {
+         $promise1 = new Promise(function () {}, $this->expectCallableOnce());
+@@ -211,7 +225,8 @@ class FunctionAnyTest extends TestCase
+         any([$promise1, $promise2])->cancel();
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldNotCancelOtherPendingInputArrayPromisesIfOnePromiseFulfills(): void
+     {
+         $deferred = new Deferred($this->expectCallableNever());
+diff --git a/tests/FunctionCheckTypehintTest.php b/tests/FunctionCheckTypehintTest.php
+index 6f7fc0f..4e6669d 100644
+--- a/tests/FunctionCheckTypehintTest.php
++++ b/tests/FunctionCheckTypehintTest.php
+@@ -4,48 +4,47 @@ namespace React\Promise;
+ 
+ use Exception;
+ use InvalidArgumentException;
++use PHPUnit\Framework\Attributes\Test;
+ 
+ class FunctionCheckTypehintTest extends TestCase
+ {
+-    /** @test */
++    #[Test]
+     public function shouldAcceptClosureCallbackWithTypehint(): void
+     {
+         self::assertTrue(_checkTypehint(function (InvalidArgumentException $e) {}, new InvalidArgumentException()));
+         self::assertFalse(_checkTypehint(function (InvalidArgumentException $e) {}, new Exception()));
+     }
+ 
+-    /** @test */
++    #[Test]
+     public function shouldAcceptFunctionStringCallbackWithTypehint(): void
+     {
+         self::assertTrue(_checkTypehint(new CallbackWithTypehintClass(), new InvalidArgumentException()));
+         self::assertFalse(_checkTypehint(new CallbackWithTypehintClass(), new Exception()));
+     }
+ 
+-    /** @test */
++    #[Test]
+     public function shouldAcceptInvokableObjectCallbackWithTypehint(): void
+     {
+         self::assertTrue(_checkTypehint(new CallbackWithTypehintClass(), new InvalidArgumentException()));
+         self::assertFalse(_checkTypehint(new CallbackWithTypehintClass(), new Exception()));
+     }
+ 
+-    /** @test */
++    #[Test]
+     public function shouldAcceptObjectMethodCallbackWithTypehint(): void
+     {
+         self::assertTrue(_checkTypehint([new CallbackWithTypehintClass(), 'testCallback'], new InvalidArgumentException()));
+         self::assertFalse(_checkTypehint([new CallbackWithTypehintClass(), 'testCallback'], new Exception()));
+     }
+ 
+-    /** @test */
++    #[Test]
+     public function shouldAcceptStaticClassCallbackWithTypehint(): void
+     {
+         self::assertTrue(_checkTypehint([CallbackWithTypehintClass::class, 'testCallbackStatic'], new InvalidArgumentException()));
+         self::assertFalse(_checkTypehint([CallbackWithTypehintClass::class, 'testCallbackStatic'], new Exception()));
+     }
+ 
+-    /**
+-     * @test
+-     * @requires PHP 8
+-     */
++    #[Test]
++    #[RequiresPhp('8')]
+     public function shouldAcceptClosureCallbackWithUnionTypehint(): void
+     {
+         eval(
+@@ -55,70 +54,56 @@ class FunctionCheckTypehintTest extends TestCase
+         );
+     }
+ 
+-    /**
+-     * @test
+-     * @requires PHP 8
+-     */
++    #[Test]
++    #[RequiresPhp('8')]
+     public function shouldAcceptInvokableObjectCallbackWithUnionTypehint(): void
+     {
+         self::assertTrue(_checkTypehint(new CallbackWithUnionTypehintClass(), new InvalidArgumentException()));
+         self::assertFalse(_checkTypehint(new CallbackWithUnionTypehintClass(), new Exception()));
+     }
+ 
+-    /**
+-     * @test
+-     * @requires PHP 8
+-     */
++    #[Test]
++    #[RequiresPhp('8')]
+     public function shouldAcceptObjectMethodCallbackWithUnionTypehint(): void
+     {
+         self::assertTrue(_checkTypehint([new CallbackWithUnionTypehintClass(), 'testCallback'], new InvalidArgumentException()));
+         self::assertFalse(_checkTypehint([new CallbackWithUnionTypehintClass(), 'testCallback'], new Exception()));
+     }
+ 
+-    /**
+-     * @test
+-     * @requires PHP 8
+-     */
++    #[Test]
++    #[RequiresPhp('8')]
+     public function shouldAcceptStaticClassCallbackWithUnionTypehint(): void
+     {
+         self::assertTrue(_checkTypehint([CallbackWithUnionTypehintClass::class, 'testCallbackStatic'], new InvalidArgumentException()));
+         self::assertFalse(_checkTypehint([CallbackWithUnionTypehintClass::class, 'testCallbackStatic'], new Exception()));
+     }
+ 
+-    /**
+-     * @test
+-     * @requires PHP 8.1
+-     */
++    #[Test]
++    #[RequiresPhp('8.1')]
+     public function shouldAcceptInvokableObjectCallbackWithIntersectionTypehint(): void
+     {
+         self::assertFalse(_checkTypehint(new CallbackWithIntersectionTypehintClass(), new \RuntimeException()));
+         self::assertTrue(_checkTypehint(new CallbackWithIntersectionTypehintClass(), new CountableException()));
+     }
+ 
+-    /**
+-     * @test
+-     * @requires PHP 8.1
+-     */
++    #[Test]
++    #[RequiresPhp('8.1')]
+     public function shouldAcceptObjectMethodCallbackWithIntersectionTypehint(): void
+     {
+         self::assertFalse(_checkTypehint([new CallbackWithIntersectionTypehintClass(), 'testCallback'], new \RuntimeException()));
+         self::assertTrue(_checkTypehint([new CallbackWithIntersectionTypehintClass(), 'testCallback'], new CountableException()));
+     }
+ 
+-    /**
+-     * @test
+-     * @requires PHP 8.1
+-     */
++    #[Test]
++    #[RequiresPhp('8.1')]
+     public function shouldAcceptStaticClassCallbackWithIntersectionTypehint(): void
+     {
+         self::assertFalse(_checkTypehint([CallbackWithIntersectionTypehintClass::class, 'testCallbackStatic'], new \RuntimeException()));
+         self::assertTrue(_checkTypehint([CallbackWithIntersectionTypehintClass::class, 'testCallbackStatic'], new CountableException()));
+     }
+ 
+-    /**
+-     * @test
+-     * @requires PHP 8.2
+-     */
++    #[Test]
++    #[RequiresPhp('8.2')]
+     public function shouldAcceptInvokableObjectCallbackWithDNFTypehint(): void
+     {
+         self::assertFalse(_checkTypehint(new CallbackWithDNFTypehintClass(), new \RuntimeException()));
+@@ -126,10 +111,8 @@ class FunctionCheckTypehintTest extends TestCase
+         self::assertTrue(_checkTypehint(new CallbackWithDNFTypehintClass(), new CountableException()));
+     }
+ 
+-    /**
+-     * @test
+-     * @requires PHP 8.2
+-     */
++    #[Test]
++    #[RequiresPhp('8.2')]
+     public function shouldAcceptObjectMethodCallbackWithDNFTypehint(): void
+     {
+         self::assertFalse(_checkTypehint([new CallbackWithDNFTypehintClass(), 'testCallback'], new \RuntimeException()));
+@@ -137,10 +120,8 @@ class FunctionCheckTypehintTest extends TestCase
+         self::assertTrue(_checkTypehint([new CallbackWithDNFTypehintClass(), 'testCallback'], new IterableException()));
+     }
+ 
+-    /**
+-     * @test
+-     * @requires PHP 8.2
+-     */
++    #[Test]
++    #[RequiresPhp('8.2')]
+     public function shouldAcceptStaticClassCallbackWithDNFTypehint(): void
+     {
+         self::assertFalse(_checkTypehint([CallbackWithDNFTypehintClass::class, 'testCallbackStatic'], new \RuntimeException()));
+@@ -148,32 +129,32 @@ class FunctionCheckTypehintTest extends TestCase
+         self::assertTrue(_checkTypehint([CallbackWithDNFTypehintClass::class, 'testCallbackStatic'], new IterableException()));
+     }
+ 
+-    /** @test */
++    #[Test]
+     public function shouldAcceptClosureCallbackWithoutTypehint(): void
+     {
+         self::assertTrue(_checkTypehint(function (InvalidArgumentException $e) {
+         }, new InvalidArgumentException()));
+     }
+ 
+-    /** @test */
++    #[Test]
+     public function shouldAcceptFunctionStringCallbackWithoutTypehint(): void
+     {
+         self::assertTrue(_checkTypehint(new CallbackWithoutTypehintClass(), new InvalidArgumentException()));
+     }
+ 
+-    /** @test */
++    #[Test]
+     public function shouldAcceptInvokableObjectCallbackWithoutTypehint(): void
+     {
+         self::assertTrue(_checkTypehint(new CallbackWithoutTypehintClass(), new InvalidArgumentException()));
+     }
+ 
+-    /** @test */
++    #[Test]
+     public function shouldAcceptObjectMethodCallbackWithoutTypehint(): void
+     {
+         self::assertTrue(_checkTypehint([new CallbackWithoutTypehintClass(), 'testCallback'], new InvalidArgumentException()));
+     }
+ 
+-    /** @test */
++    #[Test]
+     public function shouldAcceptStaticClassCallbackWithoutTypehint(): void
+     {
+         self::assertTrue(_checkTypehint([CallbackWithoutTypehintClass::class, 'testCallbackStatic'], new InvalidArgumentException()));
+diff --git a/tests/FunctionRaceTest.php b/tests/FunctionRaceTest.php
+index a0ac05b..286f4cd 100644
+--- a/tests/FunctionRaceTest.php
++++ b/tests/FunctionRaceTest.php
+@@ -3,10 +3,13 @@
+ namespace React\Promise;
+ 
+ use Exception;
++use PHPUnit\Framework\Attributes\RequiresPhpunit;
++use PHPUnit\Framework\Attributes\Test;
+ 
+ class FunctionRaceTest extends TestCase
+ {
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldReturnForeverPendingPromiseForEmptyInput(): void
+     {
+         race(
+@@ -14,7 +17,8 @@ class FunctionRaceTest extends TestCase
+         )->then($this->expectCallableNever(), $this->expectCallableNever());
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldResolveValuesArray(): void
+     {
+         $mock = $this->createCallableMock();
+@@ -28,7 +32,8 @@ class FunctionRaceTest extends TestCase
+         )->then($mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldResolvePromisesArray(): void
+     {
+         $mock = $this->createCallableMock();
+@@ -51,7 +56,8 @@ class FunctionRaceTest extends TestCase
+         $d3->resolve(3);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldResolveSparseArrayInput(): void
+     {
+         $mock = $this->createCallableMock();
+@@ -65,7 +71,8 @@ class FunctionRaceTest extends TestCase
+         )->then($mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldResolveValuesGenerator(): void
+     {
+         $mock = $this->createCallableMock();
+@@ -83,7 +90,8 @@ class FunctionRaceTest extends TestCase
+         race($gen)->then($mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldResolveValuesInfiniteGenerator(): void
+     {
+         $mock = $this->createCallableMock();
+@@ -101,7 +109,8 @@ class FunctionRaceTest extends TestCase
+         race($gen)->then($mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldRejectIfFirstSettledPromiseRejects(): void
+     {
+         $exception = new Exception();
+@@ -126,7 +135,8 @@ class FunctionRaceTest extends TestCase
+         $d3->resolve(3);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldCancelInputArrayPromises(): void
+     {
+         $promise1 = new Promise(function () {}, $this->expectCallableOnce());
+@@ -135,7 +145,8 @@ class FunctionRaceTest extends TestCase
+         race([$promise1, $promise2])->cancel();
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldNotCancelOtherPendingInputArrayPromisesIfOnePromiseFulfills(): void
+     {
+         $deferred = new Deferred($this->expectCallableNever());
+@@ -146,7 +157,8 @@ class FunctionRaceTest extends TestCase
+         race([$deferred->promise(), $promise2])->cancel();
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldNotCancelOtherPendingInputArrayPromisesIfOnePromiseRejects(): void
+     {
+         $deferred = new Deferred($this->expectCallableNever());
+diff --git a/tests/FunctionRejectTest.php b/tests/FunctionRejectTest.php
+index 38b7cc6..d3f278b 100644
+--- a/tests/FunctionRejectTest.php
++++ b/tests/FunctionRejectTest.php
+@@ -3,10 +3,13 @@
+ namespace React\Promise;
+ 
+ use Exception;
++use PHPUnit\Framework\Attributes\RequiresPhpunit;
++use PHPUnit\Framework\Attributes\Test;
+ 
+ class FunctionRejectTest extends TestCase
+ {
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldRejectAnException(): void
+     {
+         $exception = new Exception();
+diff --git a/tests/FunctionResolveTest.php b/tests/FunctionResolveTest.php
+index 1eacd34..1816510 100644
+--- a/tests/FunctionResolveTest.php
++++ b/tests/FunctionResolveTest.php
+@@ -2,13 +2,16 @@
+ 
+ namespace React\Promise;
+ 
++use PHPUnit\Framework\Attributes\Test;
++use PHPUnit\Framework\Attributes\RequiresPhpunit;
+ use React\Promise\Internal\FulfilledPromise;
+ use React\Promise\Internal\RejectedPromise;
+ use Exception;
+ 
+ class FunctionResolveTest extends TestCase
+ {
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldResolveAnImmediateValue(): void
+     {
+         $expected = 123;
+@@ -26,7 +29,8 @@ class FunctionResolveTest extends TestCase
+             );
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldResolveAFulfilledPromise(): void
+     {
+         $expected = 123;
+@@ -46,7 +50,8 @@ class FunctionResolveTest extends TestCase
+             );
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldResolveAThenable(): void
+     {
+         $thenable = new SimpleFulfilledTestThenable();
+@@ -64,7 +69,7 @@ class FunctionResolveTest extends TestCase
+             );
+     }
+ 
+-    /** @test */
++    #[Test]
+     public function shouldResolveACancellableThenable(): void
+     {
+         $thenable = new SimpleTestCancellableThenable();
+@@ -75,7 +80,8 @@ class FunctionResolveTest extends TestCase
+         self::assertTrue($thenable->cancelCalled);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldRejectARejectedPromise(): void
+     {
+         $exception = new Exception();
+@@ -95,7 +101,8 @@ class FunctionResolveTest extends TestCase
+             );
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldSupportDeepNestingInPromiseChains(): void
+     {
+         $d = new Deferred();
+@@ -125,7 +132,8 @@ class FunctionResolveTest extends TestCase
+         $result->then($mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldSupportVeryDeepNestedPromises(): void
+     {
+         if (PHP_VERSION_ID < 70200 && ini_get('xdebug.max_nesting_level') !== false) {
+diff --git a/tests/Internal/CancellationQueueTest.php b/tests/Internal/CancellationQueueTest.php
+index e8fd58e..9c60964 100644
+--- a/tests/Internal/CancellationQueueTest.php
++++ b/tests/Internal/CancellationQueueTest.php
+@@ -3,6 +3,8 @@
+ namespace React\Promise\Internal;
+ 
+ use Exception;
++use PHPUnit\Framework\Attributes\RequiresPhpunit;
++use PHPUnit\Framework\Attributes\Test;
+ use React\Promise\Deferred;
+ use React\Promise\SimpleTestCancellable;
+ use React\Promise\SimpleTestCancellableThenable;
+@@ -10,7 +12,7 @@ use React\Promise\TestCase;
+ 
+ class CancellationQueueTest extends TestCase
+ {
+-    /** @test */
++    #[Test]
+     public function acceptsSimpleCancellableThenable(): void
+     {
+         $p = new SimpleTestCancellableThenable();
+@@ -23,7 +25,7 @@ class CancellationQueueTest extends TestCase
+         self::assertTrue($p->cancelCalled);
+     }
+ 
+-    /** @test */
++    #[Test]
+     public function ignoresSimpleCancellable(): void
+     {
+         $p = new SimpleTestCancellable();
+@@ -36,7 +38,8 @@ class CancellationQueueTest extends TestCase
+         self::assertFalse($p->cancelCalled);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function callsCancelOnPromisesEnqueuedBeforeStart(): void
+     {
+         $d1 = $this->getCancellableDeferred();
+@@ -49,7 +52,8 @@ class CancellationQueueTest extends TestCase
+         $cancellationQueue();
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function callsCancelOnPromisesEnqueuedAfterStart(): void
+     {
+         $d1 = $this->getCancellableDeferred();
+@@ -63,7 +67,8 @@ class CancellationQueueTest extends TestCase
+         $cancellationQueue->enqueue($d1->promise());
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function doesNotCallCancelTwiceWhenStartedTwice(): void
+     {
+         $d = $this->getCancellableDeferred();
+@@ -75,9 +80,8 @@ class CancellationQueueTest extends TestCase
+         $cancellationQueue();
+     }
+ 
+-    /**
+-     * @test
+-     */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function rethrowsExceptionsThrownFromCancel(): void
+     {
+         $this->expectException(Exception::class);
+diff --git a/tests/Internal/FulfilledPromiseTest.php b/tests/Internal/FulfilledPromiseTest.php
+index b216e1d..f217f8a 100644
+--- a/tests/Internal/FulfilledPromiseTest.php
++++ b/tests/Internal/FulfilledPromiseTest.php
+@@ -4,6 +4,8 @@ namespace React\Promise\Internal;
+ 
+ use InvalidArgumentException;
+ use LogicException;
++use PHPUnit\Framework\Attributes\RequiresPhpunit;
++use PHPUnit\Framework\Attributes\Test;
+ use React\Promise\PromiseAdapter\CallbackPromiseAdapter;
+ use React\Promise\PromiseTest\PromiseFulfilledTestTrait;
+ use React\Promise\PromiseTest\PromiseSettledTestTrait;
+@@ -49,9 +51,8 @@ class FulfilledPromiseTest extends TestCase
+         ]);
+     }
+ 
+-    /**
+-     * @test
+-     */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldThrowExceptionIfConstructedWithAPromise(): void
+     {
+         $this->expectException(InvalidArgumentException::class);
+diff --git a/tests/PromiseTest.php b/tests/PromiseTest.php
+index a0e9ace..7ae8dbb 100644
+--- a/tests/PromiseTest.php
++++ b/tests/PromiseTest.php
+@@ -3,6 +3,8 @@
+ namespace React\Promise;
+ 
+ use Exception;
++use PHPUnit\Framework\Attributes\RequiresPhpunit;
++use PHPUnit\Framework\Attributes\Test;
+ use React\Promise\PromiseAdapter\CallbackPromiseAdapter;
+ 
+ /**
+@@ -37,7 +39,8 @@ class PromiseTest extends TestCase
+         ]);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldRejectIfResolverThrowsException(): void
+     {
+         $exception = new Exception('foo');
+@@ -56,7 +59,7 @@ class PromiseTest extends TestCase
+             ->then($this->expectCallableNever(), $mock);
+     }
+ 
+-    /** @test */
++    #[Test]
+     public function shouldResolveWithoutCreatingGarbageCyclesIfResolverResolvesWithException(): void
+     {
+         gc_collect_cycles();
+@@ -68,7 +71,8 @@ class PromiseTest extends TestCase
+         $this->assertSame(0, gc_collect_cycles());
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldRejectWithoutCreatingGarbageCyclesIfResolverThrowsExceptionWithoutResolver(): void
+     {
+         gc_collect_cycles();
+@@ -83,7 +87,8 @@ class PromiseTest extends TestCase
+         $this->assertSame(0, gc_collect_cycles());
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldRejectWithoutCreatingGarbageCyclesIfResolverRejectsWithException(): void
+     {
+         gc_collect_cycles();
+@@ -98,7 +103,7 @@ class PromiseTest extends TestCase
+         $this->assertSame(0, gc_collect_cycles());
+     }
+ 
+-    /** @test */
++    #[Test]
+     public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerRejectsWithException(): void
+     {
+         gc_collect_cycles();
+@@ -111,7 +116,7 @@ class PromiseTest extends TestCase
+         $this->assertSame(0, gc_collect_cycles());
+     }
+ 
+-    /** @test */
++    #[Test]
+     public function shouldRejectWithoutCreatingGarbageCyclesIfParentCancellerRejectsWithException(): void
+     {
+         gc_collect_cycles();
+@@ -124,7 +129,8 @@ class PromiseTest extends TestCase
+         $this->assertSame(0, gc_collect_cycles());
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldRejectWithoutCreatingGarbageCyclesIfResolverThrowsException(): void
+     {
+         gc_collect_cycles();
+@@ -148,10 +154,9 @@ class PromiseTest extends TestCase
+      * Reassigned arguments only show up in the stack trace in PHP 7, so we can't
+      * avoid this on legacy PHP. As an alternative, consider explicitly unsetting
+      * any references before throwing.
+-     *
+-     * @test
+-     * @requires PHP 7
+      */
++    #[Test]
++    #[RequiresPhp('7')]
+     public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerWithReferenceThrowsException(): void
+     {
+         gc_collect_cycles();
+@@ -167,10 +172,11 @@ class PromiseTest extends TestCase
+     }
+ 
+     /**
+-     * @test
+-     * @requires PHP 7
+      * @see self::shouldRejectWithoutCreatingGarbageCyclesIfCancellerWithReferenceThrowsException
+      */
++    #[Test]
++    #[RequiresPhp('7')]
++    #[RequiresPhpunit('< 12')]
+     public function shouldRejectWithoutCreatingGarbageCyclesIfResolverWithReferenceThrowsException(): void
+     {
+         gc_collect_cycles();
+@@ -188,10 +194,11 @@ class PromiseTest extends TestCase
+     }
+ 
+     /**
+-     * @test
+-     * @requires PHP 7
+      * @see self::shouldRejectWithoutCreatingGarbageCyclesIfCancellerWithReferenceThrowsException
+      */
++    #[Test]
++    #[RequiresPhp('7')]
++    #[RequiresPhpunit('< 12')]
+     public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerHoldsReferenceAndResolverThrowsException(): void
+     {
+         gc_collect_cycles();
+@@ -209,7 +216,7 @@ class PromiseTest extends TestCase
+         $this->assertSame(0, gc_collect_cycles());
+     }
+ 
+-    /** @test */
++    #[Test]
+     public function shouldNotLeaveGarbageCyclesWhenRemovingLastReferenceToPendingPromise(): void
+     {
+         gc_collect_cycles();
+@@ -219,7 +226,7 @@ class PromiseTest extends TestCase
+         $this->assertSame(0, gc_collect_cycles());
+     }
+ 
+-    /** @test */
++    #[Test]
+     public function shouldNotLeaveGarbageCyclesWhenRemovingLastReferenceToPendingPromiseWithThenFollowers(): void
+     {
+         gc_collect_cycles();
+@@ -230,7 +237,7 @@ class PromiseTest extends TestCase
+         $this->assertSame(0, gc_collect_cycles());
+     }
+ 
+-    /** @test */
++    #[Test]
+     public function shouldNotLeaveGarbageCyclesWhenRemovingLastReferenceToPendingPromiseWithCatchFollowers(): void
+     {
+         gc_collect_cycles();
+@@ -241,7 +248,7 @@ class PromiseTest extends TestCase
+         $this->assertSame(0, gc_collect_cycles());
+     }
+ 
+-    /** @test */
++    #[Test]
+     public function shouldNotLeaveGarbageCyclesWhenRemovingLastReferenceToPendingPromiseWithFinallyFollowers(): void
+     {
+         gc_collect_cycles();
+@@ -253,9 +260,9 @@ class PromiseTest extends TestCase
+     }
+ 
+     /**
+-     * @test
+      * @deprecated
+      */
++    #[Test]
+     public function shouldNotLeaveGarbageCyclesWhenRemovingLastReferenceToPendingPromiseWithOtherwiseFollowers(): void
+     {
+         gc_collect_cycles();
+@@ -267,9 +274,9 @@ class PromiseTest extends TestCase
+     }
+ 
+     /**
+-     * @test
+      * @deprecated
+      */
++    #[Test]
+     public function shouldNotLeaveGarbageCyclesWhenRemovingLastReferenceToPendingPromiseWithAlwaysFollowers(): void
+     {
+         gc_collect_cycles();
+@@ -280,7 +287,8 @@ class PromiseTest extends TestCase
+         $this->assertSame(0, gc_collect_cycles());
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldFulfillIfFullfilledWithSimplePromise(): void
+     {
+         gc_collect_cycles();
+diff --git a/tests/PromiseTest/CancelTestTrait.php b/tests/PromiseTest/CancelTestTrait.php
+index d119c1b..530545c 100644
+--- a/tests/PromiseTest/CancelTestTrait.php
++++ b/tests/PromiseTest/CancelTestTrait.php
+@@ -3,6 +3,8 @@
+ namespace React\Promise\PromiseTest;
+ 
+ use Exception;
++use PHPUnit\Framework\Attributes\RequiresPhpunit;
++use PHPUnit\Framework\Attributes\Test;
+ use React\Promise;
+ use React\Promise\PromiseAdapter\PromiseAdapterInterface;
+ 
+@@ -10,7 +12,8 @@ trait CancelTestTrait
+ {
+     abstract public function getPromiseTestAdapter(?callable $canceller = null): PromiseAdapterInterface;
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function cancelShouldCallCancellerWithResolverArguments(): void
+     {
+         $args = [];
+@@ -25,7 +28,8 @@ trait CancelTestTrait
+         self::assertTrue(is_callable($args[1]));
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function cancelShouldCallCancellerWithoutArgumentsIfNotAccessed(): void
+     {
+         $args = null;
+@@ -38,7 +42,8 @@ trait CancelTestTrait
+         self::assertSame(0, $args);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function cancelShouldFulfillPromiseIfCancellerFulfills(): void
+     {
+         $adapter = $this->getPromiseTestAdapter(function ($resolve) {
+@@ -57,7 +62,8 @@ trait CancelTestTrait
+         $adapter->promise()->cancel();
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function cancelShouldRejectPromiseIfCancellerRejects(): void
+     {
+         $exception = new Exception();
+@@ -78,7 +84,8 @@ trait CancelTestTrait
+         $adapter->promise()->cancel();
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function cancelShouldRejectPromiseWithExceptionIfCancellerThrows(): void
+     {
+         $e = new Exception();
+@@ -99,7 +106,8 @@ trait CancelTestTrait
+         $adapter->promise()->cancel();
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function cancelShouldCallCancellerOnlyOnceIfCancellerResolves(): void
+     {
+         $mock = $this->createCallableMock();
+@@ -116,7 +124,8 @@ trait CancelTestTrait
+         $adapter->promise()->cancel();
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function cancelShouldHaveNoEffectIfCancellerDoesNothing(): void
+     {
+         $adapter = $this->getPromiseTestAdapter(function () {});
+@@ -128,7 +137,8 @@ trait CancelTestTrait
+         $adapter->promise()->cancel();
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function cancelShouldCallCancellerFromDeepNestedPromiseChain(): void
+     {
+         $adapter = $this->getPromiseTestAdapter($this->expectCallableOnce());
+@@ -149,7 +159,8 @@ trait CancelTestTrait
+         $promise->cancel();
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function cancelCalledOnChildrenSouldOnlyCancelWhenAllChildrenCancelled(): void
+     {
+         $adapter = $this->getPromiseTestAdapter($this->expectCallableNever());
+@@ -164,7 +175,8 @@ trait CancelTestTrait
+         $child1->cancel();
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function cancelShouldTriggerCancellerWhenAllChildrenCancel(): void
+     {
+         $adapter = $this->getPromiseTestAdapter($this->expectCallableOnce());
+@@ -180,7 +192,8 @@ trait CancelTestTrait
+         $child2->cancel();
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function cancelShouldNotTriggerCancellerWhenCancellingOneChildrenMultipleTimes(): void
+     {
+         $adapter = $this->getPromiseTestAdapter($this->expectCallableNever());
+@@ -196,7 +209,8 @@ trait CancelTestTrait
+         $child1->cancel();
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function cancelShouldTriggerCancellerOnlyOnceWhenCancellingMultipleTimes(): void
+     {
+         $adapter = $this->getPromiseTestAdapter($this->expectCallableOnce());
+@@ -205,7 +219,8 @@ trait CancelTestTrait
+         $adapter->promise()->cancel();
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function cancelShouldAlwaysTriggerCancellerWhenCalledOnRootPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter($this->expectCallableOnce());
+@@ -220,7 +235,8 @@ trait CancelTestTrait
+         $adapter->promise()->cancel();
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function cancelShouldTriggerCancellerWhenFollowerCancels(): void
+     {
+         $adapter1 = $this->getPromiseTestAdapter($this->expectCallableOnce());
+@@ -235,7 +251,8 @@ trait CancelTestTrait
+         $follower->cancel();
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function cancelShouldNotTriggerCancellerWhenCancellingOnlyOneFollower(): void
+     {
+         $adapter1 = $this->getPromiseTestAdapter($this->expectCallableNever());
+@@ -253,7 +270,8 @@ trait CancelTestTrait
+         $follower1->cancel();
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function cancelCalledOnFollowerShouldOnlyCancelWhenAllChildrenAndFollowerCancelled(): void
+     {
+         $adapter1 = $this->getPromiseTestAdapter($this->expectCallableOnce());
+@@ -271,7 +289,8 @@ trait CancelTestTrait
+         $child->cancel();
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function cancelShouldNotTriggerCancellerWhenCancellingFollowerButNotChildren(): void
+     {
+         $adapter1 = $this->getPromiseTestAdapter($this->expectCallableNever());
+diff --git a/tests/PromiseTest/PromiseFulfilledTestTrait.php b/tests/PromiseTest/PromiseFulfilledTestTrait.php
+index 172c457..19107d0 100644
+--- a/tests/PromiseTest/PromiseFulfilledTestTrait.php
++++ b/tests/PromiseTest/PromiseFulfilledTestTrait.php
+@@ -3,6 +3,8 @@
+ namespace React\Promise\PromiseTest;
+ 
+ use Exception;
++use PHPUnit\Framework\Attributes\RequiresPhpunit;
++use PHPUnit\Framework\Attributes\Test;
+ use React\Promise\PromiseAdapter\PromiseAdapterInterface;
+ use React\Promise\PromiseInterface;
+ use stdClass;
+@@ -13,7 +15,8 @@ trait PromiseFulfilledTestTrait
+ {
+     abstract public function getPromiseTestAdapter(?callable $canceller = null): PromiseAdapterInterface;
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function fulfilledPromiseShouldBeImmutable(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -34,7 +37,8 @@ trait PromiseFulfilledTestTrait
+             );
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function fulfilledPromiseShouldInvokeNewlyAddedCallback(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -51,7 +55,8 @@ trait PromiseFulfilledTestTrait
+             ->then($mock, $this->expectCallableNever());
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function thenShouldForwardResultWhenCallbackIsNull(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -74,7 +79,8 @@ trait PromiseFulfilledTestTrait
+             );
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function thenShouldForwardCallbackResultToNextCallback(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -99,7 +105,8 @@ trait PromiseFulfilledTestTrait
+             );
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function thenShouldForwardPromisedCallbackResultValueToNextCallback(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -124,7 +131,8 @@ trait PromiseFulfilledTestTrait
+             );
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function thenShouldSwitchFromCallbacksToErrbacksWhenCallbackReturnsARejection(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -151,7 +159,8 @@ trait PromiseFulfilledTestTrait
+             );
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function thenShouldSwitchFromCallbacksToErrbacksWhenCallbackThrows(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -182,10 +191,9 @@ trait PromiseFulfilledTestTrait
+             );
+     }
+ 
+-    /**
+-     * @test
+-     * @requires PHP 8.1
+-     */
++    #[Test]
++    #[RequiresPhp('8.1')]
++    #[RequiresPhpunit('< 12')]
+     public function thenShouldContinueToExecuteCallbacksWhenPriorCallbackSuspendsFiber(): void
+     {
+         /** @var PromiseAdapterInterface<int> $adapter */
+@@ -210,7 +218,8 @@ trait PromiseFulfilledTestTrait
+         $adapter->promise()->then($mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function cancelShouldHaveNoEffectForFulfilledPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter($this->expectCallableNever());
+@@ -220,7 +229,8 @@ trait PromiseFulfilledTestTrait
+         $adapter->promise()->cancel();
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function catchShouldNotInvokeRejectionHandlerForFulfilledPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -229,7 +239,8 @@ trait PromiseFulfilledTestTrait
+         $adapter->promise()->catch($this->expectCallableNever());
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function finallyShouldNotSuppressValueForFulfilledPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -248,7 +259,8 @@ trait PromiseFulfilledTestTrait
+             ->then($mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function finallyShouldNotSuppressValueWhenHandlerReturnsANonPromiseForFulfilledPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -269,7 +281,8 @@ trait PromiseFulfilledTestTrait
+             ->then($mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function finallyShouldNotSuppressValueWhenHandlerReturnsAPromiseForFulfilledPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -290,7 +303,8 @@ trait PromiseFulfilledTestTrait
+             ->then($mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function finallyShouldRejectWhenHandlerThrowsForFulfilledPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -311,7 +325,8 @@ trait PromiseFulfilledTestTrait
+             ->then(null, $mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function finallyShouldRejectWhenHandlerRejectsForFulfilledPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -333,9 +348,10 @@ trait PromiseFulfilledTestTrait
+     }
+ 
+     /**
+-     * @test
+      * @deprecated
+      */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function otherwiseShouldNotInvokeRejectionHandlerForFulfilledPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -345,9 +361,10 @@ trait PromiseFulfilledTestTrait
+     }
+ 
+     /**
+-     * @test
+      * @deprecated
+      */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function alwaysShouldNotSuppressValueForFulfilledPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -367,9 +384,10 @@ trait PromiseFulfilledTestTrait
+     }
+ 
+     /**
+-     * @test
+      * @deprecated
+      */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function alwaysShouldNotSuppressValueWhenHandlerReturnsANonPromiseForFulfilledPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -391,9 +409,10 @@ trait PromiseFulfilledTestTrait
+     }
+ 
+     /**
+-     * @test
+      * @deprecated
+      */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function alwaysShouldNotSuppressValueWhenHandlerReturnsAPromiseForFulfilledPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -415,9 +434,10 @@ trait PromiseFulfilledTestTrait
+     }
+ 
+     /**
+-     * @test
+      * @deprecated
+      */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function alwaysShouldRejectWhenHandlerThrowsForFulfilledPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -439,9 +459,10 @@ trait PromiseFulfilledTestTrait
+     }
+ 
+     /**
+-     * @test
+      * @deprecated
+      */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function alwaysShouldRejectWhenHandlerRejectsForFulfilledPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+diff --git a/tests/PromiseTest/PromisePendingTestTrait.php b/tests/PromiseTest/PromisePendingTestTrait.php
+index db5e2e4..a20b4c4 100644
+--- a/tests/PromiseTest/PromisePendingTestTrait.php
++++ b/tests/PromiseTest/PromisePendingTestTrait.php
+@@ -2,6 +2,8 @@
+ 
+ namespace React\Promise\PromiseTest;
+ 
++use PHPUnit\Framework\Attributes\RequiresPhpunit;
++use PHPUnit\Framework\Attributes\Test;
+ use React\Promise\PromiseAdapter\PromiseAdapterInterface;
+ use React\Promise\PromiseInterface;
+ 
+@@ -9,7 +11,8 @@ trait PromisePendingTestTrait
+ {
+     abstract public function getPromiseTestAdapter(?callable $canceller = null): PromiseAdapterInterface;
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function thenShouldReturnAPromiseForPendingPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -17,7 +20,8 @@ trait PromisePendingTestTrait
+         self::assertInstanceOf(PromiseInterface::class, $adapter->promise()->then());
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function thenShouldReturnAllowNullForPendingPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -25,7 +29,8 @@ trait PromisePendingTestTrait
+         self::assertInstanceOf(PromiseInterface::class, $adapter->promise()->then(null, null));
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function catchShouldNotInvokeRejectionHandlerForPendingPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -34,7 +39,8 @@ trait PromisePendingTestTrait
+         $adapter->promise()->catch($this->expectCallableNever());
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function finallyShouldReturnAPromiseForPendingPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -43,9 +49,10 @@ trait PromisePendingTestTrait
+     }
+ 
+     /**
+-     * @test
+      * @deprecated
+      */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function otherwiseShouldNotInvokeRejectionHandlerForPendingPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -55,9 +62,10 @@ trait PromisePendingTestTrait
+     }
+ 
+     /**
+-     * @test
+      * @deprecated
+      */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function alwaysShouldReturnAPromiseForPendingPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+diff --git a/tests/PromiseTest/PromiseRejectedTestTrait.php b/tests/PromiseTest/PromiseRejectedTestTrait.php
+index a125698..af5fa92 100644
+--- a/tests/PromiseTest/PromiseRejectedTestTrait.php
++++ b/tests/PromiseTest/PromiseRejectedTestTrait.php
+@@ -4,6 +4,8 @@ namespace React\Promise\PromiseTest;
+ 
+ use Exception;
+ use InvalidArgumentException;
++use PHPUnit\Framework\Attributes\RequiresPhpunit;
++use PHPUnit\Framework\Attributes\Test;
+ use React\Promise\PromiseAdapter\PromiseAdapterInterface;
+ use React\Promise\PromiseInterface;
+ use function React\Promise\reject;
+@@ -13,7 +15,8 @@ trait PromiseRejectedTestTrait
+ {
+     abstract public function getPromiseTestAdapter(?callable $canceller = null): PromiseAdapterInterface;
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function rejectedPromiseShouldBeImmutable(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -37,7 +40,8 @@ trait PromiseRejectedTestTrait
+             );
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function rejectedPromiseShouldInvokeNewlyAddedCallback(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -56,7 +60,8 @@ trait PromiseRejectedTestTrait
+             ->then($this->expectCallableNever(), $mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldForwardUndefinedRejectionValue(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -84,7 +89,8 @@ trait PromiseRejectedTestTrait
+             );
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldSwitchFromErrbacksToCallbacksWhenErrbackDoesNotExplicitlyPropagate(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -109,7 +115,8 @@ trait PromiseRejectedTestTrait
+             );
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldSwitchFromErrbacksToCallbacksWhenErrbackReturnsAResolution(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -134,7 +141,8 @@ trait PromiseRejectedTestTrait
+             );
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldPropagateRejectionsWhenErrbackThrows(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -165,7 +173,8 @@ trait PromiseRejectedTestTrait
+             );
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function shouldPropagateRejectionsWhenErrbackReturnsARejection(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -192,7 +201,8 @@ trait PromiseRejectedTestTrait
+             );
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function catchShouldInvokeRejectionHandlerForRejectedPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -209,7 +219,8 @@ trait PromiseRejectedTestTrait
+         $adapter->promise()->catch($mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function catchShouldInvokeNonTypeHintedRejectionHandlerIfReasonIsAnExceptionForRejectedPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -229,7 +240,8 @@ trait PromiseRejectedTestTrait
+             });
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function catchShouldInvokeRejectionHandlerIfReasonMatchesTypehintForRejectedPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -249,7 +261,8 @@ trait PromiseRejectedTestTrait
+             });
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function catchShouldNotInvokeRejectionHandlerIfReaonsDoesNotMatchTypehintForRejectedPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -265,7 +278,8 @@ trait PromiseRejectedTestTrait
+             })->then(null, $this->expectCallableOnce()); // avoid reporting unhandled rejection
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function finallyShouldNotSuppressRejectionForRejectedPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -284,7 +298,8 @@ trait PromiseRejectedTestTrait
+             ->then(null, $mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function finallyShouldNotSuppressRejectionWhenHandlerReturnsANonPromiseForRejectedPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -305,7 +320,8 @@ trait PromiseRejectedTestTrait
+             ->then(null, $mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function finallyShouldNotSuppressRejectionWhenHandlerReturnsAPromiseForRejectedPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -326,7 +342,8 @@ trait PromiseRejectedTestTrait
+             ->then(null, $mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function finallyShouldRejectWhenHandlerThrowsForRejectedPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -348,7 +365,8 @@ trait PromiseRejectedTestTrait
+             ->then(null, $mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function finallyShouldRejectWhenHandlerRejectsForRejectedPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -370,7 +388,8 @@ trait PromiseRejectedTestTrait
+             ->then(null, $mock);
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function cancelShouldHaveNoEffectForRejectedPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter($this->expectCallableNever());
+@@ -381,9 +400,10 @@ trait PromiseRejectedTestTrait
+     }
+ 
+     /**
+-     * @test
+      * @deprecated
+      */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function otherwiseShouldInvokeRejectionHandlerForRejectedPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -401,9 +421,10 @@ trait PromiseRejectedTestTrait
+     }
+ 
+     /**
+-     * @test
+      * @deprecated
+      */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function otherwiseShouldInvokeNonTypeHintedRejectionHandlerIfReasonIsAnExceptionForRejectedPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -424,9 +445,10 @@ trait PromiseRejectedTestTrait
+     }
+ 
+     /**
+-     * @test
+      * @deprecated
+      */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function otherwiseShouldInvokeRejectionHandlerIfReasonMatchesTypehintForRejectedPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -447,9 +469,10 @@ trait PromiseRejectedTestTrait
+     }
+ 
+     /**
+-     * @test
+      * @deprecated
+      */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function otherwiseShouldNotInvokeRejectionHandlerIfReaonsDoesNotMatchTypehintForRejectedPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -466,9 +489,10 @@ trait PromiseRejectedTestTrait
+     }
+ 
+     /**
+-     * @test
+      * @deprecated
+      */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function alwaysShouldNotSuppressRejectionForRejectedPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -488,9 +512,10 @@ trait PromiseRejectedTestTrait
+     }
+ 
+     /**
+-     * @test
+      * @deprecated
+      */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function alwaysShouldNotSuppressRejectionWhenHandlerReturnsANonPromiseForRejectedPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -512,9 +537,10 @@ trait PromiseRejectedTestTrait
+     }
+ 
+     /**
+-     * @test
+      * @deprecated
+      */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function alwaysShouldNotSuppressRejectionWhenHandlerReturnsAPromiseForRejectedPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -536,9 +562,10 @@ trait PromiseRejectedTestTrait
+     }
+ 
+     /**
+-     * @test
+      * @deprecated
+      */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function alwaysShouldRejectWhenHandlerThrowsForRejectedPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -561,9 +588,10 @@ trait PromiseRejectedTestTrait
+     }
+ 
+     /**
+-     * @test
+      * @deprecated
+      */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function alwaysShouldRejectWhenHandlerRejectsForRejectedPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+diff --git a/tests/PromiseTest/PromiseSettledTestTrait.php b/tests/PromiseTest/PromiseSettledTestTrait.php
+index 093ab8b..ceddeed 100644
+--- a/tests/PromiseTest/PromiseSettledTestTrait.php
++++ b/tests/PromiseTest/PromiseSettledTestTrait.php
+@@ -2,6 +2,8 @@
+ 
+ namespace React\Promise\PromiseTest;
+ 
++use PHPUnit\Framework\Attributes\RequiresPhpunit;
++use PHPUnit\Framework\Attributes\Test;
+ use React\Promise\Internal\RejectedPromise;
+ use React\Promise\PromiseAdapter\PromiseAdapterInterface;
+ use React\Promise\PromiseInterface;
+@@ -10,7 +12,8 @@ trait PromiseSettledTestTrait
+ {
+     abstract public function getPromiseTestAdapter(?callable $canceller = null): PromiseAdapterInterface;
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function thenShouldReturnAPromiseForSettledPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -23,7 +26,8 @@ trait PromiseSettledTestTrait
+         }
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function thenShouldReturnAllowNullForSettledPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -36,7 +40,8 @@ trait PromiseSettledTestTrait
+         }
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function cancelShouldHaveNoEffectForSettledPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter($this->expectCallableNever());
+@@ -46,7 +51,8 @@ trait PromiseSettledTestTrait
+         $adapter->promise()->cancel();
+     }
+ 
+-    /** @test */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function finallyShouldReturnAPromiseForSettledPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -60,9 +66,10 @@ trait PromiseSettledTestTrait
+     }
+ 
+     /**
+-     * @test
+      * @deprecated
+      */
++    #[Test]
++    #[RequiresPhpunit('< 12')]
+     public function alwaysShouldReturnAPromiseForSettledPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+diff --git a/tests/PromiseTest/RejectTestTrait.php b/tests/PromiseTest/RejectTestTrait.php
+index eb1d891..aae02be 100644
+--- a/tests/PromiseTest/RejectTestTrait.php
++++ b/tests/PromiseTest/RejectTestTrait.php
+@@ -3,6 +3,8 @@
+ namespace React\Promise\PromiseTest;
+ 
+ use Exception;
++use PHPUnit\Framework\Attributes\RequiresPhpunit;
++use PHPUnit\Framework\Attributes\Test;
+ use React\Promise;
+ use React\Promise\Deferred;
+ use React\Promise\PromiseAdapter\PromiseAdapterInterface;
+@@ -14,7 +16,8 @@ trait RejectTestTrait
+ {
+     abstract public function getPromiseTestAdapter(?callable $canceller = null): PromiseAdapterInterface;
+ 
+-    /** @test */
++    #[RequiresPhpunit('< 12')]
++    #[Test]
+     public function rejectShouldRejectWithAnException(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -33,7 +36,8 @@ trait RejectTestTrait
+         $adapter->reject($exception);
+     }
+ 
+-    /** @test */
++    #[RequiresPhpunit('< 12')]
++    #[Test]
+     public function rejectShouldForwardReasonWhenCallbackIsNull(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -58,7 +62,8 @@ trait RejectTestTrait
+         $adapter->reject($exception);
+     }
+ 
+-    /** @test */
++    #[RequiresPhpunit('< 12')]
++    #[Test]
+     public function rejectShouldMakePromiseImmutable(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -88,7 +93,8 @@ trait RejectTestTrait
+         $adapter->reject($exception2);
+     }
+ 
+-    /** @test */
++    #[RequiresPhpunit('< 12')]
++    #[Test]
+     public function rejectShouldInvokeCatchHandler(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -107,7 +113,8 @@ trait RejectTestTrait
+         $adapter->reject($exception);
+     }
+ 
+-    /** @test */
++    #[RequiresPhpunit('< 12')]
++    #[Test]
+     public function finallyShouldNotSuppressRejection(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -127,7 +134,8 @@ trait RejectTestTrait
+         $adapter->reject($exception);
+     }
+ 
+-    /** @test */
++    #[RequiresPhpunit('< 12')]
++    #[Test]
+     public function finallyShouldNotSuppressRejectionWhenHandlerReturnsANonPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -149,7 +157,8 @@ trait RejectTestTrait
+         $adapter->reject($exception);
+     }
+ 
+-    /** @test */
++    #[RequiresPhpunit('< 12')]
++    #[Test]
+     public function finallyShouldNotSuppressRejectionWhenHandlerReturnsAPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -171,7 +180,8 @@ trait RejectTestTrait
+         $adapter->reject($exception);
+     }
+ 
+-    /** @test */
++    #[RequiresPhpunit('< 12')]
++    #[Test]
+     public function finallyShouldRejectWhenHandlerThrowsForRejection(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -193,7 +203,8 @@ trait RejectTestTrait
+         $adapter->reject($exception);
+     }
+ 
+-    /** @test */
++    #[RequiresPhpunit('< 12')]
++    #[Test]
+     public function finallyShouldRejectWhenHandlerRejectsForRejection(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+diff --git a/tests/PromiseTest/ResolveTestTrait.php b/tests/PromiseTest/ResolveTestTrait.php
+index 2a23065..ac8b6e0 100644
+--- a/tests/PromiseTest/ResolveTestTrait.php
++++ b/tests/PromiseTest/ResolveTestTrait.php
+@@ -4,6 +4,8 @@ namespace React\Promise\PromiseTest;
+ 
+ use Exception;
+ use LogicException;
++use PHPUnit\Framework\Attributes\RequiresPhpunit;
++use PHPUnit\Framework\Attributes\Test;
+ use React\Promise;
+ use React\Promise\PromiseAdapter\PromiseAdapterInterface;
+ use React\Promise\PromiseInterface;
+@@ -15,7 +17,8 @@ trait ResolveTestTrait
+ {
+     abstract public function getPromiseTestAdapter(?callable $canceller = null): PromiseAdapterInterface;
+ 
+-    /** @test */
++    #[RequiresPhpunit('< 12')]
++    #[Test]
+     public function resolveShouldResolve(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -32,7 +35,8 @@ trait ResolveTestTrait
+         $adapter->resolve(1);
+     }
+ 
+-    /** @test */
++    #[RequiresPhpunit('< 12')]
++    #[Test]
+     public function resolveShouldResolveWithPromisedValue(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -49,7 +53,8 @@ trait ResolveTestTrait
+         $adapter->resolve(resolve(1));
+     }
+ 
+-    /** @test */
++    #[RequiresPhpunit('< 12')]
++    #[Test]
+     public function resolveShouldRejectWhenResolvedWithRejectedPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -68,7 +73,8 @@ trait ResolveTestTrait
+         $adapter->resolve(reject($exception));
+     }
+ 
+-    /** @test */
++    #[RequiresPhpunit('< 12')]
++    #[Test]
+     public function resolveShouldForwardValueWhenCallbackIsNull(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -92,7 +98,8 @@ trait ResolveTestTrait
+         $adapter->resolve(1);
+     }
+ 
+-    /** @test */
++    #[RequiresPhpunit('< 12')]
++    #[Test]
+     public function resolveShouldMakePromiseImmutable(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -118,9 +125,8 @@ trait ResolveTestTrait
+         $adapter->resolve(2);
+     }
+ 
+-    /**
+-     * @test
+-     */
++    #[RequiresPhpunit('< 12')]
++    #[Test]
+     public function resolveShouldRejectWhenResolvedWithItself(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -140,9 +146,8 @@ trait ResolveTestTrait
+         $adapter->resolve($adapter->promise());
+     }
+ 
+-    /**
+-     * @test
+-     */
++    #[RequiresPhpunit('< 12')]
++    #[Test]
+     public function resolveShouldRejectWhenResolvedWithAPromiseWhichFollowsItself(): void
+     {
+         $adapter1 = $this->getPromiseTestAdapter();
+@@ -167,7 +172,8 @@ trait ResolveTestTrait
+         $adapter2->resolve($promise1);
+     }
+ 
+-    /** @test */
++    #[RequiresPhpunit('< 12')]
++    #[Test]
+     public function finallyShouldNotSuppressValue(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -187,7 +193,8 @@ trait ResolveTestTrait
+         $adapter->resolve($value);
+     }
+ 
+-    /** @test */
++    #[RequiresPhpunit('< 12')]
++    #[Test]
+     public function finallyShouldNotSuppressValueWhenHandlerReturnsANonPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -209,7 +216,8 @@ trait ResolveTestTrait
+         $adapter->resolve($value);
+     }
+ 
+-    /** @test */
++    #[RequiresPhpunit('< 12')]
++    #[Test]
+     public function finallyShouldNotSuppressValueWhenHandlerReturnsAPromise(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -231,7 +239,8 @@ trait ResolveTestTrait
+         $adapter->resolve($value);
+     }
+ 
+-    /** @test */
++    #[RequiresPhpunit('< 12')]
++    #[Test]
+     public function finallyShouldRejectWhenHandlerThrowsForFulfillment(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
+@@ -253,7 +262,8 @@ trait ResolveTestTrait
+         $adapter->resolve(1);
+     }
+ 
+-    /** @test */
++    #[RequiresPhpunit('< 12')]
++    #[Test]
+     public function finallyShouldRejectWhenHandlerRejectsForFulfillment(): void
+     {
+         $adapter = $this->getPromiseTestAdapter();
diff -pruN 3.3.0-1/debian/patches/series 3.3.0-2/debian/patches/series
--- 3.3.0-1/debian/patches/series	2025-08-26 06:58:44.000000000 +0000
+++ 3.3.0-2/debian/patches/series	2025-09-02 09:57:02.000000000 +0000
@@ -1 +1,2 @@
 0001-Don-t-expect-src-in-test-output.patch
+0002-Compatibility-with-recent-PHPUnit-12.patch
