Not sure if this applies anymore, but I added registration.php
for my module (a few minor versions ago), ran php bin/magento setup:upgrade
and my module was recognized without touching composer.
[EDIT]
I just tested this on the latest available version (rc) and it works the same.
I add the registration.php
file for modules:
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'[Namespace]_[Module]',
__DIR__
);
and run setup:upgrade
and the module is recognized.
For theme I added registration.php
:
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::THEME,
'frontend/[Namespace]/[theme]',
__DIR__
);
added theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>[Title here]</title>
<parent>Magento/blank</parent>
<media>
<preview_image>media/preview.jpg</preview_image>
</media>
</theme>
created the media/previw.jpg
, cleared the cache and everything works without touching composer.