From 5ac95f2372eda606eb990061f68f06efcc86b417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Say=C3=A3o=20Lobato=20Abreu?= Date: Mon, 11 May 2026 17:40:39 -0300 Subject: [PATCH 01/11] [command] Show installed DevTools version in list output --- CHANGELOG.md | 4 ++++ src/Console/DevTools.php | 19 ++++++++++++++++++- tests/Console/DevToolsTest.php | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc9ea00ff..abbc78d36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Show DevTools version metadata in CLI application output so `list` and `--version` expose the installed package version from `Application` metadata (#339). + ## [1.25.3] - 2026-05-11 ### Fixed diff --git a/src/Console/DevTools.php b/src/Console/DevTools.php index 7360b1a14..bbba1f80b 100644 --- a/src/Console/DevTools.php +++ b/src/Console/DevTools.php @@ -27,6 +27,7 @@ use FastForward\DevTools\SelfUpdate\SelfUpdateScopeResolverInterface; use FastForward\DevTools\SelfUpdate\VersionCheckNotifierInterface; use FastForward\DevTools\SelfUpdate\WorkingDirectorySwitcherInterface; +use Composer\InstalledVersions; use Override; use Symfony\Component\Console\Application; use Symfony\Component\Console\Command\Command; @@ -45,6 +46,10 @@ */ final class DevTools extends Application { + private const string PACKAGE = 'fast-forward/dev-tools'; + + private const string VERSION_UNKNOWN = '0.0.0'; + private const string LOGO = <<<'LOGO' ____ _____ _ | _ \ _____ _|_ _|__ ___ | |___ @@ -85,12 +90,24 @@ public function __construct( private readonly EnvironmentInterface $environment, private readonly RuntimeEnvironmentInterface $runtimeEnvironment, ) { - parent::__construct('Fast Forward Dev Tools'); + parent::__construct('Fast Forward Dev Tools', $this->resolveVersion()); $this->setDefaultCommand('dev-tools:standards'); $this->setCommandLoader($commandLoader); } + /** + * Resolves the running DevTools version for command metadata. + * + * @return string the current package version or a safe fallback + */ + private function resolveVersion(): string + { + return InstalledVersions::getPrettyVersion(self::PACKAGE) + ?? InstalledVersions::getVersion(self::PACKAGE) + ?? self::VERSION_UNKNOWN; + } + /** * Returns the application-level input definition with DevTools runtime options. * diff --git a/tests/Console/DevToolsTest.php b/tests/Console/DevToolsTest.php index d8511670a..d30a3d057 100644 --- a/tests/Console/DevToolsTest.php +++ b/tests/Console/DevToolsTest.php @@ -214,6 +214,7 @@ public function __construct() ->willReturn($customCommand); self::assertSame('Fast Forward Dev Tools', $this->devTools->getName()); + self::assertMatchesRegularExpression('/\\S+/', $this->devTools->getVersion()); self::assertTrue($this->devTools->has('custom')); self::assertSame($customCommand, $this->devTools->get('custom')); } From d45af4b735eb4e96b0a28e735f02f41504e83863 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 20:41:49 +0000 Subject: [PATCH 02/11] Update wiki submodule pointer for PR #340 --- .github/wiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/wiki b/.github/wiki index 3751f1e85..6ba42bbaa 160000 --- a/.github/wiki +++ b/.github/wiki @@ -1 +1 @@ -Subproject commit 3751f1e85cbbb350848e23dbd2d12dc0182b55f7 +Subproject commit 6ba42bbaad0ae45ab8a7a444e149125f11a845e4 From 38abd3edeec79d6c25b82fd361e5d93e95e51a33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Say=C3=A3o=20Lobato=20Abreu?= Date: Mon, 11 May 2026 17:54:21 -0300 Subject: [PATCH 03/11] refactor: reuse self-update version resolver for app metadata --- src/Console/DevTools.php | 10 ++++------ src/SelfUpdate/ComposerVersionChecker.php | 12 ++++++++++-- src/SelfUpdate/VersionCheckerInterface.php | 7 +++++++ tests/Console/DevToolsTest.php | 12 +++++++++++- 4 files changed, 32 insertions(+), 9 deletions(-) diff --git a/src/Console/DevTools.php b/src/Console/DevTools.php index bbba1f80b..4a1473e46 100644 --- a/src/Console/DevTools.php +++ b/src/Console/DevTools.php @@ -26,8 +26,8 @@ use FastForward\DevTools\SelfUpdate\SelfUpdateRunnerInterface; use FastForward\DevTools\SelfUpdate\SelfUpdateScopeResolverInterface; use FastForward\DevTools\SelfUpdate\VersionCheckNotifierInterface; +use FastForward\DevTools\SelfUpdate\VersionCheckerInterface; use FastForward\DevTools\SelfUpdate\WorkingDirectorySwitcherInterface; -use Composer\InstalledVersions; use Override; use Symfony\Component\Console\Application; use Symfony\Component\Console\Command\Command; @@ -46,8 +46,6 @@ */ final class DevTools extends Application { - private const string PACKAGE = 'fast-forward/dev-tools'; - private const string VERSION_UNKNOWN = '0.0.0'; private const string LOGO = <<<'LOGO' @@ -78,6 +76,7 @@ final class DevTools extends Application * @param VersionCheckNotifierInterface $versionCheckNotifier emits non-blocking version freshness warnings * @param SelfUpdateRunnerInterface $selfUpdateRunner runs explicit or automatic self-update flows * @param SelfUpdateScopeResolverInterface $selfUpdateScopeResolver resolves whether the active binary is global + * @param VersionCheckerInterface $versionChecker resolves the installed DevTools version for metadata output * @param EnvironmentInterface $environment reads environment flags for optional auto-update behavior * @param RuntimeEnvironmentInterface $runtimeEnvironment resolves runtime environment capabilities */ @@ -87,6 +86,7 @@ public function __construct( private readonly VersionCheckNotifierInterface $versionCheckNotifier, private readonly SelfUpdateRunnerInterface $selfUpdateRunner, private readonly SelfUpdateScopeResolverInterface $selfUpdateScopeResolver, + private readonly VersionCheckerInterface $versionChecker, private readonly EnvironmentInterface $environment, private readonly RuntimeEnvironmentInterface $runtimeEnvironment, ) { @@ -103,9 +103,7 @@ public function __construct( */ private function resolveVersion(): string { - return InstalledVersions::getPrettyVersion(self::PACKAGE) - ?? InstalledVersions::getVersion(self::PACKAGE) - ?? self::VERSION_UNKNOWN; + return $this->versionChecker->resolveCurrentVersion() ?? self::VERSION_UNKNOWN; } /** diff --git a/src/SelfUpdate/ComposerVersionChecker.php b/src/SelfUpdate/ComposerVersionChecker.php index ad2023fbd..ae9d0a5ad 100644 --- a/src/SelfUpdate/ComposerVersionChecker.php +++ b/src/SelfUpdate/ComposerVersionChecker.php @@ -52,8 +52,7 @@ public function check(): ?VersionCheckResult return null; } - $currentVersion = InstalledVersions::getPrettyVersion(self::PACKAGE) - ?? InstalledVersions::getVersion(self::PACKAGE); + $currentVersion = $this->resolveCurrentVersion(); if (null === $currentVersion) { return null; @@ -68,6 +67,15 @@ public function check(): ?VersionCheckResult return new VersionCheckResult($currentVersion, $latestVersion); } + /** + * Returns the installed DevTools version without running external Composer commands. + */ + public function resolveCurrentVersion(): ?string + { + return InstalledVersions::getPrettyVersion(self::PACKAGE) + ?? InstalledVersions::getVersion(self::PACKAGE); + } + /** * Resolves the latest stable DevTools version available to Composer. */ diff --git a/src/SelfUpdate/VersionCheckerInterface.php b/src/SelfUpdate/VersionCheckerInterface.php index bf8fcfa24..523f77df8 100644 --- a/src/SelfUpdate/VersionCheckerInterface.php +++ b/src/SelfUpdate/VersionCheckerInterface.php @@ -28,4 +28,11 @@ interface VersionCheckerInterface * Returns version information when it can be resolved without blocking command execution. */ public function check(): ?VersionCheckResult; + + /** + * Returns the currently installed DevTools version when available. + * + * @return string|null the version string for display and fallback logic + */ + public function resolveCurrentVersion(): ?string; } diff --git a/tests/Console/DevToolsTest.php b/tests/Console/DevToolsTest.php index d30a3d057..ba4ed0be1 100644 --- a/tests/Console/DevToolsTest.php +++ b/tests/Console/DevToolsTest.php @@ -44,6 +44,7 @@ use FastForward\DevTools\SelfUpdate\ComposerVersionChecker; use FastForward\DevTools\SelfUpdate\SelfUpdateRunnerInterface; use FastForward\DevTools\SelfUpdate\SelfUpdateScopeResolverInterface; +use FastForward\DevTools\SelfUpdate\VersionCheckerInterface; use FastForward\DevTools\SelfUpdate\VersionCheckNotifier; use FastForward\DevTools\SelfUpdate\VersionCheckNotifierInterface; use FastForward\DevTools\SelfUpdate\WorkingDirectorySwitcher; @@ -124,6 +125,11 @@ final class DevToolsTest extends TestCase */ private ObjectProphecy $selfUpdateScopeResolver; + /** + * @var ObjectProphecy + */ + private ObjectProphecy $versionChecker; + /** * @var ObjectProphecy */ @@ -154,8 +160,11 @@ protected function setUp(): void $this->versionCheckNotifier = $this->prophesize(VersionCheckNotifierInterface::class); $this->selfUpdateRunner = $this->prophesize(SelfUpdateRunnerInterface::class); $this->selfUpdateScopeResolver = $this->prophesize(SelfUpdateScopeResolverInterface::class); + $this->versionChecker = $this->prophesize(VersionCheckerInterface::class); $this->environment = $this->prophesize(EnvironmentInterface::class); $this->runtimeEnvironment = $this->prophesize(RuntimeEnvironmentInterface::class); + $this->versionChecker->resolveCurrentVersion() + ->willReturn('1.2.3'); $this->runtimeEnvironment->isAgentPresent() ->willReturn(false); $this->originalWorkspaceDirectoryEnv = getenv(ManagedWorkspace::ENV_WORKSPACE_DIR); @@ -214,7 +223,7 @@ public function __construct() ->willReturn($customCommand); self::assertSame('Fast Forward Dev Tools', $this->devTools->getName()); - self::assertMatchesRegularExpression('/\\S+/', $this->devTools->getVersion()); + self::assertSame('1.2.3', $this->devTools->getVersion()); self::assertTrue($this->devTools->has('custom')); self::assertSame($customCommand, $this->devTools->get('custom')); } @@ -594,6 +603,7 @@ private function createDevTools(): DevTools $this->versionCheckNotifier->reveal(), $this->selfUpdateRunner->reveal(), $this->selfUpdateScopeResolver->reveal(), + $this->versionChecker->reveal(), $this->environment->reveal(), $this->runtimeEnvironment->reveal(), ); From 0d8e1383d81a7ff9c366dc1470aac858ddd969f8 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 20:55:28 +0000 Subject: [PATCH 04/11] Update wiki submodule pointer for PR #340 --- .github/wiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/wiki b/.github/wiki index 6ba42bbaa..5f56b5ea6 160000 --- a/.github/wiki +++ b/.github/wiki @@ -1 +1 @@ -Subproject commit 6ba42bbaad0ae45ab8a7a444e149125f11a845e4 +Subproject commit 5f56b5ea6ce21101a5991c46d83a6f982a31a64b From 73e9945c2325b97a39276430640841187ba51e0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Say=C3=A3o=20Lobato=20Abreu?= Date: Mon, 11 May 2026 18:06:17 -0300 Subject: [PATCH 05/11] refactor: rename current version accessor method --- src/Console/DevTools.php | 2 +- src/SelfUpdate/ComposerVersionChecker.php | 4 ++-- src/SelfUpdate/VersionCheckerInterface.php | 2 +- tests/Console/DevToolsTest.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Console/DevTools.php b/src/Console/DevTools.php index 4a1473e46..cffb60f04 100644 --- a/src/Console/DevTools.php +++ b/src/Console/DevTools.php @@ -103,7 +103,7 @@ public function __construct( */ private function resolveVersion(): string { - return $this->versionChecker->resolveCurrentVersion() ?? self::VERSION_UNKNOWN; + return $this->versionChecker->getCurrentVersion() ?? self::VERSION_UNKNOWN; } /** diff --git a/src/SelfUpdate/ComposerVersionChecker.php b/src/SelfUpdate/ComposerVersionChecker.php index ae9d0a5ad..6b3bc9fcf 100644 --- a/src/SelfUpdate/ComposerVersionChecker.php +++ b/src/SelfUpdate/ComposerVersionChecker.php @@ -52,7 +52,7 @@ public function check(): ?VersionCheckResult return null; } - $currentVersion = $this->resolveCurrentVersion(); + $currentVersion = $this->getCurrentVersion(); if (null === $currentVersion) { return null; @@ -70,7 +70,7 @@ public function check(): ?VersionCheckResult /** * Returns the installed DevTools version without running external Composer commands. */ - public function resolveCurrentVersion(): ?string + public function getCurrentVersion(): ?string { return InstalledVersions::getPrettyVersion(self::PACKAGE) ?? InstalledVersions::getVersion(self::PACKAGE); diff --git a/src/SelfUpdate/VersionCheckerInterface.php b/src/SelfUpdate/VersionCheckerInterface.php index 523f77df8..18c17df6d 100644 --- a/src/SelfUpdate/VersionCheckerInterface.php +++ b/src/SelfUpdate/VersionCheckerInterface.php @@ -34,5 +34,5 @@ public function check(): ?VersionCheckResult; * * @return string|null the version string for display and fallback logic */ - public function resolveCurrentVersion(): ?string; + public function getCurrentVersion(): ?string; } diff --git a/tests/Console/DevToolsTest.php b/tests/Console/DevToolsTest.php index ba4ed0be1..1116e9231 100644 --- a/tests/Console/DevToolsTest.php +++ b/tests/Console/DevToolsTest.php @@ -163,7 +163,7 @@ protected function setUp(): void $this->versionChecker = $this->prophesize(VersionCheckerInterface::class); $this->environment = $this->prophesize(EnvironmentInterface::class); $this->runtimeEnvironment = $this->prophesize(RuntimeEnvironmentInterface::class); - $this->versionChecker->resolveCurrentVersion() + $this->versionChecker->getCurrentVersion() ->willReturn('1.2.3'); $this->runtimeEnvironment->isAgentPresent() ->willReturn(false); From f2c0605aa3a5f92ed186277b2a811e1b87d7740f Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 21:09:30 +0000 Subject: [PATCH 06/11] Update wiki submodule pointer for PR #340 --- .github/wiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/wiki b/.github/wiki index 5f56b5ea6..2b2304adf 160000 --- a/.github/wiki +++ b/.github/wiki @@ -1 +1 @@ -Subproject commit 5f56b5ea6ce21101a5991c46d83a6f982a31a64b +Subproject commit 2b2304adf93cbcdb47a4490a360b9ff91172293d From 21ff7c741d50c9725ccc384511b1b9a2a29e868d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Say=C3=A3o=20Lobato=20Abreu?= Date: Mon, 11 May 2026 18:13:55 -0300 Subject: [PATCH 07/11] refactor: centralize version fallback in checker --- src/Console/DevTools.php | 11 +++++++---- src/SelfUpdate/ComposerVersionChecker.php | 20 ++++++++++++++++---- src/SelfUpdate/VersionCheckerInterface.php | 7 ++++--- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/src/Console/DevTools.php b/src/Console/DevTools.php index cffb60f04..740d6289d 100644 --- a/src/Console/DevTools.php +++ b/src/Console/DevTools.php @@ -46,8 +46,6 @@ */ final class DevTools extends Application { - private const string VERSION_UNKNOWN = '0.0.0'; - private const string LOGO = <<<'LOGO' ____ _____ _ | _ \ _____ _|_ _|__ ___ | |___ @@ -99,11 +97,16 @@ public function __construct( /** * Resolves the running DevTools version for command metadata. * - * @return string the current package version or a safe fallback + * This method MUST return the resolved package version used by command + * metadata. + * It MUST delegate this resolution to the version checker and SHOULD NOT + * expose null as a fallback. + * + * @return string the current package version */ private function resolveVersion(): string { - return $this->versionChecker->getCurrentVersion() ?? self::VERSION_UNKNOWN; + return $this->versionChecker->getCurrentVersion(); } /** diff --git a/src/SelfUpdate/ComposerVersionChecker.php b/src/SelfUpdate/ComposerVersionChecker.php index 6b3bc9fcf..70b525119 100644 --- a/src/SelfUpdate/ComposerVersionChecker.php +++ b/src/SelfUpdate/ComposerVersionChecker.php @@ -23,6 +23,7 @@ use FastForward\DevTools\Path\DevToolsPathResolver; use FastForward\DevTools\Process\ProcessBuilderInterface; use JsonException; +use Throwable; use function Safe\preg_match; use function Safe\json_decode; @@ -34,6 +35,8 @@ { private const string PACKAGE = 'fast-forward/dev-tools'; + private const string VERSION_UNKNOWN = '0.0.0'; + private const int TIMEOUT_SECONDS = 5; /** @@ -54,7 +57,7 @@ public function check(): ?VersionCheckResult $currentVersion = $this->getCurrentVersion(); - if (null === $currentVersion) { + if (self::VERSION_UNKNOWN === $currentVersion) { return null; } @@ -70,10 +73,19 @@ public function check(): ?VersionCheckResult /** * Returns the installed DevTools version without running external Composer commands. */ - public function getCurrentVersion(): ?string + public function getCurrentVersion(): string { - return InstalledVersions::getPrettyVersion(self::PACKAGE) - ?? InstalledVersions::getVersion(self::PACKAGE); + if (! InstalledVersions::isInstalled(self::PACKAGE)) { + return self::VERSION_UNKNOWN; + } + + try { + return InstalledVersions::getPrettyVersion(self::PACKAGE) + ?? InstalledVersions::getVersion(self::PACKAGE) + ?? self::VERSION_UNKNOWN; + } catch (Throwable) { + return self::VERSION_UNKNOWN; + } } /** diff --git a/src/SelfUpdate/VersionCheckerInterface.php b/src/SelfUpdate/VersionCheckerInterface.php index 18c17df6d..d9e89f142 100644 --- a/src/SelfUpdate/VersionCheckerInterface.php +++ b/src/SelfUpdate/VersionCheckerInterface.php @@ -30,9 +30,10 @@ interface VersionCheckerInterface public function check(): ?VersionCheckResult; /** - * Returns the currently installed DevTools version when available. + * Returns the resolved DevTools version for display and internal comparison. * - * @return string|null the version string for display and fallback logic + * The method MUST return a safe version string even when installed metadata + * is unavailable. */ - public function getCurrentVersion(): ?string; + public function getCurrentVersion(): string; } From ee7ca9e19f05aeda56763b00e97a37b13b11f57a Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 21:16:51 +0000 Subject: [PATCH 08/11] Update wiki submodule pointer for PR #340 --- .github/wiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/wiki b/.github/wiki index 2b2304adf..e1b134127 160000 --- a/.github/wiki +++ b/.github/wiki @@ -1 +1 @@ -Subproject commit 2b2304adf93cbcdb47a4490a360b9ff91172293d +Subproject commit e1b1341275ae89e8c4b5638b1e7e394577e00f39 From 7e9d3625f7c49ae525043277153c02bafcd1fb49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Say=C3=A3o=20Lobato=20Abreu?= Date: Mon, 11 May 2026 18:18:52 -0300 Subject: [PATCH 09/11] docs: align version fallback docs with checker contract --- src/Console/DevTools.php | 11 ++++++----- src/SelfUpdate/ComposerVersionChecker.php | 5 +++++ src/SelfUpdate/VersionCheckerInterface.php | 1 + 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/Console/DevTools.php b/src/Console/DevTools.php index 740d6289d..89c724612 100644 --- a/src/Console/DevTools.php +++ b/src/Console/DevTools.php @@ -97,12 +97,13 @@ public function __construct( /** * Resolves the running DevTools version for command metadata. * - * This method MUST return the resolved package version used by command - * metadata. - * It MUST delegate this resolution to the version checker and SHOULD NOT - * expose null as a fallback. + * The method MUST return the current package version from + * `VersionCheckerInterface`. + * It MUST return the fallback value supplied by the checker when metadata is + * not available. + * Callers SHOULD pass the returned value directly to the Symfony application. * - * @return string the current package version + * @return string the package version for command metadata */ private function resolveVersion(): string { diff --git a/src/SelfUpdate/ComposerVersionChecker.php b/src/SelfUpdate/ComposerVersionChecker.php index 70b525119..e2178de8a 100644 --- a/src/SelfUpdate/ComposerVersionChecker.php +++ b/src/SelfUpdate/ComposerVersionChecker.php @@ -72,6 +72,11 @@ public function check(): ?VersionCheckResult /** * Returns the installed DevTools version without running external Composer commands. + * + * This method MUST return the package version when composer metadata is + * available. + * It MUST return `VERSION_UNKNOWN` when metadata is unavailable or on + * resolution errors. */ public function getCurrentVersion(): string { diff --git a/src/SelfUpdate/VersionCheckerInterface.php b/src/SelfUpdate/VersionCheckerInterface.php index d9e89f142..3a32b0216 100644 --- a/src/SelfUpdate/VersionCheckerInterface.php +++ b/src/SelfUpdate/VersionCheckerInterface.php @@ -34,6 +34,7 @@ public function check(): ?VersionCheckResult; * * The method MUST return a safe version string even when installed metadata * is unavailable. + * It MAY be a fallback value. */ public function getCurrentVersion(): string; } From 2cc17726c79771e567bb36c5eec7dab30523cc29 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 21:19:55 +0000 Subject: [PATCH 10/11] Update wiki submodule pointer for PR #340 --- .github/wiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/wiki b/.github/wiki index e1b134127..34c3747e6 160000 --- a/.github/wiki +++ b/.github/wiki @@ -1 +1 @@ -Subproject commit e1b1341275ae89e8c4b5638b1e7e394577e00f39 +Subproject commit 34c3747e66043b351e6cc5b9cd5403c0d1ea88e9 From 445e0d6ee134ec0c40ba8147c641fbd19b0a435c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Say=C3=A3o=20Lobato=20Abreu?= Date: Mon, 11 May 2026 18:19:47 -0300 Subject: [PATCH 11/11] refactor: inline version resolution in application constructor --- src/Console/DevTools.php | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/Console/DevTools.php b/src/Console/DevTools.php index 89c724612..a5d4640b9 100644 --- a/src/Console/DevTools.php +++ b/src/Console/DevTools.php @@ -88,28 +88,12 @@ public function __construct( private readonly EnvironmentInterface $environment, private readonly RuntimeEnvironmentInterface $runtimeEnvironment, ) { - parent::__construct('Fast Forward Dev Tools', $this->resolveVersion()); + parent::__construct('Fast Forward Dev Tools', $this->versionChecker->getCurrentVersion()); $this->setDefaultCommand('dev-tools:standards'); $this->setCommandLoader($commandLoader); } - /** - * Resolves the running DevTools version for command metadata. - * - * The method MUST return the current package version from - * `VersionCheckerInterface`. - * It MUST return the fallback value supplied by the checker when metadata is - * not available. - * Callers SHOULD pass the returned value directly to the Symfony application. - * - * @return string the package version for command metadata - */ - private function resolveVersion(): string - { - return $this->versionChecker->getCurrentVersion(); - } - /** * Returns the application-level input definition with DevTools runtime options. *