HomePhabricator

Mark `ParseError` as a PHP7 builtin class

Description

Mark ParseError as a PHP7 builtin class

Summary:
Ref T12855. In D18797, I introduced a catch (ParseError ...) to deal with a PHP7 special case. However, this class won't exist in earlier versions of PHP like PHP5.

@lpriestley reports hitting an error with this under PHP5 ("unknown class/interface ParseError") from the linter while running arc diff, which is expected since I didn't add it to the secret list of special PHP7 magic.

Add it to the PHP7 magic.

(It's fine that we catch something which may not exist in PHP5, since Throwable does not exist in PHP5 and the catch (Exception ...) above will catch everything which can be caught in PHP5.)

Test Plan: Will make @lpriestley try again.

Reviewers: amckinley, lpriestley

Reviewed By: amckinley

Subscribers: lpriestley

Maniphest Tasks: T12855

Differential Revision: https://secure.phabricator.com/D18809