// 1. 输入项目命名空间
// 注意<vendor>/<name> 必须要符合 [a-z0-9_.-]+/[a-z0-9_.-]+
Package name (<vendor>/<name>) [dell/htdocs]: output/test=
// 2. 项目描述
Description []: 这是一个测试
// 3. 输入作者信息,可以直接回车
Author [, n to skip]: sinker <2713497141@qq.com>
// 4. 输入最低稳定版本,stable, RC, beta, alpha, dev
Minimum Stability []: dev
// 5. 输入项目类型,
Package Type (e.g. library, project, metapackage, composer-plugin) []: library
// 6. 输入授权类型
License []: MIT
// 7. 输入依赖信息
Would you like to define your dependencies (require) interactively [yes]?
// 如果需要依赖,则输入要安装的依赖
Search for a package: php
// 输入版本号
Enter the version constraint to require (or leave blank to use the latest version): >=5.4.0
// 如需多个,则重复以上两个步骤
// 8. 是否需要require-dev,
Would you like to define your dev dependencies (require-dev) interactively [yes]?
// 操作同上
{
"name": "output/test",
"description": "composer",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "sinker",
"email": "2713497141@qq.com"
}
],
"minimum-stability": "dev",
"require": {}
}
// 9. 是否生成composer.json
Do you confirm generation [yes]? yes
Would you like the vendor directory added to your .gitignore [yes]?
```
### 校验composer.json
```
composer valIDAte composer.json