Page MenuHomePhabricator

Improve PHP7 handling of include-time parser-like fatals like "class must implement all abstract methods"
ClosedPublic

Authored by epriestley on Feb 6 2018, 1:00 PM.
Tags
None
Referenced Files
F18805842: D19001.id45576.diff
Sat, Oct 18, 4:45 PM
F18763242: D19001.id.diff
Mon, Oct 6, 11:25 PM
F18762991: D19001.id.diff
Mon, Oct 6, 10:02 PM
F18755589: D19001.diff
Sun, Oct 5, 6:23 AM
F18658249: D19001.diff
Sep 23 2025, 5:29 AM
F18658178: D19001.diff
Sep 23 2025, 5:12 AM
F18658152: D19001.diff
Sep 23 2025, 5:05 AM
F18653009: D19001.id.diff
Sep 21 2025, 10:33 AM
Subscribers
None

Details

Summary

Ref T12101. Although PHP7 raises parse errors as throwables, it still just instantly fatals for some types of parser-like error.

We currently silence these, so they can cause the process to appear to exit abruptly. Instead, unsilence them.

Test Plan
  • Don't implement all abstract methods.
  • Run arc unit.
  • Before: silent fatal.
  • After: useful error.

Diff Detail

Repository
rPHU libphutil
Branch
php71
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 19359
Build 26172: Run Core Tests
Build 26171: arc lint + arc unit

Event Timeline

amckinley added inline comments.
src/moduleutils/PhutilBootloader.php
234

"immediately"

This revision is now accepted and ready to land.Feb 6 2018, 7:28 PM

I figured out how to make a computer do this for me, so hopefully I'll have fewer spelling errors in comments going forward:

Screen Shot 2018-02-06 at 11.47.45 AM.png (1×960 px, 64 KB)

  • Use more conventional spelling.
This revision was automatically updated to reflect the committed changes.