V4.3 breaks with syntax error on PHP < 8.1
Closed this issue · 1 comments
cschnell commented
Hi,
The 4.x tags claim to support PHP versions >= 7.2, see
Line 22 in 0a7c3cd
The change in 899fe99 however uses a language construct ("First class callable") introduced in PHP 8.1
So this change breaks
- the PHP requirements
- semantic versioning
and has already been reported in #98 (comment)
The solution is to create a real closure like this:
private function parseStripColorProfileCommand(): mixed
{
return $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_stripColorProfileCommand'] ??
implode(
' ',
array_map(
\Closure::fromCallable([CommandUtility::class, 'escapeShellArgument']),
$GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_stripColorProfileParameters'] ?? [],
),
);
}
I'll provide a PR