Loading modules/facets_summary/src/Plugin/facets_summary/processor/ResetFacetsProcessor.php +1 −3 Original line number Diff line number Diff line Loading @@ -51,9 +51,7 @@ class ResetFacetsProcessor extends ProcessorPluginBase implements BuildProcessor } $request_stack = \Drupal::requestStack(); // Support 9.3+. // @todo remove switch after 9.3 or greater is required. $request = version_compare(\Drupal::VERSION, '9.3', '>=') ? $request_stack->getMainRequest() : $request_stack->getMasterRequest(); $request = $request_stack->getMainRequest(); $query_params = $request->query->all(); // Bypass all active facets and remove them from the query parameters array. Loading src/Controller/FacetBlockAjaxController.php +2 −9 Original line number Diff line number Diff line Loading @@ -127,15 +127,8 @@ class FacetBlockAjaxController extends ControllerBase { $facets_blocks = array_unique($facets_blocks); $new_request = Request::create($path); // Support 9.3+. // @todo remove after 9.3 or greater is required. if (class_exists(DrupalRequestStack::class)) { $request_stack = new DrupalRequestStack(); } // Legacy request stack. else { $request_stack = new SymfonyRequestStack(); } $processed = $this->pathProcessor->processInbound($path, $new_request); $processed_request = Request::create($processed); Loading src/Hierarchy/HierarchyPluginBase.php +1 −3 Original line number Diff line number Diff line Loading @@ -25,9 +25,7 @@ abstract class HierarchyPluginBase extends ProcessorPluginBase implements Hierar */ public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { $request_stack = $container->get('request_stack'); // Support 9.3+. // @todo remove switch after 9.3 or greater is required. $request = version_compare(\Drupal::VERSION, '9.3', '>=') ? $request_stack->getMainRequest() : $request_stack->getMasterRequest(); $request = $request_stack->getMainRequest(); return new static($configuration, $plugin_id, $plugin_definition, $request); } Loading src/Plugin/facets/facet_source/SearchApiDisplay.php +1 −3 Original line number Diff line number Diff line Loading @@ -124,9 +124,7 @@ class SearchApiDisplay extends FacetSourcePluginBase implements SearchApiFacetSo $container->get('plugin.manager.facets.query_type'), $container->get('search_api.query_helper'), $container->get('plugin.manager.search_api.display'), // Support 9.3+. // @todo remove switch after 9.3 or greater is required. version_compare(\Drupal::VERSION, '9.3', '>=') ? $request_stack->getMainRequest() : $request_stack->getMasterRequest(), $request_stack->getMainRequest(), $container->get('module_handler') ); } Loading tests/src/Functional/BlockTestTrait.php +1 −3 Original line number Diff line number Diff line Loading @@ -85,9 +85,7 @@ trait BlockTestTrait { * The id of the block. */ protected function deleteBlock($id) { // Delete a facet block through the UI, the text for the success message has // changed in Drupal::VERSION 9.3. $orig_success_message = 'The block ' . $this->blocks[$id]->label() . ' has been removed' . (\Drupal::VERSION >= 9.3 ? ' from the Footer region' : '') . '.'; $orig_success_message = 'The block ' . $this->blocks[$id]->label() . ' has been removed from the Footer region.'; $this->drupalGet('admin/structure/block/manage/' . $this->blocks[$id]->id(), ['query' => ['destination' => 'admin']]); $this->clickLink('Remove block'); Loading Loading
modules/facets_summary/src/Plugin/facets_summary/processor/ResetFacetsProcessor.php +1 −3 Original line number Diff line number Diff line Loading @@ -51,9 +51,7 @@ class ResetFacetsProcessor extends ProcessorPluginBase implements BuildProcessor } $request_stack = \Drupal::requestStack(); // Support 9.3+. // @todo remove switch after 9.3 or greater is required. $request = version_compare(\Drupal::VERSION, '9.3', '>=') ? $request_stack->getMainRequest() : $request_stack->getMasterRequest(); $request = $request_stack->getMainRequest(); $query_params = $request->query->all(); // Bypass all active facets and remove them from the query parameters array. Loading
src/Controller/FacetBlockAjaxController.php +2 −9 Original line number Diff line number Diff line Loading @@ -127,15 +127,8 @@ class FacetBlockAjaxController extends ControllerBase { $facets_blocks = array_unique($facets_blocks); $new_request = Request::create($path); // Support 9.3+. // @todo remove after 9.3 or greater is required. if (class_exists(DrupalRequestStack::class)) { $request_stack = new DrupalRequestStack(); } // Legacy request stack. else { $request_stack = new SymfonyRequestStack(); } $processed = $this->pathProcessor->processInbound($path, $new_request); $processed_request = Request::create($processed); Loading
src/Hierarchy/HierarchyPluginBase.php +1 −3 Original line number Diff line number Diff line Loading @@ -25,9 +25,7 @@ abstract class HierarchyPluginBase extends ProcessorPluginBase implements Hierar */ public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { $request_stack = $container->get('request_stack'); // Support 9.3+. // @todo remove switch after 9.3 or greater is required. $request = version_compare(\Drupal::VERSION, '9.3', '>=') ? $request_stack->getMainRequest() : $request_stack->getMasterRequest(); $request = $request_stack->getMainRequest(); return new static($configuration, $plugin_id, $plugin_definition, $request); } Loading
src/Plugin/facets/facet_source/SearchApiDisplay.php +1 −3 Original line number Diff line number Diff line Loading @@ -124,9 +124,7 @@ class SearchApiDisplay extends FacetSourcePluginBase implements SearchApiFacetSo $container->get('plugin.manager.facets.query_type'), $container->get('search_api.query_helper'), $container->get('plugin.manager.search_api.display'), // Support 9.3+. // @todo remove switch after 9.3 or greater is required. version_compare(\Drupal::VERSION, '9.3', '>=') ? $request_stack->getMainRequest() : $request_stack->getMasterRequest(), $request_stack->getMainRequest(), $container->get('module_handler') ); } Loading
tests/src/Functional/BlockTestTrait.php +1 −3 Original line number Diff line number Diff line Loading @@ -85,9 +85,7 @@ trait BlockTestTrait { * The id of the block. */ protected function deleteBlock($id) { // Delete a facet block through the UI, the text for the success message has // changed in Drupal::VERSION 9.3. $orig_success_message = 'The block ' . $this->blocks[$id]->label() . ' has been removed' . (\Drupal::VERSION >= 9.3 ? ' from the Footer region' : '') . '.'; $orig_success_message = 'The block ' . $this->blocks[$id]->label() . ' has been removed from the Footer region.'; $this->drupalGet('admin/structure/block/manage/' . $this->blocks[$id]->id(), ['query' => ['destination' => 'admin']]); $this->clickLink('Remove block'); Loading