3030use Phar ;
3131use PharFileInfo ;
3232use PHPUnit \Framework \Attributes \CoversClass ;
33+ use PHPUnit \Framework \Attributes \RequiresPhpExtension ;
3334use PHPUnit \Framework \Attributes \RunTestsInSeparateProcesses ;
3435use Prophecy \Argument ;
3536use Prophecy \PhpUnit \ProphecyTrait ;
@@ -1344,9 +1345,7 @@ public function test_it_cannot_compress_if_the_required_extension_is_not_loaded(
13441345 }
13451346 }
13461347
1347- /**
1348- * @requires extension zlib
1349- */
1348+ #[RequiresPhpExtension('zlib ' )]
13501349 public function test_it_compresses_all_the_files_with_the_given_algorithm (): void
13511350 {
13521351 $ this ->box ->startBuffering ();
@@ -1425,9 +1424,7 @@ public function test_it_compresses_all_the_files_with_the_given_algorithm(): voi
14251424 );
14261425 }
14271426
1428- /**
1429- * @requires extension openssl
1430- */
1427+ #[RequiresPhpExtension('openssl ' )]
14311428 public function test_it_can_sign_the_phar (): void
14321429 {
14331430 [$ key , $ password ] = $ this ->getPrivateKey ();
@@ -1492,9 +1489,7 @@ public function test_it_cannot_sign_if_cannot_create_the_public_key(): void
14921489 }
14931490 }
14941491
1495- /**
1496- * @requires extension openssl
1497- */
1492+ #[RequiresPhpExtension('openssl ' )]
14981493 public function test_it_can_sign_the_phar_using_a_private_key_with_password (): void
14991494 {
15001495 $ phar = $ this ->box ->getPhar ();
@@ -1520,9 +1515,7 @@ public function test_it_can_sign_the_phar_using_a_private_key_with_password(): v
15201515 );
15211516 }
15221517
1523- /**
1524- * @requires extension openssl
1525- */
1518+ #[RequiresPhpExtension('openssl ' )]
15261519 public function test_it_cannot_sign_the_phar_using_a_private_key_with_the_wrong_password (): void
15271520 {
15281521 $ key = $ this ->getPrivateKey ()[0 ];
0 commit comments