snc / SncRedisBundle

A Redis bundle for Symfony supporting Predis and PhpRedis
https://github.com/snc/SncRedisBundle
MIT License
1.04k stars 329 forks source link

Incompatibility with Symfony 4.4.0-BETA1 #545

Closed PhilETaylor closed 4 years ago

PhilETaylor commented 4 years ago
Compile Error: Declaration of Snc\RedisBundle\Profiler\Storage\RedisProfilerStorage::find($ip, $url, $limit, $method, $start = NULL, $end = NULL) 

must be compatible with 

Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface::find($ip, $url, $limit, $method, $start = NULL, $end = NULL): array

Symfony 4.4.0-BETA1 and snc/redis-bundle: 3.1.1

PhilETaylor commented 4 years ago

looks like this might be fixed using dev-master ?

PhilETaylor commented 4 years ago

Yup dev-master is working with "just released" Symfony 4.4.0-BETA1 - please can you bump a release so we can peg to that?

B-Galati commented 4 years ago

Fixed in master yes.

3.2.0 will be released in few days.

PhilETaylor commented 4 years ago

Thank you !

hpatoio commented 4 years ago

I've a problem similar to this. I've version 3.2.1 and I get this error

Fatal error: Declaration of Snc\RedisBundle\Profiler\Storage\RedisProfilerStorage::find($ip, $url, $limit, $method, $start = NULL, $end = NULL) must be compatible with Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface::find($ip, $url, $limit, $method, $start = NULL, $end = NULL): array in /var/www/musement.com/current/vendor/snc/redis-bundle/Profiler/Storage/RedisProfilerStorage.php on line 29
[25-Feb-2020 08:28:54 UTC] PHP Fatal error:  Declaration of Snc\RedisBundle\Profiler\Storage\RedisProfilerStorage::find($ip, $url, $limit, $method, $start = NULL, $end = NULL) must be compatible with Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface::find($ip, $url, $limit, $method, $start = NULL, $end = NULL): array in /var/www/musement.com/current/vendor/snc/redis-bundle/Profiler/Storage/RedisProfilerStorage.php on line 29

Looking at 2 method I see that the one in this bundle is

public function find($ip, $url, $limit, $method, $start = null, $end = null)

while the SF one is

public function find($ip, $url, $limit, $method, $start = null, $end = null): array;
B-Galati commented 4 years ago

@hpatoio which version of Symfony are you using?