stephpy / timeline-bundle

Symfony2 bundle to make timeline
192 stars 57 forks source link

Incorect internal Pager reference #182

Closed sadortun closed 7 years ago

sadortun commented 9 years ago

Bonjour Stéphane,

The following code should return both timelnes from Subject A and B, but they return two time the Subject B timeline.

$timelineA = $timelineManager->getTimeline($subjectA );
$timelineB = $timelineManager->getTimeline($subjectB);

When disabling the pagination, the expected timelines are retrived :

$timelineA = $timelineManager->getTimeline($subjectA , array('paginate' => false) );
$timelineB = $timelineManager->getTimeline($subjectB , array('paginate' => false));

I havent dig to deep in the timeline internals, but I think the internal reference to to the paginator / resultBuilder orshould be cloned. https://github.com/stephpy/timeline-bundle/blob/master/Driver/ORM/Pager.php#L55

Thanks, Samuel

stephpy commented 9 years ago

Hi,

Looks ok, did you try to use clone ? Is it work ?

sadortun commented 9 years ago

No, i have not investigated further. I was waiting for your feedback before going too deep. ( I try to avoid messing with the bundle internals of others when i installed it one hour ago :) )

I'll do some testing and get back to you in a few days.

stephpy commented 9 years ago

I guess you're right about clone. Tell me if it fix your issue please. :)