ComposerAutoload
Reads the parts of an app's own `composer.json` the Make layer needs to place generated files correctly: its PSR-4 autoload map, used by {@see \Milpa\DevTools\Make\ConventionDetector} to test whether a given FQCN resolves to a real file under the app root, and by the runtime `ControllerGenerator` to find the app's primary namespace/source directory. Pure filesystem + JSON parsing — no autoloading, no `Composer\InstalledVersions` (that is {@see RootResolver}'s job; this class reads a SPECIFIC app root's manifest, not "where am I installed").
ComposerAutoload::psr4()
public static function psr4(string $root): arrayThe `autoload.psr-4` map declared in `$root/composer.json`, normalized to `[prefix => dir]` with the directory's trailing slash trimmed; `[]` when the file is missing, unparsable, or declares no PSR-4 autoloading.
Parameters
| Name | Type | Description |
|---|---|---|
| $root | string |
ComposerAutoload::primaryNamespace()
public static function primaryNamespace(string $root): ?arrayThe app's primary PSR-4 namespace + source directory — the first entry in its `autoload.psr-4` map, e.g. `['App', 'src']` for `{"App\\": "src/"}`. `null` when `$root/composer.json` declares no PSR-4 autoloading at all.
Parameters
| Name | Type | Description |
|---|---|---|
| $root | string |