Exclude module `require-dev` and `autoload-dev` from the generated `composer.json`
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Find the code that rebuilds the generated root composer.json and inspect how it merges module composer.json fields. Start by checking the existing tests for generated Composer configuration; add coverage for a module declaring require-dev and autoload-dev while preserving require and autoload. Done when the generated file omits the development fields and retains the regular entries.
Written by the indexing model from the issue text.
Description
Composer Manager merges require-dev and autoload-dev from enabled modules into the generated root composer.json. Composer treats both fields as root-only. Once merged, a module’s development dependencies and autoload rules become part of the site’s Composer configuration. For example, a module that uses PHP_CodeSniffer for development can cause Composer to install it for the site.
Steps to reproduce
- Enable a module whose
composer.jsondeclaresrequire-devandautoload-dev. - Rebuild the generated
composer.json. - Inspect the generated file for the module’s development dependencies and autoload rules.
Expected behavior
The generated composer.json omits the module’s require-dev and autoload-dev entries and continues to merge its require and autoload entries.
- Dominant language
- PHP
- Stars
- 1
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from backdrop-contrib/composer_manager
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Allow a few more properties (e.g. scripts)Possibly taken @laryn claimed this 283 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
backdrop-contrib/composer_manager#8 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
All issues in backdrop-contrib/composer_manager
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
FGRibreau/mailchecker#635 ·
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
FetchDock/fetchdock-server#54 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
robsontenorio/mary#1129 ·
-
AI effort: [XS] priority: medium severity: minor type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Help-Wanted Needs-Triage Package-Request
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
microsoft/winget-pkgs#484368 ·
Maintainers usually reply within 1 day