Skip to content

Commit 634273b

Browse files
authored
chore(deps): Upgrade to Rector2 (#1468)
1 parent 1500dc9 commit 634273b

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

tests/BoxTest.php

+5-12
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
use Phar;
3131
use PharFileInfo;
3232
use PHPUnit\Framework\Attributes\CoversClass;
33+
use PHPUnit\Framework\Attributes\RequiresPhpExtension;
3334
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
3435
use Prophecy\Argument;
3536
use 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];

tests/Json/JsonTest.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use PHPUnit\Framework\AssertionFailedError;
2020
use PHPUnit\Framework\Attributes\CoversClass;
2121
use PHPUnit\Framework\Attributes\DataProvider;
22+
use PHPUnit\Framework\Attributes\RequiresPhpExtension;
2223
use Seld\JsonLint\ParsingException;
2324
use stdClass;
2425
use Throwable;
@@ -28,10 +29,10 @@
2829
use function mb_convert_encoding;
2930

3031
/**
31-
* @requires extension mbstring
3232
* @internal
3333
*/
3434
#[CoversClass(Json::class)]
35+
#[RequiresPhpExtension('mbstring')]
3536
class JsonTest extends FileSystemTestCase
3637
{
3738
private Json $json;

vendor-bin/rector/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require-dev": {
3-
"rector/rector": "^1.0"
3+
"rector/rector": "^2.0"
44
},
55

66
"config": {

0 commit comments

Comments
 (0)