Skip to content

Commit 954cb23

Browse files
committed
Allow builds to fail on PHP 8.0
1 parent 4d7b904 commit 954cb23

File tree

3 files changed

+120
-39
lines changed

3 files changed

+120
-39
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,47 +48,62 @@ jobs:
4848
benchmark:
4949
name: "Benchmark"
5050
runs-on: "ubuntu-latest"
51+
continue-on-error: ${{ matrix.experimental }}
5152
strategy:
53+
fail-fast: false
5254
matrix:
5355
php-version:
5456
- "7.2"
5557
- "7.3"
5658
- "7.4"
57-
- "8.0"
59+
experimental:
60+
- false
61+
include:
62+
- php-version: "8.0"
63+
experimental: true
64+
composer-options: "--ignore-platform-reqs"
5865
steps:
5966
- uses: "actions/checkout@v2"
6067
- uses: "shivammathur/setup-php@v2"
6168
with:
6269
php-version: "${{ matrix.php-version }}"
63-
tools: pecl
6470
extensions: bcmath, ctype, gmp
6571
coverage: "none"
6672
ini-values: "memory_limit=-1"
6773
- uses: "ramsey/composer-install@v1"
74+
with:
75+
composer-options: "${{ matrix.composer-options }}"
6876
- name: "Run PHPBench"
6977
run: "composer phpbench -- --ansi"
7078

7179
unit-tests:
7280
name: "Unit Tests"
7381
runs-on: "ubuntu-latest"
82+
continue-on-error: ${{ matrix.experimental }}
7483
strategy:
7584
fail-fast: false
7685
matrix:
7786
php-version:
7887
- "7.2"
7988
- "7.3"
8089
- "7.4"
81-
- "8.0"
90+
experimental:
91+
- false
92+
include:
93+
- php-version: "8.0"
94+
experimental: true
95+
composer-options: "--ignore-platform-reqs"
8296
steps:
8397
- uses: "actions/checkout@v2"
8498
- uses: "shivammathur/setup-php@v2"
8599
with:
86100
php-version: "${{ matrix.php-version }}"
87-
tools: pecl
88101
extensions: bcmath, ctype, gmp
89102
coverage: "pcov"
90103
ini-values: "memory_limit=-1"
91104
- uses: "ramsey/composer-install@v1"
105+
with:
106+
composer-options: "${{ matrix.composer-options }}"
92107
- name: "Run unit tests"
93108
run: "./vendor/bin/phpunit --verbose --colors=always --coverage-clover build/logs/clover.xml --coverage-text"
94109
- name: "Publish coverage report to Codecov"

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"psy/psysh": "^0.10.0",
3737
"slevomat/coding-standard": "^6.0",
3838
"squizlabs/php_codesniffer": "^3.5",
39-
"vimeo/psalm": "3.9.4"
39+
"vimeo/psalm": "^3.18"
4040
},
4141
"suggest": {
4242
"ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.",

tests/psalm-baseline.xml

Lines changed: 100 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,52 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="3.9.4@352bd3f5c5789db04e4010856c2f4e01ed354f4e">
2+
<files psalm-version="3.18.2@19aa905f7c3c7350569999a93c40ae91ae4e1626">
33
<file src="src/Builder/DegradedUuidBuilder.php">
44
<DeprecatedClass occurrences="3">
5-
<code>new DegradedTimeConverter()</code>
65
<code>DegradedUuid</code>
6+
<code>new DegradedTimeConverter()</code>
77
</DeprecatedClass>
8+
<ImpureVariable occurrences="2">
9+
<code>$this</code>
10+
<code>$this</code>
11+
</ImpureVariable>
12+
</file>
13+
<file src="src/Builder/FallbackBuilder.php">
14+
<ImpureMethodCall occurrences="1"/>
15+
<ImpureVariable occurrences="1">
16+
<code>$this</code>
17+
</ImpureVariable>
18+
</file>
19+
<file src="src/Converter/Number/BigNumberConverter.php">
20+
<ImpureVariable occurrences="2">
21+
<code>$this</code>
22+
<code>$this</code>
23+
</ImpureVariable>
824
</file>
925
<file src="src/Converter/Number/DegradedNumberConverter.php">
1026
<DeprecatedClass occurrences="1">
1127
<code>BigNumberConverter</code>
1228
</DeprecatedClass>
1329
</file>
30+
<file src="src/Converter/Number/GenericNumberConverter.php">
31+
<ImpureVariable occurrences="2">
32+
<code>$this</code>
33+
<code>$this</code>
34+
</ImpureVariable>
35+
</file>
1436
<file src="src/Converter/Time/DegradedTimeConverter.php">
1537
<DeprecatedClass occurrences="1">
1638
<code>BigNumberTimeConverter</code>
1739
</DeprecatedClass>
1840
</file>
19-
<file src="src/Converter/Time/PhpTimeConverter.php">
20-
<InvalidOperand occurrences="2">
21-
<code>$uuidTime</code>
22-
<code>$uuidTime</code>
23-
</InvalidOperand>
24-
</file>
25-
<file src="src/Generator/PeclUuidRandomGenerator.php">
26-
<MixedAssignment occurrences="1">
27-
<code>$uuid</code>
28-
</MixedAssignment>
29-
<MixedInferredReturnType occurrences="1">
30-
<code>string</code>
31-
</MixedInferredReturnType>
32-
<MixedReturnStatement occurrences="1">
33-
<code>uuid_parse($uuid)</code>
34-
</MixedReturnStatement>
35-
</file>
36-
<file src="src/Generator/PeclUuidTimeGenerator.php">
37-
<MixedAssignment occurrences="1">
38-
<code>$uuid</code>
39-
</MixedAssignment>
40-
<MixedInferredReturnType occurrences="1">
41-
<code>string</code>
42-
</MixedInferredReturnType>
43-
<MixedReturnStatement occurrences="1">
44-
<code>uuid_parse($uuid)</code>
45-
</MixedReturnStatement>
41+
<file src="src/FeatureSet.php">
42+
<PropertyNotSetInConstructor occurrences="6">
43+
<code>$calculator</code>
44+
<code>$dceSecurityGenerator</code>
45+
<code>$numberConverter</code>
46+
<code>$timeConverter</code>
47+
<code>$timeGenerator</code>
48+
<code>$timeProvider</code>
49+
</PropertyNotSetInConstructor>
4650
</file>
4751
<file src="src/Generator/PeclUuidNameGenerator.php">
4852
<ImpureFunctionCall occurrences="3">
@@ -51,22 +55,58 @@
5155
<code>uuid_parse</code>
5256
</ImpureFunctionCall>
5357
</file>
58+
<file src="src/Guid/GuidBuilder.php">
59+
<ImpureVariable occurrences="3">
60+
<code>$this</code>
61+
<code>$this</code>
62+
<code>$this</code>
63+
</ImpureVariable>
64+
</file>
65+
<file src="src/Nonstandard/UuidBuilder.php">
66+
<ImpureVariable occurrences="3">
67+
<code>$this</code>
68+
<code>$this</code>
69+
<code>$this</code>
70+
</ImpureVariable>
71+
</file>
5472
<file src="src/Provider/Dce/SystemDceSecurityProvider.php">
5573
<ForbiddenCode occurrences="5">
56-
<code>shell_exec('id -u')</code>
5774
<code>shell_exec('id -g')</code>
58-
<code>shell_exec('whoami /user /fo csv /nh')</code>
75+
<code>shell_exec('id -u')</code>
5976
<code>shell_exec('net user %username% | findstr /b /i "Local Group Memberships"')</code>
77+
<code>shell_exec('whoami /user /fo csv /nh')</code>
6078
<code>shell_exec('wmic group get name,sid | findstr /b /i ' . escapeshellarg($firstGroup))</code>
6179
</ForbiddenCode>
6280
</file>
6381
<file src="src/Provider/Node/SystemNodeProvider.php">
6482
<MixedArgument occurrences="1">
6583
<code>$macs</code>
6684
</MixedArgument>
67-
<MixedAssignment occurrences="1">
68-
<code>$node</code>
69-
</MixedAssignment>
85+
<MixedArrayAccess occurrences="1">
86+
<code>$macs</code>
87+
</MixedArrayAccess>
88+
<MixedArrayAssignment occurrences="1">
89+
<code>$macs[]</code>
90+
</MixedArrayAssignment>
91+
</file>
92+
<file src="src/Rfc4122/UuidBuilder.php">
93+
<ImpureVariable occurrences="15">
94+
<code>$this</code>
95+
<code>$this</code>
96+
<code>$this</code>
97+
<code>$this</code>
98+
<code>$this</code>
99+
<code>$this</code>
100+
<code>$this</code>
101+
<code>$this</code>
102+
<code>$this</code>
103+
<code>$this</code>
104+
<code>$this</code>
105+
<code>$this</code>
106+
<code>$this</code>
107+
<code>$this</code>
108+
<code>$this</code>
109+
</ImpureVariable>
70110
</file>
71111
<file src="src/Uuid.php">
72112
<ImpureMethodCall occurrences="6">
@@ -78,4 +118,30 @@
78118
<code>getFactory</code>
79119
</ImpureMethodCall>
80120
</file>
121+
<file src="src/UuidFactory.php">
122+
<ImpurePropertyFetch occurrences="7">
123+
<code>$this-&gt;codec</code>
124+
<code>$this-&gt;codec</code>
125+
<code>$this-&gt;codec</code>
126+
<code>$this-&gt;isDefaultFeatureSet</code>
127+
<code>$this-&gt;nameGenerator</code>
128+
<code>$this-&gt;numberConverter</code>
129+
<code>$this-&gt;uuidBuilder</code>
130+
</ImpurePropertyFetch>
131+
<ImpureVariable occurrences="13">
132+
<code>$this</code>
133+
<code>$this</code>
134+
<code>$this</code>
135+
<code>$this</code>
136+
<code>$this</code>
137+
<code>$this</code>
138+
<code>$this</code>
139+
<code>$this</code>
140+
<code>$this</code>
141+
<code>$this</code>
142+
<code>$this</code>
143+
<code>$this</code>
144+
<code>$this</code>
145+
</ImpureVariable>
146+
</file>
81147
</files>

0 commit comments

Comments
 (0)