endclothing / prometheus_client_php

Prometheus instrumentation library for PHP applications
https://prometheus.io/docs/concepts/metric_types/
Apache License 2.0
150 stars 77 forks source link

Add typecasting for Redis connect function. #48

Open Satariall opened 4 years ago

Satariall commented 4 years ago

Some libraries, frameworks of configs might provide a strings to port and timeout params. Redis extension on PHP 7.4 throw an TypeError on that situation. For preventing this add typecasting (int)$this->options['port'] and (float)$this->options['timeout'] to the connect and pconnect methods.