webflo / drupal-finder

GNU General Public License v2.0
126 stars 26 forks source link

Question: Incorrect Composer Root detected when using Symlink #74

Open jigarius opened 1 week ago

jigarius commented 1 week ago

Since I saw the label question, I thought it was allowed to ask questions here. If asking questions is not allowed on the repo, please feel free to close this ticket and refer to the question of StackOverflow if you have the time.

Context

Expectation

The path to the Drupal project should be returned, i.e. /opt/drupal

Reality

The path to the Package's root is returned, i.e. /opt/foo

References

jigarius commented 1 week ago

At this point, I'm even willing to swap the real DrupalFinderComposerRuntime with a CustomDrupalFinder and use the custom finder for local development. However, I'm afraid the solution isn't future-proof without a DrupalFinderInterface that would ensure the correctness of the custom finder implementation.

Here's a pull request in case the idea appeals to you.

Any help will be greatly appreciated. Even if you can't help, I'm still thankful for Drupal Finder.

webflo commented 1 week ago

@jigarius Thanks for opening the issue. Could to try to create the file/repo structure as a fixture in https://github.com/webflo/drupal-finder/tree/master/tests/fixtures? I will take a look. I think drupal-finder should work for your use case. Thanks!