Page MenuHomePhabricator

Mark `ParseError` as a PHP7 builtin class
ClosedPublic

Authored by epriestley on Nov 30 2017, 7:28 PM.
Tags
None
Referenced Files
F19826432: D18809.diff
Sun, Mar 8, 8:11 PM
F19798731: D18809.id.diff
Feb 27 2026, 9:58 PM
F19517219: D18809.id.diff
Jan 15 2026, 8:49 AM
F19515966: D18809.diff
Jan 14 2026, 5:55 PM
F18924402: D18809.diff
Nov 9 2025, 5:40 PM
F18866452: D18809.id.diff
Nov 3 2025, 5:13 PM
F18791234: D18809.id45128.diff
Oct 16 2025, 7:26 AM
F18764947: D18809.id.diff
Oct 7 2025, 8:42 AM
Subscribers

Details

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.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable