Attempting to set a plugin license key with ./console marketplace:set-license-key --license-key="xxx"
results in the error
Uncaught exception: Error: Class "Piwik\Plugins\Marketplace\Api" not found in
/var/www/matomo/plugins/Marketplace/Commands/SetLicenseKey.php:39
(Debian 11 running PHP 8.1.1)
This error appears to be caused by case sensitivity on the referenced class name, where the class name is API
but the the referenced class is Api
which is not PSR-4 compliant. Changing the referenced class name to API
fixes the error.
Ref L3-258
This is an error we actually might be able to prevent with phpcs. Might be useful to evaluate that maybe.