Skip to content

Commit a63b832

Browse files
committed
Updated to the latest QA tool chain
1 parent a820f27 commit a63b832

6 files changed

Lines changed: 210 additions & 82 deletions

File tree

.github/workflows/main.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,54 @@ jobs:
132132
path: ./vendor/
133133
key: ${{ runner.OS }}-${{ matrix.composer }}-${{ hashFiles('**/composer.lock') }}
134134
- run: ./vendor/bin/php-cs-fixer fix --config=.php_cs --ansi --dry-run --diff --verbose --allow-risky=yes --show-progress=estimating
135+
psalm:
136+
strategy:
137+
matrix:
138+
php: [7.3]
139+
composer: [lowest, current, highest]
140+
needs: composer-install
141+
runs-on: ubuntu-latest
142+
container:
143+
image: wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.10-dev-root
144+
steps:
145+
- uses: actions/checkout@v1
146+
- name: Cache composer packages
147+
uses: actions/cache@v1.0.1
148+
with:
149+
path: ./vendor/
150+
key: ${{ runner.OS }}-${{ matrix.composer }}-${{ hashFiles('**/composer.lock') }}
151+
- run: ./vendor/bin/psalm --threads=$(nproc)
152+
composer-unused:
153+
strategy:
154+
matrix:
155+
php: [7.3]
156+
composer: [lowest, current, highest]
157+
needs: composer-install
158+
runs-on: ubuntu-latest
159+
container:
160+
image: wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.10-dev-root
161+
steps:
162+
- uses: actions/checkout@v1
163+
- name: Cache composer packages
164+
uses: actions/cache@v1.0.1
165+
with:
166+
path: ./vendor/
167+
key: ${{ runner.OS }}-${{ matrix.composer }}-${{ hashFiles('**/composer.lock') }}
168+
- run: composer unused --ansi
169+
composer-require-checker:
170+
strategy:
171+
matrix:
172+
php: [7.3]
173+
composer: [lowest, current, highest]
174+
needs: composer-install
175+
runs-on: ubuntu-latest
176+
container:
177+
image: wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.10-dev-root
178+
steps:
179+
- uses: actions/checkout@v1
180+
- name: Cache composer packages
181+
uses: actions/cache@v1.0.1
182+
with:
183+
path: ./vendor/
184+
key: ${{ runner.OS }}-${{ matrix.composer }}-${{ hashFiles('**/composer.lock') }}
185+
- run: ./vendor/bin/composer-require-checker --ignore-parse-errors --ansi -vvv --config-file=composer-require-checker.json

composer-require-checker.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"symbol-whitelist" : [
3+
"null", "true", "false",
4+
"static", "self", "parent",
5+
"array", "string", "int", "float", "bool", "iterable", "callable", "void", "object"
6+
],
7+
"php-core-extensions" : [
8+
"Core",
9+
"date",
10+
"pcre",
11+
"Phar",
12+
"Reflection",
13+
"SPL",
14+
"standard"
15+
],
16+
"scan-files" : []
17+
}

composer.json

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"ext-parallel": "*",
1515
"react/event-loop": "^1.1",
1616
"react/promise": "^2.7",
17-
"reactivex/rxphp": "^2.0",
1817
"wyrihaximus/pool-info": "^1.0",
1918
"wyrihaximus/react-parallel-contracts": "^1.0",
2019
"wyrihaximus/react-parallel-future-to-promise-converter": "^1.1 || ^1.0.1",
@@ -55,35 +54,48 @@
5554
"ci-coverage": [
5655
"if [ -f ./build/logs/clover.xml ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi"
5756
],
57+
"composer-require-checker": [
58+
"composer-require-checker --ignore-parse-errors --ansi -vvv --config-file=composer-require-checker.json"
59+
],
5860
"cs": [
5961
"php-cs-fixer fix --config=.php_cs --ansi --dry-run --diff --verbose --allow-risky=yes --show-progress=estimating"
6062
],
6163
"cs-fix": [
6264
"php-cs-fixer fix --config=.php_cs --ansi --verbose --allow-risky=yes --show-progress=estimating"
6365
],
66+
"ensure-installed": "composer install --ansi -n -q",
6467
"infection": [
6568
"infection --ansi --min-msi=100 --min-covered-msi=100 --threads=$(nproc)"
6669
],
6770
"lint-php": [
6871
"parallel-lint --exclude vendor ."
6972
],
73+
"psalm": [
74+
"psalm --threads=$(nproc)"
75+
],
7076
"qa-all": [
7177
"composer validate --ansi",
7278
"composer normalize --ansi",
79+
"composer unused --ansi",
7380
"@lint-php",
7481
"@cs",
7582
"@stan",
83+
"@psalm",
7684
"@unit",
77-
"@infection"
85+
"@infection",
86+
"@composer-require-checker"
7887
],
7988
"qa-all-extended": [
8089
"composer validate --ansi",
8190
"composer normalize --ansi",
91+
"composer unused --ansi",
8292
"@lint-php",
8393
"@cs",
8494
"@stan",
95+
"@psalm",
8596
"@unit-coverage",
86-
"@infection"
97+
"@infection",
98+
"@composer-require-checker"
8799
],
88100
"qa-ci": [
89101
"@unit"
@@ -97,12 +109,6 @@
97109
"qa-contrib": [
98110
"@qa-all"
99111
],
100-
"qa-windows": [
101-
"@lint-php",
102-
"@cs",
103-
"@stan",
104-
"@unit"
105-
],
106112
"stan": [
107113
"phpstan analyse src tests --level max --ansi -c phpstan.neon"
108114
],

composer.lock

Lines changed: 71 additions & 71 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

psalm.xml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0"?>
2+
<psalm
3+
totallyTyped="false"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xmlns="https://getpsalm.org/schema/config"
6+
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
7+
>
8+
<projectFiles>
9+
<directory name="src"/>
10+
<ignoreFiles>
11+
<directory name="vendor"/>
12+
</ignoreFiles>
13+
</projectFiles>
14+
15+
<issueHandlers>
16+
<LessSpecificReturnType errorLevel="error"/>
17+
18+
<!-- level 3 issues - slightly lazy code writing, but provably low false-negatives -->
19+
20+
<DeprecatedMethod errorLevel="error"/>
21+
<DeprecatedProperty errorLevel="error"/>
22+
<DeprecatedClass errorLevel="error"/>
23+
<DeprecatedConstant errorLevel="error"/>
24+
<DeprecatedInterface errorLevel="error"/>
25+
<DeprecatedTrait errorLevel="error"/>
26+
27+
<InternalMethod errorLevel="error"/>
28+
<InternalProperty errorLevel="error"/>
29+
<InternalClass errorLevel="error"/>
30+
31+
<MissingClosureReturnType errorLevel="error"/>
32+
<MissingReturnType errorLevel="error"/>
33+
<MissingPropertyType errorLevel="error"/>
34+
<InvalidDocblock errorLevel="error"/>
35+
<MisplacedRequiredParam errorLevel="error"/>
36+
37+
<PropertyNotSetInConstructor errorLevel="error"/>
38+
<MissingConstructor errorLevel="error"/>
39+
<MissingClosureParamType errorLevel="error"/>
40+
<MissingParamType errorLevel="error"/>
41+
42+
<RedundantCondition errorLevel="error"/>
43+
44+
<DocblockTypeContradiction errorLevel="error"/>
45+
<RedundantConditionGivenDocblockType errorLevel="error"/>
46+
47+
<UnresolvableInclude errorLevel="error"/>
48+
49+
<RawObjectIteration errorLevel="error"/>
50+
51+
<InvalidStringClass errorLevel="error"/>
52+
</issueHandlers>
53+
<plugins><pluginClass class="Psalm\PhpUnitPlugin\Plugin"/></plugins></psalm>

0 commit comments

Comments
 (0)