Skip to content

Commit

Permalink
Merge pull request #65 from dontub/lazy-load-commands
Browse files Browse the repository at this point in the history
Make commands lazily loaded
  • Loading branch information
dontub authored Dec 1, 2019
2 parents d7775a6 + 88edd48 commit 9ab2e70
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Command/ListProvidersCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
*/
class ListProvidersCommand extends Command
{
protected static $defaultName = 'app:version:list-providers';

/**
* @var VersionManager
*/
Expand All @@ -36,9 +38,7 @@ public function __construct(VersionManager $manager)
*/
protected function configure()
{
$this
->setName('app:version:list-providers')
->setDescription('List all registered version providers');
$this->setDescription('List all registered version providers');
}

/**
Expand Down
6 changes: 3 additions & 3 deletions Command/StatusCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
*/
class StatusCommand extends Command
{
protected static $defaultName = 'app:version:status';

/**
* @var VersionManager
*/
Expand All @@ -35,9 +37,7 @@ public function __construct(VersionManager $manager)
*/
protected function configure()
{
$this
->setName('app:version:status')
->setDescription('Show current application version status');
$this->setDescription('Show current application version status');
}

/**
Expand Down
3 changes: 2 additions & 1 deletion Command/VersionBumpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/
class VersionBumpCommand extends Command
{
protected static $defaultName = 'app:version:bump';

/**
* @var VersionManager
*/
Expand All @@ -39,7 +41,6 @@ public function __construct(VersionManager $manager)
protected function configure()
{
$this
->setName('app:version:bump')
->setDescription('Manually bump the application version')
->addArgument('version', InputArgument::OPTIONAL, 'Version to set, should be compatible with Semantic versioning 2.0.0', null)
->addOption('dry-run', 'd', InputOption::VALUE_NONE, 'Dry run, does not update VERSION file')
Expand Down

0 comments on commit 9ab2e70

Please sign in to comment.