Hi! It would be nice to take "paving the walkways" approach, but last time > we tried, IIRC we've got into something very over-engineered. Maybe if > we try again with more restricted scope (i.e. not trying to put a DSL > for describing arbitrarily complex data structures into it :) it would > be more successful this time. >
PHP7 has a wonderful parser, maybe it's possible to provide a general syntax for annotations with userland hooks for arbitrary data. This approach can give a tool for framework developers to define a node visitor for annotations. Alternative way is to define simple key-value storage and access it via Reflector->getAnnotations(). I want to put my huge +1 vote on annotations support in the core, because Go! AOP uses annotations a lot for defining metadata and markers in the code and provides an engine for advanced programming patterns and method interception. Doctrine is good library, but this can be better on core level.