You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
696 B
PHP
21 lines
696 B
PHP
<?php
|
|
|
|
namespace jrosset\Tests;
|
|
|
|
use jrosset\CliProgram\TAutoDiscoveryApplication;
|
|
use jrosset\CliProgram\AutoDiscoveryDirectory;
|
|
use jrosset\CliProgram\AutoPrefixNamespaceManager;
|
|
|
|
class Application extends \Symfony\Component\Console\Application {
|
|
use TAutoDiscoveryApplication;
|
|
|
|
public function __construct (string $name = 'UNKNOWN', string $version = 'UNKNOWN') {
|
|
parent::__construct($name, $version);
|
|
|
|
$this->addAutoDiscoverySpots(
|
|
(new AutoDiscoveryDirectory(__DIR__ . '/Commands'))
|
|
->addAutoPrefixManagers(new AutoPrefixNamespaceManager('\\jrosset\\Tests\\Commands', 'test'))
|
|
);
|
|
$this->addAutoDiscoveredCommands();
|
|
}
|
|
} |