So according to this answer the only way to add service providers is to first run composer update and composer install.
This becomes a problem in terms of automation, as the service provider has already been added to config/app.php in the code repo.
'providers' => [
....
App\Providers\RouteServiceProvider::class,
/** Forum **/
'Riari\Forum\ForumServiceProvider',
'Riari\Forum\Frontend\ForumFrontendServiceProvider',
],
So running composer update and composer install fails with:
[RuntimeException] Error Output: PHP Fatal error: Class 'Riari\Forum\Frontend\ForumFrontendServiceProvider' not found in /repo/myshares/myshares/bootstrap/cache/compiled.php on line 6892
As far as I can see the only way is to run composer update first and then manually add to config/app.php