Entity bundle class is not immediately picked up after generating

Created on 22 March 2023, over 1 year ago

Problem/Motivation

After generating a new entity bundle class, it is not immediately being set as bundle class, even though there's a hook_entity_bundle_info_alter implementation present.

Steps to reproduce

  1. Generate a new entity bundle class using drush ebcg
  2. Add a new field using drush fc. No new getter is appended to the class since it's not yet registered until you manually clear Drupal caches

Proposed resolution

Run $this->entityTypeBundleInfo->clearCachedBundles(); after generating a bundle class.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇧🇪Belgium dieterholvoet Brussels

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024