loadsys / loadsys/composer-plugins
Create two separate hook libraries: folder-copy, and config-manager
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
There are two different ways to manage PHPCS coding standards installation:
- You can copy the standards folder directly into phpcs's installed path, so they are just "there" for phpcs to use.
- You can actively manage the entries in phpcs's configuration file for the `installed_paths` directive, essentially informing phpcs where to find your standards in their "native" composer-installed locations.
The first method is the currently-implemented approach, but the code already exists to perform the second approach as well.
What needs to happen is this:
- Separate the two approachs out into two different classes, but that share the same public interface (making them interchangeable).
- Update the installer to check for an `extra` entry in the project's `composer.json` file that can be used as a switch to determine which method is preferred by the project (copy-folders or manage-config).
- Update the installer to use the preferred method. This should apply to both the `phpcs-coding-standard` type as well as the postInstall hooks.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the installer and inspect the existing code for managing PHPCS installed_paths, then review how phpcs-coding-standard and postInstall hooks are handled. Separate the copy-folders and manage-config approaches behind one public interface, use the composer.json extra entry as the switch, and verify both installer paths honor the selected method.
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