Page MenuHomePhabricator

Rename `PhutilRemarkupRule` subclasses
ClosedPublic

Authored by joshuaspence on Jul 21 2014, 9:39 AM.
Tags
None
Referenced Files
F13084832: D9993.diff
Wed, Apr 24, 11:26 PM
Unknown Object (File)
Sat, Apr 20, 2:12 AM
Unknown Object (File)
Wed, Apr 17, 10:38 PM
Unknown Object (File)
Sat, Apr 13, 9:13 PM
Unknown Object (File)
Thu, Apr 11, 10:09 AM
Unknown Object (File)
Thu, Apr 4, 6:57 PM
Unknown Object (File)
Tue, Apr 2, 9:18 AM
Unknown Object (File)
Tue, Apr 2, 6:45 AM
Subscribers

Details

Summary

Ref T5655. Some discussion in D9839. Generally speaking, Phutil{$name}RemarkupRule is clearer than PhutilRemarkupRule{$name}.

Test Plan

Not yet tested... this is likely to break external code, so I'm not sure whether or not we want to pursue this.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

joshuaspence retitled this revision from to Rename `PhutilRemarkupRule` subclasses.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.

I'm not really sure about how PhutilRemarkupEngineBlockRule subclasses should be named.

I'm not really sure about how PhutilRemarkupEngineBlockRule subclasses should be named.

I think perhaps PhutilRemarkupEngineRemarkupLiteralBlockRule should really be PhutilLiteralRemarkupRemarkupBlockRule.

Maybe these should be PhutilRemarkupBoldRule, not PhutilBoldRemarkupRule? That makes the custom rules in D9994 a little easier too.

I think you're right on the literal rule.

In D9993#9, @epriestley wrote:

Maybe these should be PhutilRemarkupBoldRule, not PhutilBoldRemarkupRule? That makes the custom rules in D9994 a little easier too.

Yeah, I did it this way originally but changed my mind... hmm...

joshuaspence edited edge metadata.
  • Rename classes
  • Rename block rules too
epriestley edited edge metadata.
This revision is now accepted and ready to land.Jul 21 2014, 3:24 PM
src/markup/engine/remarkup/markuprule/PhutilRemarkupHyperlinkRule.php
3

Oh, this probably isn't okay... Should I provide a migration path or is this an outdated TODO?

joshuaspence edited edge metadata.
  • Rename classes
  • Rename block rules too
  • Remove duplicated PhutilRemarkupEngineRemarkupTestInterpreterRule class
src/markup/engine/remarkup/markuprule/PhutilRemarkupHyperlinkRule.php
3

I think it's OK to break Facebook, there is a reasonable pathway for them to stop subclassing this. I'll loop them in on the task.