cweagans / theforce

(DEPRECATED) An autocomplete library for PHP
18 stars 3 forks source link

Adding built-in symbol list #1

Open kostajh opened 9 years ago

kostajh commented 9 years ago

PHP ships with a ton of built-in symbols that this library doesn't currently know about. In the final 1.0.0 release, I'd like to ship with a couple of files that have function stubs and detailed docblocks for every built in PHP function and class (and their methods/properties). It shouldn't be too difficult to extract this information from the PHP docs. When that PHP file is generated, it should be as simple as always including it in the symbol table.

Could we make use of http://doc.php.net/downloads/json/php_manual_en.json ?

If you can provide some direction of how to incorporate this, I could try to work on this.

cweagans commented 9 years ago

Oh, that's really cool! I was going to try to parse this data out of the gigantic HTML file.

So here's what I was thinking on this front:

That should be all there is to it!

cweagans commented 9 years ago

I started some work on this in the add-php-symbols branch. Right now, it does most of the above things.

However, we're completely missing any classes that are built into PHP, as well as the child properties and methods. We're also missing any built-in PHP constants and arrays ($_SERVER and the like).

cweagans commented 9 years ago

Also, the docblocks in the generated files aren't that great (not full PHPdoc blocks).