Page MenuHomePhabricator

Read extension classes and functions from `php_compat_info.json`.
ClosedPublic

Authored by joshuaspence on Jun 22 2014, 5:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 10:56 PM
Unknown Object (File)
Fri, Nov 22, 8:51 AM
Unknown Object (File)
Fri, Nov 22, 2:34 AM
Unknown Object (File)
Thu, Nov 21, 11:59 PM
Unknown Object (File)
Sun, Nov 17, 9:26 PM
Unknown Object (File)
Wed, Nov 13, 10:06 PM
Unknown Object (File)
Sun, Nov 10, 9:07 AM
Unknown Object (File)
Fri, Nov 8, 8:34 PM
Subscribers

Details

Summary

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.

Test Plan

Deleted the src/.phutil_module_cache file (in each of rARC, rPHU and rP) and ran arc liberate.

Diff Detail

Repository
rARC Arcanist
Branch
symbols
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1301
Build 1301: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

joshuaspence retitled this revision from to Read extension classes and functions from `php_compat_info.json`..
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
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?

joshuaspence edited edge metadata.
  • Fix a typo
  • Prefer single quotes

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.

What issue did you run into using that stuff?

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.

joshuaspence edited edge metadata.
  • Interfaces too

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... 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.

epriestley edited edge metadata.

Aaah, right.

This revision is now accepted and ready to land.Jun 22 2014, 6:21 PM
joshuaspence edited edge metadata.