diff --git a/typo3/sysext/core/Classes/Console/CommandRequestHandler.php b/typo3/sysext/core/Classes/Console/CommandRequestHandler.php index acc1662c0e1978e810c45ea88afc891228301939..cf7481eeddb8fa7865c6678597b2021cf0509beb 100644 --- a/typo3/sysext/core/Classes/Console/CommandRequestHandler.php +++ b/typo3/sysext/core/Classes/Console/CommandRequestHandler.php @@ -1,5 +1,6 @@ <?php declare(strict_types = 1); + namespace TYPO3\CMS\Core\Console; /* @@ -39,7 +40,11 @@ class CommandRequestHandler implements RequestHandlerInterface */ public function __construct() { - $this->application = new Application('TYPO3 CMS', TYPO3_version); + $this->application = new Application('TYPO3 CMS', sprintf( + '%s (Application Context: <comment>%s</comment>)', + TYPO3_version, + GeneralUtility::getApplicationContext() + )); } /** diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-88318-DisplayApplicationContextInCLI.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-88318-DisplayApplicationContextInCLI.rst new file mode 100644 index 0000000000000000000000000000000000000000..b5c0b5595c3a37838eec88348f85a6e8dad66e65 --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Feature-88318-DisplayApplicationContextInCLI.rst @@ -0,0 +1,18 @@ +.. include:: ../../Includes.txt + +==================================================== +Feature: #88318 - Display Application Context in CLI +==================================================== + +See :issue:`88318` + +Description +=========== + +The current Application Context is now shown next to the TYPO3 version number in CLI requests. This makes it easier to check if the correct context is provided. + +Output example: :: + + TYPO3 CMS 10.1.0-dev (Application Context: Development/Docker) + +.. index:: CLI, ext:core