Generated with the help of an LLM.
Problem/Motivation
Rivet's child-theme generator was implemented in 2023 while Drupal core's configurable starterkit API was still under development. See #3402867: Improve Drupal core starterkit integration for Rivet theme.
The finalized API was added in Drupal 10.3.0 by #3364885. It supports ignore, no_edit, no_rename, and info. The earlier delete key was removed before the API was committed.
Rivet still contains an obsolete placeholder:
delete: null
Rivet also performs overlapping work in rivet.starterkit.yml and src/StarterKit.php. Both alter the generated *.info.yml, while the PHP class maintains a deletion list based on the repository's 2023 layout.
The current behavior is not covered by an automated generation test. Code inspection also shows a potential problem: the post-processor deletes the generated src/ directory but retains the renamed *.theme file, which may refer to classes in the generated child namespace that no longer exist.
The README still documents core/scripts/drupal. Drupal 11.4 prefers vendor/bin/dr and deprecates the older entry point.
Steps to reproduce
- Install Rivet in a clean Drupal installation.
- Generate a child theme using the command appropriate for the installed Drupal version.
Drupal 11.4 or later:
vendor/bin/dr generate-theme \
--name "Rivet Subtheme" \
--path themes/custom \
--starterkit rivet \
rivet_subtheme
Earlier supported versions:
php core/scripts/drupal generate-theme \
--name "Rivet Subtheme" \
--path themes/custom \
--starterkit rivet \
rivet_subtheme
- Inspect the generated files and
rivet_subtheme.info.yml. - Check generated PHP for references to missing classes in the
Drupal\rivet_subthemenamespace. - Enable the generated theme, clear caches, and confirm that a page renders without errors.
Proposed resolution
- Decide whether Rivet can require Drupal 10.3 or later. If so, use:
core_version_requirement: ^10.3 || ^11 - Replace the obsolete
deleteplaceholder with a testedignoreconfiguration. - Define the expected generated file set, including whether to retain the generated
*.theme, configuration, logo, favicon, SCSS, and build files. - Move the generated
*.info.ymlchanges into theinfosection ofrivet.starterkit.yml. - Use
no_editto protectSUBTHEME.mdfrom core's automatic name replacement. - Reduce
StarterKit::postProcess()to behavior that cannot be expressed in YAML, such as renaming and updating the generated README. - Remove
starterkit: trueif support for Drupal versions before 10.3 is dropped. - Add an automated test that generates, discovers, enables, and renders a page with a Rivet child theme.
- Update the documented commands for Drupal 11.4 and earlier supported releases.
The existing generator: starterkit_theme:10.1.2 value records the version from which Rivet itself was originally generated. Updating that baseline is outside the scope of this issue.
Remaining tasks
- Decide the minimum supported Drupal version.
- Define the expected generated file set.
- Implement the supported
rivet.starterkit.ymlconfiguration. - Simplify the PHP post-processing.
- Add automated generation and installation coverage.
- Test against the minimum supported Drupal release and the current Drupal 11 release.
- Update the README.
- Review for Drupal coding standards.
User interface changes
Normalize multiword region labels to sentence case so Rivet and newly generated child themes use consistent administrator-facing names.
API changes
Rivet's developer-facing child-theme generation behavior will use Drupal core's supported starterkit configuration instead of the obsolete delete placeholder and duplicated PHP cleanup.
If the minimum supported version is raised, Rivet will require Drupal 10.3 or later.
The files included in newly generated child themes may change. Existing generated themes will not be modified.
Data model changes
None.
Issue fork rivet-3636630
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
Comment #2
jwilson3Comment #3
jwilson3Comment #6
jwilson3Comment #8
jwilson3Released in 1.2.1