Skip to content
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

[Event] @Event annotation completion #493

Closed
1 task done
Haehnchen opened this issue Apr 29, 2015 · 0 comments
Closed
1 task done

[Event] @Event annotation completion #493

Haehnchen opened this issue Apr 29, 2015 · 0 comments

Comments

@Haehnchen
Copy link
Owner

Haehnchen commented Apr 29, 2015

@Event annotation was added, which reflects event names as a class const.
symfony/symfony#12299

  • Collector: needs index based on @Event annotation
@Haehnchen Haehnchen changed the title [Event] Event name completion [Event] @Event annotation completion Aug 9, 2015
Haehnchen added a commit that referenced this issue May 1, 2016
fabpot added a commit to symfony/symfony that referenced this issue 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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant