phpstan-drupal
phpstan-drupal copied to clipboard
\Drupal\Core\Config\ExtensionInstallStorage::__construct should be triggering deprecations.
Service definition:
config.storage.schema:
class: Drupal\Core\Config\ExtensionInstallStorage
arguments: ['@config.storage', 'config/schema', '', true, '%install_profile%']
__construct
public function __construct(StorageInterface $config_storage, $directory = self::CONFIG_INSTALL_DIRECTORY, $collection = StorageInterface::DEFAULT_COLLECTION, $include_profile = TRUE, $profile = NULL) {
parent::__construct($directory, $collection);
$this->configStorage = $config_storage;
$this->includeProfile = $include_profile;
if (is_null($profile)) {
@trigger_error('Install profile will be a mandatory parameter in Drupal 9.0.', E_USER_DEPRECATED);
}
$this->installProfile = $profile ?: \Drupal::installProfile();
}
Need to test if the parameter is empty. If so, why no trigger.
This is impossible to check out of the box, and needs to have its own specific rule for "new constructor signature, calling with the old signature is deprecated.