diff --git a/core/lib/Drupal/Core/Session/RefinableCalculatedPermissions.php b/core/lib/Drupal/Core/Session/RefinableCalculatedPermissions.php index 410d96c377b974c5011e625a80b995d04767d2b3..13356979ef303e3738b7cfd85e5cd62eb35a3464 100644 --- a/core/lib/Drupal/Core/Session/RefinableCalculatedPermissions.php +++ b/core/lib/Drupal/Core/Session/RefinableCalculatedPermissions.php @@ -28,7 +28,7 @@ public function addItem(CalculatedPermissionsItemInterface $item, bool $overwrit /** * {@inheritdoc} */ - public function removeItem(string $scope, string|int $identifier): self { + public function removeItem(string $scope = AccessPolicyInterface::SCOPE_DRUPAL, string|int $identifier = AccessPolicyInterface::SCOPE_DRUPAL): self { unset($this->items[$scope][$identifier]); return $this; } diff --git a/core/lib/Drupal/Core/Session/RefinableCalculatedPermissionsInterface.php b/core/lib/Drupal/Core/Session/RefinableCalculatedPermissionsInterface.php index 8f78d17b4a93615fa0e71638a55dc8b57dd6c26d..5965d91ce8dcc06ac304e5756e2dc356d3df3eae 100644 --- a/core/lib/Drupal/Core/Session/RefinableCalculatedPermissionsInterface.php +++ b/core/lib/Drupal/Core/Session/RefinableCalculatedPermissionsInterface.php @@ -27,13 +27,14 @@ public function addItem(CalculatedPermissionsItemInterface $item, bool $overwrit * Removes a single calculated permission item from a given scope. * * @param string $scope - * The scope name to remove the item from. + * (optional) The scope name to remove the item from, defaults to 'drupal'. * @param string|int $identifier - * The scope identifier to remove the item from. + * (optional) The scope identifier to remove the item from, defaults to + * 'drupal'. * * @return self */ - public function removeItem(string $scope, string|int $identifier): self; + public function removeItem(string $scope = AccessPolicyInterface::SCOPE_DRUPAL, string|int $identifier = AccessPolicyInterface::SCOPE_DRUPAL): self; /** * Removes all of the calculated permission items, regardless of scope.