Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To also support install as a global installed dependency there should be more paths taken into account, see https://github.com/sabre-io/dav/blob/c1afdc77a95efea6ee40c03c45f57c3c0c80ec22/bin/sabredav.php#L28
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you mean, but this is already taken into the account. First of all, we do not have a
deprac/bin/deptrac
, but only "deptrac/deptrac".This is the difference that would make it so we have to go "up" one less directory (one less
../
).If you take that into the account, then the path on line 12 is the same as in sabredev:29 and line 18 is the same as sabredev:30.
Anyways this code works and is internally consistent. The only "improvement" I could see is that we could check if exactly one autoloader is found and if not, throw an error. But that is out of scope IMHO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the deptrac package directly is mainly a convenience feature for people working on it. Most people should still use the shim or phar. With that in mind, I think we don't have to make any more adjustments for now.