bootstrap->getActiveRequestHandler(); if (!$activeRequestHandler instanceof HttpRequestHandlerInterface) { $this->logger->debug('SessionLock: ' . \get_class($activeRequestHandler)); return $joinPoint->getAdviceChain()->proceed($joinPoint); } $this->readOnly = true; /** @var Lock|null $lock */ $lock = $activeRequestHandler->getHttpRequest()->getAttribute( SessionLockRequestMiddleware::class . '.' . SessionLockRequestMiddleware::PARAMETER_NAME ); if ($lock !== null) { $this->logger->debug('SessionLock: Release, as this is marked read only.'); $lock->release(); } return $joinPoint->getAdviceChain()->proceed($joinPoint); } /** * @Flow\Around("method(Neos\Flow\Session\Session->shutdownObject())") * @param JoinPointInterface $joinPoint * @return mixed|void */ public function doNotSaveSession(JoinPointInterface $joinPoint) { if ($this->readOnly) { return; } return $joinPoint->getAdviceChain()->proceed($joinPoint); } }