Open MyIgel opened 4 years ago
Another error that ocured is that, when using docker, the port parameter is set as a string but Redis::connect()
requires an int
here (a simple type cast before the env(...)
or better in the connect(...)
call should fix that).
Redis::connect() expects parameter 2 to be int, string given in /vendor/endclothing/prometheus_client_php/src/Prometheus/Storage/Redis.php:132
The first issue has to be fixed by casting it to a string to be phpredis < 5 compatible, see https://github.com/phpredis/phpredis/issues/1538
I am experiencing the same error on PHP 7.3.10 and 7.3.13 (With php-pecl-redis4 from the remi repository on CentOS 7). Downgraded the package back to 0.9.1 while waiting for a fix.
I can now confirm that replacing php-pecl-redis
(which is an alias for php-pecl-redis4
) with php-pecl-redis5
on CentOS 7 will resolve the issue.
I also noticed, while upgrading this library, that the version key is gone from composer.json as of 1.0.2, which is probably why that version is not on Packagist (where the latest available is 1.0.1).
I can now confirm that replacing
php-pecl-redis
(which is an alias forphp-pecl-redis4
) withphp-pecl-redis5
on CentOS 7 will resolve the issue.I also noticed, while upgrading this library, that the version key is gone from composer.json as of 1.0.2, which is probably why that version is not on Packagist (where the latest available is 1.0.1).
I've just noticed it was changed during CI builds, not sure why.. 63966cdd9402a08a22e184038420b358b14e1dbe #20
I completely missed that, would be good to have others reviewing these PRs too :P haha
@NoelDavies do you intend to keep distributing these Dockerfiles with the project? I had similar problem as the guys there, and I can tidy a little the setup and make a PR if you plan to keep those dev containers. I personally would just remove from this project and maybe create another as helper to test this one, or even just make available the Docker images and the pure docker command to execute the tests while contributing.
Sorry @fernandesGabriel - I no longer work at EndClothing.
Running
leads to a TypeError error in
PHP 7.3.10
:Using a alpine:latest container with the
php7 php7-redis
packages (PHP 7.3.10 (cli) (built: Oct 3 2019 11:21:47) ( NTS )
)To me that looks more like it could be a bug in the redis package but sadly i have no deep enough knowledge to investigate that further.It got fixed in phpredis >=5 but that makes this plugin incompatible to phpredis 4 which is currently distributed.