Page MenuHomePhabricator

Mark `ParseError` as a PHP7 builtin class
ClosedPublic

Authored by epriestley on Nov 30 2017, 7:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 16, 1:27 AM
Unknown Object (File)
Jan 28 2024, 7:13 PM
Unknown Object (File)
Jan 11 2024, 12:15 PM
Unknown Object (File)
Jan 5 2024, 1:39 PM
Unknown Object (File)
Jan 3 2024, 1:19 PM
Unknown Object (File)
Jan 2 2024, 5:23 AM
Unknown Object (File)
Dec 27 2023, 12:32 PM
Unknown Object (File)
Dec 27 2023, 12:32 PM
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