if [ "${PREPARE_BUILD_INSTALL_DEPS_PHP}" == "true" ]
then
# It's required to update homebrew because it won't work with the default version Kokoro has.
# This can be fragile though because the future version of brew can break - consider pinning
# the formulas if that happens (see https://github.com/grpc/grpc/pull/24837).
brew update || true
# macos mojave support for php7.3 brew formula removed MacOS Mojave support here: https://github.com/Homebrew/homebrew-core/commit/d8496609d310a233bfb46272ec7948845f32d7c5#diff-df64282b6e4230b6f35468dfbbd500fcd62b0f93b01b2b161e92f512b7feb1a3
# so we need earlier version of the formulata than that. See https://github.com/grpc/grpc/pull/24837 for an example of pinning homebrew formulas to a specific commit.