Skip to content

Fix case where installed path is symlink - #33

Merged
dantleech merged 1 commit into
phpactor:masterfrom
d-s-codappix:2727-support-linked-files
Aug 6, 2026
Merged

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

Conversation

@d-s-codappix

Copy link
Copy Markdown
Contributor

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
Contributor 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
Contributor Author

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

@d-s-codappix

Copy link
Copy Markdown
Contributor 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.

@dantleech

Copy link
Copy Markdown
Collaborator

looks good, thanks. will look at the failing tests in master.

@dantleech
dantleech merged commit 6692c95 into phpactor:master Aug 6, 2026
2 of 3 checks passed
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"

2 participants