From c95d59a0975bf8d44f829d301c7ec6673b290451 Mon Sep 17 00:00:00 2001 From: Patrick Kenny <33362-ptmkenny@users.noreply.drupalcode.org> Date: Tue, 7 Jan 2025 16:03:03 +0900 Subject: [PATCH] fix settings and type hint --- src/EventSubscriber/ResponseSubscriber.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EventSubscriber/ResponseSubscriber.php b/src/EventSubscriber/ResponseSubscriber.php index ab31f1b..d94e88f 100644 --- a/src/EventSubscriber/ResponseSubscriber.php +++ b/src/EventSubscriber/ResponseSubscriber.php @@ -54,7 +54,7 @@ class ResponseSubscriber implements EventSubscriberInterface { } public function __construct(ConfigFactoryInterface $config_factory, CurrentRouteMatch $current_route_match) { - $this->config = $config_factory->get('jsonapi_links'); + $this->config = $config_factory->get('jsonapi_links.settings'); $this->currentRouteMatch = $current_route_match; } @@ -100,7 +100,7 @@ class ResponseSubscriber implements EventSubscriberInterface { /** * Unsets links in JSON:API responses. */ - protected function removeLinks(&$data, ?string $node = NULL) { + protected function removeLinks(&$data, string|int|null $node = NULL) { if ($node) { $this->path[] = $node; } -- GitLab