调用未定义的方法Illuminate \ Foundation \ Application :: bindShared() [英] Call to undefined method Illuminate\Foundation\Application::bindShared()

查看:239
本文介绍了调用未定义的方法Illuminate \ Foundation \ Application :: bindShared()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将Laravel从5.0升级到了5.1.

I've just upgraded Laravel from 5.0 to 5.1.

我收到此错误:

Call to undefined method Illuminate\Foundation\Application::bindShared()

因此,在进行一些搜索之后,我需要将bindShared更改为单例.

So after some searching I need to change bindShared to a singleton.

我可以在vendor/illuminate/html/HtmlServiceProvider.php中完成此操作

I can do this in vendor/illuminate/html/HtmlServiceProvider.php

问题是,当另一个开发人员在项目上工作并执行作曲家安装,或者我将其部署到服务器时,会发生什么情况.

The issue is, what happens when another dev works on the project and performs a composer install, or I deploy to a server.

如何保留对供应商文件夹中文件的更改?

How can I persist changes to files in the vendor folder?

推荐答案

好的,根据您的评论,我看到了您的问题(当您在问题中提到HTML组件时,我应该早点注意到它.

Okay based on your comment I see your issue (I should have noticed it sooner as you do mention the HTML component in your question.

illuminate/html组件不再是Laravel的一部分,并且尚未进行更新以符合5.1标准.实际上,我很确定泰勒现在已经正式放弃了它.

The illuminate/html component is no longer part of Laravel proper, and hasn't yet been updated to conform to 5.1 standards. In fact, I'm pretty sure it is now officially abandoned by Taylor.

但是,您可以将illuminate/html要求替换为 laravelcollective/html -这是社区对illuminate/的正式接管html,并且应该可以直接替换.

However, you can replace the illuminate/html requirement with laravelcollective/html - that's the official community takeover of illuminate/html and should be a drop-in replacement.

不必弄乱vendor中的内容!

这篇关于调用未定义的方法Illuminate \ Foundation \ Application :: bindShared()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆