From c36779912d76218dd417299475088c28ad5e8645 Mon Sep 17 00:00:00 2001 From: Claus Due Date: Tue, 22 Sep 2020 20:09:24 +0200 Subject: [PATCH 1/7] [TASK] Set beta stability --- ext_emconf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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' => '', From 21bf3a93218ebfef87db025458c5640e2a1e7196 Mon Sep 17 00:00:00 2001 From: Claus Due Date: Thu, 1 Oct 2020 11:52:35 +0200 Subject: [PATCH 2/7] [DOC] Fix documentation link Close: #1689 --- Documentation/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ;-). From 53afafdd949cf63ae9e5b2e7446189ed1a445821 Mon Sep 17 00:00:00 2001 From: Mathias Brodala Date: Tue, 20 Oct 2020 11:31:51 +0200 Subject: [PATCH 3/7] [BUGFIX] Support core FileReference in image size viewhelpers --- .../ViewHelpers/Media/Image/AbstractImageInfoViewHelper.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; From 885f5465adc494cf7384b8d9277145a555d55587 Mon Sep 17 00:00:00 2001 From: Claus Due Date: Tue, 8 Dec 2020 14:13:18 +0100 Subject: [PATCH 4/7] [BUGFIX] Correctly use PageRender meta tag API Fixes a problem with meta tags created via the v:page.header.meta ViewHelper on TYPO3 <10.4, in which a tag added by both the VH and TS/PHP would not be overwritten. Additionally, fixes an issue on TYPO3 9.5+ when generating http-equiv or property meta tags which prevented these from being possible. --- .../ViewHelpers/Page/Header/MetaViewHelper.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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); } } } From 4eeaccbff8c6caa28815cf691c5e1f6dad2397c6 Mon Sep 17 00:00:00 2001 From: Mathias Brodala Date: Wed, 6 Jan 2021 10:50:17 +0100 Subject: [PATCH 5/7] [BUGFIX] Drop ChildNodeAccessInterface usage This has been deprecated in TYPO3v9 and dropped in TYPO3v10. The interface is not necessary since the switch to standalone Fluid with TYPO3v8 whose ViewHelperInterface already contains the "setChildNodes()" method formerly defined by ChildNodeAccessInterface. --- Classes/ViewHelpers/DebugViewHelper.php | 3 +-- Classes/ViewHelpers/Security/DenyViewHelper.php | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) 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/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 { /** From 3ec66b1555dff3264bdd53ede4d0383fe416e7ca Mon Sep 17 00:00:00 2001 From: bink Date: Sun, 26 Jul 2020 01:03:27 +0200 Subject: [PATCH 6/7] [BUGFIX] Replaced GeneralUtility::sysLog calls with calls to the logging API Use Logger where available. On versions that do not have the Logger, fall back to 8.7-compatible GeneralUtility::sysLog. --- Classes/Service/AssetService.php | 18 ++++++++++++------ .../ViewHelpers/Iterator/ExtractViewHelper.php | 8 +++++++- 2 files changed, 19 insertions(+), 7 deletions(-) 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/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 = []; } From 9e35dbfd506e8f51d3d8f971ecd8a01fb87d3256 Mon Sep 17 00:00:00 2001 From: Claus Due Date: Fri, 22 Jan 2021 13:28:06 +0100 Subject: [PATCH 7/7] [TASK] Generate change log for 6.0.5 --- CHANGELOG.md | 3 ++- Documentation/Changelog/6.0.5.md | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 Documentation/Changelog/6.0.5.md 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/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!* +