-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Build custom Redis client based on the installed extension #509
Conversation
phansys
commented
Mar 16, 2019
•
edited
Loading
edited
Q | A |
---|---|
Branch | master |
Bug fix? | no |
New feature? | yes |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #399 |
License | MIT |
Doc PR | n/a |
3bcd5c3
to
9ebf39d
Compare
248950d
to
0a70ce1
Compare
I'm trying to use the reflection API in order to introspect the |
Could be an issue similar to phpredis/phpredis#1374 |
See #442 if you want more details ;-) |
before_script: mkdir Snc && ln -s ../ Snc/RedisBundle | ||
before_script: | ||
- mkdir Snc && ln -s ../ Snc/RedisBundle | ||
- php clientbuilder/build_redis_client.php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure why it is necessary to have that in the CI.
IMHO, the class should be generated at cache warmup then dump into var/cache/snc-redis-bundle and then loaded thanks to a custom autoloader. It's basically what doctrine-bundle is doing for entities.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that could work only when using DI, but be aware that PhpredisClientFactory
doesn't depend on the container.
Also, in my first approach I was thinking to check the generated file in each build in order to detect any change based on the installed Redis version, but I think it doesn't have sense now that the installed versions are set explicitly at Travis config.
Thank you for pointing me in the right direction. I've opened phpredis/phpredis#1526 for the described problem. |
@phansys Given what was said in the issue, I think we could only support phpredis4 for this feature and have a fallback compatible with phpredis3 only. That's quite easy to do since v3 will not change anymore. |
Sure. I'll try to work on the proposed fix today. Thank you. |
698f559
to
f7df8c7
Compare
Methods like |
By the other hand, Redis
Should we ship a client by minor version? |
For phpredis4 we could only generate the client class on cache warmup so that it would always fit with the installed phpredis version. We would have static client class only for older phpredis version, (e.g.) v2 and v3.
For v3, the bundle only accepts PHP 7 so let's say we add this feature for V3 only. What do you think? |
I think your proposal is doable. Regarding the release of |
Yes |
Should we close this PR ? |
Yes, closing since this fix will not be accepted as is for |