25687[FEATURE] Paginate should handle non-query-result objects
Commit message
Review
-
Code review CR +2
- Christian Kuhn +2
- Anja Leichsenring +1
-
Verified V +2
- Christian Kuhn +2
- Anja Leichsenring +1
Issues 1
Files 4
- typo3/sysext/core/Documentation/Changelog/master/Feature-34944-PaginateHandleNonQueryResultObjects.rstnew+22 −0
- typo3/sysext/fluid/Classes/ViewHelpers/Widget/Controller/PaginateController.php19+67 −9
- typo3/sysext/fluid/Classes/ViewHelpers/Widget/PaginateViewHelper.php2+8 −3
- typo3/sysext/fluid/Tests/Unit/ViewHelpers/Widget/Controller/PaginateControllerTest.php1+144 −3
Review log 57
Show 32 earlier messages
-
Mr. Jenkins commented on patch set 1 CR -1 V -1 11/26/13, 11:20
Build Failed https://ci.typo3.org/job/typo3-v4-core-gerrit/12330/ : FAILURE -
Tom uploaded patch set 2 11/26/13, 12:55
-
Mr. Jenkins commented on patch set 2 11/26/13, 13:08
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/12332/ : SUCCESS -
Oliver Klee commented on patch set 2 11/26/13, 13:31
Shouldn't the function that at least check whether the passed object is an array or a Traversable and throw an InvalidArgumentException otherwise? This would help in debugging problems. -
Tom uploaded patch set 3 11/27/13, 10:41
-
Marc Bastian Heinrichs commented on patch set 3 CR -2 11/27/13, 10:57
It's feature freeze so I block the patch till 6.2 has it's own branch. -
Mr. Jenkins commented on patch set 3 11/27/13, 10:58
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/12339/ : SUCCESS -
Tobias Wollender voted on patch set 3 CR +1 01/05/14, 13:37
-
Nikolas Hagelstein commented on patch set 3 CR +1 03/27/14, 10:31
Must have! -
Sven Külpmann commented on patch set 3 V +1 CR +1 07/08/14, 12:51
works for my Query-Objects just as good as or my arrays. must have! -
Markus Klein commented on patch set 3 07/08/14, 12:58
@Sven: how did you test this on master, if the patch does not even apply? Did you fix the patch? Then push it please. -
Tom uploaded patch set 4 07/15/14, 16:09
-
Markus Klein updated the commit message in patch set 5 07/15/14, 16:11
-
Markus Klein commented on patch set 5 CR -1 07/15/14, 16:17
PaginateController.php:31List them all please.PaginateController.php:62@throws missingPaginateController.php:76Modified.. we do not use such comments. The commit message tells us what is changed. The if condition is self-explainingPaginateController.php:77I don't know the exact difference between is_a() and instanceof, but I would prefer instanceof, if there's no special reason. Additionally an is_object() test is neededPaginateController.php:89We use (int)PaginateController.php:90IMO there should be a check for SplStorage too. Does that make sense?PaginateViewHelper.php:62Here too, please don't use mixed, but specify all allowed types -
Alexander Opitz commented on patch set 5 09/12/14, 08:32
Tom Ruether, are you working on this issue? -
Marc Bastian Heinrichs voted on patch set 5 CR 0 09/12/14, 10:03
-
Mathias Schreiber wrote 12/17/14, 14:33
Topic set to EXT: fluid -
Frank Nägler commented on patch set 5 CR -1 12/21/14, 19:17
I am on it -
Frank Nägler commented on patch set 5 12/21/14, 19:44
new patchset will follow soonPaginateController.php:31ReplyDonePaginateController.php:76ReplyDonePaginateController.php:77ReplyDonePaginateController.php:89ReplyDonePaginateController.php:90ReplyMaybe, but I think the two additional cases enough.PaginateViewHelper.php:62ReplyDone -
Frank Nägler uploaded patch set 6 12/21/14, 20:01
-
Frank Nägler voted on patch set 6 V +1 CR +1 12/21/14, 20:03
-
Anja Leichsenring commented on patch set 6 CR -1 12/21/14, 20:19
works nicely, but after this is a Feature, please add a documentation file to sysext:core/Documentation/Changelog/master. You find examples there. -
Frank Nägler uploaded patch set 7 12/21/14, 20:29
-
Frank Nägler commented on patch set 7 V +1 CR +1 12/21/14, 20:29
thx for hint Anja, I added the missing rst file -
Georg Ringer voted on patch set 7 CR +1 V +1 12/21/14, 21:22
-
Stefan Froemken commented on patch set 7 12/22/14, 08:20
What about SplObjectStorage?PaginateController.php:113Please use $itemsPerPage from above -
Alexander Opitz commented on patch set 7 CR -1 12/22/14, 08:26
PaginateController.php:113Use $itemsPerPage -
Frank Nägler commented on patch set 7 12/22/14, 08:27
PaginateController.php:113Replyyou are right, will push a new setPaginateController.php:113ReplyAnd you are right too ;) -
Frank Nägler uploaded patch set 8 12/22/14, 08:48
-
Frank Nägler commented on patch set 8 12/22/14, 08:49
I have added a check agains \ArrayAccess which allow the use of SplObjectStorage too and is more generic. -
Stefan Froemken commented on patch set 8 V -1 12/22/14, 09:01
It does not work with ObjectStorage: PHP Warning: array_slice() expects parameter 1 to be array, object given -
Frank Nägler commented on patch set 8 V -1 12/22/14, 09:53
On it again, will add some tests and fix the problem with ObjectStorage
-
Frank Nägler uploaded patch set 9 12/22/14, 11:21
-
Frank Nägler commented on patch set 9 V -1 12/22/14, 11:21
one of the tests not working yet and the other new tests should be checked by an unit test expert. -
Mathias Brodala commented on patch set 9 CR -1 12/22/14, 11:23
PaginateControllerTest.php:178No assertions? -
Frank Nägler uploaded patch set 10 12/22/14, 12:38
-
Frank Nägler commented on patch set 10 12/22/14, 12:39
Tests now running, but someone else should check the tests. -
Frank Nägler uploaded patch set 11 12/22/14, 13:19
-
Anja Leichsenring uploaded patch set 12 01/02/15, 22:39
-
Anja Leichsenring commented on patch set 12 V -1 01/02/15, 22:42
I added some unit tests for the proposed input types of object collections. Please note the test for SplObjectStorage, that is marked as skipped. There is no way to get access of individual items with offsetGet(), like proposed in this change. This will fail, because offsetGet expects an object, not an integer type! I suggest to remove SplObject from the possibilities and stick with ObjectStorage, array and QueryResult. If no one objects or improves, I will do that on sunday evening. -
Anja Leichsenring uploaded patch set 13 01/18/15, 15:21
-
Anja Leichsenring voted on patch set 13 CR +1 V +1 01/18/15, 15:22
-
Anja Leichsenring updated the commit message in patch set 14 01/18/15, 15:22
-
Anja Leichsenring voted on patch set 14 CR +1 V +1 01/18/15, 15:22
-
Oliver Klee commented on patch set 14 CR -1 01/18/15, 15:23
PaginateController.php:87The @throws should move to prepareObjectsSlice.PaginateController.php:172The @throws should go in here. -
Anja Leichsenring commented on patch set 14 01/18/15, 15:45
@Olly: I value your involvement, but would you mind, instead of freely commenting and voting -1, to push updates for the changes you propose? This would in fact be helpful, instead of killing motivation. Sorry when this goes over harsh, but really, finding your votes everywhere does not improve motivation. Thanks anyway, your notices are valid. -
Oliver Klee commented on patch set 14 01/18/15, 15:51
I'll push a new version in a minute. It looks like some people prefer doing the changes themselves (so they don't have to re-create their branch and re-cherry-pick while they're working on it), while others prefer the reviewers to push new version. -
Anja Leichsenring commented on patch set 14 01/18/15, 15:53
thank you. Why don't you join us on Slack? We could work together instead isolated. It's more effective, and fun, too. -
Oliver Klee commented on patch set 14 01/18/15, 15:57
Which channel are you currently on? typo3-cms? -
Oliver Klee uploaded patch set 15 01/18/15, 16:00
-
Oliver Klee commented on patch set 14 01/18/15, 16:00
PaginateController.php:87ReplyDone -
Anja Leichsenring voted on patch set 15 CR +1 V +1 01/18/15, 17:08
-
Christian Kuhn voted on patch set 15 CR +1 V +1 01/18/15, 21:28
-
Christian Kuhn voted on patch set 15 CR +2 V +2 01/18/15, 21:28
-
Christian Kuhn merged patch set 15 01/18/15, 21:29
-
Stefan Neufeind commented on patch set 16 04/27/15, 07:28
For those interested: Backported this to 6.2 locally and works fine. -
Nicole Hummel commented on patch set 16 01/30/17, 17:56
PaginateController.php:187This enforces non-existing array elements in $modifiedObjects for the last page if endOfRange is higher than available array items. I will push an update