Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would it be possible to update to the latest PHPCS? #119

Open
Muffinman opened this issue Jun 23, 2022 · 0 comments
Open

Would it be possible to update to the latest PHPCS? #119

Muffinman opened this issue Jun 23, 2022 · 0 comments

Comments

@Muffinman
Copy link
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant