Install
Works with Drupal: ^10.3 || ^11 || ^12Using Composer to manage Drupal site dependencies
Alternative installation files
Release notes
>Drupal 12 support, and both example modules now actually work. >
Requirements
Drupal 10.3, 11 or 12. core_version_requirement is
^10.3 || ^11 || ^12.
The floor moved up from ^10 because
FileSystem::saveData() takes a FileExists enum,
which arrived in 10.3. Drupal 10.0 to 10.2 are end of life.
Drupal 12
The module passed a bare 1 to saveData() where the
enum is now required:
TypeError: FileSystem::saveData(): Argument #3 ($fileExists) must be of type Drupal\Core\File\FileExists, int given
That only fires when a template is compiled, which is what the module exists
to do, so it would not show up until you actually used it. Fixed in
#3610218
>, along with the hook classes the Project Update Bot generated.
Both examples were broken
Neither had worked for some time, on any Drupal version. Both were found by
running them in a browser rather than by reading the code, and both are fixed
in
#3619613
>.
-
handlebars_commerce declared its main library as depending
onhandlebars_admin_menu/commerce.products. That library is
defined inhandlebars_commerce, and commerce does not depend on
the admin menu module at all, so the dependency never resolved and the
Handlebars template was never attached. -
handlebars_admin_menu did not declare
menu_link_content, which therest_menu_item
resource needs. Without it Drupal skips the module's own
rest.resource.rest_menu_item.ymlsilently, so
/api/menu_items/{menu_name}returned 404 and the menu never
rendered.
x2js is now a separate file
handlebars_commerce/js/commerce.js was 32 lines of example code
followed by 586 lines of
x2js pasted inline, with
nothing recording that the module carried it. It now lives in
js/x2js.js as its own declared library with the remote, version
and Apache 2.0 licence metadata, so it is visible as third party code and can
be updated against upstream.
Housekeeping
-
The module has a
.gitlab-ci.ymlfor the first time. Every job
passes: phpcs, phpstan, cspell, eslint and stylelint, on current, next minor
and next major. -
HandlebarsServicetakeslibrary.discoverythrough
the constructor now, as its own@todoasked, and uses the
config factory it already had rather than\Drupal::config(). -
The Makefile mounted a sibling
vendor/over the container's
own, which broke the container when run from a checkout that had no such
directory. It also calledcore/scripts/drupal, which is gone in
Drupal 11.
Known issue
handlebars_admin_menu declares ^12 but cannot be
installed there yet, because
restui and
rest_menu_items
have no Drupal 12 release. Merge requests are open and passing on both.
Tracked in
#3619589
>. The main module and handlebars_commerce are unaffected.