I installed ddev on macOs Sonoma. I installed Drupal via ddev in folder /Users/darkokan/sites/review-dev-d10 I can start Drupal with:
ddev launch
command and it works fine. When I open vscode I get an error saying that I need to set variable "php.validate.executablePath": "" in ~/Library/Application Support/Code/User/settings.json I need to set it to PHP which runs from the container. (I don't have PHP installed on mack) I can run container PHP in the command line, when I go to folder /Users/darkokan/sites/review-dev-d10 and run ddev exec php -v I get the correct response. What would be the value for my php.validate.executablePath. I read that I need to create a wrapper file in /usr/local/bin/php and make it executable: VisualStudio Code PHP executablePath in docker. What would I put in that file given I have zshel and Drupal in containers?
There are 2 main options:
~/bin/phpContainers keeps things more isolated but can require more configuration if you have multiple projects. Aliases are good, but commands can sometimes run slower.
If you mostly use command-line, you can just open the container in the terminal using
ddev sshand run commands there. You wont get all the pretty PHP colors in the main GUI though.If your on a single project, or all of your projects use the same PHP version, it can be easier to just install it on your host.