Problem/Motivation
PluginManagerPass:
if (str_starts_with($service_id, 'plugin.manager.') && !$definition->hasTag('plugin_manager_cache_clear')) {
if (is_subclass_of($definition->getClass(), '\Drupal\Component\Plugin\Discovery\CachedDiscoveryInterface')) {
$definition->addTag('plugin_manager_cache_clear');
}
}
but then we also have some manually configured services:
config.typed:
class: Drupal\Core\Config\TypedConfigManager
tags:
- { name: plugin_manager_cache_clear }
entity_type.manager:
class: Drupal\Core\Entity\EntityTypeManager
tags:
- { name: plugin_manager_cache_clear }
typed_data_manager:
class: Drupal\Core\TypedData\TypedDataManager
tags:
- { name: plugin_manager_cache_clear }
Each of those services implements CachedDiscoveryInterface, which CachedDiscoveryClearer is in charge of calling.
Steps to reproduce
Proposed resolution
Autoconfigure the tag in CoreServiceProvider:
$container->registerForAutoconfiguration(CachedDiscoveryInterface::class)
->addTag('plugin_manager_cache_clear');
Then remove deprecate PluginManagerPass and the manual tags.
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3582521
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
longwaveComment #4
longwaveHm, this will need BC for contrib though.
Comment #5
longwaveComment #7
stborchertAs far as I can tell there is not much to do for BC:
* manually added tags (
plugin_manager_cache_clearare still working* existing services without the tag but subclassing
CachedDiscoveryInterfaceare still autoconfigured (but will get a deprecation warning)Am I missing something?
Comment #8
smustgrave commentedWe've missed the 11.5 window. Earliest now is 12.1.0 but they'll need to point to a CR also.
Comment #9
stborchertUpdated the version in the deprecation message and added a change notice.
Comment #10
smustgrave commented@longwave thoughts on the current MR?
May be above me to fully review it, least to move it forward.