Skip to content

Commit

Permalink
Resolve #140: Add --version output for binary
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Frömer <andreas.froemer@check24.de>
  • Loading branch information
Andreas Frömer authored and icanhazstring committed Jan 4, 2022
1 parent 40f69d7 commit 8f0608f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,9 +1,12 @@
# Changelog

## [Unreleased] - TBA
### Fixed
- Fixed version output when running `bin/composer-unused --version`
### Added
- Added CLI argument `composer-json` which can be used to parse external projects.
This will default to the current working directory.
- Added error message when `composer.json` is not readable
### Changed
- Change `bin/composer-unused` to be used as standalone binary
- Package type is now `library` instead of `composer-plugin`
Expand Down
2 changes: 1 addition & 1 deletion bin/composer-unused
Expand Up @@ -38,7 +38,7 @@ use Symfony\Component\Console\Input\ArgvInput;
/** @var ContainerInterface $container */
$container = require __DIR__ . '/../config/container.php';

$application = new Application();
$application = new Application('composer-unused', UnusedCommand::VERSION);
$application->add($container->get(UnusedCommand::class));
$application->setDefaultCommand('unused', true);

Expand Down
2 changes: 2 additions & 0 deletions src/Console/Command/UnusedCommand.php
Expand Up @@ -30,6 +30,8 @@

final class UnusedCommand extends Command
{
public const VERSION = '0.8.0';

/** @var CollectConsumedSymbolsCommandHandler */
private $collectConsumedSymbolsCommandHandler;
/** @var CollectRequiredDependenciesCommandHandler */
Expand Down

0 comments on commit 8f0608f

Please sign in to comment.