Commit d3ad23a5 authored by Matthias Adrowski's avatar Matthias Adrowski
Browse files

[TASK] Remove TYPO3 V9 code

parent c1b51b1f
......@@ -36,7 +36,6 @@ use SGalinski\ContentReplacer\Service\CustomParserService;
use SGalinski\ContentReplacer\Service\SpanParserService;
use TYPO3\CMS\Core\Context\Context;
use TYPO3\CMS\Core\Context\TypoScriptAspect;
use TYPO3\CMS\Core\Http\Stream;
use TYPO3\CMS\Core\Http\StreamFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
......@@ -93,19 +92,12 @@ class ContentReplacerMiddleware implements MiddlewareInterface {
}
// StreamFactory is not available in TYPO3 9 yet.
if (version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '10.0.0', '<')) {
$stream = new Stream('php://temp', 'r+');
if ($content !== '') {
$stream->write($content);
}
} else {
$streamFactory = GeneralUtility::makeInstance(StreamFactory::class);
$stream = $streamFactory->createStream($content);
}
$streamFactory = GeneralUtility::makeInstance(StreamFactory::class);
$stream = $streamFactory->createStream($content);
return $response->withBody($stream);
}
/**
* Returns a span tag parser instance
*
......@@ -164,7 +156,6 @@ class ContentReplacerMiddleware implements MiddlewareInterface {
return $content;
}
/**
* Returns the merged extension configuration of the global configuration and the typoscript
* settings.
......
# Version 6 Breaking Changes
- Dropped TYPO3 8 support
# Version 7 Breaking Changes
- Dropped TYPO3 9 support
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment