symfony: The Filesystem component cannot rename between different drives
Because it only tries the PHP rename function, the Filesystem component inherits its limitation about being restricted to a single drive.
See https://github.com/symfony/symfony-installer/issues/46#issuecomment-63951753 for an issue caused by that.
composer implemented a fallback logic to be able to rename between drives: https://github.com/composer/composer/blob/edd4b2f984821fa696f1be848f9d5b5aea449537/src/Composer/Util/Filesystem.php#L260 It might be worth integrating it in the Filesystem component
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 23 (22 by maintainers)
Commits related to this issue
- Use OS mv utility on Linux systems. Fixes #12533. — committed to RoSk0/symfony by RoSk0 10 years ago
- Use OS mv utility on Linux systems. Fixes #12533. Fixed exception type. — committed to RoSk0/symfony by RoSk0 10 years ago
- Porting part of Composer's filesystem to get around renaming files across drives See symfony/symfony-installer#46 and symfony/symfony#12533 — committed to weaverryan/distill by weaverryan 10 years ago
- Fallback to 'copy' and 'unlink' instead of 'rename' ...to move a file without side effects. This gist reproduces the problem: https://gist.github.com/alcaeus/a367e895e6c55f7fb93870dcba46efa9 Same i... — committed to klammbueddel/common by deleted user 5 years ago
- Fallback to 'copy' and 'unlink' instead of 'rename' ...to move a file without side effects. This gist reproduces the problem: https://gist.github.com/alcaeus/a367e895e6c55f7fb93870dcba46efa9 Same i... — committed to klammbueddel/common by deleted user 5 years ago
Can confirm this issue during docker build, had to do a
rm -Rf app/logs/* app/cache/*first in the RUN step that triggered this indirectly via composer install.Just for reference if anyone is using Docker, there’s a high chance they will come across this problem if their cache directory is originally created in a separate layer (i.e. at the build stage).