Update php_compat_info.json using PHP CompatInfo version 4.1. In particular, this adds compatibility information for class methods (even though we don't currently use this information).
Details
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Commits
- rPHU0292c5fb6b04: Update PHP compatibility information
Eyeballed the changes, seems legit.
Diff Detail
Diff Detail
- Repository
- rPHU libphutil
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Interestingly, this didn't quite work as is... I got the following error:
> ./scripts/update_compat_info.php Purpose: Updates resources/php_compat_info.json used by ArcanistXHPASTLinter. [2015-05-16 06:59:48] EXCEPTION: (PhutilMissingSymbolException) Failed to load class or interface 'PhpParser\Autoloader': the class or interface 'PhpParser\Autoloader' is not defined in the library map for any loaded phutil library. If this symbol was recently added or moved, your library map may be out of date. You can rebuild the map by running 'arc liberate'. For more information, see: http://www.phabricator.com/docs/phabricator/article/libphutil_Libraries_User_Guide.html at [<phutil>/src/__phutil_library_init__.php:25] phutil(head=master, ref.master=d438925d1ea8) #0 __phutil_autoload(string) #1 spl_autoload_call(string) #2 class_exists(string) called at [/home/joshua/.composer/vendor/nikic/php-parser/lib/bootstrap.php:3] #3 require(string) called at [/home/joshua/.composer/vendor/composer/autoload_real.php:54] #4 composerRequirea2ca6fc4d12292fdcc121ff1c8af3a7c(string) called at [/home/joshua/.composer/vendor/composer/autoload_real.php:45] #5 ComposerAutoloaderInita2ca6fc4d12292fdcc121ff1c8af3a7c::getLoader() called at [/home/joshua/.composer/vendor/autoload.php:7] #6 require_once(string) called at [<phutil>/scripts/update_compat_info.php:18]
Apply the following diff seemed to fix it:
diff --git i/scripts/update_compat_info.php w/scripts/update_compat_info.php index 4aa11f9..6a997be 100755 --- i/scripts/update_compat_info.php +++ w/scripts/update_compat_info.php @@ -1,6 +1,12 @@ #!/usr/bin/env php <?php +// PHP CompatInfo is installed via Composer. +// +// You should symlink the Composer vendor directory to +// libphutil/externals/includes/vendor`. +require_once __DIR__.'/../externals/includes/vendor/autoload.php'; + require_once dirname(__FILE__).'/__init_script__.php'; $target = 'resources/php_compat_info.json'; @@ -11,12 +17,6 @@ echo phutil_console_format( $target, 'ArcanistXHPASTLinter')); -// PHP CompatInfo is installed via Composer. -// -// You should symlink the Composer vendor directory to -// libphutil/externals/includes/vendor`. -require_once 'vendor/autoload.php'; - $output = array(); $output['@'.'generated'] = true;