简体   繁体   English

Laravel-更新到Laravel 5.4的问题。 方式模块share()错误

[英]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.

相关问题 Laravel 从 5.4.* 到 5.5* 更新错误和 php 版本错误 - Laravel from 5.4.* to 5.5* Update error and php version error Laravel Passport无法在laravel 5.4上安装 - Laravel Passport not able to install on laravel 5.4.* Laravel 5.4.* - 运行 artisan 时“”目录不存在 - Laravel 5.4.* - The "" directory does not exist when running artisan vladimir-yuldashev/laravel-queue-rabbitmq 5.4 需要 illuminate/support 5.4.* - vladimir-yuldashev/laravel-queue-rabbitmq 5.4 requires illuminate/support 5.4.* 更新到Laravel 5.4时,PHPUnit中出现错误,但应用程序中未出现错误 - Error in PHPUnit but not in app when updating to Laravel 5.4 在laravel 5.4中。 找不到作曲家更新FatalThrowableError类'Unisharp \\ Laravelfilemanager \\ LaravelFilemanagerServiceProvider' - In laravel 5.4. composer update FatalThrowableError Class 'Unisharp\Laravelfilemanager\LaravelFilemanagerServiceProvider' not found laravel自动SiteMap生成器! 我不能从github安装spatie / laravel,我正在使用laravel 5.4。*? - Automatic SiteMap Generator for laravel ! i Cant install spatie/laravel from github , i am using laravel 5.4.*? 将Laravel 5.4升级到5.6的问题 - Problems upgrading Laravel 5.4 to 5.6 virtualhost和别名Laravel 5.4的问题 - Problems with virtualhost and alias Laravel 5.4 PHP - 严格标准错误5.4。? - PHP - Strict Standards error with 5.4.?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM