I've been having a problem with running composer update
in my production repository for a while. Only in production, in DEV and PRE does not happen to me, they all have the same configuration and in the end they pull almost from the same repository and share composer.json
.
I'm using "laravel / framework": "5.2. *", with PHP 7.0
The problem I have is that when launching composer update
, this file is generated: bootstrap / cache / compiled.php, but only in PROD; in none of the other versions does it generate it, nor in local. With this file loaded the application gives an error 500 and reports this failure:
PHP Fatal error: Can not declare class Illuminate \ Support \ ServiceProvider, because the name is already in use in /var/www/vhosts/project/bootstrap/cache/compiled.php on line 5267
If I delete this file by hand, the application will work again, but this should not happen. In addition, the applications that I try to install with composer, since I have this failure, do not work, I declare them in config / app.php and verify that the folder is in the vendor and everything is correct, but it gives another 500 so the reason for the that does not erase or generate bootstrap / cache / compiled.php makes the installations not be correct.
Please, could you help me, I do not know what else to look at or do.
This is my composer:
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"twbs/bootstrap": "^3.3",
"laravelcollective/html": "5.2.*",
"joshcam/mysqli-database-class": "dev-master",
"opentok/opentok": "2.3.x",
"intervention/image": "^2.3",
"hisorange/browser-detect": "2.*",
"ignited/laravel-omnipay": "2.*",
"omnipay/omnipay": "*",
"skecskes/calendar": "0.2.*",
"webpatser/laravel-uuid": "^2.0",
"barryvdh/laravel-debugbar": "^2.2",
"maatwebsite/excel": "~2.1.0",
"paypal/rest-api-sdk-php": "*",
"laracasts/flash": "^2.0",
"doctrine/dbal": "^2.5",
"laravel/cashier": "~6.0",
"barryvdh/laravel-dompdf": "0.7.*",
"dompdf/dompdf": "^0.7",
"ovh/ovh": "^2.0",
"docusign/esign-client": "^2.0",
"sentry/sentry": "^1.6",
"sentry/sentry-laravel": "^0.7.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"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": [
"Illuminate\Foundation\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\Foundation\ComposerScripts::postUpdate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}