beaudierman / ups

A Laravel package used to communicate with the UPS API to generate shipment rate quotes.
MIT License
12 stars 7 forks source link

register error #13

Open impactcolor opened 5 years ago

impactcolor commented 5 years ago

Thanks for this package. I'm getting the following error:

Symfony\Component\Debug\Exception\FatalThrowableError  : Call to undefined method Illuminate\Foundation\Application::share()

  at /Volumes/Macintosh HD/Users/ohms/Sites/iprintco/vendor/beaudierman/ups/src/Beaudierman/Ups/UpsServiceProvider.php: 31
  27:    * @return void
  28:    */
  29:   public function register()
  30:   {
  31:       $this->app['ups'] = $this->app->share(function($app)
  32:       {
  33:           return new Ups;
  34:       });
  35:   }
  36: 

I currently have not done anything only added use Ups; to my controller.

carcinocron commented 5 years ago

What's your laravel version?

impactcolor commented 5 years ago

5.6 @InstanceOfMichael

carcinocron commented 5 years ago

I'm guessing this package needs an update to support 5.4+.

https://laracasts.com/discuss/channels/laravel/undefined-method-illuminatefoundationapplicationshare-when-upgrading-to-laravel-54

I can't fix it right now (or in any predictable timeframe), but maybe it will work without the service provider or by extending the service provider.