Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
views.module
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
1 Jul 2024 at 14:24 UTC
Updated:
2 Aug 2024 at 06:04 UTC
Jump to comment: Most recent
Comments
Comment #3
scott_euser commentedComment #4
scott_euser commentedIf you want to find the two uses of this override in core, easiest is to search the codebase for
Views::handlerManager(as the 'type' passed is dynamic. Anyways easy to spot the two cases where the 2nd arg is passed via a phpstorm code search for that. Both cases trace back to Drupal\views\Plugin\views\query\Sql::getAggregationInfo() (and would be similar for something other than Sql if we supported aggregation with another database engine).Comment #5
andypostI find
$override_handler_plugin_idover-complicated - handler is always plugin and the method name already suppose to return handlergetHandler()so$override_plugin_idis more reasonableComment #6
scott_euser commentedThanks for the feedback! I also added the return typehint ViewsHandlerInterface + renamed the variable as suggestion.
Comment #7
scott_euser commentedRetrying pipeline, the failed block cache test seems unrelated and passes locally when I run it, so I think its a gitlab ci anomaly.
Comment #8
scott_euser commentedTests passing again
Comment #9
scott_euser commentedThanks! Resolved grammar fix
Comment #10
smustgrave commentedSmall request can MR be updated for 11.x vs 11.0.x
Comment #13
scott_euser commentedThanks for flagging, updated to 11.x (issue & MR)
Comment #14
smustgrave commentedComment reads fine, not 100% sure about the variable name if there is any BC for that but going to mark.
Comment #15
scott_euser commentedThanks! Re variable name, since its not an interface change, even if someone is for some reason extending this (I can't see why), I believe it would not cause a breaking change if they have named their variable differently.
Comment #17
catchThis is a good improvement for a very confusing and complicated bit of code.
Wondered about the bc implications of adding the type hint to ViewsHandlerManager but: 1. overriding this seems extremely unlikely 2. downstream code could just add the type hint to be compatible with all Drupal versions again.
Committed/pushed to 11.x, thanks!