Merge pull request #18 from rosiel/use-new-requeststack

Use new requeststack
This commit is contained in:
Kyle Huynh 2023-01-26 12:21:05 -05:00 committed by GitHub
commit e8633d7e3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 6 deletions

View file

@ -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

View file

@ -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);

View file

@ -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')
);
}

View file

@ -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()
);
}

View file

@ -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()
);
}