Verification
Is your feature request related to a problem?
I'm enjoying exploring the 2.0.0 version. Thank you.
One snag I hit was when I tried to run composer pd on the second project on the same server. I got an error that composer couldn’t create a file in /tmp/composer-patches. This directory had been created when I applied patches on the first project I'd worked on. It was therefore owned by the owner for that first project's directory, and had permissions 644. My second project, running on a different Linux account, therefore could not create the directory (it already existed) and so could not write to it.
I got around this by creating a custom .user.ini file for my php cli to pick up, that contained sys_temp_dir=/home/{username}/tmp
Describe your proposed solution(s)
Instead of attempting to write patches into /tmp/composer-patches, use a folder like /tmp/composer-patches-`date +%s` . It would need cleaning up afterwards.
Describe alternatives
In the extra > composer-patches section within composer.json, allow a new entry: "tmp_dir": "{directory}"
This may not work when composer.json is checked into version control. If the project's temporary patching directory was hard-wired into composer.json, the same directory would be used in any environment. That could cause problems, assuming there was no way to resolve ~ within php, because an absolute path /home/user1/tmp would not work if someone is developing a project in /home/user2.
Additional context
No response
Verification
composer self-update)composer update cweagans/composer-patches)Is your feature request related to a problem?
I'm enjoying exploring the 2.0.0 version. Thank you.
One snag I hit was when I tried to run
composer pdon the second project on the same server. I got an error that composer couldn’t create a file in/tmp/composer-patches. This directory had been created when I applied patches on the first project I'd worked on. It was therefore owned by the owner for that first project's directory, and had permissions644. My second project, running on a different Linux account, therefore could not create the directory (it already existed) and so could not write to it.I got around this by creating a custom
.user.inifile for my php cli to pick up, that containedsys_temp_dir=/home/{username}/tmpDescribe your proposed solution(s)
Instead of attempting to write patches into
/tmp/composer-patches, use a folder like/tmp/composer-patches-`date +%s`. It would need cleaning up afterwards.Describe alternatives
In the
extra > composer-patchessection withincomposer.json, allow a new entry:"tmp_dir": "{directory}"This may not work when
composer.jsonis checked into version control. If the project's temporary patching directory was hard-wired intocomposer.json, the same directory would be used in any environment. That could cause problems, assuming there was no way to resolve~within php, because an absolute path/home/user1/tmpwould not work if someone is developing a project in/home/user2.Additional context
No response