Page MenuHomePhabricator

Let `arc liberate` throw on unsupported PHP features
ClosedPublic

Authored by richardvanvelzen on Jun 16 2014, 10:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 17, 7:47 AM
Unknown Object (File)
Sun, Dec 15, 5:38 AM
Unknown Object (File)
Fri, Dec 13, 2:52 PM
Unknown Object (File)
Fri, Dec 13, 10:50 AM
Unknown Object (File)
Fri, Dec 13, 9:49 AM
Unknown Object (File)
Thu, Dec 12, 12:53 AM
Unknown Object (File)
Tue, Dec 3, 10:40 PM
Unknown Object (File)
Tue, Dec 3, 11:04 AM
Subscribers

Details

Summary

Ref T4725.

Test Plan

add some files that have unsupported constructs all over the place and run arc liberate

Diff Detail

Repository
rARC Arcanist
Branch
liberation
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1156
Build 1156: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

richardvanvelzen retitled this revision from to Let `arc liberate` throw on unsupported PHP features.
richardvanvelzen updated this object.
richardvanvelzen edited the test plan for this revision. (Show Details)
richardvanvelzen added a reviewer: epriestley.

This probably needs quite some work.

epriestley edited edge metadata.

This generally seems pretty reasonable to me. What sort of issues do you think it has?

One minor nitpick: it's sometimes hard/impossible to translate sentence fragments into other languages and end up with natural-sounding grammar. It would be better to just name the feature in $what (e.g., "namespaces" instead of "use a namespace") and then use an error string like this:

arc liberate has limited support for features introduced after PHP 5.2.3. This library uses an unsupported feature (%s) on line %d of %s

Then you can just pass "namespaces", "traits", "namespace 'use' statements", etc.

This revision now requires changes to proceed.Jun 17 2014, 11:40 AM

I don't know, it was pretty late and I just pushed it out hoping for feedback. :-)

richardvanvelzen edited edge metadata.

Use a simpler grammatical construct for the error message

epriestley edited edge metadata.

Cool, let's see how this works. Thanks!

This revision is now accepted and ready to land.Jun 17 2014, 12:12 PM
epriestley updated this revision to Diff 22993.

Closed by commit rARC3810cdbbccff (authored by @richardvanvelzen, committed by @epriestley).