Skip to content

Commit a766dea

Browse files
authored
Merge pull request #2 from Sebobo/task/neos-43-compatibility
TASK: Neos 4.3 compatibility
2 parents cd17341 + 617f7a1 commit a766dea

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

Classes/Http/RequestInterceptorComponent.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ public function handle(ComponentContext $componentContext)
6565

6666
$entry = $this->cacheFrontend->get($entryIdentifier);
6767
if ($entry) {
68-
$response = parse_response($entry);
68+
if (class_exists('Neos\\Flow\\Http\\Response')) {
69+
$response = \Neos\Flow\Http\Response::createFromRaw($entry);
70+
} else {
71+
$response = parse_response($entry);
72+
}
6973
$response = $response->withHeader('X-From-FullPageCache', $entryIdentifier);
7074
$componentContext->replaceHttpResponse($response);
7175
$componentContext->setParameter(ComponentChain::class, 'cancel', true);

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"name": "flowpack/fullpagecache",
55
"license": "MIT",
66
"require": {
7-
"neos/neos": "^5.0 || dev-master"
7+
"neos/neos": "~4.3.6 || ^5.0 || dev-master"
88
},
99
"autoload": {
1010
"psr-4": {

0 commit comments

Comments
 (0)