Skip to content

Commit cf35f90

Browse files
committed
Update phpstan, phpunit and min php version
1 parent 9005d25 commit cf35f90

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3']
18+
php-versions: ['8.0', '8.1', '8.2', '8.3', '8.4']
1919
composer-flags: ['', '--prefer-lowest']
2020
steps:
2121
- uses: actions/checkout@v4

composer.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,26 @@
1313
"lock": false
1414
},
1515
"require": {
16-
"php": ">=7.4",
17-
"composer-plugin-api": "^1.0 || ^2.0",
16+
"php": ">=8.1",
17+
"composer-plugin-api": "^2.0",
1818
"squizlabs/php_codesniffer": "^3.6"
1919
},
2020
"require-dev": {
2121
"composer/composer": "^2.0",
2222
"mikey179/vfsstream": "1.6.12",
2323
"phpmd/phpmd": "^2.15",
24-
"phpstan/phpstan": "^1.4",
25-
"phpstan/phpstan-phpunit": "^1.0",
26-
"phpstan/phpstan-strict-rules": "^1.1",
27-
"phpstan/extension-installer": "^1.1",
28-
"phpunit/phpunit": "^9.5",
24+
"phpstan/phpstan": "^2.0",
25+
"phpstan/phpstan-phpunit": "^2.0",
26+
"phpstan/phpstan-strict-rules": "^2.0",
27+
"phpstan/extension-installer": "^1.4",
28+
"phpunit/phpunit": "^10.5 || ^11.5",
2929
"roave/security-advisories": "dev-latest"
3030
},
3131
"scripts": {
32+
"baseline": ["@baseline:phpcs", "@baseline:phpmd", "@baseline:phpstan", "@baseline:phpcqc"],
33+
"baseline:phpcs": "phpcs --report=\\\\DR\\\\CodeSnifferBaseline\\\\Reports\\\\Baseline --report-file=phpcs.baseline.xml --basepath=.",
34+
"baseline:phpmd": "@check:phpmd --generate-baseline",
35+
"baseline:phpstan": "phpstan --generate-baseline",
3236
"run:plugin": "DR\\CodeSnifferBaseline\\Plugin\\Plugin::run",
3337
"check": ["@check:phpstan", "@check:phpmd", "@check:phpcs"],
3438
"check:phpstan": "phpstan analyse",

src/Baseline/BaselineSetFactory.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ class BaselineSetFactory
1010
/**
1111
* Read the baseline violations from the given filename path.
1212
* @throws RuntimeException
13-
* @SuppressWarnings(PHPMD.ErrorControlOperator) - handled by the RuntimeException
1413
*/
1514
public static function fromFile(string $fileName): ?BaselineSet
1615
{

src/Plugin/Plugin.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class Plugin implements PluginInterface, EventSubscriberInterface
1616
{
1717
private ?IOInterface $stream = null;
18-
private string $codeSnifferFilePath;
18+
private string $codeSnifferFilePath;
1919

2020
public function __construct(?string $codeSnifferFilePath = null)
2121
{
@@ -48,9 +48,6 @@ public function uninstall(Composer $composer, IOInterface $stream): void
4848
// not necessary
4949
}
5050

51-
/**
52-
* @SuppressWarnings(PHPMD.ErrorControlOperator) - handled by the === false check
53-
*/
5451
public function onPostInstall(): void
5552
{
5653
if ($this->stream === null) {

0 commit comments

Comments
 (0)