Feature #88318

Display the application context in CLI

Added by DANIEL Rémy over 1 year ago. Updated 10 months ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-05-09
Due date:
% Done:

100%

PHP Version:
Tags:
Complexity:
easy
Sprint Focus:

Description

Use case

I would like to see the application context when running the TYPO3 console.

Background

Displaying the application context in console helps when switching between different environment (dev/staging/prod).
In the backend, the application context in shown in the "System information" panel in the header.
I suggest to add it also in console.

Example:

$ typo3/sysext/core/bin/typo3

TYPO3 Context Development
TYPO3 CMS 8.7.24

Usage:
  command [options] [arguments]

...

Associated revisions

Revision 8415d5c9 (diff)
Added by Guido Schmechel about 1 year ago

[FEATURE] Display Application Context in CLI

The Command Request Handler now displays the
current Application Context when executing the
CLI context.

Resolves: #88318
Releases: master
Change-Id: If8994eee4e08c78f71972524873edfd7f0db07f0
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61382
Tested-by: TYPO3com <>
Tested-by: Georg Ringer <>
Tested-by: Jonas Eberle <>
Tested-by: Mathias Brodala <>
Tested-by: Benni Mack <>
Reviewed-by: Georg Ringer <>
Reviewed-by: Jonas Eberle <>
Reviewed-by: Mathias Brodala <>
Reviewed-by: Oliver Klee <>
Reviewed-by: Benni Mack <>

History

#1 Updated by DANIEL Rémy over 1 year ago

  • Assignee deleted (DANIEL Rémy)

#2 Updated by DANIEL Rémy over 1 year ago

I looked how Symfony does it.
It extends Console/Application and overrides this method:

    /**
     * {@inheritdoc}
     */
    public function getLongVersion()
    {
        return parent::getLongVersion().sprintf(' (env: <comment>%s</>, debug: <comment>%s</>)', $this->kernel->getEnvironment(), $this->kernel->isDebug() ? 'true' : 'false');
    }

see https://github.com/symfony/symfony/blob/4.2/src/Symfony/Bundle/FrameworkBundle/Console/Application.php#L141

#3 Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61382

#4 Updated by Gerrit Code Review about 1 year ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61382

#5 Updated by Gerrit Code Review about 1 year ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61382

#6 Updated by Gerrit Code Review about 1 year ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61382

#7 Updated by Gerrit Code Review about 1 year ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61382

#8 Updated by Gerrit Code Review about 1 year ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61382

#9 Updated by Gerrit Code Review about 1 year ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61382

#10 Updated by Guido Schmechel about 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#11 Updated by Benni Mack 10 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF