https://getcomposer.org/schema.json
The type of the package. It defaults to library.
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.
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. This can for example be used by IDEs to provide listings of projects to initialize when creating a new workspace.
- metapackage: An empty package that contains requirements and will trigger their installation, but contains no files and will not write anything to the filesystem. As such, it does not require a dist or source key to be installable.
- composer-plugin: A package of type composer-plugin may provide an installer for other packages that have a custom type. Read more in the dedicated article.
Only use a custom type if you need custom logic during installation. It is recommended to omit this field and have it default to library.
Magento Packaging Types and Examples
- Library
- "magento/composer", "magento/data-migration-tool", "magento/marketplace-eqp"
- Project
- "magento/project-enterprise-edition", "magento/project-community-edition"
- Metapackage
- "magento/extension-b2b", "magento/product-enterprise-edition"
- Custom
- magento2-component
- Example: "magento/magento2-base", "magento/magento2-ee-base", "magento/magento2-b2b-base"
- magento2-library
- Example: "magento/framework", "magento/framework-amqp"
- magento2-module
- Example: "magento/checkout"
- magento2-theme
- Example: "magento/theme-frontend-luma", "magento/theme-adminhtml-backend"
- magento2-component
References:
References:
- https://getcomposer.org/doc/04-schema.md#package-links
- https://getcomposer.org/doc/articles/versions.md
- https://semver.org/
https://devdocs.magento.com/guides/v2.3/extension-dev-guide/package/package_module.html