How to extend vendor package service provider in Laravel 5.5

Run php artisan make:provider ExtendedXeroServiceProvider

Add it to ./config/app.php under providers

Open ./app/Providers/ExtendedXeroServiceProvider.php

Change extends ServiceProvider to extends XeroServiceProvider

Add use DrawMyAttention\XeroLaravel\Providers\XeroServiceProvider to it as well

Add the original service provider to the discovery blacklist in ./composer.json

EDIT

as of the time of writing, the drawmyattention/xerolaravel package does not use autodiscovery, but in the event that it does, this can be added to the composer.json:

"extra": {
    "laravel": {
        "dont-discover": [
            "drawmyattention/xerolaravel"
        ]
    }
},