[TOC]
中国镜像 https://pkg.phpcomposer.com/
包管理 https://packagist.org/packages/submit安装参考 composer 官网
新建项目
创建composer.json
$ composer init
Welcome to the Composer config generator
This command will guide you through creating your composer.json config.
Package name (/) [administrator/sys]: framwork/sys
Description []: system core
Author [Jerry <502443279@qq.com>, n to skip]:
Minimum Stability []: dev
Package Type (e.g. library, project, metapackage, composer-plugin) []: project
License []: MIT
Define your dependencies.
Would you like to define your dependencies (require) interactively [yes]? no
Would you like to define your dev dependencies (require-dev) interactively [yes]? no
{
"name": "framwork/sys",
"description": "system core",
"type": "project",
"license": "MIT",
"authors": [
{
"name": "Jerry",
"email": "502443279@qq.com"
}
],
"minimum-stability": "dev",
"require": {}
}
Do you confirm generation [yes]? yew
Please answer yes, y, no, or n.
Do you confirm generation [yes]? yes