Page MenuHomePhabricator

Unable to execute arc unit --everything on PHP7
Closed, DuplicatePublic

Description

Requirements: PHP7 CLI

run arc unit --everything

Result:

libphutil herpa-derpa$ arc unit --everything
PHP Fatal error:  Uncaught TypeError: Argument 1 passed to PhutilErrorHandler::handleException() must be an instance of Exception, instance of ParseError given in /herp/arc/libphutil/src/error/PhutilErrorHandler.php:247
Stack trace:
#0 [internal function]: PhutilErrorHandler::handleException(Object(ParseError))
#1 {main}
  thrown in /herp/arc/libphutil/src/error/PhutilErrorHandler.php on line 247

Fatal error: Uncaught TypeError: Argument 1 passed to PhutilErrorHandler::handleException() must be an instance of Exception, instance of ParseError given in /herp/arc/libphutil/src/error/PhutilErrorHandler.php:247
Stack trace:
#0 [internal function]: PhutilErrorHandler::handleException(Object(ParseError))
#1 {main}
  thrown in /herp/arc/libphutil/src/error/PhutilErrorHandler.php on line 247

Possible solution is to have it use the \Throwable typehint instead, the problem, is that Throwable only exists in PHP7+, so this would break PHP5... ideas?