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

Bundle .phpstorm.meta.php files for new expectedArguments completion #1286

Merged
merged 2 commits into from
Mar 14, 2019

Conversation

King2500
Copy link
Contributor

@King2500 King2500 commented Mar 8, 2019

PhpStorm 2019.1 introduces expectedArguments and expectedReturnValues meta definitions to allow for approciate completion of constants and string values.
See official blog post here:
https://blog.jetbrains.com/phpstorm/2019/02/new-phpstorm-meta-php-features/

I went through Symfony framework/components and defined a lot of them here:
https://github.com/King2500/symfony-meta

People can fetch them via Composer now (as require-dev), but I think it would be better to have these bundled into this plugin.
Advantages:

  • No need to require them in every Symfony project
  • No need to have this requirement in composer.json (because it's a PhpStorm-specific thing and developers may not want to have this dependency there, when working with other developers/IDEs)

I added symfony-meta repo as git-submodule so this can be updated easily in the future (git submodule update?).

It will be built in plugin as "Library" folder, so PhpStorm can index/read meta defintions, as described here.

image

Examples
Here are some example screenshots where it comes in:
image

image

image

image

And also simple type mapping for standard Console helpers:

image

@King2500
Copy link
Contributor Author

Ping @cedricziel @Haehnchen
What you think?

@Haehnchen
Copy link
Owner

@King2500 is a good idea, looks we can ship for a release against the new PhpStorm build.

but maybe also open an issue on the symfony project just for discussion. a composer dependency looks a way nice and easier to maintain.

@Haehnchen Haehnchen merged commit d190e3b into Haehnchen:master Mar 14, 2019
@King2500 King2500 deleted the feature/phpstorm-meta branch March 14, 2019 11:00
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

Successfully merging this pull request may close these issues.

2 participants