mediacurrent / theme_generator_8

Yeoman generator for Drupal Themes - lets you quickly set up a Drupal 8 theme with sensible defaults and best practices.
MIT License
100 stars 24 forks source link

Twig namespaces is the wrong format in theme.info.yml for Components module 3.x #96

Closed brotkel closed 3 years ago

brotkel commented 3 years ago

When a theme is generated, it tries to configure the components namespace with this format:

component-libraries:
  finenothings:
    paths:
      - src/patterns/global
      - src/patterns/components
      - src/patterns/pages
      - src/templates

This results in the theme immediately causing a PHP error where it can't find the components that are referenced in the custom templates. The page for components shows that components should be included in this structure:

components:
 namespaces:
    myLib:
      - myLibFiles

Looks like this structure was marked as deprecated in 2.x and has been removed in 3.x. I would recommend updating the generator and making 2.x the minimum version, as it supports Drupal 9.

mariohernandez commented 3 years ago

Thanks @brotkel for submitting this issue and PR with the update. We went ahead and merged the PR. Closing this issue now.