Consolidate php_extension_classes.txt and php_extension_functions.txt with php_compat_info.json. Given that php_extension_classes.txt and php_extension_functions.txt are manually generated whereas php_compat_info.json is generated automatically, this should make maintenance easier.
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Commits
- rARC2f3e5e48ef79: Read extension classes and functions from `php_compat_info.json`.
Diff Detail
- Repository
- rARC Arcanist
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
scripts/phutil_symbols.php | ||
---|---|---|
515–518 | For some reason, I couldn't use Filesystem or phutil_json_decode here? |
scripts/phutil_symbols.php | ||
---|---|---|
515–520 | Do we need interfaces here? |
What issue did you run into using that stuff?
scripts/phutil_symbols.php | ||
---|---|---|
515–520 | Yes, if there are now extension interfaces -- I think when this was written there never were any. It probably should have been generalized anyway, but it would have been a little silly to check in an empty file just for future-proofing. |
I didn't specifically run into any issues with phutil_symbols.php... it just seems nicer to use the existing PHP_CompatInfo data rather than a hand-crafted text file.
Oh, sorry -- I meant this, specifically:
For some reason, I couldn't use Filesystem or phutil_json_decode here?
That is, what issue did you hit doing that? The file uses other libphutil symbols, so it's not immediately obvious to me what the issue was. (That's not related to the hand-crafted files, right? Or am I misunderstanding?)
For testing, I think you can also remove src/.phutil_module_cache from all the libraries and re-liberate them. That won't completely test this stuff, but will at least give you confidence that your modifications can rebuild everything from scratch under at least one configuration -- i.e., your changes didn't completely torpedo everything.
Oh right... I get this:
./scripts/phutil_symbols.php PHP Fatal error: Call to undefined function phutil_json_decode() in /home/joshua/workspace/github.com/phacility/arcanist/scripts/phutil_symbols.php on line 515
Oh right... phutil_symbols_get_builtins() is executed at the very start of the script, before libphutil is loaded.