diff --git a/pages_restriction.info.yml b/pages_restriction.info.yml index c3bf45a..e4206f1 100644 --- a/pages_restriction.info.yml +++ b/pages_restriction.info.yml @@ -2,7 +2,8 @@ name: Pages Restriction Access description: Restrict access from anonymous and regular users to configured pre-defined pages. type: module core: '8.x' +core_version_requirement: ^8 || ^9 package: User interface configure: pages_restriction.settings dependencies: - 'drupal:system (>= 8.5)' diff --git a/pages_restriction.services.yml b/pages_restriction.services.yml index a40f771..b82a09e 100644 --- a/pages_restriction.services.yml +++ b/pages_restriction.services.yml @@ -1,7 +1,7 @@ services: pages_restriction.event_subscriber: class: Drupal\pages_restriction\Event\PagesRestrictionSubscriber - arguments: ['@config.factory', '@request_stack', '@path.matcher', '@pages_restriction.helper', '@current_user', '@session', '@path.current', '@path.alias_manager'] + arguments: ['@config.factory', '@request_stack', '@path.matcher', '@pages_restriction.helper', '@current_user', '@session', '@path.current', '@path_alias.manager'] tags: - { name: event_subscriber, priority: 210} diff --git a/src/Event/PagesRestrictionSubscriber.php b/src/Event/PagesRestrictionSubscriber.php index 5bcfa87..da2ca1c 100644 --- a/src/Event/PagesRestrictionSubscriber.php +++ b/src/Event/PagesRestrictionSubscriber.php @@ -14,7 +14,7 @@ use Symfony\Component\HttpFoundation\RedirectResponse; use Drupal\Core\Session\AccountProxyInterface; use Symfony\Component\HttpFoundation\Session\Session; use Drupal\Core\Path\CurrentPathStack; -use Drupal\Core\Path\AliasManagerInterface; +use Drupal\path_alias\AliasManagerInterface; use Drupal\Core\Url; /**