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)
Mon, Apr 29, 3:52 PM
Unknown Object (File)
Wed, Apr 24, 10:28 PM
Unknown Object (File)
Mon, Apr 22, 5:15 PM
Unknown Object (File)
Thu, Apr 11, 8:55 AM
Unknown Object (File)
Apr 3 2024, 5:59 AM
Unknown Object (File)
Mar 1 2024, 10:52 AM
Unknown Object (File)
Feb 7 2024, 11:36 PM
Unknown Object (File)
Jan 7 2024, 2:20 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
arcpatch-D9585
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1172
Build 1172: [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).