質問

When we built/install new module it should have registration.php as per Magento Standard.

When we run php bin/magento setup:upgrade. Module will be installed.

How actually this command check for my custom module's registration.php & install it?

役に立ちましたか?

解決

For modules installed with composer, registration.php should be registered as autoload file in composer.json.

For local modules in "app" (which you seem to be referring to), there is app/etc/NonComposerComponentRegistration.php which itself is registered as autoloader file and looks for the following paths:

$pathList[] = dirname(__DIR__) . '/code/*/*/cli_commands.php';
$pathList[] = dirname(__DIR__) . '/code/*/*/registration.php';
$pathList[] = dirname(__DIR__) . '/design/*/*/*/registration.php';
$pathList[] = dirname(__DIR__) . '/i18n/*/*/registration.php';
$pathList[] = dirname(dirname(__DIR__)) . '/lib/internal/*/*/registration.php';
$pathList[] = dirname(dirname(__DIR__)) . '/lib/internal/*/*/*/registration.php';
ライセンス: CC-BY-SA帰属
所属していません magento.stackexchange
scroll top