From 86221448c91ba3c39209e0643ed5e0227d88eeb2 Mon Sep 17 00:00:00 2001 From: Patrick Dawkins Date: Mon, 6 Jan 2025 10:08:10 +0000 Subject: [PATCH] Show "(legacy)" in the version output, if not wrapped. --- src/Application.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Application.php b/src/Application.php index 5da57a1172..4e9648476d 100644 --- a/src/Application.php +++ b/src/Application.php @@ -532,4 +532,13 @@ public function setRunningViaMulti() { $this->runningViaMulti = true; } + + public function getLongVersion() + { + // Show "(legacy)" in the version output, if not wrapped. + if (!$this->cliConfig->isWrapped()) { + return sprintf('%s (legacy) %s', $this->cliConfig->get('application.name'), $this->cliConfig->getVersion()); + } + return sprintf('%s %s', $this->cliConfig->get('application.name'), $this->cliConfig->getVersion()); + } }