Skip to content

Commit

Permalink
Test on PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoll committed Dec 16, 2024
1 parent 21e8808 commit 13b77b9
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,12 @@ jobs:
matrix:
os: [ubuntu-latest]
php_version:
- 7.2
- 7.3
- 7.4
- 8.0
- 8.1
- 8.2
- 8.3
# - 8.4
dependencies_level:
- --prefer-lowest
- ""
Expand Down Expand Up @@ -93,7 +92,7 @@ jobs:
run: vendor/bin/phpstan analyse --no-progress
- name: Run psalm
if: ${{ matrix.os != 'windows-latest' }}
run: vendor/bin/psalm --show-info=true
run: vendor/bin/psalm
- name: Run phan
if: ${{ matrix.os != 'windows-latest' }}
run: vendor/bin/phan
Expand Down
3 changes: 2 additions & 1 deletion MO4/Sniffs/Formatting/AlphabeticalUseStatementsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ private function findNewDestination(File $phpcsFile, int $stackPtr, string $impo
{
$tokens = $phpcsFile->getTokens();

$line = $tokens[$stackPtr]['line'];
$line = $tokens[$stackPtr]['line'];
/** @var int|bool $prevLine */
$prevLine = false;
$prevPtr = $stackPtr;

Expand Down
1 change: 1 addition & 0 deletions MO4/Sniffs/Formatting/UnnecessaryNamespaceUsageSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ private function checkShorthandPossible(File $phpcsFile, array $useStatements, s
if (true === $isDocBlock) {
$tokens = $phpcsFile->getTokens();
$oldContent = $tokens[$startPtr]['content'];
/** @var string $newContent */
$newContent = \str_replace($className, $replacement, $oldContent);
$phpcsFile->fixer->replaceToken($startPtr, $newContent);
} else {
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"source": "https://github.com/mayflower/mo4-coding-standard"
},
"require": {
"php": "~7.2 || ~8.0",
"php": "~7.4 || ~8.0",
"dealerdirect/phpcodesniffer-composer-installer": "~0.7 || ~1.0",
"escapestudios/symfony2-coding-standard": "^3.10.0",
"slevomat/coding-standard": "^8.14",
Expand All @@ -32,11 +32,11 @@
"require-dev": {
"ergebnis/composer-normalize": ">=2.19 <2.30",
"phan/phan": "^5.4.2",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-strict-rules": "^1.0",
"phpstan/phpstan": "^1.12",
"phpstan/phpstan-strict-rules": "^1.6",
"phpunit/phpunit": "^7.5.20 || ^8.5.36 || ^9.6.15",
"psalm/plugin-phpunit": "^0.18",
"vimeo/psalm": "^4.30"
"vimeo/psalm": "^5.26"
},
"config": {
"allow-plugins": {
Expand Down
3 changes: 2 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ parameters:
paths:
- %rootDir%/../../../MO4
- %rootDir%/../../../tests
checkMissingIterableValueType: false
ignoreErrors:
- identifier: missingType.iterableValue
includes:
- vendor/phpstan/phpstan-strict-rules/rules.neon

0 comments on commit 13b77b9

Please sign in to comment.