#110611Decouple TCA record icon registration from IconRegistry
Description
Follow-up to #110405.
IconRegistry still knows about TCA: it receives an optional TcaSchemaFactory, checks on every public call whether the schema has been loaded in the meantime and then registers the “tcarecords-TABLE-default” icons for tables with a “ctrl iconfile” setting. The dependency has to be optional because the failsafe container of the install tool provides no schema factory.
The registry should not know TCA at all. The icons derived from TCA can be registered where the icons from the Configuration Icons.php files of all packages are already added to the registry, in the core ServiceProvider extension for IconRegistry. That extension runs when the registry service is created, which in the full container is always after the schema has been loaded. In the failsafe container the schema factory does not exist and the step is skipped, which matches the current behaviour.
Result: IconRegistry loses the TcaSchemaFactory constructor argument, the protected registerTCAIcons method and the tcaInitialized flag, and public calls no longer re-run the initialisation to catch a late TCA load. The identifiers tcarecords-TABLE-default stay available for all consumers, including direct usages such as LinkElement and Configuration Icons.php overrides such as the one in EXT:styleguide.
Removing the protected method and property is breaking for subclasses, so a Breaking changelog entry is needed.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[TASK] Decouple TCA record icon registration from IconRegistry Resolves: #110611 Releases: main