Bug #83740

Cleanup of AbstractRecordList breaks hook

Added by Frank Naegler almost 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2018-01-31
Due date:
% Done:

100%

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

Description

With #82334 the abstract parent class was removed.

This patch has some bad side effect:

1) In all three changed classes the same hook $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][DatabaseRecordList::class]['buildQueryParameters'] is used
2) the sixth parameter ($this) refer to one of this three classes, alle three classes has no common abstract parent class nor a common interface

The result: I have no change to write clean code, because I can't add a type hint for the buildQueryParametersPostProcess method.
Beside this points, it is no good idea to use the same hook in different places with different method signatures.

Currently I would opt for an interface, the other solution would ne to revert the original patch.


Related issues

Related to TYPO3 Core - Story #82334: Refactor AbstractRecordList Closed 2017-09-07

Associated revisions

Revision 4f17dd08 (diff)
Added by Frank Naegler almost 2 years ago

[BUGFIX] Deprecate broken buildQueryParameters hook

This change deprecates the "buildQueryParameters" hook in three
different classes and adds two new hooks in DatabaseRecordList
and PageLayoutView to modify the current query.

With #82334 a cleanup of AbstractRecordList has introduced
the same hook into multiple classes, which breaks existing
hooks, because of the sixth parameter which can be one of three
different classes without a common parent class or interface.
This makes it impossible to use a type hint in the hook class.

Another problem is: an extension which implements the hook
for the list module and uses a type hint will break the page module.

The same query manipulation can be achieved with the two
new hooks, which have a separate identifier.

Resolves: #83740
Related: #82334
Releases: master
Change-Id: Ie3b2c8082f86c6632400a8194dca4ca244b428bc
Reviewed-on: https://review.typo3.org/55512
Tested-by: TYPO3com <>
Reviewed-by: Joerg Boesche <>
Reviewed-by: Mathias Schreiber <>
Tested-by: Mathias Schreiber <>
Reviewed-by: Susanne Moog <>
Reviewed-by: Alexander Opitz <>
Tested-by: Susanne Moog <>

History

#1 Updated by Frank Naegler almost 2 years ago

  • Related to Story #82334: Refactor AbstractRecordList added

#2 Updated by Frank Naegler almost 2 years ago

  • Status changed from New to In Progress
  • Assignee set to Frank Naegler

#3 Updated by Gerrit Code Review almost 2 years ago

  • Status changed from In Progress 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/55512

#4 Updated by Gerrit Code Review almost 2 years 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/55512

#5 Updated by Gerrit Code Review almost 2 years 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/55512

#6 Updated by Gerrit Code Review almost 2 years 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/55512

#7 Updated by Gerrit Code Review almost 2 years 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/55512

#8 Updated by Gerrit Code Review almost 2 years 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/55512

#9 Updated by Frank Naegler almost 2 years ago

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

#10 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF