M1 Mac Docker Cannot Parse PHP files

I am trying to remember where I developed my last PHP application based on Symfony… I am not hundred prcent sure it was Docker Desktop, but I know I tried that too. I guess the PHP files that the intepreter complains about are mounted from the host. Since this is a special moint (mounted from the host to a VM and from the VM to the container) there could be issues.

Have you enabled VirtioFS in Docker Desktop preferences? It is a beta feature, but faster then the default.

If you enabled it, you can try to disable it, but I think it is better to be enabled.