Active
Project:
Drupal core
Version:
main
Component:
entity system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Nov 2025 at 17:45 UTC
Updated:
14 Nov 2025 at 17:45 UTC
Jump to comment: Most recent
#3396166: Convert entity type discovery to PHP attributes introduced a regression in DX and possibly translatability:
label_count used to be a PluralTranslation, which enforced the keys:
public function __construct(array $values) {
if (!isset($values['singular'])) {
throw new \InvalidArgumentException('Missing "singular" value in the PluralTranslation annotation');
}
if (!isset($values['plural'])) {
throw new \InvalidArgumentException('Missing "plural" value in the PluralTranslation annotation');
}
Now it's just an array and there's no check of the keys:
public readonly array $label_count = [],
1. Change the label_count property of an entity type to no longer had one of its child items.
2. Do a rebuild.
3. Note absence of helpful exception
Comments