My setup for PHP / Laravel development on Apple Silicon M1

My setup for PHP / Laravel development on Apple Silicon M1

At the end of 2020 my trusty mid-2014 MacBook Pro died and was replaced with the latest generation MacBook Pro, running an Apple Silicon M1 Pro processor. The change in architecture away from Intel to Apples own ARM based CPU meant that some software would no longer run on my new machine.

I took this opportunity to review and update my development environment to suit me as a full stack PHP / Laravel developer. This is what I've gone with:

IDE & Editors

I've used PHPStorm as my primary IDE for several years and can't imagine using anything else now - the annual subscription is well worth it. I use the "Darcula" theme and to keep things tidy, I always hide some the tools I don't use (e.g. Database and Version Control). I have several additional plugins installed - but the most useful by far is Laravel Idea which provides some great auto completion on for Laravel projects. Other particularly useful plugins include String Manipulation, Alpine.js Support and .env files support.

Sublime Text is my go-to text editor for making quick edits, hacking on one-off simple scripts and working with large text based files.

PHP & Web Server

I'm using Laravel Valet to run projects locally. It allows me to easily switch between multiple PHP versions (highly important for me as I work on projects that run on a range of PHP versions) and sites are served via NGINX. Everything is managed via an easy-to-use CLI tool.

However, I also have the fantastic PHP Monitor installed - this shows the current PHP version in the Mac OS menu bar and provides a GUI for some Valet tasks - including changing the PHP version.

I also use Valet Launchpad (an open source project of mine) - this gives me a nice browser based UI for viewing the projects that are being served by Valet.

A preview of the Valet Launchpad UI (light & dark modes)

Previously I relied on Laravel Homestead to run all my projects locally - however as virtualisation support is rather limited on Apple Silicon this was a no-go. The switch to Valet has been great - sites serve significantly quicker and less configuration is needed!

Databases

DBngin is my tool of choice for managing database servers. It provides an easy-to-use GUI for managing all of the database engines that I usually work with (MySQL, PostgreSQL and Redis) and allows me to run multiple versions with ease. Best of all, it's free to use.

I use TablePlus as a database GUI tool for working with local and remote databases. It connects to a wide range of database engines and the built in "safe mode" is a superb feature to stop you making accidental changes. It also has robust data import & export tools and even provides previews of geospatial data.

Terminal

I use the default Terminal application that comes with Mac OS - but powered up with Oh-My-ZSH. I stick with the default theme (robbyrussell) and have the following plugins installed: git, brew, colored-man-pages, composer and npm. I have several aliases defined to speed up common tasks - I keep these and all my other dotfiles under version control using GIT - if you're interested, you can view them here.

GIT

I use the CLI for performing simple tasks in GIT (I have a few aliases setup to make commands shorter), but frequently reach for my favourite GUI, which is Tower. It gives a great visualisation of the commit history and has a great toolset for everything you'd expect - working with remotes, managing branches, merging, rebasing and stashing.

Other Developer Things

  • As a PHP developer, I couldn't work without having Composer installed
  • I also have PHP_CodeSniffer installed for maintaining coding standards
  • I often use Deployer to deploy projects
  • I use GPG to sign my GIT commits (I followed this guide)
  • Transmit is my go-to tool for remote file transfer (SFTP, AWS S3 etc)
  • Safari is my main web browser, but I frequently test & debug in Chrome and Firefox too
  • I have shortcuts in my /etc/hosts file for servers I frequently SSH into
  • Previously I've used Rested as a HTTP client - but am still looking for a replacement

General System Things

  • I always run dark mode wherever possible
  • I use Homebrew to manage tools & applications as much as I can
  • I use Mac Mouse Fix 3 instead of the bloatware and non Apple Silicon disaster that is Logi Options (for my mouse, see Hardware section below)
  • I use Carbon Copy Cloner and Time Machine for my backup strategy
  • I run Pi-Hole at home to block ads and analytics trackers
  • I use Slack and Zoom for communication with working remotely
  • I'm a big fan of Alfred (with the PowerPack) for increasing productivity
  • I'm pretty much "all in" with the Apple Ecosystem:
    • I use their Mail app for my multiple email accounts
    • I use their Notes, Reminders & Calendar apps
    • I use Pages & Numbers for my "office" software
    • I'm an Apple Music subscriber
    • I rely on iCloud services to keep things sync across my devices

Hardware

I use a 2021 MacBook Pro - with an M1 Pro processor & 32GB RAM in silver with the 16" screen. When at my home desk, I have it connected to a Dell U2520D 25" monitor, use the Logitech MX Master Keys for Mac keyboard and the Logitech MX Master 3 for Mac mouse.


Hopefully you've found this useful. If you have any questions, or suggestions for other things I should try you can find me on Twitter @gbuckingham89.