The PHP executable command seems to run in the user's home directory and doesn't parse common VSCode variables making it difficult to use with docker compose in a project. It would be helpful if it parsed the common variables or at least was run in the root of the workspace.
Example:
"php.executables": {
"docker compose php": "\"docker compose --file ${workspaceFolder}/docker-compose.yml exec dev php\""
}
Side note: instead of taking the PHP version from the binary, have it use composer.json
if it exists as it should be the most correct source of the minimum PHP version supported for the current project.