Closed schelmo closed 7 years ago
Is it BC break? Will that work for previous versions?
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.
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?
Ah sorry. didnt know whats the meaning of "BC break" :) No the change doesnt break backwards compability. Behaves like before.
Thanks
@schelmo does the provider work for you on laravel 5.4 with such change?
yeah its working fine
laravel 5.4 removed the share method. use the singleton method now