我正在尝试在Laravel 5.3应用中安装illuminate / html:
$ composer require "illuminate/html":"5.0.*"
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Package illuminate/html is abandoned, you should avoid using it. Use laravelcollective/html instead.
Writing lock file
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
PHP Fatal error: Call to undefined method Illuminate\Foundation\Application::bindShared() in /var/www/qa-laravel/vendor/illuminate/html/HtmlServiceProvider.php on line 36
[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Illuminate\Foundation\Application::bindShared()
Script php artisan optimize handling the post-update-cmd event returned with error code 255
Installation failed, reverting ./composer.json to its original content.
如果在composer.json中出现问题,我确实更改了供应商路径:
{
...
"config": {
"preferred-install": "dist",
"vendor-dir": "../vendor"
}
}
正在加载类,好吧,我只是无法安装这个新包。出现此错误的明显原因是什么?
答案 0 :(得分:0)
该软件包与Laravel 5.3不兼容。自{5.1起} ->bindShared()
功能已被删除,现在为->singleton()
。
此外,表格助手包裹被移除是有原因的;它不会节省任何时间并引入不必要的复杂情况。没有使用它的目的;删除它。