59853[FEATURE] Limit restriction to table/s in QueryBuilder
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 27
- typo3/sysext/core/Classes/Database/Query/Restriction/AbstractQueryRestriction.php6new+50 −0
- typo3/sysext/core/Classes/Database/Query/Restriction/AbstractRestrictionContainer.php+4 −1
- typo3/sysext/core/Classes/Database/Query/Restriction/BackendWorkspaceRestriction.php1+10 −3
- typo3/sysext/core/Classes/Database/Query/Restriction/DeletedRestriction.php+1 −1
- typo3/sysext/core/Classes/Database/Query/Restriction/DocumentTypeExclusionRestriction.php1+5 −2
- typo3/sysext/core/Classes/Database/Query/Restriction/EndTimeRestriction.php1+5 −2
- typo3/sysext/core/Classes/Database/Query/Restriction/FrontendGroupRestriction.php1+5 −2
- typo3/sysext/core/Classes/Database/Query/Restriction/FrontendRestrictionContainer.php+1 −0
- typo3/sysext/core/Classes/Database/Query/Restriction/FrontendWorkspaceRestriction.php1+10 −3
- typo3/sysext/core/Classes/Database/Query/Restriction/HiddenRestriction.php+1 −1
- typo3/sysext/core/Classes/Database/Query/Restriction/QueryRestrictionContainerInterface.php1+13 −1
- typo3/sysext/core/Classes/Database/Query/Restriction/QueryRestrictionInterface.php+6 −0
- typo3/sysext/core/Classes/Database/Query/Restriction/RootLevelRestriction.php1+5 −2
- typo3/sysext/core/Classes/Database/Query/Restriction/StartTimeRestriction.php1+5 −2
- typo3/sysext/core/Classes/Database/Query/Restriction/WorkspaceRestriction.php1+5 −2
- typo3/sysext/core/Documentation/Changelog/master/Feature-87776-LimitRestrictionToTablesInQueryBuilder.rst5new+103 −0
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/AbstractRestrictionContainerTest.php3+2 −0
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/BackendWorkspaceRestrictionTest.php1+41 −0
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/DeletedRestrictionTest.php+41 −0
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/DocumentTypeExclusionRestrictionTest.phpnew+55 −0
Show 7 more files
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/EndTimeRestrictionTest.php+49 −0
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/FrontendGroupRestrictionTest.php+49 −0
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/FrontendWorkspaceRestrictionTest.php+44 −0
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/HiddenRestrictionTest.php+49 −0
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/RootLevelRestrictionTest.php+27 −0
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/StartTimeRestrictionTest.php+49 −0
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/WorkspaceRestrictionTest.php+41 −0
Review log 3043
Show 1218 earlier messages
-
Manuel Selbach uploaded patch set 1 03/04/19, 21:08
-
TYPO3com voted on patch set 1 V -1 03/04/19, 21:13 Completed build in 32s on Mon, 4 Mar, 10:13 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32526
-
Manuel Selbach uploaded patch set 2 03/04/19, 21:28
-
TYPO3com voted on patch set 2 V -1 03/04/19, 21:28 Completed build in 12s on Mon, 4 Mar, 10:28 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32527
-
Manuel Selbach uploaded patch set 3 03/04/19, 21:36
-
TYPO3com voted on patch set 3 V +1 03/04/19, 21:46 Completed build in 09m 44s on Mon, 4 Mar, 10:46 PM Test Summary: 46884 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32528
-
Soren Malling commented on patch set 3 03/05/19, 10:19
Be aware that a new DocumentTypeExclusion restriction class has been introduced in master since your latest changeset -
Manuel Selbach uploaded patch set 4 03/05/19, 12:08
-
Manuel Selbach commented on patch set 4 03/05/19, 12:10
> Patch Set 3: > > Be aware that a new DocumentTypeExclusion restriction class has been introduced in master since your latest changeset Thanks for the hint. I also added a test for that one. -
TYPO3com voted on patch set 4 V +1 03/05/19, 12:23 Completed build in 15m 06s on Tue, 5 Mar, 01:23 PM Test Summary: 46896 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32533
-
Soren Malling wrote 03/05/19, 12:24
Removed reviewer Soren Malling. -
Manuel Selbach uploaded patch set 5 03/14/19, 20:06
-
TYPO3com voted on patch set 5 V +1 03/14/19, 20:22 Completed build in 15m 22s on Thu, 14 Mar, 09:22 PM Test Summary: 47284 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32736
-
Manuel Selbach uploaded patch set 6 03/14/19, 20:33
-
TYPO3com voted on patch set 6 V +1 03/14/19, 20:51 Completed build in 17m 33s on Thu, 14 Mar, 09:51 PM Test Summary: 47284 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32739
-
Manuel Selbach wrote 03/15/19, 09:17
Topic set to persistence -
Jörg Bösche commented on patch set 6 CR -1 04/09/19, 07:17
AbstractQueryRestriction.php:25Should be string[]. A list of tableNames.BackendWorkspaceRestriction.php:42Should be string[]. A list of tableNames.DocumentTypeExclusionRestriction.php:33Should be string[]. A list of tableNames.EndTimeRestriction.php:33Should be string[]. A list of tableNames.FrontendGroupRestriction.php:36Should be string[]. A list of tableNames.FrontendWorkspaceRestriction.php:48array or null? Should be string[]. A list of tableNames.RootLevelRestriction.php:33Should be string[]. A list of tableNames.StartTimeRestriction.php:28Should be string[]. A list of tableNames.WorkspaceRestriction.php:45Should be string[]. A list of tableNames.Feature-87776-LimitRestrictionToTablesInQueryBuilder.rst:65Should be string[]. A list of tableNames. -
Tobi Kretschmann commented on patch set 6 04/09/19, 08:00
AbstractQueryRestriction.php:41Unresolvedplease add the third param for strict type comparisonAbstractRestrictionContainerTest.php:36is the string key necessary?
-
Manuel Selbach commented on patch set 6 04/09/19, 10:17
AbstractRestrictionContainerTest.php:36Reply UnresolvedYes, as this is the input of queried tables where the string key may be the alias. -
Manuel Selbach rebased onto patch set 7 04/09/19, 10:19
-
Manuel Selbach uploaded patch set 8 04/09/19, 10:22
-
TYPO3com voted on patch set 7 V +1 04/09/19, 10:31 Completed build in 11m 47s on Tue, 9 Apr, 12:31 PM Test Summary: 47351 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33132
-
TYPO3com voted on patch set 8 V +1 04/09/19, 10:39 Completed build in 16m 22s on Tue, 9 Apr, 12:39 PM Test Summary: 47351 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33133
-
Jörg Bösche voted on patch set 8 V +1 CR +1 04/09/19, 11:20
-
Anja Leichsenring commented on patch set 8 V +1 04/23/19, 19:09
AbstractQueryRestriction.php:26Unresolvedan explanation what this array does, especially if empty, would probably be a good idea.AbstractQueryRestriction.php:27Unresolved`restrictedTables` might be a more fitting name. If set, the restriction will apply to this tables.AbstractQueryRestriction.php:36isEmpty() maybe?Feature-87776-LimitRestrictionToTablesInQueryBuilder.rst:26Unresolvedthis is a pretty bad example, as the table does not exist anymore. Can you come up with something more recent and therefor relevant, please?Feature-87776-LimitRestrictionToTablesInQueryBuilder.rst:56Unresolvedform -> from. The sentence in whole is not really good to read and understand.Feature-87776-LimitRestrictionToTablesInQueryBuilder.rst:63Unresolvedcan you spare this example a class name? Mentioning that you talk about custom Restriction classes might also be a good idea.AbstractRestrictionContainerTest.php:37Unresolvedyou can skip the shouldBeCalled() when you ask for a return. One is enough.BackendWorkspaceRestrictionTest.php:96Unresolvedthe r of restricted wants to be upper case. Look, it's sad. -
Anja Leichsenring voted on patch set 8 CR -1 04/23/19, 19:10
-
Manuel Selbach rebased onto patch set 9 04/25/19, 20:37
-
Manuel Selbach uploaded patch set 10 04/25/19, 20:38
-
Manuel Selbach commented on patch set 10 04/25/19, 20:46
AbstractQueryRestriction.php:36Reply UnresolvedIs it necessary to check with "empty()" in that case? Should we also array_filter() on that property to remove all "empty" values before then? -
TYPO3com voted on patch set 9 V +1 04/25/19, 20:53 Completed build in 15m 50s on Thu, 25 Apr, 10:53 PM Test Summary: 47572 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33450
-
TYPO3com voted on patch set 10 V +1 04/25/19, 20:53 Completed build in 14m 57s on Thu, 25 Apr, 10:53 PM Test Summary: 47572 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33451
-
Manuel Selbach uploaded patch set 11 05/02/19, 08:45
-
Manuel Selbach uploaded patch set 12 05/02/19, 08:48
-
TYPO3com voted on patch set 11 V +1 05/02/19, 08:57 Completed build in 11m 25s on Thu, 2 May, 10:57 AM Test Summary: 47559 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33687
-
TYPO3com voted on patch set 12 V +1 05/02/19, 09:03 Completed build in 14m 32s on Thu, 2 May, 11:03 AM Test Summary: 47559 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33688
-
Anja Leichsenring commented on patch set 12 05/19/19, 07:19
Feature-87776-LimitRestrictionToTablesInQueryBuilder.rst:54Unresolveda 'k' ran away here, also in line 90. -
Anja Leichsenring commented on patch set 13 05/19/19, 07:24
Published edit on patch set 12. -
Anja Leichsenring voted on patch set 13 V +1 CR +1 05/19/19, 07:24
-
TYPO3com voted on patch set 13 V -1 05/19/19, 07:37 Completed build in 13m 08s on Sun, 19 May, 09:37 AM Test Summary: 1 of 46190 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33925
-
Helmut Hummel commented on patch set 13 CR -1 05/19/19, 09:48
Thanks for working on improving the restrictions API Before I can go into a more depth review, I would like to know very concrete use cases. Otherwise it is hard to make alternative suggestions. My first impression of this change is, that it is rather very impactful with not too much benefit. I think we can achieve the same goal without such big impact.QueryRestrictionContainerInterface.php:25The intention of QueryRestrictionContainerInterface extending QueryRestrictionInterface was making it possible to add restriction containers as restrictions. This is very useful and is used in FAL SearchQuery extensively. Removing this inheritance is not only a breaking change, it removes the possibility to conveniently group restrictions. -
Helmut Hummel commented on patch set 13 05/20/19, 12:49
I created an alternative suggestion here: https://review.typo3.org/60781 It adds the possibility to on query level decide which restrictions should be applied to which table aliases. It does not add convenience for restriction implementers to specify tables in a property to which the implemented restriction should be applied to. This convenience could be added, but should not be added by implementing a base abstract class, but rather by a interface/trait combination. The reason for that is, that we don't want to couple all restrictions to a base class even if they don't need the behavior and it might be useful for restrictions to select from a set of behaviors, which would not be possible with a single inheritance structure. I opted against implementing the interface/trait, because the implementation of this behavior can easily be implemented in each restriction that needs it with adding a single "if" and the reasons *WHY* certain restrictions might want their restrictions only to be applied to certain tables might differ significantly and could be a more complicated check where static definition in a property might not suffice. I'm looking forward to hear what you think about my implementation and my comments. -
Anja Leichsenring wrote 09/09/19, 08:42
Removed reviewer Anja Leichsenring with the following votes: * Verified+1 by Anja Leichsenring <aleichsenring@ab-softlab.de> * Code-Review+1 by Anja Leichsenring <aleichsenring@ab-softlab.de> -
Manuel Selbach abandoned the change 03/30/20, 19:47
We want to go with the implementation introduced with https://review.typo3.org/c/Packages/TYPO3.CMS/+/60781