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

Update for Composer 2.2 #242

Merged
merged 1 commit into from Feb 21, 2022

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Feb 17, 2022

Using the dealerdirect/phpcodesniffer-composer-installer Composer plugin is recommended to register external PHPCS standards with PHPCS.

As of Composer 2.2.0, Composer plugins need to be explicitly allowed to run.

This commit:

  • Adds the necessary configuration for that to the composer.json for this project.
  • Adds the CLI command to set those permissions to the installation instructions for consumer projects.

Includes updating the URL references to the plugin to point to the new home of the plugin. (see upstream issue #146)

Refs:

Using the `dealerdirect/phpcodesniffer-composer-installer` Composer plugin is recommended to register external PHPCS standards with PHPCS.

As of Composer 2.2.0, Composer plugins need to be explicitly allowed to run.

This commit:
* Adds the necessary configuration for that to the `composer.json` for this project.
* Adds the CLI command to set those permissions to the installation instructions for consumer projects.

Includes updating the URL references to the plugin to point to the new home of the plugin. (see [upstream issue sirbrillig#146](PHPCSStandards/composer-installer#146))

Refs:
* https://blog.packagist.com/composer-2-2/#more-secure-plugin-execution
@jrfnl
Copy link
Collaborator Author

jrfnl commented Feb 17, 2022

The build failure is unrelated to this change.

On that note: is it time to change over to running CI via GH Actions ?

@sirbrillig
Copy link
Owner

Thanks for this update!

The build failure is unrelated to this change.

🤔 that is weird. Looks like an SSL cert error when trying to download and install composer. Looks like it may be this error which doesn't have a clear solution; something was fixed in composer, but also many people just seem to have SSL issues on their OS, which could be the issue with the docker container CircleCI is using here. In any case, I can't imagine this PR would have an effect on any of that so 👍

On that note: is it time to change over to running CI via GH Actions ?

That would be cool! I haven't done a migration like that before, but perhaps this is the time to do so.

@sirbrillig sirbrillig merged commit c921498 into sirbrillig:2.x Feb 21, 2022
@jrfnl
Copy link
Collaborator Author

jrfnl commented Feb 21, 2022

The build failure is unrelated to this change.

🤔 that is weird. Looks like an SSL cert error when trying to download and install composer. Looks like it may be this error which doesn't have a clear solution; something was fixed in composer, but also many people just seem to have SSL issues on their OS, which could be the issue with the docker container CircleCI is using here. In any case, I can't imagine this PR would have an effect on any of that so 👍

It may actually be closer to this issue (with solution): composer/composer#10495 (I ran into something similar elsewhere not too long ago myself)

On that note: is it time to change over to running CI via GH Actions ?

That would be cool! I haven't done a migration like that before, but perhaps this is the time to do so.

If you like, I'd be happy to set up an initial PR for this. I've converted WPCS, PHPCompatibility, PHPCSExtra, Utils etc all to use GH Actions by now and those all have similar needs as this library, so should be straight forward enough to take the workflows from one of those repos and adapt.

@jrfnl jrfnl deleted the feature/update-for-composer-2.2 branch February 21, 2022 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants