endclothing / prometheus_client_php

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

[Idea] Use Collections instead of default arrays #5

Closed NoelDavies closed 4 years ago

NoelDavies commented 5 years ago

I know that it requires another dependency, but what is people's thoughts on using Collections over vanilla arrays for a lot of what's being used currently.

I personally think it would make things a lot cleaner and easier to read, use and understand.

bvisness commented 5 years ago

If you're referring to https://www.php.net/manual/en/class.ds-collection.php, then that would require everybody to install the ds extension, which would definitely be a breaking change. It would be wiser to stick with vanilla arrays so more people can actually use this library.

NoelDavies commented 5 years ago

I was referring to the tightenco/collection library - https://github.com/tightenco/collect