The following table discusses the component types that Magento Marketplace supports. The composer type column in the following table specifies the value of the type field you must add to composer.json for that type of component.

Friendly name

composer.json type

Description

Metapackage

metapackage

Technically, a Composer package type, not a Magento component type. A metapackage consists of only a composer.json that specifies a list of components and their dependencies.

For example, both Magento Open Source and Magento Commerce are metapackages.

Module

magento2-module

Code that modifies Magento application behavior. You can upload a single module to the Magento Marketplace or your module can be dependent on some parent package.

Theme

magento2-theme

Code that modifies the look and feel of the storefront or Magento Admin.

Language package

magento2-language

Translations for the storefront or Admin.

Using metapackages

Metapackages allow you to group an extension
that consists of multiple packages into a cohesive unit. This works exactly as described in standard composer.json documentation. If you have an extension that uses more than one package you must use a metapackage
as the root package. Otherwise you should not use metapackage. A metapackage that you submit to Magento Marketplace should be a .zip file containing only the metapackage composer.json file.

We recommend metapackages refer to specific component versions. Do not use wildcards to represent version ranges.

Sample composer.json file

The following example is a composer.json file for a module:

{"name":"magento/sample-module-newpage","description":"A Magento 2 module that creates a new page","type":"magento2-module","version":"1.0.0","license":["OSL-3.0","AFL-3.0"],"require":{"php":"~5.5.0|~5.6.0|~7.0.0","magento/framework":"~100.0.4"},"autoload":{"files":["registration.php"],"psr-4":{"Magento\\SampleNewPage\\":""}}}

Package and publish your extension

Create a package of your extension by performing a zip operation on the directory with your extension (excluding unnecessary directories). For example:

Click the Submit Package button and paste your GitHub repository link. Packagist automatically gathers the information from the component’s composer.json file and link it to the GitHub repository, allowing you to reference the package as vendor/module without any additional repository information, because this is required solely using GitHub.

Hosting on a private repository

If you use the Setup Wizard, you must use the Magento Marketplace repository.
A private repository can be used for development or private code but installation must be done with a command line interface (you can install a package that specifies a private repository only with a command line installation).