83153[FEATURE] Support comma-separated lists in page tree filter
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Garvin Hicking +1
- Guido Schmechel +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Benni Mack +2
- Garvin Hicking +1
- Guido Schmechel +1
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 1
Files 4
- typo3/sysext/backend/Classes/Tree/Repository/PageTreeRepository.php6+16 −4
- typo3/sysext/backend/Tests/Functional/Tree/Repository/Fixtures/PageTree.csv+2 −0
- typo3/sysext/backend/Tests/Functional/Tree/Repository/PageTreeRepositoryTest.php7+227 −0
- typo3/sysext/core/Documentation/Changelog/13.1/Feature-103220-SupportComma-separatedListsInPageTreeFilter.rstnew+17 −0
Review log 4662
Show 2537 earlier messages
-
Philipp Kitzberger uploaded patch set 1 02/28/24, 00:19
-
core-ci voted on patch set 1 V -1 02/28/24, 00:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53665
-
Philipp Kitzberger uploaded patch set 2
V -102/28/24, 00:59 -
Philipp Kitzberger uploaded patch set 3 02/28/24, 01:01
-
core-ci voted on patch set 2 V -1 02/28/24, 01:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53666
-
core-ci voted on patch set 3 V -1 02/28/24, 01:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53667
-
Philipp Kitzberger uploaded patch set 4
V -102/28/24, 01:16 -
core-ci voted on patch set 4 V +1 02/28/24, 01:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53669
-
Josef Glatz commented on patch set 4 CR -1 02/28/24, 04:02
rST feature file missing (but didn’t checked the code) -
Philipp Kitzberger uploaded patch set 5
CR -1V +102/28/24, 08:03 -
core-ci voted on patch set 5 V +1 02/28/24, 08:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53672
-
Chris Müller uploaded patch set 6
V +102/28/24, 20:14 -
core-ci voted on patch set 6 V +1 02/28/24, 20:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53693
-
Andreas Kienast commented on patch set 6 02/29/24, 12:32
PageTreeRepository.php:548I'd love to see an `array_unique()` here. -
Andreas Kienast commented on patch set 6 CR -1 02/29/24, 12:34
PageTreeRepository.php:548ReplyAlso, I'm not sure whether `array_filter()` is needed as `true` is passed to `intExplode()`. Also, I we need some sanitization regarding negative values again (`array_filter` comes in handy again). -
Garvin Hicking commented on patch set 6 02/29/24, 12:40
Love this! Will test later, some commentsPageTreeRepositoryTest.php:330Should we add also tests for "string,int,string" and "string.string" here? and "sameInt,sameInt", "negativeInt"?Feature-103220-EnhancePagetreeFilterBySupportingListsOfPids.rst:14Maybe formulate this more passively like usual: "The page tree has been enhanced by..."? -
Philipp Kitzberger uploaded patch set 7
CR -1V +102/29/24, 14:29 -
Philipp Kitzberger uploaded patch set 8 02/29/24, 14:32
-
core-ci voted on patch set 7 V -1 02/29/24, 14:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53726
-
core-ci voted on patch set 8 V -1 02/29/24, 14:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53727
-
Philipp Kitzberger uploaded patch set 9
V -102/29/24, 15:42 -
Philipp Kitzberger commented on patch set 8 02/29/24, 15:43
Reply
DonePageTreeRepository.php:548Reply`array_filter()` is necessary for `GeneralUtility::intExplode(',', '', true)` returning `[0]` and for comma separated strings even more bigger arrays of zeros like `[0, ..., 0]` But you're right, negative values need to be filtered out as well. Please have a look at latest patchset.Feature-103220-EnhancePagetreeFilterBySupportingListsOfPids.rst:14ReplyDone -
core-ci voted on patch set 9 V +1 02/29/24, 15:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53728
-
Garvin Hicking commented on patch set 9 V +1 02/29/24, 17:18
Tested and works fine for me!Feature-103220-EnhancePagetreeFilterBySupportingListsOfPids.rst:14"has" not "hase" - but I also think you accidentally overwrote Chris' patches to the changelog which improved a few other changes, or was that by intention? -
Chris Müller commented on patch set 9 02/29/24, 18:17
Feature-103220-EnhancePagetreeFilterBySupportingListsOfPids.rst:14ReplyYup, my change was overriden :-( -
Chris Müller uploaded patch set 10
V +102/29/24, 18:42 -
Chris Müller commented on patch set 10 02/29/24, 18:43
Feature-103220-EnhancePagetreeFilterBySupportingListsOfPids.rst:14ReplyFixed. -
core-ci voted on patch set 10 V +1 02/29/24, 18:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53735
-
Philipp Kitzberger commented on patch set 10 02/29/24, 19:26
Feature-103220-EnhancePagetreeFilterBySupportingListsOfPids.rst:14ReplySorry, didn't mean to! -
Benni Mack commented on patch set 10 02/29/24, 19:52
PageTreeRepositoryTest.php:330Replyyes. I wonder what happens if I type in "page30" -
Philipp Kitzberger commented on patch set 10 02/29/24, 19:54
PageTreeRepositoryTest.php:330Replynot much. it'll search for a page with that phrase in its title. same for "30page". intExplode will eliminate those "non-numbers" and thus not include them in the pid-lookup. -
Garvin Hicking commented on patch set 10 02/29/24, 20:11
PageTreeRepositoryTest.php:330ReplyBut we should still verify that with a test in case someone(tm) ever tries to to replace intExplode with something else, or otherwise change the parsing routine and then the results could change without noticing. -
Philipp Kitzberger uploaded patch set 11
V +103/02/24, 09:42 -
core-ci voted on patch set 11 V -1 03/02/24, 09:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53770
-
Philipp Kitzberger commented on patch set 11 03/02/24, 09:51
PageTreeRepositoryTest.php:330ReplyI was wrong! `intExplode` of course casts "30page" to "30", that's why I've switched now from `intExplode` to `trimExplode` in combination with `is_number` from before and applying `intval` them manually. Additionally there 3 more tests, even covering the "no results" case for non-matching strings. -
core-ci commented on patch set 11 03/02/24, 11:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53770
-
Philipp Kitzberger rebased onto patch set 12
V -103/02/24, 11:32
-
core-ci voted on patch set 12 V +1 03/02/24, 11:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53775
-
Garvin Hicking commented on patch set 12 03/02/24, 13:34
PageTreeRepositoryTest.php:330ReplyNice, that was worth it then ☺️ How about "30,string,31" as well, to ensure ints still match even when a string is involved? And a "-30,31" to only match "31"? -
Philipp Kitzberger uploaded patch set 13
V +103/02/24, 13:46 -
Philipp Kitzberger commented on patch set 13 03/02/24, 13:48
Done ;-)PageTreeRepositoryTest.php:330ReplyDone -
core-ci voted on patch set 13 V +1 03/02/24, 13:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53778
-
Garvin Hicking commented on patch set 13 CR +1 V +1 03/02/24, 15:59
👍 -
Stefan Bürk commented on patch set 13 CR -1 03/04/24, 17:41
Nitpick: Let's manually break the commit a little bit earlier and not avoid exceeding the maximum commit message line length (and breaking weired in gerrit).PageTreeRepository.php:551`is_numeric()` is not good here, as this would return true or float-like string or exponent notation, see: https://3v4l.org/lfOW7 ``` var_dump(is_numeric('123.98')); // returs true var_dump(is_numeric('123e23')); // return true ``` therfore `MathUtility::canBeInterpretedAsInteger()` should be used here. Additionally, it doesn't make sense to have `array_filter()`, `array_map()` and than an additionally array_unique(). I would suggest to use a `foreach()` loop here and add only values which can be interpreted as integer, casted as integer to a new array if not contained in it - or with a array_uniquie() afterwards. but at least we should combine the filter and map in some way. Note: float and exponent like syntax should be added to the tests also. -
Stefan Bürk commented on patch set 13 03/04/24, 17:46
PageTreeRepository.php:551ReplySmall additional side-note: if `array_map()` is used, we normally use ``` array_map(intval(...), $array); ``` nowerdays. -
Philipp Kitzberger uploaded patch set 14
CR +1V +103/04/24, 23:26 -
Philipp Kitzberger commented on patch set 13 03/04/24, 23:29
Reply
DonePageTreeRepository.php:551ReplyThanks for your feedback! Please have another look. -
core-ci voted on patch set 14 V +1 03/04/24, 23:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53912
-
Simon Schaufelberger voted on patch set 14 CR +1 03/22/24, 23:44
-
Garvin Hicking voted on patch set 14 CR +1 V +1 04/05/24, 10:58
-
Jörg Bösche voted on patch set 14 CR +1 04/11/24, 13:37
-
Fabien Udriot voted on patch set 14 CR +1 04/11/24, 14:54
-
Guido Schmechel voted on patch set 14 CR +1 V +1 04/12/24, 17:44
-
Guido Schmechel commented on patch set 14 CR 0 04/12/24, 17:45
The file name of the RST would probably have to be adapted? -
Simon Schaufelberger uploaded patch set 15
CR +1V +104/12/24, 19:11 -
Simon Schaufelberger voted on patch set 15 CR +1 V +1 04/12/24, 19:11
-
core-ci voted on patch set 15 V +1 04/12/24, 19:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55878
-
Garvin Hicking voted on patch set 15 CR +1 V +1 04/12/24, 20:32
-
Guido Schmechel voted on patch set 15 CR +1 V +1 04/13/24, 08:21
-
Benni Mack voted on patch set 15 CR +1 V +1 04/13/24, 11:50
-
Benni Mack voted on patch set 15 CR +2 V +2 04/13/24, 11:50
-
Benni Mack merged patch set 16 04/13/24, 11:50