Skip to content

Commit 282b962

Browse files
authored
Merge pull request #13 from Flowpack/remove-optimized-redis-cache-backend
TASK: Update to Neos 8, remove OptimizedRedisCacheBackend
2 parents 195ef1f + 0632227 commit 282b962

4 files changed

Lines changed: 10 additions & 14 deletions

File tree

Classes/NodeRendering/Infrastructure/RedisContentCacheReader.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Neos\Flow\Annotations as Flow;
1111
use Flowpack\DecoupledContentStore\Core\Infrastructure\RedisClientManager;
1212
use Neos\Fusion\Core\Cache\ContentCache;
13-
use Sandstorm\OptimizedRedisCacheBackend\OptimizedRedisCacheBackend;
13+
use Neos\Cache\Backend\RedisBackend;
1414

1515
/**
1616
* @Flow\Scope("singleton")
@@ -49,8 +49,8 @@ public function tryToExtractRenderingForEnumeratedNodeFromContentCache(DocumentN
4949

5050
$redis = null;
5151
$backend = $this->contentCache->getBackend();
52-
if ($backend instanceof OptimizedRedisCacheBackend) {
53-
$reflProp = new \ReflectionProperty(OptimizedRedisCacheBackend::class, 'redis');
52+
if ($backend instanceof RedisBackend) {
53+
$reflProp = new \ReflectionProperty(RedisBackend::class, 'redis');
5454
$reflProp->setAccessible(true);
5555
$redis = $reflProp->getValue($backend);
5656
} else {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Neos_Fusion_Content:
22
frontend: Neos\Cache\Frontend\StringFrontend
3-
backend: Sandstorm\OptimizedRedisCacheBackend\OptimizedRedisCacheBackend
3+
backend: Neos\Cache\Backend\RedisBackend

Tests/Behavior/Features/Bootstrap/FeatureContext.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use Behat\Behat\Context\Context;
44
use Behat\Gherkin\Node\PyStringNode;
55
use Flowpack\DecoupledContentStore\ContentReleaseManager;
6+
use Flowpack\DecoupledContentStore\Core\ConcurrentBuildLockService;
67
use Flowpack\DecoupledContentStore\Core\Domain\ValueObject\ContentReleaseIdentifier;
78
use Flowpack\DecoupledContentStore\Core\Domain\ValueObject\PrunnerJobId;
89
use Flowpack\DecoupledContentStore\Core\RedisKeyService;
@@ -40,7 +41,6 @@
4041
use Neos\Utility\Arrays;
4142
use Neos\Utility\ObjectAccess;
4243
use PHPUnit\Framework\Assert;
43-
use Psr\Log\Test\TestLogger;
4444
use Symfony\Component\Console\Output\BufferedOutput;
4545
use Symfony\Component\Yaml\Yaml;
4646

@@ -153,6 +153,8 @@ public function iCreateAContentRelease($contentReleaseIdentifier)
153153
$prunnerJobId = PrunnerJobId::fromString("...");
154154
$logger = ContentReleaseLogger::fromSymfonyOutput($bufferedOutput, $contentReleaseIdentifier);
155155
$redisContentReleaseService->createContentRelease($contentReleaseIdentifier, $prunnerJobId, $logger);
156+
$concurrentBuildLockService = $this->getObjectManager()->get(ConcurrentBuildLockService::class);
157+
$concurrentBuildLockService->ensureAllOtherInProgressContentReleasesWillBeTerminated($contentReleaseIdentifier);
156158
echo $bufferedOutput->fetch();
157159
}
158160

@@ -406,13 +408,8 @@ public function iFlushTheContentCacheDependingOnTheModifiedNodes()
406408
{
407409
$contentCacheFlusher = $this->getObjectManager()->get(ContentCacheFlusher::class);
408410

409-
$testLogger = new TestLogger();
410-
ObjectAccess::setProperty($contentCacheFlusher, 'systemLogger', $testLogger, true);
411411
$contentCacheFlusher->shutdownObject();
412412
ObjectAccess::setProperty($contentCacheFlusher, 'tagsToFlush', [], true);
413-
foreach ($testLogger->records as $record) {
414-
echo $record['message'] . "\n";
415-
}
416413
}
417414

418415
/**

composer.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
"type": "neos-package",
44
"name": "flowpack/decoupledcontentstore",
55
"require": {
6-
"php": "^7.1 || ^8.0",
7-
"neos/neos": "^7.0",
6+
"php": "^8.0",
7+
"neos/neos": "^8.0",
88
"albertofem/rsync-lib": "~1.0",
9-
"sandstorm/optimizedrediscachebackend": "^1.1.4",
10-
"flowpack/prunner": "^0.2"
9+
"flowpack/prunner": "*"
1110
},
1211
"autoload": {
1312
"psr-4": {

0 commit comments

Comments
 (0)