[BUGFIX] Do not depend on a database connection in CLI authentication 27/58427/5
authorBenjamin Franzke <bfr@qbus.de>
Wed, 26 Sep 2018 20:54:22 +0000 (22:54 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 30 Sep 2018 12:39:55 +0000 (14:39 +0200)
commit5648fb69d271c74872953101906072ad5e6b9303
tree858421707e88f9047deb722168985c9a20c61bc1
parent7dc0badb6ec61c6342314dc6c3fea1f42b2a69c6
[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 <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Authentication/CommandLineUserAuthentication.php
typo3/sysext/core/Classes/Imaging/IconRegistry.php
typo3/sysext/extbase/Classes/Command/CoreCommand.php