Problem/Motivation

recipes/horizonaid/composer.json carries "vardot/varbase-patches": "~11.0.0" in its require. That package is a Composer plugin, and a Composer plugin only does anything from the ROOT composer.json: it needs config.allow-plugins and the extra.composer-patches.allowed-dependency-patches allowlist, neither of which a recipe can set for the project that installs it. So requiring it here does not make the patches apply. It only pulls the package in and couples the recipe to a Vardot-specific patch plugin.

The wiring script already does this properly. recipes/horizonaid/scripts/drupal-cms-wiring.php merges scripts/assets/drupal-cms.composer.json into the root composer.json, which sets allow-plugins for cweagans/composer-patches, vardot/varbase-patches and oomphinc/composer-installers-extender plus the default-deny allowed-dependency-patches list, and then tells the user to run composer require vardot/varbase-patches from the project root. That is the only place it works.

Continues #3614681: Add Varbase Patches to the composer requirements and a Drupal CMS wiring script.

Steps to reproduce

  1. Look at recipes/horizonaid/composer.json: vardot/varbase-patches is in require.
  2. Look at recipes/horizonaid/scripts/drupal-cms-wiring.php and scripts/assets/drupal-cms.composer.json: the allowlist and the root require are already handled there.
  3. The recipe's own require adds the package without enabling the plugin, so it is redundant where it sits.

Proposed resolution

MR !57 (merged): drop "vardot/varbase-patches": "~11.0.0" from require in recipes/horizonaid/composer.json. A recipe cannot enable a Composer plugin, so the requirement did nothing where it sat.

MR !58 (merged): remove the wiring script and its composer asset (scripts/drupal-cms-wiring.php, scripts/assets/drupal-cms.composer.json). The script was never run by the recipe itself, only by the "(Drupal CMS) Install Horizon Aid site template" CI job, so that job now does the work directly: nine composer config calls for the plugin allowlist and the patch allowlist, plus the placement the script used to do: it copies scripts/assets/drupal-libraries.package.json into the Drupal CMS root as package.json, writes the .yarnrc.yml that keeps Yarn 4 on the node-modules linker, and copies scripts/drupal-libraries-sync.js in next to package.json where postinstall expects it. The front-end library sync stays in the recipe (both files); the yarn install, the drupal-libraries count assertion and the ls web/libraries steps are unchanged.

Remaining tasks

  • ✅ File an issue
  • ✅ Remove the requirement from the recipe's composer.json (MR !57, merged)
  • ✅ Remove the wiring script and its composer asset (MR !58, merged)
  • ✅ Move the Drupal CMS composer setup and the library-file placement into the "(Drupal CMS) Install Horizon Aid site template" CI job (MR !58, merged)
  • ✅ Confirm the guarding CI job still passes (pipeline 930491, 26/26 green)
  • ✅ Verify a fresh install still works both ways: the browser installer's site template picker and drush site:install. The Varbase 11 install was verified green locally, and the Drupal CMS install CI job passes with the library sync running and 6 libraries declared. The local workspace builder's Drupal CMS path still fails for an unrelated reason, tracked separately.
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support
  • ➖ User Guide Documentation support
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ❌ Reviewed by a human
  • ❌ Code review by maintainers
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ✅ Update Release Notes
  • ✅ Release, horizonaid-1.0.0-alpha2

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Removed the vardot/varbase-patches requirement from the site template recipe.
  • Removed the Drupal CMS wiring script and its composer asset; the Drupal CMS composer setup and the front-end library-file placement now live in the CI job that installs the site template.

AI-Generated: Yes

Issue fork horizonaid-3618245

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajab natshah created an issue. See original summary.

  • rajab natshah committed 166819ac on 1.0.x
    refactor: #3618245 Remove vardot/varbase-patches from the site template...

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes

  • rajab natshah committed 9cb97fd0 on 1.0.x
    refactor: #3618245 Remove the Drupal CMS wiring script and its composer...
rajab natshah’s picture

Issue summary: View changes
Status: Active » Needs review

Both merge requests are merged into 1.0.x.

MR !57 https://git.drupalcode.org/project/horizonaid/-/merge_requests/57 (squash 166819acf543): removed "vardot/varbase-patches": "~11.0.0" from require in recipes/horizonaid/composer.json.

MR !58 https://git.drupalcode.org/project/horizonaid/-/merge_requests/58 (squash 9cb97fd0c833, now the 1.0.x tip): removed scripts/drupal-cms-wiring.php and scripts/assets/drupal-cms.composer.json; the "(Drupal CMS) Install Horizon Aid site template" CI job now does that setup directly. scripts/drupal-libraries-sync.js and scripts/assets/drupal-libraries.package.json are kept.

Pipelines green on both (930316 and 930491, 26/26), with the Drupal CMS install job passing and the library sync declaring 6 libraries.

rajab natshah’s picture

Status: Needs review » Fixed

Merged into 1.0.x. Marking Fixed.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

rajab natshah’s picture

Assigned: Unassigned » josebc
Status: Fixed » Needs review

Back to Needs review pending the maintainer's review of the merged work. Nothing has been released: the code is merged to 1.0.x, and the only tag is still 1.0.0-alpha1. Assigning to josebc for review.

rajab natshah’s picture

Title: task: Remove vardot/varbase-patches from the site template recipe's composer.json and wire it from the script only » task: Remove vardot/varbase-patches and the Drupal CMS wiring script from the site template recipe
rajab natshah’s picture

Assigned: josebc » Unassigned
rajab natshah’s picture

Issue summary: View changes
Status: Needs review » Fixed
Issue tags: +horizonaid-1.0.0-alpha2

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.