muhammadnm's avatar

Call to undefined method Laravel\Lumen\Application::booted()

I tried to make this package [Laravel-Intl] (https://github.com/Propaganistas/Laravel-Intl) work with Lumen (5.5.1) (Laravel Components 5.5.*)

Registered provider in bootstrap/app.php $app->register(Propaganistas\LaravelIntl\IntlServiceProvider::class);

Throws me this error

Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Laravel\Lumen\Application::booted() in SRC\lumen\vendor\propaganistas\laravel-intl\src\IntlServiceProvider.php:119

0 likes
1 reply
ahuggins's avatar

The Lumen Application class doesn't have the booted() method, which the Propaganistas package is looking for. You could extend the Application class that comes with Lumen and add a booted method that takes a call back and ties the passed callback to the Container...Might want to look at the Laravel Application class to see how it works:

https://github.com/laravel/framework/blob/5.5/src/Illuminate/Foundation/Application.php#L802-L809

But you would also have to use the isBooted() method, and maybe some other things.

Please or to participate in this conversation.