From b0fe216adebd4e2814e04c61ec77ac69a67a5cd2 Mon Sep 17 00:00:00 2001 From: Daniel Lienert Date: Wed, 16 Dec 2020 09:06:25 +0100 Subject: [PATCH] BUGFIX: Adapt to middleware refactoring in Neos 7 --- Classes/ResourceManagement/ProxyAwareTargetTrait.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Classes/ResourceManagement/ProxyAwareTargetTrait.php b/Classes/ResourceManagement/ProxyAwareTargetTrait.php index b1724d6..44b1676 100644 --- a/Classes/ResourceManagement/ProxyAwareTargetTrait.php +++ b/Classes/ResourceManagement/ProxyAwareTargetTrait.php @@ -3,18 +3,14 @@ namespace Sitegeist\MagicWand\ResourceManagement; use Neos\Flow\Annotations as Flow; -use Neos\Flow\Core\Bootstrap; use Neos\Flow\Http\Exception as HttpException; use Neos\Flow\Http\HttpRequestHandlerInterface; use Neos\Flow\Mvc\ActionRequest; use Neos\Flow\Mvc\Routing\Exception\MissingActionNameException; -use Neos\Flow\Mvc\Routing\UriBuilder; use Neos\Flow\ResourceManagement\CollectionInterface; use Neos\Flow\ResourceManagement\PersistentResource; -use Neos\Flow\ResourceManagement\ResourceManager; use Neos\Flow\ResourceManagement\Storage\StorageObject; use Neos\Flow\ResourceManagement\Target\Exception; -use Sitegeist\MagicWand\Domain\Service\ConfigurationService; trait ProxyAwareTargetTrait { @@ -23,7 +19,7 @@ public function initializeObject() // initialize uriBuilder with request $requestHandler = $this->bootstrap->getActiveRequestHandler(); if ($requestHandler instanceof HttpRequestHandlerInterface) { - $request = ActionRequest::fromHttpRequest($requestHandler->getComponentContext()->getHttpRequest()); + $request = ActionRequest::fromHttpRequest($requestHandler->getHttpRequest()); $this->uriBuilder->setRequest($request); } parent::initializeObject();