There are plenty of classes which will or do require some sort of configuration like forms or ORM entities. I'm struggling with this issue for some time now without a satisfactional solution.
Today most frameworks are using some kind of meta information to configure those objects. For example Joomla uses XML for form configuration and Doctrine uses Annotations, XML or YAML for entities (besides an outdated way of using PHP classes).
But all those kinds of meta configuration never seems right to me, be it for performance or testing reasons. The Flow framework does made a good job by "caching" real PHP classes which are generated by base classes and configurations, but that negates many benefits from a non compiled language like PHP.
Since this topic will recurring every now and then i thought it might be a good idea to share thoughts about that. Any preferences ?