Closed cbeyer closed 6 years ago
No. Here is my config.yml :
spy_timeline:
drivers:
redis:
client: snc_redis.default
prefix: astro
snc_redis:
clients:
default:
type: predis
alias: default
dsn: redis://localhost
I think you are missing the filter part for the configuration.
this is how i configured mine for mongodb.
spy_timeline:
drivers:
odm:
object_manager: doctrine.odm.mongodb.document_manager
classes:
timeline: AppBundle\Document\Timeline\Timeline
action: AppBundle\Document\Timeline\Action
component: AppBundle\Document\Timeline\Component
action_component: AppBundle\Document\Timeline\ActionComponent
notifiers:
- spy_timeline.unread_notifications
filters:
duplicate_key:
priority: 10
data_hydrator:
priority: 20
filter_unresolved: false
locators:
- spy_timeline.filter.data_hydrator.locator.doctrine_odm
Hum... I did not understand something
In your example $subject = $actionManager->findOrCreateComponent('a\model', array(1, 2));
, a\model (1,2)
is the "key" for the Redis entry ?
Does this key need to be mapped with an Doctrine Entity with the hydrator ?
Can you try to add
filters:
data_hydrator:
filter_unresolved: false
to your config ? Just to be sure it's not due to the data_hydrator resolver ?
I add filter_unresolved: false
in my config.yml but the result is the same.
PS: the bundle on a other project, with Symfony2.7, works fine.
I have made some tests with a fresh Symfony install : Symfony 2.8.28 (Redis works fine on this version on a personal project). For the same PHP example code mentioned above :
Works fine :
"stephpy/timeline-bundle": "2.4.*",
"snc/redis-bundle": "1.1.8",
"predis/predis": "0.8.*"
Not working :
"stephpy/timeline-bundle": "2.4.*",
"snc/redis-bundle": "1.1.9",
"predis/predis": "~1.0"
Not working :
"stephpy/timeline-bundle": "2.4.*",
"snc/redis-bundle": "2.*",
"predis/predis": "1.0.*"
Ok, sorry for delay,
It seems predis or snc/redis-bundle (I think it's predis) which break something we use with its major changes.
I'm back... I first need to upgrade my project to Symfony 3.1
Now I use :
The PHP code above is the same but getTimeline returns always nothing :(
I tried the following code, using Redis without the stephpy/timeline-bundle :
$redis = $this->container->get('snc_redis.default');
$val = $redis->incr('foo:bar');
var_dump($val);
The dumped variable is good incremented.
So is it a bug in this stephpy/timeline-bundle ?
No help ? :(
I'll try to reproduce the bug this week. Sorry for delay.
OK thanks. My latest attempt was with Symfony 3.2
I found the issue ... it's about predis and pipelines ... predis does not follow the phpredis syntax for pipeline, so I had to make this dirty code ... and they changed the pipeline object.
Sorry for delay, I just commited a fix here: https://github.com/stephpy/timeline/releases/tag/v1.1.1
Hi @stephpy , thanks for the fix (in stephpy/timeline) but what about this stephpy/timeline-bundle ? How to get the fix for my composer.json ?
You just have to update stephpy/timeline, timeline-bundle has not to be changed.
I added "stephpy/timeline": "v1.1.1",
in my composer.json and it works. Alleluia ;) Thanks !
Hi,
I've just tested this bundle with this configuration:
The dump command returns "[]" :(
In the devtoolbar, panel Redis, there are 5 items :
What is wrong ?