Incorrect type hint in meta_entity_entity_bundle_field_info() hook implementation
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3529976. --> Reported by: [alorenc](https://www.drupal.org/user/3603980) Related to !14 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>In meta_entity.module, the hook_entity_bundle_field_info() implementation currently type-hints bundle parameter as string:<br> <code>function meta_entity_entity_bundle_field_info(EntityTypeInterface $entity_type, string $bundle, array $base_field_definitions): array {</code></p> <p>This strict type hint violates the Drupal core hook expectations. According to the Drupal 11.x API documentation, $bundle can be NULL when Drupal requests field info for all bundles of a given entity type.<br> <a href="https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21entity.api.php/function/hook_entity_bundle_field_info/11.x">https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21entity.api.php/function/hook_entity_bundle_field_info/11.x</a></p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Update the hook implementation to allow $bundle to be nullable:<br> <code>function meta_entity_entity_bundle_field_info(string $entity_type, ?string $bundle): array {</code></p> > Related issue: [Issue #3529979](https://www.drupal.org/node/3529979)
issue