Skip to content

Commit 5fae544

Browse files
committed
Fix PHP shell script analysis
1 parent a27d2a6 commit 5fae544

File tree

4 files changed

+11
-26
lines changed

4 files changed

+11
-26
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,34 +19,17 @@ jobs:
1919
php-version: '8.3'
2020
- run: composer validate --strict --no-check-lock
2121

22-
check_code_style:
22+
check_code:
2323
name: Check code style
2424
runs-on: ubuntu-latest
2525
steps:
2626
- uses: actions/checkout@v4
27-
2827
- uses: shivammathur/setup-php@v2
2928
with:
3029
coverage: none
3130
php-version: '8.3'
32-
33-
- name: Install dependencies
34-
run: composer update
35-
36-
- run: ./vendor/bin/php-cs-fixer fix --dry-run --diff --show-progress=dots
37-
38-
static_analysis:
39-
name: Static analysis
40-
runs-on: ubuntu-latest
41-
steps:
42-
- uses: actions/checkout@v4
43-
- uses: shivammathur/setup-php@v2
44-
with:
45-
coverage: none
46-
php-version: '8.3'
47-
- name: Install dependencies
48-
run: composer update
49-
- run: ./vendor/bin/phpstan analyze
31+
- run: composer update
32+
- run: composer lint
5033

5134
tests:
5235
runs-on: ubuntu-latest

bin/update_cucumber

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ foreach (json_decode($composerConfig, true, 512, JSON_THROW_ON_ERROR)['repositor
2121
}
2222
}
2323

24-
if (!isset($oldHash)) {
24+
if (!isset($oldHash, $oldTag)) {
2525
echo "ERROR: Could not parse the composer configuration\n";
2626
exit(1);
2727
}

composer.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,19 @@
7474
"scripts": {
7575
"lint": [
7676
"Composer\\Config::disableProcessTimeout",
77-
"vendor/bin/phpstan analyse --no-progress --memory-limit 512M",
78-
"vendor/bin/php-cs-fixer check --diff --show-progress=dots --verbose"
77+
"vendor/bin/phpstan analyze --ansi --no-progress --memory-limit 512M",
78+
"vendor/bin/phpstan analyze bin/cucumber_changelog --ansi --no-progress --memory-limit 512M",
79+
"vendor/bin/phpstan analyze bin/update_cucumber --ansi --no-progress --memory-limit 512M",
80+
"vendor/bin/phpstan analyze bin/update_i18n --ansi --no-progress --memory-limit 512M",
81+
"vendor/bin/php-cs-fixer check --diff --ansi --show-progress=dots --verbose"
7982
],
8083
"test": [
8184
"Composer\\Config::disableProcessTimeout",
82-
"vendor/bin/phpunit ./tests"
85+
"vendor/bin/phpunit --colors"
8386
],
8487
"fix": [
8588
"Composer\\Config::disableProcessTimeout",
86-
"vendor/bin/php-cs-fixer fix --diff --show-progress=dots"
89+
"vendor/bin/php-cs-fixer fix --diff --ansi --show-progress=dots"
8790
]
8891
},
8992

phpstan.dist.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
parameters:
22
level: 1
33
paths:
4-
- bin
54
- src
65
- tests

0 commit comments

Comments
 (0)