<?php

namespace Scriptotek\Sru\Providers;

use Illuminate\Support\ServiceProvider;
use Scriptotek\Sru\Client as SruClient;

class SruServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap the application events.
     *
     * @return void
     */
    public function boot()
    {
        $this->publishes(array(
            __DIR__.'/../../config/config.php' => config_path('sru.php')
        ));
    }

    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register()
    {
        $this->mergeConfigFrom(
            __DIR__.'/../../config/config.php',
            'sru'
        );
        $this->app->singleton(SruClient::class, function ($app) {
            return new SruClient($app['config']->get('sru.endpoint'), $app['config']->get('sru'));
        });
    }

    /**
     * Get the services provided by the provider.
     *
     * @return array
     */
    public function provides()
    {
        return [SruClient::class];
    }
}

<?php

namespace Scriptotek\Sru\Providers;

use Illuminate\Support\ServiceProvider;
use Scriptotek\Sru\Client as SruClient;

class SruServiceProvider extends ServiceProvider
{

    /**
     * Bootstrap the application events.
     *
     * @return void
     */
    public function boot()
    {
        $this->publishes(array(
            __DIR__.'/../../config/config.php' => config_path('sru.php')
        ));
    }

    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register()
    {
        $app = $this->app;
        $this->mergeConfigFrom(
            __DIR__.'/../../config/config.php',
            'sru'
        );
        $app['sru-client'] = $app->share(function ($app) {
            return new SruClient($app['config']->get('sru.endpoint'), $app['config']->get('sru'));
        });
        $app->alias('sru-client', SruClient::class);
    }

    /**
     * Get the services provided by the provider.
     *
     * @return array
     */
    public function provides()
    {
        return array('sru-client');
    }
}

--- 
+++ 
@@ -7,7 +7,6 @@
 
 class SruServiceProvider extends ServiceProvider
 {
-
     /**
      * Bootstrap the application events.
      *
@@ -27,15 +26,13 @@
      */
     public function register()
     {
-        $app = $this->app;
         $this->mergeConfigFrom(
             __DIR__.'/../../config/config.php',
             'sru'
         );
-        $app['sru-client'] = $app->share(function ($app) {
+        $this->app->singleton(SruClient::class, function ($app) {
             return new SruClient($app['config']->get('sru.endpoint'), $app['config']->get('sru'));
         });
-        $app->alias('sru-client', SruClient::class);
     }
 
     /**
@@ -45,6 +42,6 @@
      */
     public function provides()
     {
-        return array('sru-client');
+        return [SruClient::class];
     }
 }
Update service provider to work with Laravel 5.4
