Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement RPC features #1

Open
21 of 28 tasks
zonuexe opened this issue Apr 17, 2018 · 8 comments
Open
21 of 28 tasks

Implement RPC features #1

zonuexe opened this issue Apr 17, 2018 · 8 comments

Comments

@zonuexe
Copy link
Member

zonuexe commented Apr 17, 2018

https://phpactor.github.io/phpactor/rpc.html

Editor Actions

Phpactor Commands

@zonuexe
Copy link
Member Author

zonuexe commented Apr 17, 2018

Update. #3

@zonuexe
Copy link
Member Author

zonuexe commented Apr 20, 2018

Update #10

@zonuexe
Copy link
Member Author

zonuexe commented Apr 30, 2018

Update #16

@zonuexe
Copy link
Member Author

zonuexe commented Apr 30, 2018

Update #17

@MarTango
Copy link
Contributor

I'm currently trying to implement context_menu here, however, I'm struggling a lot since it seems to be the case that the function phpactor-action-input-callback is using the wrong callback (this is changed in my branch), and also often provides invalid arguments to the RPC (I believe this is PHPActor's fault, though).

For example:
calling M-x phpactor-context-menu on Book.php L18C24, choosing rename_variable, in my branch causes the error:
user-error: Invalid arguments "current_path" for handler "rename_variable", valid arguments: "path", "source", "offset", "name", "name_suggestion", "scope"

:current_path doesn't seem to be any different to :path, so I'm not sure why phpactor sometimes specifies one instead of the other.

I've also encountered an issue where phpactor provided a parameter which was missing the key choices (when trying to rename variable), causing the function phpactor--action-input-parameters to throw an error.

I hope what I've said makes some kind of sense - I think the fixes will need to be on phpactor's end)

@dantleech any insight?

If I haven't been clear here, please let me know and I can try to clarify.

@dantleech
Copy link

dantleech commented May 23, 2018

current_path is what the context menu needs, however this is mapped to path by Phpactor (you may also be interested in the Handler which will progressively ask for missing information via. RPC callbacks).

What would help is if you had the request and response, if you don't know already this can be easily found by adding the following in a Phpactor config file (e.g. $HOME/.config/phpactor/phpactor.yml`)

rpc.store_replay: true

You can then easily debug the last RPC command sent to Phpactor with:

$ phpactor rpc --replay --verbose

and see the exact request and response.

Let me know if you have any other questions, I'm having a look at getting Emacs running on my side, so might be able to help out.

@zonuexe
Copy link
Member Author

zonuexe commented May 26, 2018

Update #22, Implemented context menu action. (Thanks @dantleech )

And phpactor package is now available on MELPA and MELPA stable.

@zonuexe
Copy link
Member Author

zonuexe commented Jul 26, 2018

Update #34, Implemented import_class action.
(Thanks @kermorgant, and I invited him as a member of @emacs-php/developers)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants