composer配置文件各字段記錄
時間 2019-12-06
標籤
composer
配置文件
字段
記錄
composer配置文件各字段記錄
官網鏈接php
composer 配置文件內容
name
description
version
X.Y.Z
vX.Y.Z
X.Y.Z-dev
除了-dev
,還能夠有-patch -alpha -beta -RC
type
- library 默認值,表示包
- project 項目
- metapackage 空包
- composer-plugin 官網連接
keywords
homepage
time
license
- Apache-2.0
- BSD-2-Clause
- BSD-3-Clause
- BSD-4-Clause
- GPL-2.0
- GPL-2.0+
- GPL-3.0
- GPL-3.0+
- LGPL-2.1
- LGPL-2.1+
- LGPL-3.0
- LGPL-3.0+
- MIT
authors
support
- email
- issues
- forum
- wiki
- irc
- source
suggest
autoload
autoload-dev (root-only)
include_path (Not-Suggested)
- 將下列路徑加入
PHP
的include_path
的路徑中
target-dir
- 爲了解決命名空間與項目實際安裝位置存在衝突時,指定安裝路徑
minimum-stability (root-only)
prefer-stable (root-only)
repositories (root-only)
指定除了packagist
以外的資源庫.html
- composer
- vcs
- pear
- package
官網資料git
config (root-only)
- process-timeout 數字,進程處理最大時間
- use-include-path
true/false
,是否從PHP
的include_path
中查找類
- preferred-install
auto/dist/source
,首先嚐試從哪裏下載類
- github-protocols
git/https/ssh
,從git
克隆項目時採用的協議
- github-oauth 訪問github的私人倉庫 官網資料
- vendor-dir 擴展安裝目錄,默認是
vendor
- bin-dir 默認是
vendor/bin
,官網資料
- cache-dir 緩存保存路徑
- cache-files-dir
- cache-repo-dir
- cache-vcs-dir
- cache-files-ttl 緩存文件保存時間
- cache-files-maxsize 緩存最大時間
- prepend-autoloader 不講
autoloader.php
加入到自動加載中
- autoloader-suffix 做用不知
- autoloader-suffix
- optimize-autoloader
- github-domains
- notify-on-install
- discard-changes
scripts (root-only)
bin
archive
下面提到的全部對象,都應該是 包名 到 版本 的映射對象。
require
require-dev (root-only)
conflict
replace
provide