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';