CLI should not depend on a working database connection
When registering build commands for deployment scenarios, it should not be required to have a working
database connection to run CLI commands.
[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/
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.
Tested-by: TYPO3com <firstname.lastname@example.org>
Reviewed-by: Benni Mack <email@example.com>
Tested-by: Benni Mack <firstname.lastname@example.org>
Reviewed-by: Wouter Wolters <email@example.com>
Reviewed-by: Stefan Neufeind <firstname.lastname@example.org>
Reviewed-by: Christian Kuhn <email@example.com>
Tested-by: Christian Kuhn <firstname.lastname@example.org>