-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Improve stream wrapper support #12396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
BrianHenryIE
wants to merge
40
commits into
composer:main
Choose a base branch
from
BrianHenryIE:use/realpath
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
2ab3d1e
use `Composer\Util\Platform::realpath()`
BrianHenryIE 708c809
use `Composer\Util\Platform::realpath()`
BrianHenryIE e8a516f
Always treat stream wrappers as absolute paths
BrianHenryIE 198a7ea
Remove `false` check which no longer can evaluate to false
BrianHenryIE 9f03eba
Add `::testIsAbsolutePath()`
BrianHenryIE ed968c0
Do not treat `file://` paths as absolute path without check it un-pre…
BrianHenryIE 27fac4b
Recursively call `::realpath()` until `$path` does not change
BrianHenryIE d1081a3
Replace `realpath()` with `Platform::realpath()`
BrianHenryIE 4b5129b
Update src/Composer/Util/Filesystem.php
BrianHenryIE 21b7a7e
Refactor `::isStreamWrapperPath()` to `public static` method
BrianHenryIE a23e7ce
Do not treat `file://` as a streamwrapper
BrianHenryIE 40eb099
Return existing path for streamwrapper; throw exception for invalid path
BrianHenryIE 0cd95aa
Move `stream_wrapper_register()` to `bootstrap.php`
BrianHenryIE 598e88e
Replace `realpath()` with `Platform::realpath()`
BrianHenryIE 413dd88
Add test `::realpath()` throws `RuntimeException`
BrianHenryIE d859488
Add `::testIsStreamWrapperPath()`
BrianHenryIE 7542d71
Add `::testIsLocalPath()`
BrianHenryIE faeac42
Remove outdated redundant throw
BrianHenryIE aa70941
Return `false` on `::realpath()` `RuntimeException`
BrianHenryIE 1430918
`continue` on failed `::realpath()`
BrianHenryIE 1baf8bd
Strip `file://` before running system `realpath()`
BrianHenryIE 2c9ed1f
Add `::testRealPathFileStreamStripsScheme()`
BrianHenryIE d32e015
Update `::isStreamWrapperPath()
BrianHenryIE 463cebe
Don't `file://` prefix stream paths
BrianHenryIE 32e6c08
No need to catch and throw `RuntimeException` here, the message was fine
BrianHenryIE d359604
Preserve `null` or `realpath()`
BrianHenryIE 6592d1d
Update PhpDoc arguing we how we treat stream wrappers in `::isLocalPa…
BrianHenryIE 95353bc
Preserver behaviour; redundant throw
BrianHenryIE ea4e18b
Update `::configFromString()` to return pretty `url` in `$repoConfig`
BrianHenryIE 59bdaec
Use `::realpath()` early on `$targetDir` after `::ensureDirectoryExis…
BrianHenryIE dc204f7
Undo accidental double-prefix of `$targetDir`
BrianHenryIE 6dd3cf8
Add `::testGetPackageTime()` for `realpath()` change
BrianHenryIE 8184e1e
Add `::testCreatesComposerJsonIfNotExists()`
BrianHenryIE 89d71b2
Add `::testClearCacheCommandDirectoryDoesNotExist()`
BrianHenryIE 8bb5b15
Add `::isInstalled()` tests for symlinks
BrianHenryIE f3ae074
Improve comment explaining `stream_wrapper_register()`
BrianHenryIE 79e9bc5
Check the full `.../composer.json` path
BrianHenryIE 5adaa86
Use `Platform::getCwd()`
BrianHenryIE f2db2ca
Use `Platform::getCwd()`
BrianHenryIE 9d8b179
Catch more specific `RuntimeException`
BrianHenryIE File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Use
Platform::getCwd()
- Loading branch information
commit 5adaa868c7eb5f696da6a301ff27a779197afddb
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Covered by existing tests
InitCommandTest::testRunGuessNameFromDirSanitizesDir()and::testInteractiveRun()simple-phpunit --filter="testRunGuessNameFromDirSanitizesDir|testInteractiveRun"