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

WPCS 2.0: Remove reference to WPCS' PHPAliases.php #322

Closed
GaryJones opened this issue Dec 24, 2018 · 8 comments
Closed

WPCS 2.0: Remove reference to WPCS' PHPAliases.php #322

GaryJones opened this issue Dec 24, 2018 · 8 comments

Comments

@GaryJones
Copy link
Contributor

WPCS has a ticket to remove the PHPAliases.php file that VIPCS currently references.

For WPCS 2.0, we'll need to remove our reference and see what other fixes, if anything, is needed to keep things working.

@GaryJones
Copy link
Contributor Author

That linked PR has now been merged.

As WPCS 2.0.0-RC1 got pushed to master, it now means VIPCS master is no longer compatible with WPCS master.

If using Git, then checkout the WPCS 1.2.1 tag, along with the VIPCS 0.4.0 tag.

If using Composer, then ensure the WPCS constraint is "^1" for now.

@GaryJones
Copy link
Contributor Author

Depending on what exactly happens once we remove the reference, we may be able to fix the immediate issues with VIPCS master branch not being compatible with WPCS master branch, by making the file inclusion conditional on whether it exists or not.

@MattGeri
Copy link

I'm experiencing this issue with one of our builds. Downgrading to the WPCS 1.2.1 tag isn't possible as WPCS is included in the project by a separate build system that multiple different projects run off of. Would be great if there was a solution for this issue.

@GaryJones
Copy link
Contributor Author

Interestingly, we've already set the constraint for WPCS to be 1.* for the VIPCS 0.4.0 release.

If the constraint of dev-master is used for WPCS in a project, then VIPCS needs a constraint of * to be able to install anything, and that installs 0.2.4, which is the latest version not to have any WPCS constraint.

This 0.2.4 will fail to run though, due to the reference to the missing PHPCSAliases.php file.

Even if this PHPAliases reference could be fixed, WPCS 2.0 still completely removes sniffs from the WordPress.VIP category, that VIPCS 0.4.0 and earlier directly reference.

As such, it's only the next release (potentially 0.5.0, or maybe 1.0), where this can be fixed.

@GaryJones
Copy link
Contributor Author

@MattGeri As of right now, WPCS 1.2.1 is the latest release (until tomorrow anyway), so it sounds like your build system has a reference to master? And perhaps pulling it down with git clone, or as a zip?

Whether it applies to single or multiple projects, not using tags (or letting Composer handle it with constraints), but having a build system rely on master may result in conflicts just like you've found.

We're actively working on the next VIPCS release and want to get it released soon.

@whyisjake
Copy link
Contributor

As WPCS 2.0.0-RC1 got pushed to master, it now means VIPCS master is no longer compatible with WPCS master.

If using Git, then checkout the WPCS 1.2.1 tag, along with the VIPCS 0.4.0 tag.

This should be at the top of the README.

@GaryJones
Copy link
Contributor Author

This should be at the top of the README.

The very first line after the Installation heading is:

First, make sure you have WPCS 1.* and PHPCS v3+ installed.

The Requirements section also makes it clear that WPCS 1.* is needed.

The composer.json also states the dependencies it works with.

@imwithsam
Copy link

I ran into this issue running VVV. Currently, it appears to be running WPCS 2.1.0.

GaryJones added a commit that referenced this issue Apr 29, 2019
The PHPCS compatibility file that was referencing a PHPCS aliases file in WPCS is no longer needed, since WPCS dropped support for PHPCS 2.

Closes #322.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants