How do I "register" a service in a Craft 3 plugin?
It turns out there's a handy method for manually registering your services, or in Yii2 parlance, just "components":

namespace example\myplugin;

use example\myplugin\services\Example as ExampleService;

use Craft;
use craft\base\Plugin as BasePlugin;

class MyPlugin extends BasePlugin
{
    public static $plugin;

    public function init()
    {
        parent::init();
        self::$plugin = $this;

        $this-&gt;setComponents([
            'example' =&gt; ExampleService::class
        ]);
    }
}


Then, somewhere else in your plugin, your service is immediately available as:

MyPlugin::$plugin-&gt;example-&gt;myMethod();


…where example is the key in the hash of classes you passed to $this-&gt;setComponents().