- π¬π§United Kingdom catch
I think between changing the type hints to the interface and using class_alias() that would allow us to do the other issue without breaking bc, so still seems valid.
Comments on the patch:
-
+++ b/core/lib/Drupal/Core/Menu/MenuParentFormSelectorInterface.php @@ -26,7 +26,7 @@ * the values are a menu name or link title indented by depth. */ - public function getParentSelectOptions($id = '', array $menus = NULL, CacheableMetadata &$cacheability = NULL); + public function getParentSelectOptions($id = '', array $menus = NULL, RefinableCacheableDependencyInterface $cacheability = NULL); /**
I doubt anyone is subclassing this, but I think we should probably remove the entire parameter from the interface in Drupal 10, add a commented out one to indicate it's going to be added back with the new type hint, then change the type hint in Drupal 12. Pretty sure this allows an implementation to update their own type hint in Drupal 10, see example 3 on π± [Meta] Implement strict typing in existing code Active .
-
+++ b/core/modules/views/src/Plugin/views/cache/CachePluginBase.php @@ -283,10 +284,10 @@ protected function prepareViewResult(array $result) { */ - public function alterCacheMetadata(CacheableMetadata $cache_metadata) { + public function alterCacheMetadata(RefinableCacheableDependencyInterface $cache_metadata) { }
And the same here.
-