Constrain all the Composer config to only wp-plugin and wp-theme packages#75
Constrain all the Composer config to only wp-plugin and wp-theme packages#75johnbillion wants to merge 3 commits intoroots:mainfrom
wp-plugin and wp-theme packages#75Conversation
|
cc @tangrufus |
|
Interesting, TIL. (Also GitHub search made it difficult to find results for "only" 😄). From my point of view as a package consumer, this is something I want to configure in my local config. At the extreme, this is a supply chain security enhancement that protects against WP Packages being compromised to serve replacements for non-WordPress packages (although granted if WP Packages is compromised there are bigger problems). |
|
I don't think we need to add back Composer v2 filters packages by:
Roughly translate to: in_array($pkg, $available_package_patterns) && in_array($pkg, $only) && ! in_array($pkg, $exclude)As See usages of
I know that feel. Am I missing anything? |
|
Thanks for the info and the links. My personal opinion is I would prefer for the |
This updates all the example Composer config to add
"only":["wp-plugin/*","wp-theme/*"]for the wp-packages repo. This constrains the repo so it only applies to matching packages.I had to switch to using a JSON blob for the main
configcommand to facilitate setting the nested property values. Composer docs here.I reduced the text size of the command on the home page so its full value fits in when viewed at the widest viewport on desktop without being truncated.
Screenshots