diff --git a/CHANGELOG.md b/CHANGELOG.md index 67570f4e..c8a913b7 100644 --- a/CHANGELOG.md +++ b/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` diff --git a/bin/composer-unused b/bin/composer-unused index 3ad7071a..dd874ac6 100755 --- a/bin/composer-unused +++ b/bin/composer-unused @@ -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); diff --git a/src/Console/Command/UnusedCommand.php b/src/Console/Command/UnusedCommand.php index 01e1e735..3906e768 100644 --- a/src/Console/Command/UnusedCommand.php +++ b/src/Console/Command/UnusedCommand.php @@ -30,6 +30,8 @@ final class UnusedCommand extends Command { + public const VERSION = '0.8.0'; + /** @var CollectConsumedSymbolsCommandHandler */ private $collectConsumedSymbolsCommandHandler; /** @var CollectRequiredDependenciesCommandHandler */