Payum / PayumLaravelPackage

Payum offers everything you need to work with payments. From simplest use cases to very advanced ones.
https://payum.forma-pro.com/
MIT License
122 stars 38 forks source link

laravel 5.4 compatibility #43

Closed schelmo closed 7 years ago

schelmo commented 7 years ago

laravel 5.4 removed the share method. use the singleton method now

makasim commented 7 years ago

Is it BC break? Will that work for previous versions?

schelmo commented 7 years ago

Jeah the share method was removed in laravel 5.4 from https://laravel.com/docs/5.4/upgrade:

The share method has been removed from the container. This was a legacy method that has not been documented in several years. If you are using this method, you should begin using the singleton method instead:

$container->singleton('foo', function () {
return 'foo';
});

The singleton method works also for laravel 4. just created a laravel 4.2 project and made a working basic offline checkout.

makasim commented 7 years ago

Laravel did not hear about semver? Sigh.

Could you please create a method that checks the laravel version and use one or another strategy to register a service?

schelmo commented 7 years ago

Ah sorry. didnt know whats the meaning of "BC break" :) No the change doesnt break backwards compability. Behaves like before.

makasim commented 7 years ago

Thanks

makasim commented 7 years ago

@schelmo does the provider work for you on laravel 5.4 with such change?

schelmo commented 7 years ago

yeah its working fine