下午好,
我有时间在我的生产存储库中运行composer update时遇到问题。只有在生产中,在DEV和PRE中没有发生在我身上,每个人都有相同的配置,最后拉出几乎相同的存储库并共享composer.json
我正在使用“laravel / framework”:“5.2。*”,PHP 7.0
我遇到的问题是,在启动composer update时,我生成了这个文件,bootstrap / cache / compiled.php,但仅在PROD中,在其他版本中都没有生成它,也没有在本地生成。加载此文件后,应用程序会出现错误500并报告此失败:
PHP Fatal error: Can not declare class Illuminate \ Support \ ServiceProvider, because the name is already in use in /var/www/vhosts/proyecto/bootstrap/cache/compiled.php on line 5267
如果我手动删除此文件应用程序再次运行,但这不应该发生,此外,我尝试使用composer安装的应用程序,因为我有这个bug,不起作用,我在config /中声明它们app.php并检查这个供应商中的文件夹和一切都是正确的,但是它给了另外500个,所以它没有擦除或生成bootstrap / cache / compiled.php的原因使得安装不会最终正确。
拜托,你能帮助我吗,我不知道还有什么可以看的或者做的......
这是我的作曲家档案:
{
"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"
}
非常感谢, 问候
答案 0 :(得分:3)
从require
/ requir_dev
部分逐个删除第三方软件包,然后重试composer update
大多数情况下,第三方软件包会导致此错误。您可以执行以下操作:
php artisan clear-compiled
并重试composer update
compiled.php
删除生成的服务提供商,然后重试composer update