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)
Thu, Dec 19, 7:55 AM
Unknown Object (File)
Tue, Dec 17, 7:42 AM
Unknown Object (File)
Sun, Dec 15, 3:26 PM
Unknown Object (File)
Sat, Dec 14, 1:05 PM
Unknown Object (File)
Mon, Dec 9, 5:04 PM
Unknown Object (File)
Sat, Dec 7, 2:12 AM
Unknown Object (File)
Fri, Dec 6, 10:02 AM
Unknown Object (File)
Sat, Nov 30, 12:04 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
Branch
parseerror1
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 18901
Build 25486: Run Core Tests
Build 25485: arc lint + arc unit