Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve #140: Add --version output for binary #264

Merged
merged 1 commit into from Jan 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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