* Altering the AnnotationManager to delegate "parsing" tasks. This is
done by triggering an event; first listener to return an object
(representing an annotation) wins and stops the loop.
* Moving the original annotation registration and creation into a new
"GenericAnnotationParser" implementation. This acts as a listener on
the AnnotationManager now, and works as it did previously when the
functionality was inside the AM.
* Creating a new DoctrineAnnotationParser. This class consumes the
DocParser from the Doctrine Annotations library, and acts as a
listener on the AM. Unlike how the DocParser normally works, the
class expects you to register annotation classes you support, and
then passes the annotation string _only_ (not the full docblock) to
the DocParser instance.
If you've already started using form annotations, you may need to update
them to follow Doctrine-style syntax. The PR shows what changes I needed
to do to the various test assets to make the tests pass -- note,
however, that I did not need to do anything further to the tests, as the
primary public API has not changed!
I've unit tested the functionality from the ZF2 side, and also tried
with Doctrine. For Doctrine, you need to tell its AnnotationRegistry
where to find the ZF2 library: