stephpy / timeline-bundle

Symfony2 bundle to make timeline
192 stars 57 forks source link

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

Closed Zeichen32 closed 11 years ago

Zeichen32 commented 11 years ago

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?

stephpy commented 11 years ago

Hi,

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

stephpy commented 11 years ago

I did a fix on timeline library: https://github.com/stephpy/timeline/commit/0f957794271c011e448d36262cbfcab6aad71889

Can you confirm it fix your problem please ?

Zeichen32 commented 11 years ago

Problem fixed. Big thanx!!!

stephpy commented 11 years ago

You're welcome ;)