Add scope input for scoped Composer dependencies (#309) - #19
Open
srtfisher wants to merge 1 commit into
Open
Conversation
When `scope: true`, install dev dependencies (so php-scoper is available), run `composer scope`, and prune require/require-dev so the released artifact ships the prefixed vendor-prefixed/ directory without re-resolving dependencies. Backward compatible: defaults to false, preserving the existing --no-dev install path. Unblocks the previously-disabled require-pruning step. Relates to alleyinteractive/create-wordpress-plugin#309.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds release-time support for scoped Composer dependencies, unblocking the require-pruning step that was previously commented out citing alleyinteractive/create-wordpress-plugin#309.
Pairs with alleyinteractive/create-wordpress-plugin#537, which adds the opt-in scoping machinery (
.scoper/,composer scope) to the plugin template.What
New
scopeinput (defaultfalse, fully backward compatible). Whenscope: true:php-scoperis available) instead of--no-dev.composer scope, which prefixes runtime dependencies intovendor-prefixed/.require/require-devfromcomposer.jsonso the released artifact doesn't re-resolve (and re-conflict) dependencies when installed.The prefixed
vendor-prefixed/directory is what ships; the plugin's.deployignoreexcludesvendor/, so dev dependencies installed in step 1 are never committed to the built branch.When
scopeisfalse(the default), behaviour is unchanged: the existing--no-devinstall runs and nothing is pruned.Usage
A scoped plugin's
built-release.ymlopts in:Notes
🤖 Generated with Claude Code