Page MenuHomePhabricator

`arc liberate` should throw when encountering (and eventually support) namespaces and traits
Open, WishlistPublic


phutil doesn't seem to support traits. It can never find the symbols.

I went to add support myself but tracing through phutil and arcanist and back again is taking forever. get_declared_traits() and ReflectionClass::getTraits() are likely useful for someone implementing

traits have been supported since php 5.4 (and is in the PHP version shipped on latest mac os x)

Event Timeline

LegNeato assigned this task to epriestley.
LegNeato raised the priority of this task from to Needs Triage.
LegNeato updated the task description. (Show Details)
LegNeato added a subscriber: LegNeato.
epriestley triaged this task as Wishlist priority.Apr 3 2014, 1:18 PM

Since we support PHP 5.2.3 and newer in Phabricator itself, we can't use traits, closures, namespaces, generators, or a handful of other features introduced after PHP 5.2.3 in the upstream. Consequently, support for these features is a low priority (third party code could use them if we supported them in the infrastructure, but we can't in the main codebase). You can see these tasks for some further discussion:

After work on T4334 we should be parsing these correctly, so it's probably not hugely difficult to add support.

epriestley renamed this task from phutil doesn't support traits to `arc liberate` should throw when encountering (and eventually support) namespaces and traits.Apr 4 2014, 2:29 AM
epriestley added a project: Badge Awarded.

Since XHPAST can parse this stuff (T4334), making the lack of support clear by throwing an exception should be fairly easy, at least.