stephpy/timeline-bundle

Cannot use object of type Spy\Timeline\ResultBuilder\Pager\KnpPager as array

Closed this issue · 4 comments

If i enable the "DuplicateKey" Filter, i got the following error:

FatalErrorException: Error: Cannot use object of type
 Spy\Timeline\ResultBuilder\Pager\KnpPager as array in
\vendor\stephpy\timeline\src\Spy\Timeline\Filter\DuplicateKey.php line 46

My current configuration looks like this:

knp_paginator: ~

spy_timeline:
    paginator: spy_timeline.paginator.knp
    drivers:
        odm:
            object_manager: doctrine.odm.mongodb.document_manager
            classes:
                timeline:  MyBundle\TimelineBundle\Document\Timeline
                action:    MyBundle\TimelineBundle\Document\Action
                component: MyBundle\TimelineBundle\Document\Component
                action_component: MyBundle\TimelineBundle\Document\ActionComponent
    filters:
        duplicate_key:
            priority: 10

        data_hydrator:
            priority:             20
            service:              spy_timeline.filter.data_hydrator
            filter_unresolved:    true
            locators:
                - spy_timeline.filter.data_hydrator.locator.doctrine_orm
                - spy_timeline.filter.data_hydrator.locator.doctrine_odm

Is this a bug or has somebody the same problems with the "DuplicateKey" filter?

Hi,

This is a bug, i'm gonna fix it, thank you for reveal it.

I did a fix on timeline library: stephpy/timeline@0f95779

Can you confirm it fix your problem please ?

Problem fixed. Big thanx!!!

You're welcome ;)