我当前正在更新到Laravel 5.4,并在控制台中遇到以下错误。
声明 App Provister EventerViceProvider :: boot(Illuminate Contract
S Events dispatcher $ events(应与 照明 foundatio
N support 提供者 EventerviceProvider :: boot((
这是我的 composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.4.*",
"illuminate/html": "5.0.*",
"laravelcollective/html": "^5.4.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.7",
"symfony/css-selector": "2.8.*|3.0.*",
"symfony/dom-crawler": "2.8.*|3.0.*"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r "copy('.env.example', '.env');""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-update-cmd": [
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
您正在更新为5.4,所以有些事情会改变。
启动方法不再需要传递给它的参数,父母也不需要:
从函数和parent::boot()
完全删除参数,因此没有任何参数传递给:
public function boot()
{
parent::boot();
}
我认为您的应用程序可能正在缓存编译的文件,升级后对我有用的解决方案是重新创建一个新的空目录:
bootstrap/cache
将现有文件夹重命名为不同的温度名称,并创建一个新的目录Bootstrap/Cache并应用权限/所有权,您可以使用。