Fix missing directory separator in FileDownloader #9426
Merged
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.
In a project I'm working on, we have some dependencies on libraries outside of the
composer
ecosystem.To do so, we are defining those external dependencies as
file
-typed packages.We're currently working on migrating to
composer v2.x
, when I noticed an anomaly...When installing a package with
dist.type: 'file'
, it appears that the file gets installed in the wrong target destination?Reproduction steps
I've created a minimal
composer.json
file that reproduces this issue incomposer v2.x
.Sample
composer.json
This example contains a
composer/readme-file
package, which pulls in the README.md file of this repository as a composer "package".Expected behavior
As the package
name
iscomposer/readme-file
, I'd expect the file to be stored atvendor/composer/readme-file/README.md
.This is also what happens with
composer v1.x
:Actual behavior
However, in
composer v2.x
, this is not the case anymore.The file is stored as
vendor/composer/readme-fileREADME.md
(so concatenated and directly under thevendor/composer
parent, as opposed to in its ownvendor/composer/readme-file
subdirectory):