Skip to content

Commit 168cfc5

Browse files
committed
Update lint jobs
1 parent 623bfb7 commit 168cfc5

18 files changed

Lines changed: 35 additions & 42 deletions

.github/workflows/coverage.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
if: steps.composer-cache.outputs.cache-hit != 'true'
4242
run: |
4343
composer config version 1.9.0
44+
composer remove --no-update phan/phan friendsofphp/php-cs-fixer nette/utils phpmd/phpmd phpstan/phpstan squizlabs/php_codesniffer vimeo/psalm
4445
composer update --prefer-dist ${{ matrix.setup != 'next' && format('--prefer-{0}', matrix.setup) || '' }} --no-progress ${{ matrix.php >= 8.1 && '--ignore-platform-req=php' || '' }}
4546
4647
- name: Prepare git config

.github/workflows/phan.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ jobs:
3838
3939
- name: Install dependencies
4040
if: steps.composer-cache.outputs.cache-hit != 'true'
41-
run: composer update --prefer-dist ${{ matrix.setup != 'next' && format('--prefer-{0}', matrix.setup) || '' }} --no-progress
41+
run: |
42+
composer remove --no-update phpunit/phpunit friendsofphp/php-cs-fixer nette/utils phpmd/phpmd phpstan/phpstan squizlabs/php_codesniffer vimeo/psalm
43+
composer update --prefer-dist ${{ matrix.setup != 'next' && format('--prefer-{0}', matrix.setup) || '' }} --no-progress
4244
4345
- name: Check style with Phan
4446
run: composer run-script phan

.github/workflows/phpcs.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@ jobs:
3232
uses: actions/cache@v4
3333
with:
3434
path: vendor
35-
key: style-${{ runner.os }}-${{ matrix.setup }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
35+
key: cs-${{ runner.os }}-${{ matrix.setup }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
3636
restore-keys: |
37-
style-${{ runner.os }}-${{ matrix.setup }}-${{ matrix.php }}-
37+
cs-${{ runner.os }}-${{ matrix.setup }}-${{ matrix.php }}-
3838
3939
- name: Install dependencies
4040
if: steps.composer-cache.outputs.cache-hit != 'true'
41-
run: composer update --prefer-dist ${{ matrix.setup != 'next' && format('--prefer-{0}', matrix.setup) || '' }} --no-progress
41+
run: |
42+
composer remove --no-update phpunit/phpunit phan/phan friendsofphp/php-cs-fixer nette/utils phpmd/phpmd phpstan/phpstan vimeo/psalm
43+
composer update --prefer-dist ${{ matrix.setup != 'next' && format('--prefer-{0}', matrix.setup) || '' }} --no-progress
4244
4345
- name: Check style with PHPCS
4446
run: composer run-script phpcs

.github/workflows/phpcsf.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@ jobs:
3232
uses: actions/cache@v4
3333
with:
3434
path: vendor
35-
key: style-${{ runner.os }}-${{ matrix.setup }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
35+
key: csf-${{ runner.os }}-${{ matrix.setup }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
3636
restore-keys: |
37-
style-${{ runner.os }}-${{ matrix.setup }}-${{ matrix.php }}-
37+
csf-${{ runner.os }}-${{ matrix.setup }}-${{ matrix.php }}-
3838
3939
- name: Install dependencies
4040
if: steps.composer-cache.outputs.cache-hit != 'true'
41-
run: composer update --prefer-dist ${{ matrix.setup != 'next' && format('--prefer-{0}', matrix.setup) || '' }} --no-progress
41+
run: |
42+
composer remove --no-update phpunit/phpunit phan/phan nette/utils phpmd/phpmd phpstan/phpstan squizlabs/php_codesniffer vimeo/psalm
43+
composer update --prefer-dist ${{ matrix.setup != 'next' && format('--prefer-{0}', matrix.setup) || '' }} --no-progress
4244
4345
- name: Check style with phpcsf
4446
run: composer run-script phpcsf

.github/workflows/phpmd.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ jobs:
3838
3939
- name: Install dependencies
4040
if: steps.composer-cache.outputs.cache-hit != 'true'
41-
run: composer update --prefer-dist ${{ matrix.setup != 'next' && format('--prefer-{0}', matrix.setup) || '' }} --no-progress
41+
run: |
42+
composer remove --no-update phpunit/phpunit phan/phan friendsofphp/php-cs-fixer nette/utils phpstan/phpstan squizlabs/php_codesniffer vimeo/psalm
43+
composer update --prefer-dist ${{ matrix.setup != 'next' && format('--prefer-{0}', matrix.setup) || '' }} --no-progress
4244
4345
- name: Check style with phpmd
4446
run: composer run-script phpmd

.github/workflows/psalm.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
php: ['8.2']
16+
php: ['8.4']
1717
setup: ['stable']
1818

1919
name: PHP ${{ matrix.php }} - ${{ matrix.setup }}
@@ -38,9 +38,8 @@ jobs:
3838
3939
- name: Install dependencies
4040
if: steps.composer-cache.outputs.cache-hit != 'true'
41-
# tests/use-fork.php because of https://github.com/vimeo/psalm/issues/8957
4241
run: |
43-
php tests/use-fork.php vimeo/psalm 5.14.2 https://github.com/kylekatarnls/psalm.git fix/datetime-inheritance-5.x
42+
composer remove --no-update phan/phan phpunit/phpunit friendsofphp/php-cs-fixer nette/utils phpmd/phpmd phpstan/phpstan squizlabs/php_codesniffer
4443
composer update --prefer-dist ${{ matrix.setup != 'next' && format('--prefer-{0}', matrix.setup) || '' }} --no-progress
4544
4645
- name: Check style with psalm

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
if: steps.composer-cache.outputs.cache-hit != 'true'
4646
run: |
4747
composer config version 1.9.0
48+
composer remove --no-update phan/phan friendsofphp/php-cs-fixer nette/utils phpmd/phpmd phpstan/phpstan squizlabs/php_codesniffer vimeo/psalm
4849
composer update --prefer-dist ${{ matrix.setup != 'next' && format('--prefer-{0}', matrix.setup) || '' }} --no-progress ${{ matrix.php >= 8.1 && '--ignore-platform-req=php' || '' }} --no-interaction
4950
5051
- name: Prepare git config

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
},
2828
"require-dev": {
2929
"friendsofphp/php-cs-fixer": "^2.15.0 || ^3.23.0",
30-
"nette/utils": "^3.2.10",
30+
"nette/utils": "^3.2.10 || ^4.1.3",
3131
"phan/phan": "^3.2.10 || ^5.4.2",
3232
"phpunit/phpunit": "^8.5.52 || ^9.6.34",
3333
"phpmd/phpmd": "^2.13.0",
3434
"phpstan/phpstan": "^0.11.15 || ^1.10.29",
3535
"squizlabs/php_codesniffer": "^3.7.2",
36-
"vimeo/psalm": "^4.30.0 || ^5.14.1"
36+
"vimeo/psalm": "^4.30.0 || ^5.14.1 || ^6.15.1"
3737
},
3838
"autoload": {
3939
"psr-4": {

psalm.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
<InternalProperty errorLevel="info" />
3333
<InternalClass errorLevel="info" />
3434

35+
<ClassMustBeFinal errorLevel="info" />
36+
<MissingOverrideAttribute errorLevel="info" />
37+
3538
<MissingClosureReturnType errorLevel="info" />
3639
<MissingReturnType errorLevel="info" />
3740
<MissingPropertyType errorLevel="info" />

src/Phug/Split/Command/CommandBase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ protected function gitEscape(string $value): string
5555
*
5656
* @psalm-suppress UndefinedThisPropertyFetch RiskyTruthyFalsyComparison
5757
*/
58-
protected function getGitCommand(string $command, array $options = [], string $redirect = null): string
58+
protected function getGitCommand(string $command, array $options = [], ?string $redirect = null): string
5959
{
6060
foreach ($options as $name => $value) {
6161
$command .= ' --'.$name.'='.$this->gitEscape($value);
@@ -73,7 +73,7 @@ protected function getGitCommand(string $command, array $options = [], string $r
7373
*
7474
* @return string|null
7575
*/
76-
protected function git(string $command, array $options = [], string $redirect = null): ?string
76+
protected function git(string $command, array $options = [], ?string $redirect = null): ?string
7777
{
7878
$command = $this->getGitCommand($command, $options, $redirect);
7979

0 commit comments

Comments
 (0)