Jimdo / prometheus_client_php

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

Add APCu Adapter #60

Closed rdohms closed 6 years ago

rdohms commented 6 years ago

First of all, apologies to @JWZH for not being able to incorporate his changes in this PR.

Added a new APCu adapter, which is less complex then having one that does both, or adding a polyfill that is not required. I also made test suite a bit more resilient to missing extensions, so instead of crashing it skips tests related to those adapters.

bracki commented 6 years ago

I just figured out that APC also has a backwards compatible mode that I always was using in production. See here for details. It appears that if you use Debian/Ubuntu and apt-get install php-apcu you'll also get php-apcu-bc which is a backwards compatible API. So basically they provide you with the apc_* functions. I just have to figure out how to get this running on Travis.

lcobucci commented 6 years ago

@bracki it's not 100% compatible, we found some issues while changing some stuff on @doctrine repositories. Since PHP 5.6.x active support is about to die I'd recommend you to start suggesting to the users of this lib to migrate to APCu and just let APC die too =)

bracki commented 6 years ago

Finally got to merge #62. Closing here.