-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfast-boot.php
More file actions
64 lines (50 loc) · 2.31 KB
/
Copy pathfast-boot.php
File metadata and controls
64 lines (50 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php declare(strict_types=1);
// At this point Webkernel::boot() has already been called in bootstrap/app.php.
// fast-boot only adds constants that require a running Laravel Application instance.
use Illuminate\Foundation\Application;
$app = Application::getInstance();
if (!($app instanceof Application)) {
throw new \RuntimeException('fast-boot must run after the Application is instantiated.');
}
Webkernel::define('WEBKERNEL_VERSION', '0.11.3');
Webkernel::define('WEBKERNEL_BUILD', 131);
Webkernel::define('WEBKERNEL_SEMVER', '0.11.3+131');
Webkernel::define('WEBKERNEL_CODENAME', 'waterfall');
Webkernel::define('WEBKERNEL_CHANNEL', 'stable');
Webkernel::define('WEBKERNEL_RELEASED_AT', '2026-04-23');
Webkernel::define('WEBKERNEL_BRANCH', 'main');
Webkernel::define('WEBKERNEL_TAG', 'v0.11.3');
Webkernel::define('WEBKERNEL_CACHE_PATH', storage_path('framework/cache'));
Webkernel::define('WEBKERNEL_CACHE_MANIFEST', storage_path('framework/cache/core-manifest.php'));
Webkernel::define('WEBKERNEL_INSTANCE_FILE', storage_path('deployment.php'));
Webkernel::define('DEVMODE_FILE', base_path('.devmode.php'));
(static function (): void {
$vendor = json_decode(file_get_contents(Webkernel::project_path('composer.json')), true)['config']['vendor-dir'] ?? null;
if ($vendor === null) {
return;
}
$resolved = str_starts_with($vendor, '/')
? $vendor
: Webkernel::project_path($vendor);
Webkernel::define('COMPOSER_VENDOR_PATH', $resolved);
putenv('COMPOSER_VENDOR_DIR=' . $resolved);
})();
if (defined('DEVMODE_FILE') && is_file(DEVMODE_FILE)) {
$devConfig = require DEVMODE_FILE;
$enabled = is_array($devConfig) && ($devConfig['dev-mode'] ?? false) === true;
Webkernel::define('IS_DEVMODE', $enabled);
Webkernel::define('WEBKERNEL_DEV_NAMESPACES', $enabled
? array_map(
static fn(string $p): string => Webkernel::project_path(ltrim($p, '/')),
(array) ($devConfig['namespaces'] ?? [])
)
: []
);
} else {
Webkernel::define('IS_DEVMODE', false);
Webkernel::define('WEBKERNEL_DEV_NAMESPACES', []);
}
require_once __DIR__ . '/standard-defines.php';
if (defined('WEBKERNEL_CACHE_PATH') && !is_dir(WEBKERNEL_CACHE_PATH)) {
@mkdir(WEBKERNEL_CACHE_PATH, 0750, true);
}