Closed BWBama85 closed 1 year ago
Hello, was messing with my local config to check around this issue.
You can try this, run composer global require phpcompatibility/php-compatibility
.
After that take the current installed_paths
value. Run phpcs --config-show
take the value of installed_paths
, it should be a path (or a few paths separated with a comma ,
).
And finally add the path to the PHPCompatibility to the other path.
You can check if its added correctly with phpcs -i
should mention that PHPCompatibility
is installed.
After that you should be ok to add your own codding standard
For example:
I run php --config-show
And receive
installed_paths: ~/a/b/c,~/d/e/f
Then I'd run
phpcs --config-set installed_paths ~/a/b/c,~/d/e/f,~/.composer/vendor/phpcompatibility/php-compatibility/PHPCompatibility
Hope this helps ~
Have you already checked elsewhere?
What are you struggling with?
I would like to add a new coding standard for phpcs in the php container I am using. I run multiple php versions, if that matters.
What have you tried already?
I have tried searching and have poked around the container but can not see where or how standards should be installed.
phpcs -vv shows me this:
As you can see, I have a phpcs.xml that is trying to use PHPCompatibility but it is not installed as a coding standard in the container.
What is your goal?
Add new coding standards to phpcs in a php container.