When someone wants to create a plugin and is using the Matomo version from matomo.zip, they probably get an error like this one:
Uncaught exception: Error: Class 'Piwik\Plugins\ExamplePlugin\ExamplePlugin' not found
This is expected as Matomo doesn't ship with the Example* plugins anymore, but doesn't help the person struggling with this.
generate:plugin should detect if those plugins are missing and if not point people towards https://developer.matomo.org/guides/getting-started-part-1
BTW maybe some other thought... those commands require development mode to be enabled anyway. So maybe when development mode is enabled, we could call the method whether Matomo is installed through git (
SettingsPiwik::isGitDeployment) and if not, throw an error mentioning "development mode can be only enabled when installed through git"
Makes sense, I am just not sure at the moment if there isn't some reason why someone would want to enable development temporarily in production.
@Findus23 there shouldn't be (did a very quick check) and if there is a reason then we would maybe need to change something or add another check like we do here: https://github.com/matomo-org/matomo/blob/4.0.5/core/FrontController.php#L641-L647
This be an easy fix and could also fix other issues and make development more like what it's meant to be used from I guess.