diff --git a/advanced_search.info.yml b/advanced_search.info.yml index 5420ad9..c6189d6 100644 --- a/advanced_search.info.yml +++ b/advanced_search.info.yml @@ -4,7 +4,7 @@ name: 'Advanced Search' description: "Creates an Advanced Search block and other enhancements to search." type: module package: Islandora -core_version_requirement: ^8 || ^9 +core_version_requirement: ^9.3 dependencies: - drupal:facets - drupal:facets_summary diff --git a/src/Controller/AjaxBlocksController.php b/src/Controller/AjaxBlocksController.php index 9eb7739..c5e3fb8 100644 --- a/src/Controller/AjaxBlocksController.php +++ b/src/Controller/AjaxBlocksController.php @@ -11,7 +11,6 @@ use Drupal\Core\Render\RendererInterface; use Drupal\Core\Routing\CurrentRouteMatch; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Routing\RouterInterface; @@ -136,7 +135,7 @@ class AjaxBlocksController extends ControllerBase { } $new_request = Request::create($path); - $request_stack = new RequestStack(); + $request_stack = \Drupal::requestStack(); $processed = $this->pathProcessor->processInbound($new_request->getPathInfo(), $new_request); $this->currentPath->setPath($processed); diff --git a/src/Form/AdvancedSearchForm.php b/src/Form/AdvancedSearchForm.php index 7637cf4..4316eed 100644 --- a/src/Form/AdvancedSearchForm.php +++ b/src/Form/AdvancedSearchForm.php @@ -71,7 +71,7 @@ class AdvancedSearchForm extends FormBase { */ public static function create(ContainerInterface $container) { return new static( - $container->get('request_stack')->getMasterRequest(), + $container->get('request_stack')->getMainRequest(), $container->get('current_route_match') ); } diff --git a/src/Plugin/Block/AdvancedSearchBlock.php b/src/Plugin/Block/AdvancedSearchBlock.php index 7ce64fe..5db6c2e 100644 --- a/src/Plugin/Block/AdvancedSearchBlock.php +++ b/src/Plugin/Block/AdvancedSearchBlock.php @@ -108,7 +108,7 @@ class AdvancedSearchBlock extends BlockBase implements ContainerFactoryPluginInt $plugin_definition, $container->get('plugin.manager.search_api.display'), $container->get('form_builder'), - $container->get('request_stack')->getMasterRequest() + $container->get('request_stack')->getMainRequest() ); } diff --git a/src/Plugin/Block/SearchResultsPagerBlock.php b/src/Plugin/Block/SearchResultsPagerBlock.php index 498cc64..b47edb8 100644 --- a/src/Plugin/Block/SearchResultsPagerBlock.php +++ b/src/Plugin/Block/SearchResultsPagerBlock.php @@ -58,7 +58,7 @@ class SearchResultsPagerBlock extends BlockBase implements ContainerFactoryPlugi $configuration, $plugin_id, $plugin_definition, - $container->get('request_stack')->getMasterRequest() + $container->get('request_stack')->getMainRequest() ); }