Issue
So here's my composer.json file:
{
"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"
}
}
I have a local version that works perfectly fine, but when I try to deploy to our server I get
PHP Fatal error: Interface 'Monolog\ResettableInterface' 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
I've looked everywhere and the only fixes I've found were to manually download and add ResettableInterface.php and place it in the monolog vendor directory but I can't do that as it's installed then tested automatically by the deployer script and if it fails it won't deploy so I don't get a chance to do this. What do I do?
Solution
Try removing or renaming the vendor folder and Composer.lock file. Now run composer install . This will create the vendor folder with all its new dependencies.
Answered By - Arun P
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.