How do I keep reflection cost under control in an attribute-based mapping layer in production?
Read attributes once per class into a cached mapping plan rather than per request, and compile to generated PHP only if the profile still shows reflection.