Problem/Motivation

The recipe depends on patched contrib (notably drupal/canvas) but does not require the package that carries those patches, so it relies on whatever project template happens to be underneath.

There is also no way to prepare a plain drupal/cms codebase for it. composer require fails before the recipe is even downloaded, because every drupal/varbase_*_base it requires is 1.0.x-dev:

Could not find a version of package drupal/educare matching your minimum-stability

Steps to reproduce

  1. composer create-project drupal/cms
  2. composer require drupal/educare:1.0.x-dev
  3. It fails on minimum-stability. Setting that alone then fails on a blocked composer plugin, and web/libraries/ stays empty.

Proposed resolution

Require vardot/varbase-patches in composer.json, above the Varbase base recipes.

Add scripts/drupal-cms-wiring.js (Node, no dependencies, idempotent, supports --dry-run), which sets what a stock drupal/cms lacks: dev stability, the allow-plugins and patches allowlist varbase-patches needs to run, the drupal-libraries sync into web/libraries/, and nodeLinker: node-modules for Yarn 4. Its values live in scripts/assets/drupal-cms.composer.json and scripts/assets/drupal-libraries.package.json, so the wiring can change without editing the script.

cd PROJECT_DIR_NAME/recipes/educare/scripts
node drupal-cms-wiring.js

composer require drupal/educare:1.0.x-dev -W
corepack enable && corepack yarn install

-W is needed because a partial update keeps the locked symfony/css-selector, which drupal/storybook conflicts with.

Verified on a stock Drupal CMS build: drupal/canvas resolves to 1.9.0 with its patches, all six libraries land in web/libraries/, and the recipe is in place. Nothing changes on a Varbase base.

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Testing to ensure no regression
  • ✅ 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 educare-1.0.0-alpha2

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Added the Varbase Patches composer requirement and a Drupal CMS wiring script.

Issue fork educare-3614680

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’s picture

Issue summary: View changes

  • rajab natshah committed 1774327b on 1.0.x
    feat: #3614680 Add Varbase Patches to the composer requirements and a...

  • rajab natshah committed b0ac6ad6 on 1.0.x
    test: #3614680 Add a pre-test that builds and installs Educare on Drupal...
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Assigned: Unassigned » josebc
Issue summary: View changes
Status: Active » Needs review
Issue tags: +educare-1.0.0-alpha2
rajab natshah’s picture

Assigned: josebc » mohammed j. razem
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
Status: Needs review » 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.