diff --git a/src/Composer/Console/Application.php b/src/Composer/Console/Application.php index 2a080067e..663e5287e 100644 --- a/src/Composer/Console/Application.php +++ b/src/Composer/Console/Application.php @@ -84,10 +84,12 @@ class Application extends BaseApplication /** @var SignalHandler */ private $signalHandler; - public function __construct() + public function __construct(string $name = 'Composer', string $version = '') { static $shutdownRegistered = false; - + if ($version === '') { + $version = Composer::getVersion(); + } if (function_exists('ini_set') && extension_loaded('xdebug')) { ini_set('xdebug.show_exception_trace', '0'); ini_set('xdebug.scream', '0'); @@ -121,7 +123,7 @@ class Application extends BaseApplication $this->initialWorkingDirectory = getcwd(); - parent::__construct('Composer', Composer::getVersion()); + parent::__construct($name, $version); } public function __destruct()