I've got a self-written plugin that came about by going through the Plugin Tutorial. One of the snippets of code that the base plugin structure already provides is this:
public function autoload(): ClassLoader
{
return require __DIR__ . '/vendor/autoload.php';
}
Everything worked - until today, when I decided to do some content editing, but both the backend as well as frontend presented me with an error (edited server paths and plugin name to make it more generic):
require(): Failed opening required '/path/to/the/project/user/plugins/plugin-name/vendor/autoload.php' (include_path='.:/usr/lib/php7.4')
I checked, there is no vendor directory in my plugin. Should there be one? If so, what should the contents of the autoload.php look like? Checking other plugins, like grav-plugin-email, it seems like this file is auto-generated. But through what process? And why did everything work until just now, then suddenly broke?
Disclaimer: I have no idea about what composer is or does.