- πΊπΈUnited States mikeryan Murphysboro, IL, USA
While we're here - what about
setCacheKey()
andwriteCache()
? These public methods are:- Implemented in
AliasManager
- Not defined in
AliasManagerInterface
- Used in
PathAliasSubscriber
via a member defined as an instance ofAliasManagerInterface
In other words, if you were to implement your own alias manager using the interface without referencing the internals of the core implementation - it would blow up.
No, I'm not actually trying to implement my own alias manager - I'm decorating
AliasManager
, andphpstan
is (rightfully) unhappy with the situation:32 Method Drupal\me_performance\MePerformanceAliasManager::setCacheKey() has parameter $key with no type specified. 33 Call to an undefined method Drupal\path_alias\AliasManagerInterface::setCacheKey(). 40 Call to an undefined method Drupal\path_alias\AliasManagerInterface::writeCache(). 53 Method Drupal\me_performance\MePerformanceAliasManager::cacheClear() has parameter $source with no type specified.
These methods were originally defined in `CacheDecoratorInterface` - when that was deprecated β , the methods probably should have been moved to `AliasManagerInterface`.
- Implemented in
- π¬π§United Kingdom catch
π AliasManager should use the current route match for outbound alias pre-loading cache keys Active affects this issue - if we do that, some of these methods might even go altogether.