Skip to content

Commit e66f493

Browse files
authored
Drop PHP < 8.1 support, switch to PhpToken, and update dependencies (#245)
1 parent 975e587 commit e66f493

36 files changed

+1267
-1763
lines changed

.github/workflows/checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
name: Setup PHP
1919
uses: shivammathur/setup-php@v2
2020
with:
21-
php-version: 8.3
21+
php-version: 8.5
2222
ini-values: phar.readonly=0
2323
ini-file: development
2424
-
@@ -34,7 +34,7 @@ jobs:
3434
strategy:
3535
fail-fast: false
3636
matrix:
37-
php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
37+
php-version: [ '8.1', '8.2', '8.3', '8.4', '8.5' ]
3838
dependency-version: [ prefer-lowest, prefer-stable ]
3939
operating-system: [ ubuntu-latest, windows-latest ]
4040
steps:

bin/composer-dependency-analyser

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env php
2-
<?php declare(strict_types=1);
2+
<?php declare(strict_types = 1);
33

44
use ShipMonk\ComposerDependencyAnalyser\Analyser;
55
use ShipMonk\ComposerDependencyAnalyser\Exception\AbortException;
@@ -35,6 +35,11 @@ $initializer = new Initializer($cwd, $stdOutPrinter, $stdErrPrinter);
3535
$stopwatch = new Stopwatch();
3636

3737
try {
38+
if (!isset($argv)) {
39+
$stdErrPrinter->printLine("\n<red>Missing \$argv, check your register_argc_argv setting.</red>" . PHP_EOL);
40+
exit(1);
41+
}
42+
3843
$options = $initializer->initCliOptions($cwd, $argv);
3944
$composerJson = $initializer->initComposerJson($options);
4045
$initializer->initComposerAutoloader($composerJson);
@@ -60,5 +65,3 @@ try {
6065
}
6166

6267
exit($exitCode);
63-
64-

composer-dependency-analyser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
->ignoreErrorsOnExtensionsAndPaths(
1111
['ext-dom', 'ext-libxml'],
1212
[__DIR__ . '/src/Result/JunitFormatter.php'], // optional usages guarded with extension_loaded()
13-
[ErrorType::DEV_DEPENDENCY_IN_PROD]
13+
[ErrorType::DEV_DEPENDENCY_IN_PROD],
1414
);

composer.json

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"unused code"
2020
],
2121
"require": {
22-
"php": "^7.2 || ^8.0",
22+
"php": "^8.1",
2323
"ext-json": "*",
2424
"ext-tokenizer": "*"
2525
},
@@ -28,13 +28,12 @@
2828
"ext-libxml": "*",
2929
"editorconfig-checker/editorconfig-checker": "^10.7.0",
3030
"ergebnis/composer-normalize": "^2.19.0",
31-
"phpcompatibility/php-compatibility": "^9.3.5",
32-
"phpstan/phpstan": "^1.12.26",
33-
"phpstan/phpstan-phpunit": "^1.4.2",
34-
"phpstan/phpstan-strict-rules": "^1.6.2",
35-
"phpunit/phpunit": "^8.5.42 || ^9.6.23",
36-
"shipmonk/name-collision-detector": "^2.1.1",
37-
"slevomat/coding-standard": "^8.15.0"
31+
"phpstan/phpstan": "^2.1",
32+
"phpstan/phpstan-phpunit": "^2.0",
33+
"phpstan/phpstan-strict-rules": "^2.0",
34+
"phpunit/phpunit": "^10.5.58",
35+
"shipmonk/coding-standard": "^0.2.0",
36+
"shipmonk/name-collision-detector": "^2.1.1"
3837
},
3938
"autoload": {
4039
"psr-4": {
@@ -79,7 +78,7 @@
7978
"check:ec": "ec src tests",
8079
"check:scripts": "phpstan analyse -vv --ansi --level=6 scripts/*.php",
8180
"check:self": "bin/composer-dependency-analyser",
82-
"check:tests": "phpunit -vvv tests",
81+
"check:tests": "phpunit tests",
8382
"check:types": "phpstan analyse -vv --ansi",
8483
"fix:cs": "phpcbf"
8584
}

0 commit comments

Comments
 (0)