Page MenuHomePhabricator

Add nullable type hint support to xhpast
Needs ReviewPublic

Authored by richardvanvelzen on Apr 28 2017, 8:43 AM.
Tags
None
Referenced Files
F18876801: D17802.id42805.diff
Nov 6 2025, 3:44 AM
F18867428: D17802.id42806.diff
Nov 4 2025, 12:16 AM
F18814441: D17802.id.diff
Oct 20 2025, 11:12 PM
F18810367: D17802.diff
Oct 19 2025, 9:12 PM
F18803333: D17802.id.diff
Oct 17 2025, 10:54 PM
F18739688: D17802.diff
Oct 1 2025, 10:34 PM
F18667928: D17802.id42805.diff
Sep 24 2025, 12:56 PM
F18646101: D17802.diff
Sep 19 2025, 9:27 AM

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Maniphest Tasks
T4334: Support PHP5.4+ syntax in XHPAST
Summary

Ref T4334. This implements a new node type for type hints in general, and uses them to add nullability to a type hint.

Test Plan

Added test cases.

Diff Detail

Repository
rPHU libphutil
Branch
nullable-type-hints
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 16732
Build 22321: arc lint + arc unit

Event Timeline

src/parser/xhpast/__tests__/data/nullable-type-hints.php.test
1

Darn

Remove copy-flag from new unit test (caused by copy-via-IDE)

This does not appear to have any impact on arc/lint.

(This and the other change look good to me, I just want to look at them in more detail and maybe take a stab at fixing the awful unreadable test cases while we're here.)

Sure, no problem. Let me know if there is something I can do to help