Skip to content

Support Class Move in combination with composer "repositories" of type "path" #2727

@d-s-codappix

Description

@d-s-codappix

Given the following setup within composer.json of a project:

    "repositories": [
        {
            "type": "path",
            "url": "local_packages/*"
        }
    ],

One can provide project specific composer packages within local_packages.
We now have packages following that structure and want to use class:move feature, which fails with:

  [RuntimeException]
  There are no class name candidates

The Phpactor\ClassFileConverter\Adapter\Composer\Psr4NameInflector will not work as it will receive /vendor/prefix/name/Classes instead of the local_packages/package/Classes path.

Adding a realpath() call within class-to-file/lib/Adapter/Composer/ComposerFileToClass seems to help. I'm not sure if that might break other things.

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