Cleanup of AbstractRecordList breaks hook
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.
[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.
Tested-by: TYPO3com <email@example.com>
Reviewed-by: Joerg Boesche <firstname.lastname@example.org>
Reviewed-by: Mathias Schreiber <email@example.com>
Tested-by: Mathias Schreiber <firstname.lastname@example.org>
Reviewed-by: Susanne Moog <email@example.com>
Reviewed-by: Alexander Opitz <firstname.lastname@example.org>
Tested-by: Susanne Moog <email@example.com>