Skip to content

Commit b095f16

Browse files
authored
Fix CI-CD (#100)
1 parent 2166016 commit b095f16

File tree

10 files changed

+206
-148
lines changed

10 files changed

+206
-148
lines changed

.github/workflows/integrate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ jobs:
218218
needs:
219219
- "byte_level"
220220
- "syntax_errors"
221-
runs-on: "ubuntu-20.04"
221+
runs-on: "ubuntu-latest"
222222
steps:
223223
- name: "Checkout code"
224224
uses: "actions/checkout@v4"

composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"php": ">=8.1",
2020
"ext-json": "*",
2121
"ext-openssl": "*",
22-
"brick/math": "^0.9|^0.10|^0.11|^0.12",
22+
"brick/math": "^0.9|^0.10|^0.11|^0.12|^0.13",
2323
"spomky-labs/pki-framework": "^1.0"
2424
},
2525
"autoload": {
@@ -29,17 +29,17 @@
2929
},
3030
"require-dev": {
3131
"infection/infection": "^0.29",
32-
"phpstan/phpstan": "^1.7",
33-
"phpstan/phpstan-deprecation-rules": "^1.0",
34-
"phpstan/phpstan-phpunit": "^1.1",
35-
"phpstan/phpstan-strict-rules": "^1.2",
36-
"phpunit/phpunit": "^10.1|^11.0",
37-
"rector/rector": "^1.0",
32+
"phpstan/phpstan": "^1.7|^2.0",
33+
"phpstan/phpstan-deprecation-rules": "^1.0|^2.0",
34+
"phpstan/phpstan-phpunit": "^1.1|^2.0",
35+
"phpstan/phpstan-strict-rules": "^1.0|^2.0",
36+
"phpunit/phpunit": "^10.1|^11.0|^12.0",
37+
"rector/rector": "^2.0",
3838
"symplify/easy-coding-standard": "^12.0",
3939
"symfony/phpunit-bridge": "^6.4|^7.0",
40-
"ekino/phpstan-banned-code": "^1.0",
40+
"ekino/phpstan-banned-code": "^1.0|^2.0|^3.0",
4141
"php-parallel-lint/php-parallel-lint": "^1.3",
42-
"qossmic/deptrac": "^2.0",
42+
"deptrac/deptrac": "^3.0",
4343
"phpstan/extension-installer": "^1.3"
4444
},
4545
"autoload-dev": {

phpstan-baseline.neon

Lines changed: 92 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,171 +1,229 @@
11
parameters:
22
ignoreErrors:
33
-
4-
message: "#^Cannot cast mixed to string\\.$#"
4+
message: '#^Cannot cast mixed to string\.$#'
5+
identifier: cast.string
56
count: 1
67
path: src/Algorithm/Mac/Hmac.php
78

89
-
9-
message: "#^Method Cose\\\\Algorithm\\\\Signature\\\\ECDSA\\\\ECSignature\\:\\:fromAsn1\\(\\) should return string but returns string\\|false\\.$#"
10+
message: '#^Parameter \#1 \$signature of static method Cose\\Algorithm\\Signature\\ECDSA\\ECSignature\:\:fromAsn1\(\) expects string, mixed given\.$#'
11+
identifier: argument.type
12+
count: 1
13+
path: src/Algorithm/Signature/ECDSA/ECDSA.php
14+
15+
-
16+
message: '#^Method Cose\\Algorithm\\Signature\\ECDSA\\ECSignature\:\:fromAsn1\(\) should return string but returns string\|false\.$#'
17+
identifier: return.type
1018
count: 1
1119
path: src/Algorithm/Signature/ECDSA/ECSignature.php
1220

1321
-
14-
message: "#^Method Cose\\\\Algorithm\\\\Signature\\\\ECDSA\\\\ECSignature\\:\\:toAsn1\\(\\) should return string but returns string\\|false\\.$#"
22+
message: '#^Method Cose\\Algorithm\\Signature\\ECDSA\\ECSignature\:\:toAsn1\(\) should return string but returns string\|false\.$#'
23+
identifier: return.type
1524
count: 1
1625
path: src/Algorithm/Signature/ECDSA/ECSignature.php
1726

1827
-
19-
message: "#^Parameter \\#1 \\$signature of function sodium_crypto_sign_verify_detached expects non\\-empty\\-string, string given\\.$#"
28+
message: '#^Parameter \#1 \$signature of function sodium_crypto_sign_verify_detached expects non\-empty\-string, string given\.$#'
29+
identifier: argument.type
2030
count: 1
2131
path: src/Algorithm/Signature/EdDSA/EdDSA.php
2232

2333
-
24-
message: "#^Parameter \\#2 \\$secret_key of function sodium_crypto_sign_detached expects non\\-empty\\-string, string given\\.$#"
34+
message: '#^Parameter \#2 \$secret_key of function sodium_crypto_sign_detached expects non\-empty\-string, string given\.$#'
35+
identifier: argument.type
2536
count: 2
2637
path: src/Algorithm/Signature/EdDSA/EdDSA.php
2738

2839
-
29-
message: "#^Parameter \\#3 \\$public_key of function sodium_crypto_sign_verify_detached expects non\\-empty\\-string, string given\\.$#"
40+
message: '#^Parameter \#3 \$public_key of function sodium_crypto_sign_verify_detached expects non\-empty\-string, string given\.$#'
41+
identifier: argument.type
3042
count: 1
3143
path: src/Algorithm/Signature/EdDSA/EdDSA.php
3244

3345
-
34-
message: "#^Parameter \\#1 \\$length of function random_bytes expects int\\<1, max\\>, int given\\.$#"
46+
message: '#^Parameter \#1 \$length of function random_bytes expects int\<1, max\>, int given\.$#'
47+
identifier: argument.type
3548
count: 1
3649
path: src/Algorithm/Signature/RSA/PSSRSA.php
3750

3851
-
39-
message: "#^Parameter \\#1 \\$array of function current expects array\\|object, array\\|false given\\.$#"
52+
message: '#^Method Cose\\Algorithm\\Signature\\RSA\\RSA\:\:sign\(\) should return string but returns mixed\.$#'
53+
identifier: return.type
54+
count: 1
55+
path: src/Algorithm/Signature/RSA/RSA.php
56+
57+
-
58+
message: '#^Parameter \#1 \$array of function current expects array\|object, array\|false given\.$#'
59+
identifier: argument.type
60+
count: 1
61+
path: src/BigInteger.php
62+
63+
-
64+
message: '#^Parameter \#1 \$number of static method Brick\\Math\\BigInteger\:\:fromBase\(\) expects string, mixed given\.$#'
65+
identifier: argument.type
4066
count: 1
4167
path: src/BigInteger.php
4268

4369
-
44-
message: "#^Parameter \\#1 \\$string of function ltrim expects string, string\\|false given\\.$#"
70+
message: '#^Parameter \#1 \$string of function ltrim expects string, string\|false given\.$#'
71+
identifier: argument.type
4572
count: 1
4673
path: src/BigInteger.php
4774

4875
-
49-
message: "#^Cannot cast mixed to string\\.$#"
76+
message: '#^Cannot cast mixed to string\.$#'
77+
identifier: cast.string
5078
count: 2
5179
path: src/Key/Ec2Key.php
5280

5381
-
54-
message: "#^Method Cose\\\\Key\\\\Ec2Key\\:\\:curve\\(\\) should return int\\|string but returns mixed\\.$#"
82+
message: '#^Method Cose\\Key\\Ec2Key\:\:curve\(\) should return int\|string but returns mixed\.$#'
83+
identifier: return.type
5584
count: 1
5685
path: src/Key/Ec2Key.php
5786

5887
-
59-
message: "#^Method Cose\\\\Key\\\\Ec2Key\\:\\:d\\(\\) should return string but returns mixed\\.$#"
88+
message: '#^Method Cose\\Key\\Ec2Key\:\:d\(\) should return string but returns mixed\.$#'
89+
identifier: return.type
6090
count: 1
6191
path: src/Key/Ec2Key.php
6292

6393
-
64-
message: "#^Method Cose\\\\Key\\\\Ec2Key\\:\\:x\\(\\) should return string but returns mixed\\.$#"
94+
message: '#^Method Cose\\Key\\Ec2Key\:\:x\(\) should return string but returns mixed\.$#'
95+
identifier: return.type
6596
count: 1
6697
path: src/Key/Ec2Key.php
6798

6899
-
69-
message: "#^Method Cose\\\\Key\\\\Ec2Key\\:\\:y\\(\\) should return string but returns mixed\\.$#"
100+
message: '#^Method Cose\\Key\\Ec2Key\:\:y\(\) should return string but returns mixed\.$#'
101+
identifier: return.type
70102
count: 1
71103
path: src/Key/Ec2Key.php
72104

73105
-
74-
message: "#^Cannot cast mixed to int\\.$#"
106+
message: '#^Cannot cast mixed to int\.$#'
107+
identifier: cast.int
75108
count: 1
76109
path: src/Key/Key.php
77110

78111
-
79-
message: "#^Method Cose\\\\Key\\\\Key\\:\\:type\\(\\) should return int\\|string but returns mixed\\.$#"
112+
message: '#^Method Cose\\Key\\Key\:\:type\(\) should return int\|string but returns mixed\.$#'
113+
identifier: return.type
80114
count: 1
81115
path: src/Key/Key.php
82116

83117
-
84-
message: "#^Method Cose\\\\Key\\\\OkpKey\\:\\:curve\\(\\) should return int\\|string but returns mixed\\.$#"
118+
message: '#^Method Cose\\Key\\OkpKey\:\:curve\(\) should return int\|string but returns mixed\.$#'
119+
identifier: return.type
85120
count: 1
86121
path: src/Key/OkpKey.php
87122

88123
-
89-
message: "#^Method Cose\\\\Key\\\\OkpKey\\:\\:d\\(\\) should return string but returns mixed\\.$#"
124+
message: '#^Method Cose\\Key\\OkpKey\:\:d\(\) should return string but returns mixed\.$#'
125+
identifier: return.type
90126
count: 1
91127
path: src/Key/OkpKey.php
92128

93129
-
94-
message: "#^Method Cose\\\\Key\\\\OkpKey\\:\\:x\\(\\) should return string but returns mixed\\.$#"
130+
message: '#^Method Cose\\Key\\OkpKey\:\:x\(\) should return string but returns mixed\.$#'
131+
identifier: return.type
95132
count: 1
96133
path: src/Key/OkpKey.php
97134

98135
-
99-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:QInv\\(\\) should return string but returns mixed\\.$#"
136+
message: '#^Method Cose\\Key\\RsaKey\:\:QInv\(\) should return string but returns mixed\.$#'
137+
identifier: return.type
138+
count: 1
139+
path: src/Key/RsaKey.php
140+
141+
-
142+
message: '#^Method Cose\\Key\\RsaKey\:\:d\(\) should return string but returns mixed\.$#'
143+
identifier: return.type
100144
count: 1
101145
path: src/Key/RsaKey.php
102146

103147
-
104-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:d\\(\\) should return string but returns mixed\\.$#"
148+
message: '#^Method Cose\\Key\\RsaKey\:\:dI\(\) should return string but returns mixed\.$#'
149+
identifier: return.type
105150
count: 1
106151
path: src/Key/RsaKey.php
107152

108153
-
109-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:dI\\(\\) should return string but returns mixed\\.$#"
154+
message: '#^Method Cose\\Key\\RsaKey\:\:dP\(\) should return string but returns mixed\.$#'
155+
identifier: return.type
110156
count: 1
111157
path: src/Key/RsaKey.php
112158

113159
-
114-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:dP\\(\\) should return string but returns mixed\\.$#"
160+
message: '#^Method Cose\\Key\\RsaKey\:\:dQ\(\) should return string but returns mixed\.$#'
161+
identifier: return.type
115162
count: 1
116163
path: src/Key/RsaKey.php
117164

118165
-
119-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:dQ\\(\\) should return string but returns mixed\\.$#"
166+
message: '#^Method Cose\\Key\\RsaKey\:\:e\(\) should return string but returns mixed\.$#'
167+
identifier: return.type
120168
count: 1
121169
path: src/Key/RsaKey.php
122170

123171
-
124-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:e\\(\\) should return string but returns mixed\\.$#"
172+
message: '#^Method Cose\\Key\\RsaKey\:\:n\(\) should return string but returns mixed\.$#'
173+
identifier: return.type
125174
count: 1
126175
path: src/Key/RsaKey.php
127176

128177
-
129-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:n\\(\\) should return string but returns mixed\\.$#"
178+
message: '#^Method Cose\\Key\\RsaKey\:\:other\(\) should return array\<mixed\> but returns mixed\.$#'
179+
identifier: return.type
130180
count: 1
131181
path: src/Key/RsaKey.php
132182

133183
-
134-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:other\\(\\) should return array but returns mixed\\.$#"
184+
message: '#^Method Cose\\Key\\RsaKey\:\:p\(\) should return string but returns mixed\.$#'
185+
identifier: return.type
135186
count: 1
136187
path: src/Key/RsaKey.php
137188

138189
-
139-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:p\\(\\) should return string but returns mixed\\.$#"
190+
message: '#^Method Cose\\Key\\RsaKey\:\:q\(\) should return string but returns mixed\.$#'
191+
identifier: return.type
140192
count: 1
141193
path: src/Key/RsaKey.php
142194

143195
-
144-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:q\\(\\) should return string but returns mixed\\.$#"
196+
message: '#^Method Cose\\Key\\RsaKey\:\:rI\(\) should return string but returns mixed\.$#'
197+
identifier: return.type
145198
count: 1
146199
path: src/Key/RsaKey.php
147200

148201
-
149-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:rI\\(\\) should return string but returns mixed\\.$#"
202+
message: '#^Method Cose\\Key\\RsaKey\:\:tI\(\) should return string but returns mixed\.$#'
203+
identifier: return.type
150204
count: 1
151205
path: src/Key/RsaKey.php
152206

153207
-
154-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:tI\\(\\) should return string but returns mixed\\.$#"
208+
message: '#^Parameter \#1 \$array of function current expects array\|object, array\|false given\.$#'
209+
identifier: argument.type
155210
count: 1
156211
path: src/Key/RsaKey.php
157212

158213
-
159-
message: "#^Parameter \\#1 \\$array of function current expects array\\|object, array\\|false given\\.$#"
214+
message: '#^Parameter \#1 \$number of static method Brick\\Math\\BigInteger\:\:fromBase\(\) expects string, mixed given\.$#'
215+
identifier: argument.type
160216
count: 1
161217
path: src/Key/RsaKey.php
162218

163219
-
164-
message: "#^Cannot cast mixed to int\\.$#"
220+
message: '#^Cannot cast mixed to int\.$#'
221+
identifier: cast.int
165222
count: 1
166223
path: src/Key/SymmetricKey.php
167224

168225
-
169-
message: "#^Method Cose\\\\Key\\\\SymmetricKey\\:\\:k\\(\\) should return string but returns mixed\\.$#"
226+
message: '#^Method Cose\\Key\\SymmetricKey\:\:k\(\) should return string but returns mixed\.$#'
227+
identifier: return.type
170228
count: 1
171229
path: src/Key/SymmetricKey.php

src/Algorithm/ManagerFactory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use InvalidArgumentException;
88
use function array_key_exists;
9+
use function sprintf;
910

1011
final class ManagerFactory
1112
{

src/Key/Ec2Key.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use function array_key_exists;
1515
use function in_array;
1616
use function is_int;
17+
use function sprintf;
1718
use function strlen;
1819

1920
/**

src/Key/Key.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use InvalidArgumentException;
88
use function array_key_exists;
9+
use function sprintf;
910

1011
class Key
1112
{

tests/Algorithm/Mac/HmacTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
final class HmacTest extends TestCase
2121
{
2222
#[Test]
23-
#[DataProvider('getVectors')]
2423
public function theAlgorithsmHaveCorrectInnerParameters(): void
2524
{
2625
// Then

0 commit comments

Comments
 (0)