Laravel Upgrading To 5.2.0 From 5.1 error

五迷三道 提交于 2019-12-02 23:19:32

You need to remove this outdated package (taken out of the core and no longer supported):

"illuminate/html": "^5.0",

When you remove it, you need to also remove its service providers / aliases. So, if you open up config/app.php, you will see a providers and aliases section. Remove these lines of code if you haven't done so already.

'Illuminate\Html\HtmlServiceProvider'

'Form'=> 'Illuminate\Html\FormFacade', 
'HTML'=> 'Illuminate\Html\HtmlFacade',

In place of it, you should install the Laravel collective package. To install that, replace the illuminate/html package with this:

"laravelcollective/html": "5.2.*"

Then in your config/app.php file, add this to your providers array:

Collective\Html\HtmlServiceProvider::class

and this to your aliases array:

'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,

The docs can be found here: https://laravelcollective.com/docs/5.2/html

Look at this
https://laracasts.com/discuss/channels/laravel/call-to-undefined-method-illuminatefoundationapplicationbindshared

Quote "bindShared has been renamed to $app->singleton()"

[Edit] I think you have something is your own custom code what need to be changed from : $this->app->bindShared() to: $this->app->singleton().

Kiren Siva

I solved it by the steps mentioned in Link1 Link2

After the upgrade please make sure all the Deprecations mentioned in Link2 are corrected in your current app. For me Illuminate\Contracts\Routing\Middleware had to be removed from all the Middlewares.

Also I had to install latest version of certain packages like "yajra/laravel-datatables-oracle": "~6.1.1",

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!