stephpy/timeline-bundle

Incorect internal Pager reference

Closed this issue · 3 comments

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

Hi,

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

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.

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