Skip to content

Commit 13b77b9

Browse files
committed
Test on PHP 8.4
1 parent 21e8808 commit 13b77b9

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

.github/workflows/ci.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,12 @@ jobs:
4040
matrix:
4141
os: [ubuntu-latest]
4242
php_version:
43-
- 7.2
44-
- 7.3
4543
- 7.4
4644
- 8.0
4745
- 8.1
4846
- 8.2
4947
- 8.3
48+
# - 8.4
5049
dependencies_level:
5150
- --prefer-lowest
5251
- ""
@@ -93,7 +92,7 @@ jobs:
9392
run: vendor/bin/phpstan analyse --no-progress
9493
- name: Run psalm
9594
if: ${{ matrix.os != 'windows-latest' }}
96-
run: vendor/bin/psalm --show-info=true
95+
run: vendor/bin/psalm
9796
- name: Run phan
9897
if: ${{ matrix.os != 'windows-latest' }}
9998
run: vendor/bin/phan

MO4/Sniffs/Formatting/AlphabeticalUseStatementsSniff.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,8 @@ private function findNewDestination(File $phpcsFile, int $stackPtr, string $impo
292292
{
293293
$tokens = $phpcsFile->getTokens();
294294

295-
$line = $tokens[$stackPtr]['line'];
295+
$line = $tokens[$stackPtr]['line'];
296+
/** @var int|bool $prevLine */
296297
$prevLine = false;
297298
$prevPtr = $stackPtr;
298299

MO4/Sniffs/Formatting/UnnecessaryNamespaceUsageSniff.php

+1
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ private function checkShorthandPossible(File $phpcsFile, array $useStatements, s
381381
if (true === $isDocBlock) {
382382
$tokens = $phpcsFile->getTokens();
383383
$oldContent = $tokens[$startPtr]['content'];
384+
/** @var string $newContent */
384385
$newContent = \str_replace($className, $replacement, $oldContent);
385386
$phpcsFile->fixer->replaceToken($startPtr, $newContent);
386387
} else {

composer.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"source": "https://github.com/mayflower/mo4-coding-standard"
2424
},
2525
"require": {
26-
"php": "~7.2 || ~8.0",
26+
"php": "~7.4 || ~8.0",
2727
"dealerdirect/phpcodesniffer-composer-installer": "~0.7 || ~1.0",
2828
"escapestudios/symfony2-coding-standard": "^3.10.0",
2929
"slevomat/coding-standard": "^8.14",
@@ -32,11 +32,11 @@
3232
"require-dev": {
3333
"ergebnis/composer-normalize": ">=2.19 <2.30",
3434
"phan/phan": "^5.4.2",
35-
"phpstan/phpstan": "^1.0",
36-
"phpstan/phpstan-strict-rules": "^1.0",
35+
"phpstan/phpstan": "^1.12",
36+
"phpstan/phpstan-strict-rules": "^1.6",
3737
"phpunit/phpunit": "^7.5.20 || ^8.5.36 || ^9.6.15",
3838
"psalm/plugin-phpunit": "^0.18",
39-
"vimeo/psalm": "^4.30"
39+
"vimeo/psalm": "^5.26"
4040
},
4141
"config": {
4242
"allow-plugins": {

phpstan.neon

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ parameters:
55
paths:
66
- %rootDir%/../../../MO4
77
- %rootDir%/../../../tests
8-
checkMissingIterableValueType: false
8+
ignoreErrors:
9+
- identifier: missingType.iterableValue
910
includes:
1011
- vendor/phpstan/phpstan-strict-rules/rules.neon

0 commit comments

Comments
 (0)