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)
Thu, Apr 11, 8:55 AM
Unknown Object (File)
Wed, Apr 3, 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
Unknown Object (File)
Dec 27 2023, 2:02 PM
Unknown Object (File)
Dec 22 2023, 4:08 AM
Unknown Object (File)
Dec 21 2023, 7:16 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
Lint
Lint Skipped
Unit
Tests Skipped

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).