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?

Revisions and Commits

Restricted Differential Revision

Event Timeline

Mnkras updated the task description. (Show Details)
Mnkras added a project: Arcanist.
Mnkras added a subscriber: Mnkras.

Or we could remove the type hint entirely, that may be the easiest and cleanest solution.

Mnkras added a revision: Restricted Differential Revision.Oct 26 2015, 6:12 PM
Mnkras closed this task as Resolved by committing Restricted Diffusion Commit.Oct 26 2015, 6:34 PM
Mnkras added a commit: Restricted Diffusion Commit.