我正在使用Yii2 PHP框架開展一個項目。 Yii2使用作曲家與fxp/composer-asset-plugin來處理項目依賴關係。Yii2 with composer and fxp/composer-asset-plugin
問題是,當一個新的開發涉及到的項目,並運行
git clone <project-repo>
composer install
或其他開發人員要經常(經常)不順心的事,並安裝有composer require <package-name>
一個新的擴展作曲家(或可能資產插件,我上面提到)顯示了另一個不明確的錯誤消息(可能只適用於我)。開發人員花費大量時間來查找錯誤的含義以及如何處理它。
今天,我已經克隆項目的Windows計算機上,安裝了最新作曲家和資產插件版本,運行composer install
和,約20分鐘後等待,得到這個:
在我的Linux系統已經安裝了相同的依賴關係,沒有錯誤。
問題№1 這個錯誤是什麼意思,我該如何解決它?
問題№2 會這麼壞主意vendor/
目錄添加到版本控制? (我讀過https://getcomposer.org/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md)
問題№3 也許我做錯了什麼或有祕密,我不知道有關,它允許管理Yii2不依賴這樣巨大的時間損失。
非常感謝。
composer.json
:
{
"name": "yiisoft/yii2-app-basic",
"description": "Yii 2 Basic Project Template",
"keywords": ["yii2", "framework", "basic", "project template"],
"homepage": "http://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "http://www.yiiframework.com/forum/",
"wiki": "http://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"repositories": [
{
"type": "git",
"url": "https://github.com/ZeroVision/swiftmailer.git"
}
],
"minimum-stability": "dev",
"require": {
"php": ">=5.4.0",
"giggsey/libphonenumber-for-php": "~7.0",
"yiisoft/yii2": "2.0.7",
"swiftmailer/swiftmailer": "dev-fixStreamBufferTransport",
"yiisoft/yii2-bootstrap": ">=2.0.3",
"yiisoft/yii2-swiftmailer": "*",
"yiisoft/yii2-authclient": "^[email protected]",
"2amigos/yii2-date-picker-widget": "~1.0",
"kartik-v/yii2-widget-timepicker": "*",
"kartik-v/yii2-widget-rating": "*",
"2amigos/yii2-gallery-widget": "~1.0",
"2amigos/yii2-ckeditor-widget": "~1.0",
"uran1980/yii2-scroll-to-top": "dev-master",
"yii-cms/yii2-robokassa": "^1.1",
"onokumus/metismenu": "v2.4.2",
"rmrevin/yii2-fontawesome": "*",
"dektrium/yii2-user": "*",
"p2made/yii2-sb-admin-theme": "1.1.2",
"p2made/yii2-p2y2-things": "*",
"p2made/yii2-asset-collection": "*",
"demi/image": "~1.0",
"demi/cropper": "~1.0",
"cyneek/yii2-widget-upload-crop": "dev-master",
"Nemmo/yii2-attachments": "*",
"2amigos/yii2-file-input-widget": "*",
"rkit/yii2-ajaxform-plugin": "^0.0.4",
"nsept/yii2-birthday-picker": "*",
"bryglen/yii2-apns-gcm": "1.0.4"
},
"require-dev": {
"yiisoft/yii2-codeception": "*",
"yiisoft/yii2-debug": "*",
"yiisoft/yii2-gii": "*",
"yiisoft/yii2-faker": "*"
},
"config": {
"process-timeout": 1800
},
"scripts": {
"post-create-project-cmd": [
"yii\\composer\\Installer::postCreateProject"
]
},
"extra": {
"yii\\composer\\Installer::postCreateProject": {
"setPermission": [
{
"runtime": "0777",
"web/assets": "0777",
"yii": "0755"
}
],
"generateCookieValidationKey": [
"config/web.php"
]
},
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
}
}
你可以在這裏粘貼你的composer.json嗎? – Bizley