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
Inconsistent file counts using PHP via Docker Desktop on WSL2 #8997
Comments
Hi, |
I am hosting this on the Windows file system because as a developer working on PHP with IntelliJ products it is not optimal to access the WSL2 filesystem over a network share in their software. It may be a tradeoff I have to sacrifice now or I need to use the Hyper V backend which has its own file performance issues. There is a bug tracking with WSL that |
Actually file system performance with files hosted on Windows is worse with WSL2 backend than with Hyper-V, So you should really put your files within the WSL2 distro and make IntelliJ access them from Note that since latest version, you can mount files living in a WSL distro from a Windows executable, with mount expressions such as |
@themizzi did u manage to fix it? |
This is still an issue for us. We have reverted to using the hyper-v docker backend for our PHP applications. It would be really great if this worked, though, since the WSL file system performs so much faster than the hyper-v backend. |
@themizzi I don't know your use case of RecursiveDirectoryIterator but here's what helped me ... simply I started having this issue after running PHP app on Windows machine under WSL2 but the code it was running was completely copied from my previous Linux distro. One of my composer dependencies was using the RecursiveDirectoryIterator. I don't know why and how but it all suddenly started working when I deleted vendor folder and ran |
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Expected behavior
File counts from
scandir
andRecursiveDirectoryIterator
do not diverge.Actual behavior
File counts diverge between
scandir
andRecursiveDirectoryIterator
.Information
Steps to reproduce the behavior
Must be using the WSL2 engine!
Please see this repository for a full reproduction:
https://github.com/themizzi/wsl2-php-recursive-directory-iterator-bug
The text was updated successfully, but these errors were encountered: