-
Notifications
You must be signed in to change notification settings - Fork 119
Add completions for PHP functions with descriptions, return types and and params #158
base: master
Are you sure you want to change the base?
Conversation
paramters. This significantly improves the UX for PHP projects by adding autocompletion configs for PHP function return values, paramter names, descriptions and "sinse version" to the description. The list of functions is generated from the JetBrains PHP-Stubds repo (https://github.com/JetBrains/phpstorm-stubs)
I also added PHP constants and class names. |
Good job @joehoyle, but can we somehow automate this in a way that anyone can update these programmatically in the future? Similar to https://github.com/atom/language-less/blob/master/update.coffee |
@Ingramz sure, I have a script to do this in PHP which builds the whole |
@Ingramz ok I added the |
@Ingramz any update here? |
@joehoyle very cool! Only pitfall that I am seeing here is that JSON file is re-generated and not simply modified. By all means this is better than no script. Edit: the reason for that is that people might try to modify the JSON directly, which can be easily overwritten by the script. Also I have no clue if using JSON instead of CSON is desired, but I understand that's because of PHP limitations. I also thought of rewriting the scripts to pure javascript, which seems to be possible (perhaps using this and this). This is not required, just something that might be easier to maintain for javascript-oriented community. In addition to that, some languages have an |
I'm for all manual changes getting wiped out so that the script is deterministic. |
I still think it would be better to solve it like this https://github.com/atom/language-less/blob/master/update.coffee#L31-L35 |
Ok, happy to do that! |
However, re:
I feel like this is a somewhat important point and probably shouldn't continue this effort until this is decided. |
I'm not too sure whether this should belong here or if we're trying to move all autocompletions into dedicated autocomplete packages. /cc @joefitzgerald |
IT BELONGS HERE!! These are core php functions. not support of a library or a framework. |
This significantly improves the UX for PHP projects by adding
autocompletion configs for PHP function return values, parameter names,
descriptions and "since version" to the description.
The list of functions is generated from the JetBrains PHP-Stubs repo
(https://github.com/JetBrains/phpstorm-stubs)
This looks like this: