-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalueobjectcompiler
More file actions
46 lines (35 loc) · 1.25 KB
/
valueobjectcompiler
File metadata and controls
46 lines (35 loc) · 1.25 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
#!/usr/bin/env php
<?php
error_reporting(E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED);
set_error_handler(static function ($severity, $message, $file, $line) {
if ($severity & error_reporting()) {
throw new ErrorException($message, 0, $severity, $file, $line);
}
});
// check environment requirements
(static function () {
if (\PHP_VERSION_ID < 80200) {
fwrite(STDERR, "PHP needs to be a minimum version of PHP 8.2.0 and maximum version of PHP 8.3.*.\n");
fwrite(STDERR, 'Current PHP version: '.PHP_VERSION.".\n");
}
})();
// load dependencies
(static function () {
// OK, it's not, let give Composer autoloader a try!
$possibleFiles = [__DIR__ . '/../../autoload.php', __DIR__ . '/../autoload.php', __DIR__ . '/vendor/autoload.php'];
$file = null;
foreach ($possibleFiles as $possibleFile) {
if (file_exists($possibleFile)) {
$file = $possibleFile;
break;
}
}
if (null === $file) {
throw new RuntimeException('Unable to locate autoload.php file.');
}
require_once $file;
})();
use LiamH\ValueObjectCompiler\Console\Application;
$application = new Application();
$application->run();
__HALT_COMPILER();