所以这是我的composer.json文件:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.0.0",
"laravel/framework": "5.1.*",
"illuminate/support": "5.1.*",
"laravelcollective/html": "^5.1.9",
"twilio/sdk": "^5.4.2",
"monolog/monolog": "1.11.*",
"maatwebsite/excel": "^2.1.8",
"fideloper/proxy": "^3.3.4",
"sentry/sentry": "^1.0",
"barryvdh/laravel-dompdf": "^0.7",
"dompdf/dompdf": "0.7.0 as 0.6.2",
"phenx/php-font-lib": "0.4 as 0.2.2"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1"
},
"autoload": {
"classmap": [
"database"
],
"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"
}
}
我有一个本地版本,可以很好地工作,但是当我尝试部署到服务器时,我会得到
PHP Fatal error: Interface 'MonologResettableInterface' not found in /var/www/html/vendor/monolog/monolog/src/Monolog/Logger.php on line 28 Script php artisan clear-compiled handling the post-install-cmd event returned with error code 255
我到处都是,我发现的唯一修复程序是手动下载并添加ResettableInterface.php并将其放置在单一供应商目录中,但我无法做到这一点,因为它已安装,然后由Deployer脚本自动测试如果失败了,它将不会部署,因此我没有机会这样做。我该怎么办?
尝试删除或重命名供应商文件夹和composer.lock文件。现在运行作曲家安装。这将创建具有所有新依赖项的供应商文件夹。