sampart / BreadcrumbsBundle

A small breadcrumbs bundle for Symfony
Other
188 stars 68 forks source link

Add metadata to help PhpStorm Symfony plugin with autocompletion #101

Closed mhujer closed 5 years ago

mhujer commented 5 years ago

When you are using the Symfony plugin in PhpStorm, it can also autocomplete routes, translation keys and other things. To be able to do so, it needs the parameters to be annotated with Hash Tags.

You can read the documentation on https://symfony2-plugin.espend.de/extension/method_parameter.html#hash-tags

sampart commented 5 years ago

Thanks for contributing, @mhujer, and sorry for the delay in responding. I'd like to better understand the benefits that this provides but the documentation linked to is pretty terse. Please could you provide me with some examples of what this makes possible?

E.g. "With this change, when you do xyz in PHPStorm then zyx happens".

Please include screenshots if possible. Thanks

mhujer commented 5 years ago

@sampart You can read more about it in my blogpost.

And here is a screenshot, how letting the Symfony plugin know that the parameter is a route, allows it to provide clever autocomplete (it works similarly for translation keys): image

sampart commented 5 years ago

That's really nice! Thanks for the screenshot, @mhujer. Would you like a release creating for this?

mhujer commented 5 years ago

No, thanks, I don't need a release for this - it can wait when there are more unreleased changes.