6/9/2023 0 Comments Install php for macAnd to do that, you do the tap command.Once Homebrew is successfully installed, install PHP using below command. When you install Homebrew, a selected set packages are available but if you want to expand the set of available packages, you add repositories to Hombrew. In short tap means that we’re adding a repository outside the standard list of repositories available to Homebrew. zshrc file and sourced it in the terminal so it runs the recently installed version: export this is how you can install old versions of PHP. Then I installed PHP 7.2: ~ brew install I updated my. Next, I issue the following command in my terminal: ~ brew tap shivammathur/php The gist of that is another article, though. □ Note: If you ever worry about a particular repository being deleted, fork it into your local repository and then set it up so you can tap it later. I’ll do into detail about the terminology at the end of the article but here’s how I ended up installing PHP 7.2.34 on my machine.įirst, I found a repository that was maintaining older versions of PHP. So if you need a deprecated version of PHP but Brew won’t let you install it, what are we supposed to do? Install an Old Version of PHP The problem with this is that if you try to install any of the deprecated versions, then Brew won’t allow you to do it. However at the time of this writing, I versions of PHP available via brew.sh are as follows:Īnd the latter two are deprecated. I’ve written before about my affinity for using Homebrew to install the software on my machine. Is it easier to handle all of the other software already running on their servers or refactoring your code?Ī bit of a rhetorical question. Some are running on a server with 7.4, some are running 7.3, and some are running 7.2. What does this have to do with PHP, though?Īssume for a moment that you’re working on a project that was written with 8.0 but you start rolling it out to a suite of products. Sometimes we’ll be working with the latest, sometimes we’ll working with a version or a few versions older, and sometimes we may need to work with something that’s deprecated.Īnd this is usually the part where certain engineers start saying we should upgrade all the things and stay with the newest version of languages and frameworks. Obviously, this means that those of us who work with PHP are likely going to need to work with different versions. It is part of software development and it has been since before most of us were writing our first lines of code (let alone before we were even alive). I love the speed at which PHP is moving these days and how fast the new versions are, too □ but that doesn’t mean the software on which we’re going is going to consistently be able to keep up with the fast release cycles.Īnd that’s okay.
0 Comments
Leave a Reply. |