Would it be possible to update to the latest PHPCS?
Opened this issue · 0 comments
Muffinman commented
Hi,
It seems that the latest
and 8.1
images are currently built a slightly older version of phpcs
? They've released 3.7.x
in the past few days with full support for Enums.
Would it be possible to rebuild this image with the latest phpcs
?
The below is from our Gitlab CI:
Using docker image sha256:7c2d8a09876789338e4eb616a55cc014ec3a1f46e374c2157ed9ceba99e3bf0f for lorisleiva/laravel-docker:8.1 with digest lorisleiva/laravel-docker@sha256:a7815be935f7120de35d30ba4f46faada0769e75d1cb05975aa698a41f16c569 ...
$ phpcs --version
PHP_CodeSniffer version 3.6.2 (stable) by Squiz (http://www.squiz.net/)
$ phpcs --standard=PSR2 --extensions=php app
FILE: /builds/spring/spring/app/Support/Enums/PaymentMethodType.php
----------------------------------------------------------------------
FOUND 5 ERRORS AND 1 WARNING AFFECTING 6 LINES
----------------------------------------------------------------------
1 | WARNING | [ ] A file should declare new symbols (classes,
| | functions, constants, etc.) and cause no other
| | side effects, or it should execute logic with
| | side effects, but should not do both. The first
| | symbol is defined on line 14 and the first side
| | effect is on line 7.
9 | ERROR | [x] Line indented incorrectly; expected 0 spaces,
| | found 4
10 | ERROR | [x] Line indented incorrectly; expected 0 spaces,
| | found 4
11 | ERROR | [x] Line indented incorrectly; expected 0 spaces,
| | found 4
12 | ERROR | [x] Line indented incorrectly; expected 0 spaces,
| | found 4
38 | ERROR | [x] Line indented incorrectly; expected at least 4
| | spaces, found 0
And from my local machine with the latest phpcs
:
$ phpcs --version
PHP_CodeSniffer version 3.7.0 (stable) by Squiz (http://www.squiz.net)
$ phpcs --standard=PSR2 --extensions=php app
// No errors