diff --git a/CHANGELOG.md b/CHANGELOG.md index 21edb90e4..a6fb42f58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ -Latest release: 6.0.4 (2020/09/22) +Latest release: 6.0.5 (2021/01/22) All previous release change logs: +* [6.0.5 (2021/01/22)](Documentation/Changelog/6.0.5.md) [Full list of changes](https://github.com/FluidTYPO3/vhs/compare/6.0.4...6.0.5) * [6.0.4 (2020/09/22)](Documentation/Changelog/6.0.4.md) [Full list of changes](https://github.com/FluidTYPO3/vhs/compare/6.0.3...6.0.4) * [6.0.3 (2020/06/02)](Documentation/Changelog/6.0.3.md) [Full list of changes](https://github.com/FluidTYPO3/vhs/compare/6.0.2...6.0.3) * [6.0.2 (2020/06/01)](Documentation/Changelog/6.0.2.md) [Full list of changes](https://github.com/FluidTYPO3/vhs/compare/6.0.1...6.0.2) diff --git a/Classes/Service/AssetService.php b/Classes/Service/AssetService.php index a3faeea24..ae885609a 100644 --- a/Classes/Service/AssetService.php +++ b/Classes/Service/AssetService.php @@ -11,6 +11,8 @@ use FluidTYPO3\Vhs\Asset; use FluidTYPO3\Vhs\Utility\CoreUtility; use FluidTYPO3\Vhs\ViewHelpers\Asset\AssetInterface; +use Psr\Log\LoggerInterface; +use TYPO3\CMS\Core\Log\LogManager; use TYPO3\CMS\Core\SingletonInterface; use TYPO3\CMS\Core\Utility\ArrayUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; @@ -30,7 +32,6 @@ */ class AssetService implements SingletonInterface { - /** * @var string */ @@ -627,6 +628,10 @@ protected function copyReferencedFilesAndReplacePaths($contents, $regex, $origin $replacements = []; $wrap = explode('|', $wrap); preg_match_all($regex, $contents, $matches); + $logger = null; + if (class_exists(LogManager::class)) { + $logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__); + } foreach ($matches[2] as $matchCount => $match) { $match = trim($match, '\'" '); if (false === strpos($match, ':') && !preg_match('/url\\s*\\(/i', $match)) { @@ -646,11 +651,12 @@ protected function copyReferencedFilesAndReplacePaths($contents, $regex, $origin ) . $path; $realPath = realpath($rawPath); if (false === $realPath) { - GeneralUtility::sysLog( - 'Asset at path "' . $rawPath . '" not found. Processing skipped.', - 'vhs', - GeneralUtility::SYSLOG_SEVERITY_WARNING - ); + $message = 'Asset at path "' . $rawPath . '" not found. Processing skipped.'; + if ($logger instanceof LoggerInterface) { + $logger->warning($message, ['rawPath' => $rawPath]); + } else { + GeneralUtility::sysLog($message, GeneralUtility::SYSLOG_SEVERITY_WARNING); + } } else { if (false === file_exists($temporaryFile)) { copy($realPath, $temporaryFile); diff --git a/Classes/ViewHelpers/DebugViewHelper.php b/Classes/ViewHelpers/DebugViewHelper.php index 645f706b1..b77b04341 100644 --- a/Classes/ViewHelpers/DebugViewHelper.php +++ b/Classes/ViewHelpers/DebugViewHelper.php @@ -13,7 +13,6 @@ use TYPO3\CMS\Extbase\Utility\DebuggerUtility; use TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode as LegacyFluidObjectAccessorNode; use TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode as LegacyFluidViewHelperNode; -use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\ChildNodeAccessInterface; use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode as StandaloneFluidObjectAccessorNode; use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\ViewHelperNode as StandaloneFluidViewHelperNode; use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; @@ -65,7 +64,7 @@ * @package Vhs * @subpackage ViewHelpers */ -class DebugViewHelper extends AbstractViewHelper implements ChildNodeAccessInterface +class DebugViewHelper extends AbstractViewHelper { /** diff --git a/Classes/ViewHelpers/Iterator/ExtractViewHelper.php b/Classes/ViewHelpers/Iterator/ExtractViewHelper.php index 1ee27e313..ea5b1fd09 100644 --- a/Classes/ViewHelpers/Iterator/ExtractViewHelper.php +++ b/Classes/ViewHelpers/Iterator/ExtractViewHelper.php @@ -8,6 +8,8 @@ * LICENSE.md file that was distributed with this source code. */ +use Psr\Log\LoggerInterface; +use TYPO3\CMS\Core\Log\LogManager; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Extbase\Reflection\ObjectAccess; use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; @@ -125,7 +127,11 @@ public static function renderStatic( $result = static::extractByKey($content, $key); } } catch (\Exception $error) { - GeneralUtility::sysLog($error->getMessage(), 'vhs', GeneralUtility::SYSLOG_SEVERITY_WARNING); + if (class_exists(LogManager::class)) { + GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__)->warning($error->getMessage(), ['content' => $content]); + } else { + GeneralUtility::sysLog($error->getMessage(), 'vhs', GeneralUtility::SYSLOG_SEVERITY_WARNING); + } $result = []; } diff --git a/Classes/ViewHelpers/Media/Image/AbstractImageInfoViewHelper.php b/Classes/ViewHelpers/Media/Image/AbstractImageInfoViewHelper.php index db148dae1..d29e58667 100644 --- a/Classes/ViewHelpers/Media/Image/AbstractImageInfoViewHelper.php +++ b/Classes/ViewHelpers/Media/Image/AbstractImageInfoViewHelper.php @@ -9,9 +9,10 @@ */ use FluidTYPO3\Vhs\Utility\ResourceUtility; +use TYPO3\CMS\Core\Resource\FileReference as CoreFileReference; use TYPO3\CMS\Core\Resource\ResourceFactory; use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Domain\Model\FileReference; +use TYPO3\CMS\Extbase\Domain\Model\FileReference as ExtbaseFileReference; use TYPO3Fluid\Fluid\Core\ViewHelper\Exception; use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; @@ -86,7 +87,7 @@ public function getInfo() } } - if (is_object($src) && $src instanceof FileReference) { + if (is_object($src) && ($src instanceof CoreFileReference || $src instanceof ExtbaseFileReference)) { $src = $src->getUid(); $treatIdAsUid = false; $treatIdAsReference = true; diff --git a/Classes/ViewHelpers/Page/Header/MetaViewHelper.php b/Classes/ViewHelpers/Page/Header/MetaViewHelper.php index 63947455d..7a6f78a7c 100644 --- a/Classes/ViewHelpers/Page/Header/MetaViewHelper.php +++ b/Classes/ViewHelpers/Page/Header/MetaViewHelper.php @@ -59,16 +59,25 @@ public function render() $content = $this->arguments['content']; if (!empty($content)) { $pageRenderer = static::getPageRenderer(); - if (method_exists($pageRenderer, 'addMetaTag')) { + if (!method_exists($pageRenderer, 'setMetaTag')) { $pageRenderer->addMetaTag($this->renderTag($this->tagName, null, ['content' => $content])); } else { $properties = []; - foreach (['http-equiv', 'scheme', 'lang', 'dir'] as $propertyName) { + $type = 'name'; + $name = $this->tag->getAttribute('name'); + if (!empty($this->tag->getAttribute('property'))) { + $type = 'property'; + $name = $this->tag->getAttribute('property'); + } elseif (!empty($this->tag->getAttribute('http-equiv'))) { + $type = 'http-equiv'; + $name = $this->tag->getAttribute('http-equiv'); + } + foreach (['http-equiv', 'property', 'scheme', 'lang', 'dir'] as $propertyName) { if (!empty($this->tag->getAttribute($propertyName))) { $properties[$propertyName] = $this->tag->getAttribute($propertyName); } } - $pageRenderer->setMetaTag('name', $this->arguments['name'], $content, $properties); + $pageRenderer->setMetaTag($type, $name, $content, $properties); } } } diff --git a/Classes/ViewHelpers/Security/DenyViewHelper.php b/Classes/ViewHelpers/Security/DenyViewHelper.php index 24a93464d..625a94cc6 100644 --- a/Classes/ViewHelpers/Security/DenyViewHelper.php +++ b/Classes/ViewHelpers/Security/DenyViewHelper.php @@ -8,8 +8,6 @@ * LICENSE.md file that was distributed with this source code. */ -use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\ChildNodeAccessInterface; - /** * ### Security: Deny * @@ -19,7 +17,7 @@ * * Is the mirror opposite of `v:security.allow`. */ -class DenyViewHelper extends AbstractSecurityViewHelper implements ChildNodeAccessInterface +class DenyViewHelper extends AbstractSecurityViewHelper { /** diff --git a/Documentation/Changelog/6.0.5.md b/Documentation/Changelog/6.0.5.md new file mode 100644 index 000000000..8d5c1782b --- /dev/null +++ b/Documentation/Changelog/6.0.5.md @@ -0,0 +1,19 @@ +## Release: 6.0.5 (2021/01/22) + +* 2020-07-26 [BUGFIX] Replaced GeneralUtility::sysLog calls with calls to the logging API (Commit 3ec66b15 by bink) +* 2021-01-06 [BUGFIX] Drop ChildNodeAccessInterface usage (Commit 4eeaccbf by Mathias Brodala) +* 2020-12-08 [BUGFIX] Correctly use PageRender meta tag API (Commit 885f5465 by Claus Due) +* 2020-10-20 [BUGFIX] Support core FileReference in image size viewhelpers (Commit 53afafdd by Mathias Brodala) + +Generated by: + +``` +git log --since="2020/09/22" --until="2021/01/22" --abbrev-commit --pretty='%ad %s (Commit %h by %an)' \ + --date=short | egrep '(\[FEATURE|BUGFIX|REMOVAL\])+'` +``` + +Full list of changes: https://github.com/FluidTYPO3/vhs/compare/6.0.4...6.0.5 + +*Please note: the change list above does not contain any TASK commits since they are considered +infrastructure-only and not relevant to end users. The full list includes these!* + diff --git a/Documentation/README.md b/Documentation/README.md index 85716b134..eedb1a98b 100644 --- a/Documentation/README.md +++ b/Documentation/README.md @@ -1,5 +1,5 @@ VHS: Documentation ====================== -Please visit our full documentation at: https://fluidtypo3.org/viewhelpers/vhs/master.html. +Please visit our full documentation at: https://viewhelpers.fluidtypo3.org/fluidtypo3/vhs/. You can also browse through the markdown files here, but other website has a much nicer view ;-). diff --git a/ext_emconf.php b/ext_emconf.php index bfd0dbeca..1875f334c 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -11,7 +11,7 @@ 'conflicts' => '', 'priority' => '', 'module' => '', - 'state' => 'stable', + 'state' => 'beta', 'internal' => '', 'uploadfolder' => 0, 'createDirs' => '',