官方参考链接:https://packagist.org/about
我的项目配置:https://github.com/lizhibin205/lizhibin-php-mcrypt
一、为你的PHP库建立一个名字
首先,为你的PHP库起一个名字是非常重要的,必须为一个库建立一个唯一的名称,并且之后是不能更改的。名字应该由一个供应商名+一个项目名组成。
例如:monolog/monolog [供应商名]/[项目名]
例如:monolog/monolog [供应商名]/[项目名]
参考:
// Monolog is a library, so the vendor name and package name are the same.
monolog/monolog
// That could be the name of a drupal module (maintained/provided by monolog,
// if the drupal team did it, the vendor would be drupal).
monolog/monolog-drupal-module
// Acme is a company or person here, they can name their package with a common name (Email).
// As long as it's in their own vendor namespace it does not conflict with anyone else.
acme/email
monolog/monolog
// That could be the name of a drupal module (maintained/provided by monolog,
// if the drupal team did it, the vendor would be drupal).
monolog/monolog-drupal-module
// Acme is a company or person here, they can name their package with a common name (Email).
// As long as it's in their own vendor namespace it does not conflict with anyone else.
acme/email
二、管理库的版本
代码库的版本命名规则应该符合这一套规范:
1.0.0
v1.0.0
1.10.5-RC1
v4.4.4beta2
v2.0.0-alpha
v1.0.0
1.10.5-RC1
v4.4.4beta2
v2.0.0-alpha