Setup MacbookPro M1 Pro for PHP Developers in 2022
3 min read
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.
MACBOOK PRO SPECIFICATION
- 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 https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
then update brew to the latest version
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 https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Oh My Zsh Plugins and theme
Install the theme https://github.com/romkatv/powerlevel10k
Valet+ for Mac
You can find the full documentation at here github.com/weprovide/valet-plus/wiki
- Install or update Homebrew to the latest version using
- Add the Homebrew PHP tap for Valet+ via
brew tap henkrehorst/php.
- Install PHP 8.0 using Homebrew via
brew install firstname.lastname@example.org --build-from-source
- Link your PHP version using the command
brew link email@example.com --force
Install Composer using Homebrew via
brew install composer
Install Valet+ with Composer via
composer global require weprovide/valet-plus
to .bash_profile (for bash) or .zshrc (for zsh) depending on your shell (echo $SHELL)
valet fixcommand. This will check for common issues preventing Valet+ from installing.
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.
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 127.0.0.1. 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.
You can found the solution at github.com/weprovide/valet-plus/pull/573
For compilers to find firstname.lastname@example.org you may need to set:
export LDFLAGS="-Lemail@example.com/lib" export CPPFLAGS="-Ifirstname.lastname@example.org/include"
/opt/homebrew/Cellaremail@example.com/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/Cellarfirstname.lastname@example.org/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 twitter.com/coder_horizon ▶ Blog coderhorizon.com
Credits: ▶ BGM: Amnesia by Ghost_Beatz - app.soundstripe.com/songs/14193
- 00:44 Clean the Dock
- 00:24 Install Homebrew
- 01:35 Install iTerm2 and change its colour scheme
- 3:24 Install zsh
- 4:26 Install Oh My Zsh and its plugins
- 05:32 Install Power level 10k
- 07:42 Install exa
- 08:47 Install Valet+ and demo
- ACPU issue
- 14:31 Testing Valet+
- 15:30 Other apps
- Alfred - alfredapp.com
- Raycast - raycast.com
- VS Code - code.visualstudio.com