在composer update
命令上获取错误。
我的composer.json文件是:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"illuminate/html": "^5.0",
"barryvdh/laravel-debugbar": "~2.0",
"spatie/laravel-paginateroute": "^2.0",
"darkaonline/l5-swagger": "~2.0",
"yajra/laravel-datatables-oracle": "~5.0",
"phpoffice/phpexcel": "^1.8"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1",
"symfony/dom-crawler": "~3.0",
"symfony/css-selector": "~3.0"
},
"autoload": {
"classmap": [
"database"
],
"files": ["app/Helpers/helpers.php"],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-update-cmd": [
"php artisan optimize"
],
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
}
}
答案 0 :(得分:38)
您需要删除此过时的软件包(从核心中取出并且不再受支持):
"illuminate/html": "^5.0",
删除它时,还需要删除其服务提供者/别名。因此,如果您打开config/app.php
,您将看到提供者和别名部分。如果您还没有这样做,请删除这些代码行。
'Illuminate\Html\HtmlServiceProvider'
'Form'=> 'Illuminate\Html\FormFacade',
'HTML'=> 'Illuminate\Html\HtmlFacade',
代替它,您应该安装Laravel集合包。要安装它,请将illuminate/html
包替换为:
"laravelcollective/html": "5.2.*"
然后在您的config/app.php
文件中,将其添加到您的提供者数组中:
Collective\Html\HtmlServiceProvider::class
这是你的别名数组:
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
答案 1 :(得分:3)
引用“bindShared已重命名为$ app-> singleton()”
<强> [编辑] 强> 我认为您有自己的自定义代码需要更改的内容:$ this-&gt; app-&gt; bindShared()to:$ this-&gt; app-&gt; singleton()。
答案 2 :(得分:3)