Skip to content

Commit 5ac374c

Browse files
authored
Global upgrade of the dev dependencies + PHP8.4 tests (#60)
1 parent 4a4c785 commit 5ac374c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+653
-381
lines changed

.github/workflows/integrate.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
- "8.1"
5858
- "8.2"
5959
- "8.3"
60+
- "8.4"
6061
dependencies:
6162
- "lowest"
6263
- "highest"

composer.json

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,16 @@
5656
"require-dev": {
5757
"ext-gmp": "*",
5858
"ext-openssl": "*",
59-
"ekino/phpstan-banned-code": "^1.0",
60-
"infection/infection": "^0.28",
59+
"ekino/phpstan-banned-code": "^1.0|^2.0|^3.0",
60+
"infection/infection": "^0.28|^0.29",
6161
"php-parallel-lint/php-parallel-lint": "^1.3",
62-
"phpstan/extension-installer": "^1.3",
63-
"phpstan/phpstan": "^1.8",
64-
"phpstan/phpstan-beberlei-assert": "^1.0",
65-
"phpstan/phpstan-deprecation-rules": "^1.0",
66-
"phpstan/phpstan-phpunit": "^1.1",
67-
"phpstan/phpstan-strict-rules": "^1.3",
68-
"rector/rector": "^1.0",
62+
"phpstan/extension-installer": "^1.3|^2.0",
63+
"phpstan/phpstan": "^1.8|^2.0",
64+
"phpstan/phpstan-deprecation-rules": "^1.0|^2.0",
65+
"phpstan/phpstan-phpunit": "^1.1|^2.0",
66+
"phpstan/phpstan-strict-rules": "^1.3|^2.0",
67+
"rector/rector": "^1.0|^2.0",
6968
"roave/security-advisories": "dev-latest",
70-
"symfony/phpunit-bridge": "^6.4|^7.0",
7169
"symfony/string": "^6.4|^7.0",
7270
"symfony/var-dumper": "^6.4|^7.0",
7371
"symplify/easy-coding-standard": "^12.0",

phpstan-baseline.neon

Lines changed: 470 additions & 178 deletions
Large diffs are not rendered by default.

phpstan.neon

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ parameters:
22
level: max
33
paths:
44
- src
5-
checkMissingIterableValueType: true
6-
checkGenericClassInNonGenericObjectType: true
75
checkUninitializedProperties: true
86
treatPhpDocTypesAsCertain: false
97
includes:

phpunit.xml.dist

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,9 @@
3535
</include>
3636
</source>
3737
<php>
38-
<ini name="display_errors" value="1"/>
3938
<ini name="error_reporting" value="-1"/>
40-
<ini name="memory_limit" value="-1"/>
41-
<server name="APP_ENV" value="test" force="true"/>
39+
<ini name="xdebug.show_exception_trace" value="0"/>
40+
<ini name="display_errors" value="1"/>
4241
<server name="SHELL_VERBOSITY" value="-1"/>
43-
<server name="SYMFONY_PHPUNIT_REMOVE" value=""/>
44-
<server name="SYMFONY_PHPUNIT_VERSION" value="10"/>
45-
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/>
4642
</php>
4743
</phpunit>

rector.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,23 @@
66
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector;
77
use Rector\PHPUnit\CodeQuality\Rector\ClassMethod\DataProviderArrayItemsNewLinedRector;
88
use Rector\PHPUnit\Set\PHPUnitSetList;
9-
use Rector\Set\ValueObject\LevelSetList;
109
use Rector\Set\ValueObject\SetList;
1110
use Rector\Symfony\Set\SymfonySetList;
12-
use Rector\Symfony\Symfony42\Rector\New_\StringToArrayArgumentProcessRector;
1311
use Rector\ValueObject\PhpVersion;
1412

1513
return static function (RectorConfig $config): void {
1614
$config->import(SetList::DEAD_CODE);
17-
$config->import(LevelSetList::UP_TO_PHP_81);
15+
$config->import(SetList::PHP_81);
1816
$config->import(SymfonySetList::SYMFONY_50_TYPES);
19-
$config->import(SymfonySetList::SYMFONY_52_VALIDATOR_ATTRIBUTES);
2017
$config->import(SymfonySetList::SYMFONY_CODE_QUALITY);
2118
$config->import(SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION);
22-
$config->import(SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES);
2319
$config->import(PHPUnitSetList::PHPUNIT_CODE_QUALITY);
2420
$config->import(PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES);
2521
$config->paths([__DIR__ . '/src', __DIR__ . '/tests', __DIR__ . '/ecs.php', __DIR__ . '/rector.php']);
26-
$config->skip([
27-
DataProviderArrayItemsNewLinedRector::class,
28-
PreferPHPUnitThisCallRector::class,
29-
StringToArrayArgumentProcessRector::class => [__DIR__ . '/tests'],
30-
]);
22+
$config->skip([DataProviderArrayItemsNewLinedRector::class, PreferPHPUnitThisCallRector::class]);
23+
$config::configure()->withComposerBased(twig: true, phpunit: true);
24+
$config::configure()->withPhpSets();
25+
$config::configure()->withAttributesSets();
3126
$config->phpVersion(PhpVersion::PHP_81);
3227
$config->parallel();
3328
$config->importNames();

src/ASN1/Component/Length.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use function count;
1414
use function mb_strlen;
1515
use function ord;
16+
use function sprintf;
1617

1718
/**
1819
* Class to represent BER/DER length octets.

src/ASN1/Element.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
use UnexpectedValueException;
4747
use function array_key_exists;
4848
use function mb_strlen;
49+
use function sprintf;
4950

5051
/**
5152
* Base class for all ASN.1 type elements.

src/ASN1/Type/BaseString.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use InvalidArgumentException;
88
use SpomkyLabs\Pki\ASN1\Element;
99
use Stringable;
10+
use function sprintf;
1011

1112
/**
1213
* Base class for all string types.

src/ASN1/Type/Primitive/GeneralizedTime.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ final class GeneralizedTime extends BaseTime
3434
* @var string
3535
*/
3636
final public const REGEX = '#^' .
37-
'(\d\d\d\d)' . // YYYY
38-
'(\d\d)' . // MM
39-
'(\d\d)' . // DD
40-
'(\d\d)' . // hh
41-
'(\d\d)' . // mm
42-
'(\d\d)' . // ss
43-
'(?:\.(\d+))?' . // frac
44-
'Z' . // TZ
45-
'$#';
37+
'(\d\d\d\d)' . // YYYY
38+
'(\d\d)' . // MM
39+
'(\d\d)' . // DD
40+
'(\d\d)' . // hh
41+
'(\d\d)' . // mm
42+
'(\d\d)' . // ss
43+
'(?:\.(\d+))?' . // frac
44+
'Z' . // TZ
45+
'$#';
4646

4747
/**
4848
* Cached formatted date.

0 commit comments

Comments
 (0)