Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-install sniccowp/php-scoper-wordpress-excludes #170

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tyrann0us
Copy link
Member

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)

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, runs composer install --no-dev (understandably). However, this requires the helper library sniccowp/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 with shivammathur/setup-php in the release workflow and sniccowp/php-scoper-wordpress-exclude is a hard requirement for all our packages where we scope namespaces, we add it to the list of tools for shivammathur/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 local vendor/ 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.

@tyrann0us tyrann0us requested a review from a team as a code owner December 12, 2024 04:57
@tyrann0us tyrann0us requested a review from Biont December 12, 2024 04:57
Copy link
Member

@Biont Biont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants