You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ERROR] in_array() expects parameter 2 to be array, null given
Possible fixes:
Upgrade to symplify/easy-coding-standard:v^9.0
The problem is in vendor/symplify/easy-coding-standard/src/Yaml/CheckerServiceParametersShifter.php constructor where serviceKeywords comes NULL instead of empty array.
After further investigation found out that in symfony/dependency-injection:4.4.19 the serviceKeywords has changed from a property to a constant in this commit.
A patch fix can be to change lines 72-73 in vendor/symplify/easy-coding-standard/src/Yaml/CheckerServiceParametersShifter.php to:
$serviceKeywordsProperty = (new ReflectionClass(YamlFileLoader::class))
->getConstant('SERVICE_KEYWORDS');
I will try to push a fix to symplify/easy-coding-standard repo as well deprecated-packages/symplify#3017.
I think same issue might occur in 1.9 as well.
The text was updated successfully, but these errors were encountered:
Thank you for the investigation! 🎉 As far as I see, it would also require upgrading sylius-labs/coding-standard to ^4.0. Do you think you would be able to open a PR?
Sylius-Standard version: 1.8.9
PHP: 7.3 or 7.4
How to reproduce:
Clone https://github.com/Sylius/Sylius-Standard
Checkout branch 1.8
Run
composer install
Run
./vendor/bin/ecs
Error in console:
[ERROR] in_array() expects parameter 2 to be array, null given
Possible fixes:
symplify/easy-coding-standard:v^9.0
The problem is in
vendor/symplify/easy-coding-standard/src/Yaml/CheckerServiceParametersShifter.php
constructor whereserviceKeywords
comesNULL
instead of empty array.After further investigation found out that in
symfony/dependency-injection:4.4.19
theserviceKeywords
has changed from a property to a constant in this commit.A patch fix can be to change lines 72-73 in
vendor/symplify/easy-coding-standard/src/Yaml/CheckerServiceParametersShifter.php
to:I will try to push a fix to
symplify/easy-coding-standard
repo as well deprecated-packages/symplify#3017.I think same issue might occur in 1.9 as well.
The text was updated successfully, but these errors were encountered: