How to fix the «The "autoload" field is not set or empty in the "composer.json" file; please verify the archive.» issue for a Magento Marketplace metapackage?

composer-package
bug
magento-marketplace
magento-marketplace-validation
composer-autoload

(Dmitry Fedyuk) #1

02

My composer.json file:

The official Magento documentation says:

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.

03

devdocs.magento.com/guides/v2.0/extension-dev-guide/package/package_module.html#package-metapackage

The official composer.json example of a metapackage does not contain an autoload field:

05

devdocs.magento.com/guides/v2.0/extension-dev-guide/package/package_module.html#metapackage-example


[AlphaCommerceHub] Magento Marketplace submission process
(Dmitry Fedyuk) #2

The previous time, it took 40 days for Magento Marketplace team to respond to a contact form message.
Let’s see will it be faster now.

01

02


(Dmitry Fedyuk) #3

I have got a response from Magento:

It appears that the issue is with the type field in the composer file.
According to the web page provided, the type is listed as magento2-module instead of metapackage as stated in the documentation.
The reason for autoload error is due to incorrect labeling in the type field.