query-monitor
query-monitor copied to clipboard
Introduce classes for collector data
Collectors currently store their data in an array (the $data property) which is not an efficient use of memory because the arrays get copied each time they're passed between methods.
Let's switch the data to a proper class with a property for each element of data. This gives us increased type safety too with PHPStan analysis, which is a blocker for #483.
Third party extensions can read and write to this data so the data class needs to implement ArrayAccess to avoid breakage.