Pre-install sniccowp/php-scoper-wordpress-excludes
#170
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.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature
What is the current behavior? (You can also link to an open issue here)
The "Create plugin archive" workflow, where PHP-Scoper is run if
scoper.inc.php
is present, runscomposer install --no-dev
(understandably). However, this requires the helper librarysniccowp/php-scoper-wordpress-excludes
to be installed as a regular dependency to be available in the build process while it clearly is a dev "sub" dependency.What is the new behavior (if this is a feature change)?
Since we already install
humbug/php-scoper
withshivammathur/setup-php
in the release workflow andsniccowp/php-scoper-wordpress-exclude
is a hard requirement for all our packages where we scope namespaces, we add it to the list of tools forshivammathur/setup-php
to install. This allows us to remove the tool from the regular dependencies of packages using this workflow.Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No. Existing packages requiring
sniccowp/php-scoper-wordpress-exclude
and referencing localvendor/
paths to the list of excluded WordPress symbols (see documentation: https://github.com/humbug/php-scoper/blob/main/docs/further-reading.md#example-for-wordpress-core) continue to work.Other information:
As part of the Boy Scout rule, I linked the tools used in the workflow in the documentation and removed the false claim that Composer Asset Compiler and WordPress Translation Downloader are installed when "required and configured by the package". They are installed when the workflow finds their configuration in the calling package, even when they are not required.