[英]Laravel - Problems with updating to Laravel 5.4. Way module share() error
This is regarding Laravel and I am still pretty new to the framework. 这是关于Laravel的,对于这个框架我还是很陌生的。 I recently updated my Laravel to 5.4.
我最近将Laravel更新为5.4。 And I am running into the following error:
而且我遇到以下错误:
[Symfony\Component\Debug\Exception\FatalThrowableError]
Call to undefined method Illuminate\Foundation\Application::share()
Some investigation landed me on one of my vendor module 'Way' is still call share(), which is no longer supported. 一些调查使我发现我的供应商模块“ Way”之一仍然称为share(),不再受支持。 I did realize that singleton() is the preferred way, but should I even touch the vendor files?
我确实意识到singleton()是首选方式,但我是否应该触摸供应商文件? Should composer update the vendor Modules as well (especially Way since it is one of the core module)?
作曲家是否还应该更新供应商模块(尤其是Way,因为它是核心模块之一)?
Any tips will be greatly appreciated! 任何提示将不胜感激!
Thanks. 谢谢。
laravel 5.4 share
has been removed. laravel 5.4
share
已被删除。 You will have to use the singleton
instead. 您将不得不使用
singleton
。
See this https://github.com/laravel/framework/commit/1a1969b6e6f793c3b2a479362641487ee9cbf736 看到这个https://github.com/laravel/framework/commit/1a1969b6e6f793c3b2a479362641487487ee9cbf736
This library does not have support for Laravel 5.4 . 该库不支持Laravel 5.4。
Author referred other library : laracasts/generators
. 作者推荐其他图书馆:
laracasts/generators
。 Both the packages are managed by same author. 这两个软件包均由同一作者管理。
Check below link : https://github.com/JeffreyWay/Laravel-4-Generators#laravel-5 检查以下链接: https : //github.com/JeffreyWay/Laravel-4-Generators#laravel-5
I was able to fix it for now by adjusting the way generator line in composer.json to: 我现在可以通过将composer.json中的生成器行的方式调整为:
"way/generators": "dev-master"
The library was updated but it is just not included in the composer update. 库已更新,但未包含在作曲家更新中。
Just want to post the answer here in case anyone is running into similar issue. 只想在这里发布答案,以防有人遇到类似问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.