Bug #89891

Temporary assets can not be removed in install tool, exception occurs

Added by Benjamin Franzke 6 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Start date:
2019-12-06
Due date:
% Done:

100%

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

Description

Exception is:

Too few arguments to function TYPO3\CMS\Core\Resource\ResourceFactory::__construct(), 0 passed in […]/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 3461 and exactly 1 expected

Solution:
The ResourceFactory needs to be defined by a service provider to be available in install tool mode.


Related issues

Duplicated by TYPO3 Core - Bug #90071: ArgumentCountError for ResourceFactory Closed 2020-01-08
Duplicated by TYPO3 Core - Bug #90084: Event Dispatcher missing in Maintenance -> Remove temporary assets Closed 2020-01-10
Duplicated by TYPO3 Core - Bug #90732: FileIndexRepository can not be constructed when using the Maintenance->Remove Temporary Assets functionality Closed 2020-03-11

Associated revisions

Revision c020e9ba (diff)
Added by Benjamin Franzke about 2 months ago

[TASK] Inject singletons used by EXT:install in service providers

This will allow both, dependency injection for these services (manually
wired in service providers), and usage in install/maintenance tool
(where we do not use the caching symfony container for basic tasks).

The move to DI is possible thanks to the failsafe container and the
service providers which can fed the failsafe container with service
factories. These factories are used to wire services manually.

Notes:

  • The definition in a service provider means we are required to use
    manual wiring and are forced to define the dependencies in the service
    provider when we add new depenencies to services that are being used
    by the install..
    With that approach we can assure that we do not accidentally add new
    dependencies to services which would become available in symfony DI due
    to autowiring, but would be unavailable in the install tool.
  • The install tool has operations that require a booted symfony
    container which is provided by the LateBootService. Services that
    are used in that mode do not need to be listed in service providers.
    Therefore we do only add core services to service providers if they
    are used in a context without a fully booted symfony DI container.
  • GLOBALS['LANG'] mocks in Core\Tests\Unit\DataHandling\DataHandlerTest
    have been removed as the code under test does no longer use
    $GLOBALS['LANG']->csConvObj->substr() but mb_substr. The test had been
    introduced with #68602 but the tested code was adapted in #78670.
  • We got a bit ugly constructs now, where a unit(!) test previously used

    $GLOBALS['LANG'] = new LanguageService();

    …we now have to encode the dependency structure:

    $GLOBALS['LANG'] = new LanguageService(new Locales,
    new LocalizationFactory(
    new LanguageStore,
    $cacheManagerProphecy->reveal()
    )
    );

    This isn't nice, but this change reveals that the affected unit tests
    should either be adapted, removed or be moved to a functional test.
    Such adaption are out of scope for this change.

  • loadExtLocalconfDatabaseAndExtTables() is removed from the
    EXT:install AbstractController, as it hides the implicit dependency
    to LateBootService
  • Nullable constructor arguments have been changed to be non-nullable
    whenever possible. That results in some more test adaptions, but
    reveals, where unit tests rely on implicit dependencies and offers
    better readability and less possible codepaths.

Releases: master
Resolves: #89892
Resolves: #89891
Change-Id: Ib72d6440f81b2c0d05279e8768697c3b48aecfe4
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575
Tested-by: TYPO3com <>
Tested-by: Andreas Fernandez <>
Tested-by: Susanne Moog <>
Reviewed-by: Andreas Fernandez <>
Reviewed-by: Susanne Moog <>

History

#1 Updated by Gerrit Code Review 6 months 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/c/Packages/TYPO3.CMS/+/62575

#2 Updated by Gerrit Code Review 6 months 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/c/Packages/TYPO3.CMS/+/62575

#3 Updated by Gerrit Code Review 6 months 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/c/Packages/TYPO3.CMS/+/62575

#4 Updated by Gerrit Code Review 6 months 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/c/Packages/TYPO3.CMS/+/62575

#5 Updated by Gerrit Code Review 6 months ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#6 Updated by Gerrit Code Review 6 months ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#7 Updated by Gerrit Code Review 6 months ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#8 Updated by Gerrit Code Review 6 months ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#9 Updated by Andreas Fernandez 5 months ago

  • Duplicated by Bug #90071: ArgumentCountError for ResourceFactory added

#10 Updated by Daniel Goerz 5 months ago

  • Duplicated by Bug #90084: Event Dispatcher missing in Maintenance -> Remove temporary assets added

#11 Updated by Gerrit Code Review 5 months ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#12 Updated by Gerrit Code Review 4 months ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#13 Updated by Gerrit Code Review 4 months ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#14 Updated by Gerrit Code Review 4 months ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#15 Updated by Gerrit Code Review 4 months ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#16 Updated by Benjamin Franzke 4 months ago

  • Status changed from Under Review to Resolved

Has been fixed by https://review.typo3.org/c/Packages/TYPO3.CMS/+/63076 – that patch adds the required factory in the core service provider, which is needed to fix this bug.

#17 Updated by Gerrit Code Review 4 months ago

  • Status changed from Resolved to Under Review

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#18 Updated by Andreas Fernandez 3 months ago

  • Duplicated by Bug #90732: FileIndexRepository can not be constructed when using the Maintenance->Remove Temporary Assets functionality added

#19 Updated by Gerrit Code Review about 2 months ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#20 Updated by Gerrit Code Review about 2 months ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#21 Updated by Gerrit Code Review about 2 months ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#22 Updated by Gerrit Code Review about 2 months ago

Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#23 Updated by Gerrit Code Review about 2 months ago

Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#24 Updated by Gerrit Code Review about 2 months ago

Patch set 20 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#25 Updated by Gerrit Code Review about 2 months ago

Patch set 21 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#26 Updated by Gerrit Code Review about 2 months ago

Patch set 22 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#27 Updated by Gerrit Code Review about 2 months ago

Patch set 23 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#28 Updated by Gerrit Code Review about 2 months ago

Patch set 24 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#29 Updated by Gerrit Code Review about 2 months ago

Patch set 25 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#30 Updated by Gerrit Code Review about 2 months ago

Patch set 26 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#31 Updated by Gerrit Code Review about 2 months ago

Patch set 27 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#32 Updated by Gerrit Code Review about 2 months ago

Patch set 28 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#33 Updated by Gerrit Code Review about 2 months ago

Patch set 29 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#34 Updated by Gerrit Code Review about 2 months ago

Patch set 30 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#35 Updated by Gerrit Code Review about 2 months ago

Patch set 31 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62575

#36 Updated by Benjamin Franzke about 2 months ago

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

#37 Updated by Benni Mack about 1 month ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF