In my experiments with Magento 2 composer packages, I've been able to get a package up and running without using composer's type
attribute.
However, this class file
#File: vendor/magento/framework/Composer/ComposerInformation.php
const THEME_PACKAGE_TYPE = 'magento2-theme';
/**
* Magento2 module type
*/
const MODULE_PACKAGE_TYPE = 'magento2-module';
/**
* Magento2 language type
*/
const LANGUAGE_PACKAGE_TYPE = 'magento2-language';
/**
* Magento2 metapackage type
*/
const METAPACKAGE_PACKAGE_TYPE = 'metapackage';
/**
* Magento2 library type
*/
const LIBRARY_PACKAGE_TYPE = 'magento2-library';
/**
* Magento2 component type
*/
const COMPONENT_PACKAGE_TYPE = 'magento2-component';
hints at the fact there's times where Magento 2 is parsing composer.json
files, and looking at the type
attribute.
Does anyone know where/why Magento 2 does this, with an eye towards figuring out if type
is a required attribute or not for general (i.e. non Marketplace) distribution of extensions?