Skip to content

issue with phpactor-copy-class #37

@kermorgant

Description

@kermorgant

phpactor-copy-class used to work well but I just stumbled upon a project where it failed.

{
  "action": "error",
  "parameters": {
    "message": "Could not copy file \"/path/to/project/api/src/Validator/User/Constraints/UniqueEmail.php\" to \"/path/to/project/api/src/Validator/ProductAttribute/Constraints/ValidProductAttribute.php\"",
    "details": "0: Trying to create descendant from absolute path \"/path/to/project/api/src/Validator/User/Constraints/UniqueEmail.php\" that does not lie within context path \"/path-to-other-project\"\n#0 /home/mikael/src/phpactor/vendor/phpactor/source-code-filesystem/lib/Adapter/Git/GitFilesystem.php(79)...

The relevant part is imho does not lie within context path \"/path-to-other-project which for some reason has been used here.

Facts to consider

  • I have several projects opened (using projectile + persp)
  • the .git folder is not at the root of the php project but in the parent folder

I will try to debug that a bit more later

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions