Pronovix / swagger_ui_formatter

Swagger UI Field Formatter for Drupal
GNU General Public License v2.0
3 stars 12 forks source link

Re-enable Drupal Check or equivalent #85

Closed mxr576 closed 2 years ago

mxr576 commented 2 years ago

Drupal Check had to be disabled in #84 more details are here.

https://github.com/Pronovix/swagger_ui_formatter/pull/84/files#r931072893

Natively running PHPStan can be a viable alternative.

mxr576 commented 2 years ago

And deprecation testing probably should run on PHP 8.1 (too?) to ensure we are not using deprecated PHP calls.

mxr576 commented 2 years ago

And deprecation testing probably should run on PHP 8.1

Deprecation (PHPStan) could be executed on PHP 8.1 too but I am skeptical about the benefit of that currently.

If it runs n PHP 7.4 it does not complain about passing NULL as the first parameter of str_contains(), it complains on PHP 8.1. It complains on PHP 7.4 if you try to use this PHP 8.1 feature: https://stitcher.io/blog/new-in-php-81#array-unpacking-with-string-keys-rfc But it does not complain on PHP 7.4 when you try to use this PHP 8.1 function due to symfony/pollyfill-php81 is required somewhere in the dependency tree...

So generically speaking it would make sense to run it on all supported PHP versions, but it would require splitting "check-cs" step into multiple steps because we do not want to run Slevomat on PHP 8.1 because it starts complaining about missing usage of PHP 8.1 features...

Based on this I think it is enough to run PHPStan on the minimum required PHP version for now to spare some CPU time and some :deciduous_tree: .