Page MenuHomePhabricator

Update PHP compatibility information
ClosedPublic

Authored by joshuaspence on May 16 2015, 6:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 30, 5:13 AM
Unknown Object (File)
Mon, Nov 25, 1:07 AM
Unknown Object (File)
Wed, Nov 20, 5:27 PM
Unknown Object (File)
Mon, Nov 18, 5:06 AM
Unknown Object (File)
Mon, Nov 18, 5:06 AM
Unknown Object (File)
Mon, Nov 18, 5:06 AM
Unknown Object (File)
Mon, Nov 18, 4:46 AM
Unknown Object (File)
Sat, Nov 16, 10:04 PM
Subscribers

Details

Summary

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

Test Plan

Eyeballed the changes, seems legit.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

joshuaspence retitled this revision from to Update PHP compatibility information.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.

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;
epriestley edited edge metadata.

No clue on the composer/vendor stuff.

This revision is now accepted and ready to land.May 17 2015, 2:51 PM
This revision was automatically updated to reflect the committed changes.