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

phpactor-move-class does not work #36

Closed
kermorgant opened this issue Jul 26, 2018 · 0 comments · Fixed by #39
Closed

phpactor-move-class does not work #36

kermorgant opened this issue Jul 26, 2018 · 0 comments · Fixed by #39

Comments

@kermorgant
Copy link
Contributor

Invoking function phpactor-move-class ends with the following error

cond: Unknown input type confirm

which stems from

(cl-defun phpactor--action-input-parameters (value-type &key default label choices type)
...
    (cl-case type
      (file (read-file-name label nil default))
      (text (read-string label default))
...
      (t (error "Unknown input type %s" type)))))

I still haven't looked into the details of why value-type has the value "confirm" but I tried to add a condition like this

    (cl-case type
      (confirm (read-string label  default))
      (file (read-file-name label nil default))

with that, I get a confirmation question to which I answered yes. After that, I got this error message

apply: Symbol’s function definition is void: phpactor-action-collection

The *Phpactor input* buffer contains

{
  "action": "collection",
  "parameters": {
    "actions": [
      {
        "name": "close_file",
        "parameters": {
          "path": "/.../AppBundle/Security/Voter/RandomClass1.php"
        }
      },
      {
        "name": "open_file",
        "parameters": {
          "path": "/.../AppBundle/Security/Voter/RandomClass2.php",
          "offset": 0
        }
      }
    ]
  }
}

I'm not sure if my first modification is appropriate, it just happened to make the code run some steps further.

But for sure, we need a phpactor-action-collection function to perform a collection of actions.

kermorgant added a commit to kermorgant/phpactor.el that referenced this issue Jul 29, 2018
kermorgant added a commit to kermorgant/phpactor.el that referenced this issue Jul 29, 2018
kermorgant added a commit to kermorgant/phpactor.el that referenced this issue Jul 29, 2018
kermorgant added a commit to kermorgant/phpactor.el that referenced this issue Jul 29, 2018
kermorgant added a commit to kermorgant/phpactor.el that referenced this issue Jul 30, 2018
kermorgant added a commit to kermorgant/phpactor.el that referenced this issue Aug 6, 2018
phpactor sometimes need to run a sequence of actions, which this
commit adds support for. In order to support class renaming,
phpactor-action-close-file is also added.

resolves emacs-php#36 (class renaming)
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

Successfully merging a pull request may close this issue.

1 participant