#!/usr/bin/env php
<?php
declare(strict_types=1);
// Find and load the autoloader
$autoloaderPaths = [
__DIR__ . '/../vendor/autoload.php',
__DIR__ . '/../../autoload.php',
__DIR__ . '/../../../autoload.php',
];
$autoloaderFound = false;
foreach ($autoloaderPaths as $autoloaderPath) {
if (file_exists($autoloaderPath)) {
require_once $autoloaderPath;
$autoloaderFound = true;
break;
}
}
if (!$autoloaderFound) {
fwrite(STDERR, "Error: Composer autoloader not found. Run 'composer install' first.\n");
exit(1);
}
use PhpDep\Cli\Application;
$application = new Application();
$application->run();
|