I'm trying to write my own Craft 3 TWIG filter / functions.
For this purpose I created a scaffolding using pluginfactory.io. I did a
composer require and composer correctly symlinks the plugin to the Craft project's vendor directory. When I click "Plugins" in the CP it shows my plugin, but when I click "Install" I get the error:
Call to a member function getVersion() on null
caused in /var/www/html/vendor/craftcms/cms/src/services/Plugins.php on line 328 which is
$info = [ 'handle' => $handle, 'version' => $plugin->getVersion(), // <== Line 328 'schemaVersion' => $plugin->schemaVersion, 'installDate' => Db::prepareDateForDb(new \DateTime()), ];
Why? I compared my composer.json with e.g. nystudio107/craft3-pathtools and it's almost identical and I definitely have a version defined in my composer.json.
Why is $plugin null?