@sickaustrian As of laravel 5.4 share has been removed. You will have to use the singleton instead.
See: https://github.com/laravel/framework/commit/1a1969b6e6f793c3b2a479362641487ee9cbf736
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello, I just tried to upgrate Laravel 5.4 by updating my laravel/framework dependency to 5.4.* in my composer.json file. Once i run composer update I get the following error message:
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
[Symfony\Component\Debug\Exception\FatalThrowableError]
Call to undefined method Illuminate\Foundation\Application::share()
Script php artisan optimize handling the post-update-cmd event returned with error code 1
vagrant@homestead:~/sites/Project$
Any ideas why? Thank you in advance!
Please or to participate in this conversation.