Project

General

Profile

Actions

Bug #96332

closed

Dependency injection not working for extbase validators

Added by Philipp Thiele over 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2021-12-10
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
extbase,DI
Complexity:
Is Regression:
Sprint Focus:

Description

(Found by testing powermail in TYPO3 version 11.)

In \TYPO3\CMS\Extbase\Mvc\Controller\ActionController->initializeActionMethodValidators() the validators are instantiated by calling

$validatorInstance = GeneralUtility::makeInstance(
                    $validatorDefinition['className'],
                    $validatorDefinition['options']
                );

however, when options for the given validator are empty, the empty array will get passed to GeneralUtility::makeInstance() as the first argument. Therefore, the check for empty constructorArguments will fail in GeneralUtility::makeInstance() and the class will not be instantiated by the DI container.


Related issues 5 (0 open5 closed)

Related to TYPO3 Core - Task #95026: [TASK] Add missing breaking.rst about service injection in Extbase validatorsClosedTorben Hansen2021-08-29

Actions
Related to TYPO3 Core - Task #92238: Avoid usage of object manager in validation related classesClosed2020-09-09

Actions
Related to TYPO3 Core - Task #94451: Avoid ObjectManager in ext:extbaseClosed2021-07-01

Actions
Related to TYPO3 Core - Task #94384: Avoid ObjectManager in remaining ext:form placesClosed2021-06-19

Actions
Related to TYPO3 Core - Task #96998: Streamline Extbase validatorsClosed2022-02-22

Actions
Actions #1

Updated by Philipp Thiele over 2 years ago

  • Description updated (diff)
  • Target version deleted (Candidate for patchlevel)
Actions #2

Updated by Christian Kuhn about 2 years ago

  • Related to Task #95026: [TASK] Add missing breaking.rst about service injection in Extbase validators added
Actions #3

Updated by Christian Kuhn about 2 years ago

  • Related to Task #92238: Avoid usage of object manager in validation related classes added
Actions #4

Updated by Christian Kuhn about 2 years ago

  • Related to Task #94451: Avoid ObjectManager in ext:extbase added
Actions #5

Updated by Gerrit Code Review about 2 years ago

  • Status changed from New to Under Review

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

Actions #6

Updated by Christian Kuhn about 2 years ago

  • Related to Task #94384: Avoid ObjectManager in remaining ext:form places added
Actions #7

Updated by Gerrit Code Review about 2 years ago

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

Actions #8

Updated by Gerrit Code Review about 2 years ago

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

Actions #9

Updated by Gerrit Code Review about 2 years ago

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

Actions #10

Updated by Gerrit Code Review about 2 years ago

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

Actions #11

Updated by Gerrit Code Review about 2 years ago

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

Actions #12

Updated by Gerrit Code Review about 2 years ago

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

Actions #13

Updated by Gerrit Code Review about 2 years ago

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

Actions #14

Updated by Gerrit Code Review about 2 years ago

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

Actions #15

Updated by Gerrit Code Review about 2 years ago

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

Actions #16

Updated by Gerrit Code Review about 2 years ago

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

Actions #17

Updated by Gerrit Code Review about 2 years ago

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

Actions #18

Updated by Gerrit Code Review about 2 years ago

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

Actions #19

Updated by Gerrit Code Review about 2 years ago

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

Actions #20

Updated by Gerrit Code Review about 2 years ago

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

Actions #21

Updated by Gerrit Code Review about 2 years ago

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

Actions #22

Updated by Gerrit Code Review about 2 years ago

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

Actions #23

Updated by Christian Kuhn about 2 years ago

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

Updated by Christian Kuhn about 2 years ago

  • Related to Task #96998: Streamline Extbase validators added
Actions #25

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF