TypeError: Return value of parseStripColorProfileCommand() must be an instance of Plan2net\Webp\Converter\mixed, string returned
Closed this issue · 4 comments
Seems to be that this is a regression wich was introduced with the bugfix for #98
Downgrading to webp 4.2.0 fixes the issue
Hey @christianbltr , it might be due to your PHP version.
From what I understand, the return value "mixed" was introduced in PHP 8.0. I encountered the same error using version 4.3.1 with PHP 7.4, which is currently out of official security support.
The requirement specified in the composer.json file for version 4.3.1 is "php": ">=7.2.0". If my assumption is correct, perhaps we could submit a pull request to raise the PHP requirement?
Yes I would also assume that this is caused by the PHP version. Raising the PHP version would at least prevent composer from installing the latest version on those systems. But composer would still try to install 4.3.1 because this version says it will run under PHP 7.4. So I think it would be the best to have at least one version which will run flawlessly under PHP 7.4 before raising the PHP requirement in the next version. Otherwise other users will end up here also because they try to install webp 4.3.1 on systems with PHP 7.4.
I pushed a new version 4.3.2