我试图在我的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"
}
}
类正在加载好,我只是无法安装这个新包。这个错误有什么明显的原因吗?
该包与Laravel 5.3不兼容。->bindShared()
函数在5.1中被删除,现在是->singleton()
。
此外,Form Helper包被删除是有原因的;它不会节省任何时间,还会带来不必要的并发症。没有使用它的目的;删除它。