Page MenuHomePhabricator

php_compat_info.json missing ZipArchive class
Closed, ResolvedPublic

Description

From D10078 Diff 1:

(PHL1) Unknown Symbol at line 54
Use of unknown class 'ZipArchive'. Common causes are:

- Your libphutil/ is out of date.
This is the most common cause.
Update this copy of libphutil: /Users/btrahan/Dropbox/code/libphutil

- Some other library is out of date.
Update the library this symbol appears in.

- This symbol is misspelled.
Spell the symbol name correctly.
Symbol name spelling is case-sensitive.

- This symbol was added recently.
Run `arc liberate` on the library it was added to.

- This symbol is external. Use `@phutil-external-symbol`.
Use `grep` to find usage examples of this directive.

*** ALTHOUGH USUALLY EASY TO FIX, THIS IS A SERIOUS ERROR.
*** THIS ERROR IS YOUR FAULT. YOU MUST RESOLVE IT.

This class isn't mentioned in php_compat_info.json.

Event Timeline

epriestley raised the priority of this task from to Normal.
epriestley updated the task description. (Show Details)
epriestley added a project: libphutil.

I tried to fix this, but seem to be stuck on the installation instructions for composer, etc from D9568. (When I do a composer global require "bartlett-php-compatinfo" it seems to hang, and I had to do a few bojank things along the way to even get that far.)

Looking at the code, the Zip stuff seems to be included correctly, so the file just needs to be re-generated? Not sure how come its not in there already though as the code looks correct for this since D9662 (the Zip extension was added here.)

Maybe as a by-product of this we can make it easier to run this thing?

Here's what I did that didn't work:

  • Tried to install with PEAR, no luck. Got kicked to a different channel and then that failed to install.
  • Tried to adjust the script to use the .phar, which is the easiest thing to download, but no luck. I couldn't find a way to include it as a library.

This eventually did:

  • Cloned the thing off GitHub, then installed Composer, then ran composer install in php-compat-info/. This cloned 350 GB of dependencies.
  • Adjusted the script to include php-compat-info/vendor/autoload.php, which composer install generated.
  • Ran the script successfully.

I couldn't come up with a real way to make that process much easier / more automatic.

Wow, that was not easy indeed. :/

Hmm. I'm pretty sure I just did this (the installation) all through composer...

epriestley claimed this task.