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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. This projec

## 4.0.4-dev

### Added

- Add "PHP Runtime Generation" (php_runtime_generation) to the `env:list` command (#2729)

## 4.0.3 - 2025-09-11

### Added
Expand Down
5 changes: 4 additions & 1 deletion src/Commands/Env/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ class ListCommand extends TerminusCommand implements SiteAwareInterface
* connection_mode: Connection Mode
* locked: Locked
* initialized: Initialized
* @return RowsOfFields
* php_runtime_generation: PHP Runtime Generation
* @default-fields id,created,domain,connection_mode,locked,initialized

* @return RowsOfFields
*
* @param string $site_id Site name
*
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ public function getPHPVersion()
*/
public function getPHPRuntimeGeneration()
{
return $this->settings('appserver_runtime')->php_runtime_generation;
return $this->settings('appserver_runtime')->php_runtime_generation;
}

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

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

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

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