Php php / composer not found after upgrade to Ventura

I have inherited a roots/sage/bedrock project and so have been on a learning curve understanding the system. I had everything fully working, and used composer to update wp core etc. I am returning to do a couple of small updates similarly but now when I run a composer update and return this error

env: php: No such file or directory.

I recently upgraded my dev OS to Ventura, from Catalania so could be something to do with that?

Should I be installing php via brew, or reinstalling composer is there a different way to achieve this, something else I should check first?

Thanks in advance, I’m a bit new to this so apologies if there is important information missing in my question.

I believe mac os stopped including php out of the box after Catalina, so you probably do need to re-install it. I used homebrew to install it on my machine and that has worked well for me.


OK this worked. I’m curious though, for my understanding of how this all works. how I can run my site locally, without php being installed ?

I believe that one way or another you will need to have php installed to run the site locally. If you mean how could you avoid installing it globally, I think you could use something like lando and have php only installed in the docker container.