Bug #86408

Epic #83968: PSR-11 Initiative

FailsafePackageManager does not sort packages when PackageStates.php file is missing

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

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

100%

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

Description

This currently does not expose real problems, as the install
tool creates a new PackageStates.php later on and saves (and
implicitly sorts packages) using forceSortAndPackageStates().

FailsafePackageManager prevents saving PackageStates.php in
failsafe mode by overwriting sortAndSavePackageStates(). That works
to prevent saving, but also prevents sorting when initially loading
packages when PackageStates.php is missing.

Despite not exposing bugs right now, this should be fixed as
this is a) unclean and b) will become a problem when other failsafe
applications will be added.


Related issues

Related to TYPO3 Core - Bug #86416: CLI should not depend on a working database connection Closed 2018-09-28

Associated revisions

Revision 9623facf (diff)
Added by Benjamin Franzke about 1 year ago

[BUGFIX] FailsafePackageManager: do not prevent package sorting

FailsafePackageManager prevents saving PackageStates.php in
failsafe mode by overwriting sortAndSavePackageStates(). That works
to prevent saving, but also prevents sorting when initially loading
packages when PackageStates.php is missing.

Currently this does not really produce problems, as the install
tool creates a new PackageStates.php later on and saves (and
implicitly sorts them) using forceSortAndPackageStates().

To fix the intermediate state we now only prevent saving,
but not the sorting of packages.

Releases: master
Resolves: #86408
Change-Id: I02ccb20653700e696d89b0a6ff39253f4f1ebc73
Reviewed-on: https://review.typo3.org/58416
Tested-by: TYPO3com <>
Reviewed-by: Frank Naegler <>
Tested-by: Frank Naegler <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>

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/58416

#2 Updated by Benjamin Franzke about 1 year ago

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

#3 Updated by Anja Leichsenring about 1 year ago

  • Related to Bug #86416: CLI should not depend on a working database connection added

#4 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

#5 Updated by Benjamin Franzke 4 months ago

  • Parent task set to #83968

Also available in: Atom PDF