Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. This projec

### Added

- Add "PHP Runtime Generation" (php_runtime_generation) to the `env:list` command (#2729)
- Add "PHP Runtime Generation" (php_runtime_generation) and "PHP Version" (php_version) to the `env:list` command (#2729, #2732)

## 4.0.3 - 2025-09-11

Expand Down
1 change: 1 addition & 0 deletions src/Commands/Env/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class ListCommand extends TerminusCommand implements SiteAwareInterface
* connection_mode: Connection Mode
* locked: Locked
* initialized: Initialized
* php_version: PHP Version
* php_runtime_generation: PHP Runtime Generation
* @default-fields id,created,domain,connection_mode,locked,initialized

Expand Down
27 changes: 27 additions & 0 deletions tests/Functional/EnvCommandsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,33 @@ public function testListCommandWithPHPRuntimeGeneration()
);
}

/**
* @test
* @covers \Pantheon\Terminus\Commands\Env\ListCommand
*
* @group env
* @group short
*/
public function testListCommandWithPHPVersion()
{
$envs = $this->terminusJsonResponse(
sprintf('env:list %s --fields=id,php_version', $this->getSiteName())
);
$this->assertIsArray($envs);
$env = array_shift($envs);

$this->assertArrayHasKey(
'id',
$env,
'An environment should have "id" field.'
);
$this->assertArrayHasKey(
'php_version',
$env,
'An environment should have "php_version" field when explicitly requested.'
);
}

/**
* @test
* @covers \Pantheon\Terminus\Commands\Env\ViewCommand
Expand Down
Loading