Review main Abandoned

58264[WIP][BUGFIX] Provide --failsafe option for CLI binary

Benjamin Franzke CR 0 V 0 Normal +68 −5 updated 09/30/18, 22:12

Commit message

The typo3 cli tool is now guaranteed to run in cases
where caches or extensions are broken when --failsafe is specified.
(same conditions as for the web install tool)
That means `typo3 --failsafe` runs entirely uncached.

bin/typo3 can now also be executed when the database is unavailable
or not configured. Individual commands might still fail
but the binary and command dispatcher are at least
able to be invoked at all (and may provide proper error hints).

As extbase requires ext_localconf.php to be loaded,
extbase commands are excluded in --failsafe mode.

If LocalConfiguration.php is missing `--failsafe` is activated
implicitly (but that is not new behaviour). In that case
proper execution is guaranteed as well now.

The flag may be used for commands like `dumpautoload` or
`upgrade:run`:
typo3/sysext/core/bin/typo3 --failsafe dumpautoload
typo3/sysext/core/bin/typo3 --failsafe upgrade:run

The complementing patch to typo3/cms-cli is
available as PR on https://github.com/TYPO3/cms-cli/pull/4

TODO:
 * naming is hard, configuration option 'failsafe' => ignore/true/false
 * document 'failsafe' configuration option
 * probably show all commands in --help with an information
   whether --failsafe is required or not
 * Also add the required entry point changes to typo3/cli
   see https://github.com/TYPO3/cms-cli/pull/4

Review

  • Code review CR 0

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V 0

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 8