composer on Windows UNC network path results in:
[ErrorException]proc_open(NUL): Failed to open stream: Permission denied
If you came here, you perhaps try to run composer on a windows UNC network path like
There are several issues for this problem but sadly I wasn't able to find a final, simple solution yet and also current PHP 8 versions plus latest composer don't solve the problem for me.
Issues and discussions I found for that were for example:
The only working solution I was able to find was to map a network drive on my device for the path instead of using the UNC
You can see here how it works: https://support.microsoft.com/en-us/windows/map-a-network-drive-in-wind…
Then opening the CMD / PowerShell / (Git) Bash on that network drive and running composer works without any problems!
From my perspective this still seems to be a PHP Bug even in 8.x on Windows not being able to work correctly on UNC network paths. If you should find any further final information, please contact me to update this blog article.
I hope it helped, thank you!