phpstan-drupal
phpstan-drupal copied to clipboard
Service resolution returns incorrect interface for keyvalue.expirable
I've encountered a minor issue with the container service resolution returning an incorrect interface when loading the keyvalue.expirable service through the container.
This can be duplicated using just core files with: phpstan analyze --level 3 web/core/lib/Drupal.php
380 Method Drupal::keyValueExpirable() should return Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface but returns Drupal\Core\KeyValueStore\KeyValueStoreInterface.
I've also duplicated this in a plugin implementing ContainerFactoryPluginInterface using $container->get('keyvalue.expirable')->get('something')