File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed
Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file. This projec
66### Added
77
88### Fixed
9+ - Fix output of drush_version in ` env:info ` (#2736 )
910
1011## 4.1.0 - 2025-09-29
1112
Original file line number Diff line number Diff line change @@ -625,7 +625,7 @@ public function getPrimaryDomainModel()
625625 */
626626 public function getDrushVersion ()
627627 {
628- return $ this ->settings ('drush_version ' ) ;
628+ return $ this ->settings ('appserver_runtime ' )-> drush_version ;
629629 }
630630
631631 /**
@@ -961,6 +961,7 @@ public function serialize()
961961 'initialized ' => $ this ->isInitialized (),
962962 'connection_mode ' => $ this ->get ('connection_mode ' ),
963963 'php_version ' => $ this ->getPHPVersion (),
964+ 'drush_version ' => $ this ->getDrushVersion (),
964965 'php_runtime_generation ' => $ this ->getPHPRuntimeGeneration (),
965966 ];
966967 }
Original file line number Diff line number Diff line change @@ -317,6 +317,29 @@ public function testInfoCommand()
317317 );
318318 }
319319
320+ /**
321+ * @test
322+ * @covers \Pantheon\Terminus\Commands\Env\InfoCommand
323+ *
324+ * @group env
325+ * @group short
326+ */
327+ public function testInfoCommandWithDrushVersion ()
328+ {
329+ $ envInfo = $ this ->terminusJsonResponse (
330+ sprintf ('env:info %s --fields=drush_version ' , $ this ->getSiteEnv ())
331+ );
332+ $ this ->assertArrayHasKey (
333+ 'drush_version ' ,
334+ $ envInfo ,
335+ 'Environment info should have "drush_version" field when explicitly requested. '
336+ );
337+ $ this ->assertNotEmpty (
338+ $ envInfo ['drush_version ' ],
339+ 'Environment info "drush_version" should not be empty. '
340+ );
341+ }
342+
320343 /**
321344 * @test
322345 * @covers \Pantheon\Terminus\Commands\Env\MetricsCommand
You can’t perform that action at this time.
0 commit comments