Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add machine readable events #12299
@stof Having 3rd party bundles adapt to this standard will probably even take longer, where as it might be a lot more common for people to name their their classes
Annotations also have the side effect of being used by parsers and IDEs. With a common name like Category, who knows what breaks. Who knows what custom Annotation readers will break on this? Side effects will most likely be limited, but in my opinion, a (slow but cachable) file scanner should be a better solution and show more possible events.
I think the goal of this is to not only document Symfony events, because they are already documented, but also to gather all events and mark which are being listened to. On systems that have access to "find", this can even be an extremely fast one liner in bash.
The one big reason why having some annotation (you could also say that its just a ordinary phpdoc) is that doc tools out there already understand this. Parsing by classname in each file is way more specific compared to every common features, for example listing documentation by group.