Page MenuHomePhabricator

Rename Conduit classes
ClosedPublic

Authored by joshuaspence on Jul 20 2014, 1:49 PM.
Tags
None
Referenced Files
F14391818: D9991.id24009.largetrue.diff
Sat, Dec 21, 8:18 PM
F14389922: D9991.id24150.diff
Sat, Dec 21, 6:00 PM
Unknown Object (File)
Tue, Dec 17, 4:10 AM
Unknown Object (File)
Sat, Dec 14, 8:17 AM
Unknown Object (File)
Sat, Dec 14, 2:01 AM
Unknown Object (File)
Thu, Dec 12, 11:32 PM
Unknown Object (File)
Wed, Dec 11, 7:10 AM
Unknown Object (File)
Mon, Dec 9, 3:32 PM

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Maniphest Tasks
T5655: Standardize naming conventions
Commits
Restricted Diffusion Commit
rP023dee0d3b6d: Rename Conduit classes
Summary

Ref T5655. Rename Conduit classes and provide a getAPIMethodName method to declare the API method.

Test Plan
> echo '{}' | arc --conduit-uri='http://phabricator.joshuaspence.com' call-conduit user.whoami
Waiting for JSON parameters on stdin...
{"error":null,"errorMessage":null,"response":{"phid":"PHID-USER-lioqffnwn6y475mu5ndb","userName":"josh","realName":"Joshua Spence","image":"http:\/\/phabricator.joshuaspence.com\/res\/1404425321T\/phabricator\/3eb28cd9\/rsrc\/image\/avatar.png","uri":"http:\/\/phabricator.joshuaspence.com\/p\/josh\/","roles":["admin","verified","approved","activated"]}}

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

joshuaspence retitled this revision from to Rename Conduit classes.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
joshuaspence edited edge metadata.
  • Whoops, I forgot one
  • Update documentation
  • Minor formatting stuff
  • Use a magic constant
  • Replace the really hacky ConduitAPIMethod::getClassNameFromAPIMethodName method
epriestley edited edge metadata.

I think it would also be reasonable to call these ...APIMethod instead of ...ConduitAPIMethod if you prefer, but either is fine.

src/applications/conduit/method/ConduitAPIMethod.php
102

We should check + throw here for duplicates.

This revision is now accepted and ready to land.Jul 21 2014, 2:52 PM
src/applications/conduit/method/ConduitAPIMethod.php
102

Yeah I agree. This means that I can't use mpull right?

joshuaspence edited edge metadata.
  • Throw an exception if API methods are duplicated

@epriestley, are there any Conduit logs in the DB that would need to be migrated?

We log by method name (x.y) rather than class name (Conduit_x_y_APIMethod), so the logs aren't affected. Stuff like ConduitCall() uses method names, too. Basically, the class names were weird/inconsistent and ugly so we never used them for anything.

  • Rebase
  • Fix file name
  • Whitespace