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

PHPCS not using version number specified by testVersion #1541

Open
mikes000 opened this issue Jan 17, 2023 · 0 comments
Open

PHPCS not using version number specified by testVersion #1541

mikes000 opened this issue Jan 17, 2023 · 0 comments

Comments

@mikes000
Copy link

I am running into an issue where running composer lint:wpc is returning errors for PHP version 5.2 and earlier.

Error I recieve:

$ composer lint:wpc
> @php ./vendor/squizlabs/php_codesniffer/bin/phpcs
....E.. 7 / 7 (100%)
FOUND 5 ERRORS AFFECTING 4 LINES
------------------------------------------------------------------------------------------------------------------------
  8 | ERROR | "namespace" keyword is not present in PHP version 5.2 or earlier
    |       | (PHPCompatibility.Keywords.NewKeywords.t_namespaceFound)

Searching for testVersion in previous issues I found this issue #1393.

I have tried adding the specified testVersion number back in as a command argument in the composer.json file and running the command does not return any errors.

$ composer lint:wpc
> @php ./vendor/squizlabs/php_codesniffer/bin/phpcs --runtime-set testVersion 5.6-
....... 7 / 7 (100%)

Any ideas why setting the version number with testVersion in phpcs.xml.dist is not working?

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