Varying-Vagrant-Vagrants / VVV

An open source Vagrant configuration for developing with WordPress
https://varyingvagrantvagrants.org
MIT License
4.54k stars 847 forks source link

PHPCS WordpressVIPMinimum coding standard not working #1797

Closed nitishkaila closed 5 years ago

nitishkaila commented 5 years ago

The WordpressVIPMinimum coding standard not working using vagrant ssh command. when I enter the phpcs -i it should be display all coding standard including WordpressVIPMinimum. but it was not working.

phpcs

Expected Behaviour

The WordpressVIPMinimum should be work as per coding standard using vagrant ssh command.

Possible Solution

As per the VIP coding standard, it will work with WPCS 1.*. Please see the minimal requirements section.

I have noticed that VVV get latest WPCS package during installation. To fixed this issue, please update the VVV/provision/phpcs/composer.json composer package file like following.

From:

"wp-coding-standards/wpcs": "*",

To:

"wp-coding-standards/wpcs": "1.*",

Steps to Reproduce (for bugs)

Enter following command to reproduce the issue.

  1. vagrant ssh
  2. cd /srv/www/wordpress-two/public_html/
  3. phpcs --standard=WordPressVIPMinimum wp-config.php
tomjn commented 5 years ago

We get a lot of people installing VVV on contributor day and for doing work with WP Core, so downgrading WPCS just for those working with VIP is a very heavy price to pay and would cause more problems than it solves

So, I'm going to leave as is, when VIPCS updates to be compatible with WPCS then the issue will be fixed. Otherwise the temporary removal of VIPCS is more likely.

If you need VIPCS in the meantime, you can use it with composer to create a self contained local PHPCS install

nitishkaila commented 5 years ago

@tomjn

If we are doing this changes then both the standard working correctly. So any one can use WordPress standard or VIP standard. That is main purpose of my PR. I understand that we need to update downgrading WPCS, but that changes work for both standard.

Also is there any way where I can update vagrant composer packages locally?

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.