change autoload to hotload for phar hotload mode (build 442)

This commit is contained in:
crazywhalecc
2022-03-20 16:20:14 +08:00
parent 78f78c607d
commit 444a77933a
4 changed files with 23 additions and 17 deletions

View File

@@ -5,7 +5,10 @@ declare(strict_types=1);
function loader__generated_id__()
{
$obj = json_decode(file_get_contents(__DIR__ . '/zmplugin.json'), true);
foreach (($obj['autoload-psr-4'] ?? []) as $v) {
foreach (($obj['hotload-psr-4'] ?? []) as $v) {
require_once Phar::running() . '/' . $v;
}
foreach (($obj['hotload-files'] ?? []) as $v) {
require_once Phar::running() . '/' . $v;
}
}