--- ../tests/StreamDecoratorTraitTest.php	2026-07-13 22:44:58.913464723 +0300
+++ ../tests/StreamDecoratorTraitTest.php	2026-07-13 22:53:39.984121540 +0300
@@ -7,6 +7,7 @@
 use GuzzleHttp\Psr7;
 use GuzzleHttp\Psr7\StreamDecoratorTrait;
 use PHPUnit\Framework\TestCase;
+use PHPUnit\Framework\Attributes\RequiresPhp;
 use Psr\Http\Message\StreamInterface;
 
 class Str implements StreamInterface
@@ -38,9 +39,7 @@
         $this->b = new Str($this->a);
     }
 
-    /**
-     * @requires PHP < 7.4
-     */
+    #[RequiresPhp('< 7.4.0')]
     public function testCatchesExceptionsWhenCastingToString(): void
     {
         $s = $this->createMock(Str::class);
