Skip to content

Commit a57abd0

Browse files
authored
Fix code samples CI (#3237)
* code_samples.yaml: Ignore more SA * phpstan-baseline.neon: adapt ignored patterns to PHP 7.4
1 parent 1506c7c commit a57abd0

2 files changed

Lines changed: 29 additions & 6 deletions

File tree

.github/workflows/code_samples.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,30 @@ jobs:
5252
composer config audit.ignore --json '{
5353
"GHSA-68jq-c3rv-pcrr": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
5454
"GHSA-fc86-6rv6-2jpm": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
55-
"GHSA-r7cg-qjjm-xhqq": "As this is for code quality tests and not to run a production DXP, this can be ignored."
55+
"GHSA-r7cg-qjjm-xhqq": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
56+
"PKSA-5k7f-wvjj-jrgw": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
57+
"PKSA-sjvz-tbbr-vwth": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
58+
"PKSA-h8hf-ytnd-5t9q": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
59+
"PKSA-wwb1-81rc-pd65": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
60+
"PKSA-hgmw-wn4d-hpcy": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
61+
"PKSA-kvv6-36cr-fkzb": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
62+
"PKSA-n14z-jjjg-g8vd": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
63+
"PKSA-3mcc-k66d-pydb": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
64+
"PKSA-gw7n-z4yx-7xjt": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
65+
"PKSA-dpx1-78wg-1kqs": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
66+
"PKSA-21g2-dzjv-sky5": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
67+
"PKSA-yhcn-xrg3-68b1": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
68+
"PKSA-2wrf-1xmk-1pky": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
69+
"PKSA-6319-ffpf-gx66": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
70+
"PKSA-n7sg-8f52-pqtf": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
71+
"PKSA-8kk8-h2xr-h5nx": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
72+
"PKSA-2rbx-bjdx-4d4d": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
73+
"PKSA-fs5b-x5k4-1h39": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
74+
"PKSA-fbvq-z33h-r2np": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
75+
"PKSA-g9zw-qxh8-pq8w": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
76+
"PKSA-yd6k-t2gh-1m43": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
77+
"PKSA-1tmc-rt7x-12w6": "As this is for code quality tests and not to run a production DXP, this can be ignored.",
78+
"PKSA-xx6c-6d96-db2w": "As this is for code quality tests and not to run a production DXP, this can be ignored."
5679
}'
5780
5881
- uses: ramsey/composer-install@v3

phpstan-baseline.neon

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ parameters:
121121
path: code_samples/api/public_php_api/src/Controller/CustomFilterController.php
122122

123123
-
124-
message: '#^Parameter \#1 \$string of function base64_encode expects string, string\|false given\.$#'
124+
message: '#^Parameter \#1 \$str(ing)? of function base64_encode expects string, string\|false given\.$#'
125125
identifier: argument.type
126126
count: 1
127127
path: code_samples/api/rest_api/create_image.json.php
@@ -151,7 +151,7 @@ parameters:
151151
path: code_samples/api/rest_api/create_image.xml.php
152152

153153
-
154-
message: '#^Parameter \#1 \$string of function base64_encode expects string, string\|false given\.$#'
154+
message: '#^Parameter \#1 \$str(ing)? of function base64_encode expects string, string\|false given\.$#'
155155
identifier: argument.type
156156
count: 1
157157
path: code_samples/api/rest_api/create_image.xml.php
@@ -181,13 +181,13 @@ parameters:
181181
path: code_samples/api/rest_api/src/Rest/ValueObjectVisitor/RestLocation.php
182182

183183
-
184-
message: '#^Parameter \#1 \.\.\.\$arrays of function array_merge expects array, iterable\<Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLAlias\> given\.$#'
184+
message: '#^Parameter \#1 (\.\.\.\$arrays|\$arr1) of function array_merge expects array, iterable\<Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLAlias\> given\.$#'
185185
identifier: argument.type
186186
count: 1
187187
path: code_samples/api/rest_api/src/Rest/ValueObjectVisitor/RestLocation.php
188188

189189
-
190-
message: '#^Parameter \#2 \.\.\.\$arrays of function array_merge expects array, iterable\<Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLAlias\> given\.$#'
190+
message: '#^Parameter \#2 \.\.\.\$ar(rays|gs) of function array_merge expects array, iterable\<Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLAlias\> given\.$#'
191191
identifier: argument.type
192192
count: 1
193193
path: code_samples/api/rest_api/src/Rest/ValueObjectVisitor/RestLocation.php
@@ -283,7 +283,7 @@ parameters:
283283
path: code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php
284284

285285
-
286-
message: '#^Parameter \#2 \$string of function explode expects string, string\|null given\.$#'
286+
message: '#^Parameter \#2 \$str(ing)? of function explode expects string, string\|null given\.$#'
287287
identifier: argument.type
288288
count: 1
289289
path: code_samples/back_office/search/src/EventSubscriber/MySuggestionEventSubscriber.php

0 commit comments

Comments
 (0)