Bug #86416

CLI should not depend on a working database connection

Added by Benjamin Franzke about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
System/Bootstrap/Configuration
Target version:
-
Start date:
2018-09-28
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When registering build commands for deployment scenarios, it should not be required to have a working
database connection to run CLI commands.


Related issues

Related to TYPO3 Core - Bug #86408: FailsafePackageManager does not sort packages when PackageStates.php file is missing Closed 2018-09-27

Associated revisions

Revision 5648fb69 (diff)
Added by Benjamin Franzke about 1 year ago

[BUGFIX] Do not depend on a database connection in CLI authentication

Neither the backend user authentication should try to perform
database queries, nor the extbase services.

As a side effect this allows to run the cli tool when
LocalConfiguration.php or PackageStates.php are missing,
which allows to run commands like `dumpautoload` in that case.
Note: Only in that case, not if a database connection
is configured, but not available – for that usecase failsafe
booting will be needed, as proposed in https://review.typo3.org/c/58298/
and/or https://review.typo3.org/c/58300/

As a drive-by we also add a null coalescing operator to
IconRegistry::registerModuleIcons() which is currently
required because ext_tables.php files are loaded in
incorrect order if PackageStates.php is missing (reported
in another bug: #86408). Although this workaround will
not be strictly required when that bug is fixed, that functions
should still properly handle that case.

Change-Id: I7d339e21160d25b5aee5dd0e2f25491a22ec83e9
Releases: master
Resolves: #86416
Related: #86408
Reviewed-on: https://review.typo3.org/58427
Tested-by: TYPO3com <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>
Reviewed-by: Wouter Wolters <>
Reviewed-by: Stefan Neufeind <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 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/58427

#2 Updated by Anja Leichsenring about 1 year ago

  • Related to Bug #86408: FailsafePackageManager does not sort packages when PackageStates.php file is missing added

#3 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/58427

#4 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/58427

#5 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/58427

#6 Updated by Benjamin Franzke about 1 year ago

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

#7 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF