Setup MacbookPro M1 Pro for PHP Developers in 2022

Setup MacbookPro M1 Pro for PHP Developers in 2022

Hello. I'm Tony a web developer from Vietnam, In this video, I introduce apps that I use for daily tasks and how to set them up from the new Macbook Pro for PHP developers in 2022. Hope you guys like it.


  • 14-inch
  • Apple M1 Pro, 10‑Core CPU, 16‑Core GPU and 16‑Core Neural Engine
  • 16 GB RAM
  • 512 GB SSD
  • QWERTY = English (International)
  • macOS Monterey


Install Homebrew as the package manager for macOS:

/bin/bash -c "$(curl -fsSL"

then update brew to the latest version

brew update

Install the applications

brew install --cask \
  google-chrome  \
  iterm2 \
  visual-studio-code \
  sublime-text \
  docker \
  alfred \
  slack \
  vlc \
  wget \
  exa \
  git \

Oh my Zsh


sh -c "$(curl -fsSL"

Oh My Zsh Plugins and theme

Valet+ for Mac

You can find the full documentation at here

  1. Install or update Homebrew to the latest version using brew update.
  2. Add the Homebrew PHP tap for Valet+ via brew tap henkrehorst/php.
  3. Install PHP 8.0 using Homebrew via
    brew install valet-php@8.0 --build-from-source
  4. Link your PHP version using the command
    brew link valet-php@8.0 --force
  1. Install Composer using Homebrew via

    brew install composer
  2. Install Valet+ with Composer via

    composer global require weprovide/valet-plus
  3. Add

    export PATH="$PATH:$HOME/.composer/vendor/bin"

    to .bash_profile (for bash) or .zshrc (for zsh) depending on your shell (echo $SHELL)

  4. Run the valet fixcommand. This will check for common issues preventing Valet+ from installing.

  5. Run the valet install command. Optionally add --with-mariadb to use MariaDB instead of MySQL This will configure and install Valet+ and DnsMasq, and register Valet's daemon to launch when your system starts.

  6. Once Valet+ is installed, try pinging any *.test domain on your terminal using a command such as ping -c1 foobar.test. If Valet+ is installed correctly you should see this domain responding on If not you might have to restart your system. Especially when coming from the Dinghy (docker) solution.

Valet+ will automatically start its daemon each time your machine boots. There is no need to run valet start or valet install ever again once the initial Valet+ installation is complete.

ACPU error

You can found the solution at

For compilers to find php@8.0 you may need to set:

export LDFLAGS="-L/opt/homebrew/opt/php@8.0/lib"
export CPPFLAGS="-I/opt/homebrew/opt/php@8.0/include"


/opt/homebrew/Cellar/valet-php@8.0/8.0.3/include/php/ext/pcre/php_pcre.h:23:10: fatal error: 'pcre2.h' file not found  #include "pcre2.h"

How to fix it

ln -s /opt/homebrew/include/pcre2.h /opt/homebrew/Cellar/valet-php@8.0/8.0.3/include/php/ext/pcre/pcre2.h

Please notice the path for your valet PHP to make it correct


▶ My equipment

  • Video editing: Final Cut Pro X
  • Mic: Blue Microphones Yeti

Follow me online here: ▶ Twitter ▶ Blog

Credits: ▶ BGM: Amnesia by Ghost_Beatz -