Closed (fixed)
Project:
Drupal core
Version:
10.1.x-dev
Component:
views.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 Jul 2022 at 23:15 UTC
Updated:
8 Mar 2023 at 09:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
andypostComment #3
andypostWIP
Comment #4
anchal_gupta commentedI have Fixed CS error. Please Review
Comment #5
andypostThanks fixing my patch but looks you're added unrelated hunk
this test is not related here
Comment #6
andypostLooks that's the only way to fix it with BC
But I'd like to change the property name to
workspaceAdjastedso__get()/__set()could be neededComment #7
andypostI find it ready now
Comment #9
andypostrandom failure, needs review
Comment #10
longwaveDoes this need to be a property on the join? Could we add a property to the ViewsQueryAlter class that caches the altered objects?
Class name could be WorkspacesStandard to match plugin name?
Comment #11
andypost@longwave Thank you! great idea to explore
Comment #12
andypostHere's attempt to use internal property, the "query alter service" is created on every query alter, see
workspaces_views_query_alter()Comment #13
andypostIt looks like backportable to 10.0.x
Comment #14
longwaveThis looks good to me - only the service needs to know which joins have been altered as far as I can see.
Comment #15
alexpottAre we sure that that $join_table is going to be unique? What happens if a view has multiple joins to the same table?
Comment #16
andypostGood catch, looking at code it's not clear but views doing aliasing on every table so probably it would be ok but better to as @lendude
Comment #17
andypostOther option could be using WeakMap to use join object as key so it should fix #15
Comment #18
andypostUpdated IS with last approach
Comment #19
smustgrave commentedBrought this up in #needs-review-queue-initiative channel and @andypost pointed out this doesn't need a change record.
So moving this one on.
Comment #20
alexpottCommitted 88fab0ba7c and pushed to 10.1.x. Thanks!
I think removing
#[\AllowDynamicProperties]is not an API change. It means that if anything in contrib is doing something similar that can make the same change and PHP will issue deprecations telling them they need to do it.