Page MenuHomePhabricator

Rename Conduit classes
ClosedPublic

Authored by joshuaspence on Jul 20 2014, 1:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 10:43 PM
Unknown Object (File)
Wed, Apr 24, 1:19 PM
Unknown Object (File)
Fri, Apr 19, 3:42 AM
Unknown Object (File)
Wed, Apr 17, 6:48 PM
Unknown Object (File)
Sun, Apr 14, 8:16 AM
Unknown Object (File)
Thu, Apr 11, 9:55 AM
Unknown Object (File)
Sun, Apr 7, 8:01 PM
Unknown Object (File)
Sun, Apr 7, 5:35 AM

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