WordPress / WordPress/plugin-check

Prefix Composer dependencies

Open
#328 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Type] Enhancement
Dominant language
PHP
Stars
362
Forks
126
Avg merge
1d 23h
Merged PRs (30d)
22

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing how PHPCS is installed through Composer and how the Composer autoloader loads its classes. Compare the proposed approach with the PHP-Scoper examples in the linked web-stories-wp and site-kit-wp repositories. Done means PHPCS dependencies are prefixed so they do not conflict with dependencies bundled by other plugins.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.