Skip to content

add @Event annotation and description for KernelEvents::FINISH_REQUES… #18684

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

Closed
wants to merge 1 commit into from

Conversation

Haehnchen
Copy link
Contributor

@Haehnchen Haehnchen commented May 1, 2016

Q A
Branch 3.0
Bug fix no
New feature no
BC breaks no
Deprecations no
Tests pass yes
Fixed tickets
License MIT
Doc PR
#12299 added "@event" annotations for events. They are now used by PhpStorm Plugin. This adds some missing docs

External issue:
Haehnchen/idea-php-symfony2-plugin#493

@xabbuh
Copy link
Member

xabbuh commented May 2, 2016

@Haehnchen Shouldn't these new annotation also include the event class name like you did in #18685?

@Haehnchen
Copy link
Contributor Author

this commit adds just the missing docs, whereas #18685 includes structural changes which needs some more decisions. if #18685 is ok then better include this changes there and have just one commit.

@stof
Copy link
Member

stof commented May 2, 2016

Actually, AuthenticationEvents should be fixed in 2.3 and KernelEvents::FINISH_REQUEST in 2.7.
Could you send 2 PRs instead of 1, so that we can apply them in different targets ?

@Haehnchen
Copy link
Contributor Author

@stof done

@fabpot fabpot closed this May 3, 2016
fabpot added a commit that referenced this pull request May 3, 2016
This PR was merged into the 3.1-dev branch.

Discussion
----------

add @event annotation for AuthenticationEvents

| Q             | A
| ------------- | ---
| Branch       | 2.3
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #18684
| License       | MIT

split of #18684 for targeting 2.3 branch

Commits
-------

e2c1270 add @event annotation for AuthenticationEvents
fabpot added a commit that referenced this pull request May 3, 2016
This PR was merged into the 2.7 branch.

Discussion
----------

add @event annotation for KernelEvents

| Q             | A
| ------------- | ---
| Branch       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #18684
| License       | MIT

split of #18684 for targeting 2.7 branch

Commits
-------

a52e51a add @event annotation for KernelEvents
fabpot added a commit that referenced this pull request May 3, 2016
…notations defau… (Haehnchen)

This PR was submitted for the 3.0 branch but it was merged into the 3.1-dev branch instead (closes #18685).

Discussion
----------

move event listener method type hint docs to @event annotations defau…

| Q             | A
| ------------- | ---
| Branch?       | 3.0
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

I moved all `listener method receives a "*"` from php docs to "@event". makes them parsable by PhpStorm Plugin without extract class names out of comments. This helps to prefill type hints on method creation. There is also a fallback for doccomments, but it would be much easier to provide a common structure eg for external libs.

see also #18684, which adds some missing "@Events"

External issue:
Haehnchen/idea-php-symfony2-plugin#493

![phpstorm-events-method](https://cloud.githubusercontent.com/assets/1011712/14941660/e214f546-0fa3-11e6-8d2e-fa6fc7a6f201.png)

Commits
-------

f2c0446 move event listener method type hint docs to @event annotations default value. makes it easily parsable by PhpStorm plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants