Page MenuHomePhabricator

Mark `ParseError` as a PHP7 builtin class
ClosedPublic

Authored by epriestley on Nov 30 2017, 7:28 PM.
Tags
None
Referenced Files
F15574087: D18809.id45129.diff
Mon, May 5, 11:34 PM
F15558123: D18809.id45129.diff
Tue, Apr 29, 1:10 AM
F15552995: D18809.id45128.diff
Sun, Apr 27, 11:38 PM
F15536212: D18809.id.diff
Thu, Apr 24, 8:41 AM
F15533162: D18809.diff
Wed, Apr 23, 6:26 PM
F15532907: D18809.diff
Wed, Apr 23, 5:35 PM
F15473751: D18809.id45128.diff
Apr 6 2025, 1:36 AM
F15438699: D18809.id45129.diff
Mar 26 2025, 2:51 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