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

Prefix Composer dependencies #328

Open
swissspidy opened this issue Nov 30, 2023 · 1 comment · May be fixed by #879
Open

Prefix Composer dependencies #328

swissspidy opened this issue Nov 30, 2023 · 1 comment · May be fixed by #879
Labels
[Type] Enhancement A suggestion for improvement of an existing feature

Comments

@swissspidy
Copy link
Member

PHPCS is installed via Composer and we use the Composer autoloader for loading all these classes.

To avoid conflicts with any other plugins bundling PHPCS, we should prefix the dependencies' classes with something like PHP-Scoper. See https://github.com/googleforcreators/web-stories-wp/ and https://github.com/google/site-kit-wp for some prior art where this is done.

@swissspidy swissspidy added the [Type] Enhancement A suggestion for improvement of an existing feature label Nov 30, 2023
@ernilambar
Copy link
Member

vendor/afragen/wordpress-plugin-readme-parser/class-parser.php

That's being loaded by plugin-check even on WordPress.org, that shouldn't be happening. The WordPress.org file should take precedence. I guess the plugin-check auto-loader is simply being hit first.

Meta team has been using hacky approach for the deployment of the plugin due to this issue and wants PCP plugin to handle the loading of parser class in itself.

Suggestions are welcome so that we can fix the loading issue.

@swissspidy swissspidy linked a pull request Feb 25, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement A suggestion for improvement of an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants