list of source filenames to include, as [localNameInPackage =>] filename. if a filename starts with =, it is used as-is as direct php source code instead of a path to read
Sort a (possibly nested) array of source urls by urlPriority, in place.
function sortUrls(array &$urls): array
Namespace
MMO\core\packages
A list (numerically indexed) is deduplicated and sorted directly; an associative array is left as-is but
recursed into, so a `{group: [urls...]}` structure has every inner list sorted independently.
$grouped = ['group1' => ['https://x', '/local'], 'group2' => ['git@y']];
sortUrls($grouped); // each inner list is sorted independently, the top-level keys are untouched
Rank a source url so lower-priority (cheaper/faster to read) sources are processed first by sortUrls.
function urlPriority(string $url): int
Namespace
MMO\core\packages
Local files are cheapest (0), then git remotes (1), then already-built phar archives (2, since reading a phar
generally means re-extracting an existing build), everything else (e.g. a plain http(s) url) sorts last (10).