Skip to content

Fix case where installed path is symlink - #33

Open
d-s-codappix wants to merge 1 commit into
phpactor:masterfrom
d-s-codappix:2727-support-linked-files
Open

Fix case where installed path is symlink#33
d-s-codappix wants to merge 1 commit into
phpactor:masterfrom
d-s-codappix:2727-support-linked-files

Conversation

@d-s-codappix

Copy link
Copy Markdown

One can install packages from a local path via composers repositories type "path".
Those are typically symlinks which were not resolved. We therefore add a realpath() call, but falling back to old behavior if it didn't resolve. That way we keep independent of realpath() as requested by the inline comment.

Resolves: phpactor/phpactor#2727

@d-s-codappix

Copy link
Copy Markdown
Author

I wasn't able to come up with a proper test setup

One can install packages from a local path via composers repositories
type "path".
Those are typically symlinks which were not resolved.
We therefore add a realpath() call, but falling back to old behavior if
it didn't resolve. That way we keep independent of realpath() as
requested by the inline comment.

Resolves: phpactor/phpactor#2727
@d-s-codappix
d-s-codappix force-pushed the 2727-support-linked-files branch from 06b218f to 4d6d2d1 Compare August 4, 2026 09:51
@d-s-codappix

Copy link
Copy Markdown
Author

I finally found the time to come up with a test case.

@d-s-codappix

Copy link
Copy Markdown
Author

The failing tests reported by https://github.com/phpactor/class-to-file/actions/runs/30898115673/job/91955766437?pr=33 already failed for me on current master, so doesn't seem to be related to my change.

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 this pull request may close these issues.

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

1 participant