-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Add machine readable events #12299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add machine readable events #12299
Conversation
I'm not really a fan of useless annotations. What about just creating a command that parses all classes that have the "Events" suffix? This would also make it easier to parse 3rd party packages and list optional events if they follow the same system. |
@iltar the idea here is to give a hint to phpdoc generators. And a command parsing classes ending with Events would have to parse all files in the project to find them, which would be quite inefficient. |
@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. |
@iltar 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. |
Can someone explain me what bits here are wrong? There is a contribution header up there, changing documentation should also not let travis fail completly! Any idea? |
@dawehner fabpot is only run when a new commit is pushed. It doesn't detect message changes in the PR description. I assume you didn't have the table when creating this PR? |
974237e
to
7372a93
Compare
Okay ... rebased so updated. @wouterj Did you maybe forgot to write down your full sentence. |
@dawehner the thing is, I really don't see why you would want to list all events known from only symfony. They are already documented on the website.. What I _do_find interesting, is being able to list all events available from all my vendors. |
@iltar |
@dawehner That's why I think an |
Looks like something that does not hurt us, so I'm 👍 |
|
I would love to be able to use @group but I haven't found any information about that specific tag on phpdoc. Drupal uses it pretty mmuch everywhere already |
So, what about a |
I would be totally fine with that as well |
@dawehner Can you make the change? I think we need to use |
7372a93
to
54443ab
Compare
Sure, just was slacking around |
Thank you @dawehner. |
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12299). Discussion ---------- Add machine readable events As discussed in [#11878] it would be great to have some simple machine readable way to find events | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #11878 | License | MIT Commits ------- ace9a22 Add machine readable events
This PR was submitted for the master branch but it was merged into the 3.1 branch instead (closes #20156). Discussion ---------- Fix event annotation for arguments resolving event | Q | A | ------------- | --- | Branch? | 3.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #12299 | License | MIT | Doc PR | - Commits ------- 384d0ee Fix event annotation for arguments resolving event
As discussed in [#11878] it would be great to have some simple machine readable way to find events