php-extension-check/bin/extension-check

22 lignes
854 B
Plaintext
Brut Lien permanent Vue normale Historique

2021-05-08 21:09:48 +00:00
#!/usr/bin/env php
<?php
require __DIR__.'/../vendor/autoload.php';
use Fbrinker\ExtensionCheck\Command\CheckCommand;
use Laminas\ServiceManager\ServiceManager;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
2022-05-25 10:10:23 +00:00
$serviceManager = new ServiceManager(require(__DIR__."/../config/serviceManager.php"));
2021-05-08 21:09:48 +00:00
$application = new Application();
$command = $serviceManager->get(CheckCommand::class);
$application->add($command);
// Prepend the command as default command to accept arguments and options if necessary
// Workaround, since the Symfony $application->setDefaultCommand() can't accept arguments or options
if (!isset($argv[1]) || $argv[1] !== CheckCommand::getDefaultName()) {
$argv = array_merge([$argv[0], CheckCommand::getDefaultName()], array_slice($argv, 1));
}
2022-05-25 10:10:23 +00:00
$application->run(new ArgvInput($argv));