Install Brew Macos Catalina
I've just launched a 10-day popup newsletter called The Road to PHP 8.1. For the next 10 days, you'll receive one email covering a new and exiting feature of PHP 8.1; afterwards you'll be automatically unsubscribed, so no spam or followup. Subscribe now!
# Upgrading with Homebrew
Installing MongoDB on Mac (Catalina and non-Catalina) 14th Feb 2020. I had to reconfigure my Macbook after sending it for repairs. During the reconfiguration period, I noticed the instructions I linked to in “Setting up a local MongoDB connection” were outdated. How to install Homebrew on Mac What you need. Before you install Homebrew on Mac, you’ll need to make sure you have the following: A 64-bit Intel CPU or an Apple Silicon CPU (i.e., an M1 Mac) You can check if you have a compatible Mac by pressing cmd + spacebar, typing “About This Mac”, pressing return, and then checking the Processor. Brew install llvm. Bottle (binary package) installation support provided for macOS releases: Intel: big sur:: catalina.
Start by making sure brew is up-to-date:
Next, upgrade PHP:
Check the current version by running php -v
:
Restart Nginx or Apache:
And make sure that your local web server also uses PHP 7.4 by visiting this script:
Install Homebrew On Macos Catalina
The version should show 7.4.x
.
Note: if you're using Laravel Valet, please keep on reading,you need some extra steps in order for the web server to properly work.
# Valet
If you're using Laravel Valet, you should do the following steps to upgrade it:
Now run valet install
:
# Extensions
Homebrew doesn't support the installation of PHP extensions anymore, you should use pecl instead.I personally use Imagick, Redis and Xdebug.
They can be installed like so:
Brew Install Openssl Mac Catalina
You can run pecl list
to see which extensions are installed:
You can search for other extensions using pecl search
:
Make sure to restart your web server after installing new packages:
If you're using Laravel Valet, you should restart it as well.
Make sure all extensions are correctly installed and loaded by checking both your PHP webserver and CLI installs:
If extensions aren't properly loaded, there are two easy fixes.
Macos Catalina Brew Install Java
First, make sure the extensions are added in the correct ini file. You can run php --ini
to know which file is loaded:
Now check the ini file:
Note that if you're testing installed extensions via the CLI, you don't need to restart nginx, apache or Valet.
The second thing you can do, if you're updating from an older PHP version which also used pecl to install extension; is to reinstall every extension individually.
# Last step
Finally you should test and upgrade your projects for PHP 7.4 compatibility.