创建composer包时,我应该选择什么"Package Type"

When creating a composer package, what "Package Type" should I choose

我正在创建我的第一个 PHP Composer 包(在 these instructions 之后)。 我 运行

$ composer init

我正在填写详细信息,现在要求我

Package Type (e.g. library, project, metapackage, composer-plugin) []:

我假设这只是一个用于对不同包裹进行分类的人类可识别标签?

我想知道是否有包类型的定义?

我发现这是发布问题:

Composer Package Types

Out of the box, Composer supports four types:

  • library: This is the default. It will simply copy the files to /vendor.

  • project: This denotes a project rather than a library. For example application shells like the Symfony standard edition, CMSs like the SilverStripe installer or full fledged applications distributed as packages.

  • metapackage: An empty package that contains requirements and will trigger their installation, but contains no files and will not write anything to the filesystem.

  • composer-plugin: A package of type composer-plugin may provide an installer for other packages that have a custom type. Only use a custom type if you need custom logic during installation.

Package types are used for custom installation logic. If you have a package that needs some special logic, you can define a custom type. This could be a symfony-bundle, a wordpress-plugin or a typo3-cms-extension. These types will all be specific to certain projects, and they will need to provide an installer capable of installing packages of that type.

来源:https://getcomposer.org/doc/04-schema.md