Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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: 2 additions & 0 deletions src/Commands/Env/InfoCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class InfoCommand extends TerminusCommand implements SiteAwareInterface
* connection_mode: Connection Mode
* php_version: PHP Version
* drush_version: Drush Version
* php_runtime_generation: PHP Runtime Generation
* @param string $site_env Site & environment in the format `site-name.env`
*
* @return \Consolidation\OutputFormatters\StructuredData\PropertyList
Expand Down Expand Up @@ -67,6 +68,7 @@ public function getPropertyList(TerminusModel $model)
unset($properties['drush_version']);
unset($properties['php_version']);
unset($properties['locked']);
unset($properties['php_runtime_generation']);
}
return new PropertyList($properties);
}
Expand Down
11 changes: 11 additions & 0 deletions src/Models/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,16 @@ public function getPHPVersion()
: null;
}

/**
* Gets the PHP runtime generation of this environment
*
* @return string
*/
public function getPHPRuntimeGeneration()
{
return $this->settings('appserver_runtime')->php_runtime_generation;
}

/**
* @return UpstreamStatus
*/
Expand Down Expand Up @@ -947,6 +957,7 @@ public function serialize()
'initialized' => $this->isInitialized(),
'connection_mode' => $this->get('connection_mode'),
'php_version' => $this->getPHPVersion(),
'php_runtime_generation' => $this->getPHPRuntimeGeneration(),
];
}

Expand Down
5 changes: 5 additions & 0 deletions tests/Functional/EnvCommandsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,11 @@ public function testInfoCommand()
$envInfo,
'Environment info should have "php_version" field.'
);
$this->assertArrayHasKey(
'php_runtime_generation',
$envInfo,
'Environment info should have "php_runtime_generation" field.'
);
}

/**
Expand Down
Loading