As far as where MAMP is located, it’s likely in /Applications/MAMP. I realize the second one may vary based on your project so you’ll need to adjust some of what I’ve offered here. Which version of PHP you use when building projects.
In order to setup everything, you’ll need to make good use of the Terminal.įurthermore, you’re going to need to know: To do that, we need to do some initial work to get that configuration setup.
And if you’re like me, then you like to keep things self-contained while also making it easy to use them from the command line without having to enter in a long string of commands. This is important because OS X ships with versions of PHP, MySQL, and so on.
The rest of this article is going to assume you’re on OS X with MAMP installed and is going to guide you through the process of actually setting up Composer within the MAMP installation directory to give you access to it for your projects without interfering with the rest of the software pre-installed on your system. If you want to read a much longer, well-written piece on this (more than three bullet primer), I highly recommend checking out Andrey Savchenko’s page on exactly this topic.
It helps to deploy code into production environments when they have it installed by allows those environments to read the Composer file and pull in the additional software it needs without you having to bundle it with your work.Want the latest stable release? Go for it. Want the latest bleeding edge version? Go for it. This allows you to set what versions of software you want to be used with your project.This keeps your repository small and allows other developers, who have Composer installed, to bring it into their system. A dependency manager allows you to define what third-party software your project needs without actually having to bring it into your repository.This is one answer that could go on for a long time, but I want to keep it as direct and succinct as possible. Why Composer?Īs I mentioned earlier, why should we bother with something like Composer? Why not bring in all of the components into a single project and manage it from there. If it uses a different stack, then I’ll set up that environment when needed.Īll of that to say, don’t let certain attitudes dissuade you from using particular software because it’s “old” or “feels dated.” Be pragmatic and make smart decisions for you, your clients, and your tools. If the majority of my work is going to be built on a LAMP stack, then I’m okay using MAMP. That’s fine! I’m very much to each his/her own (as long as we’re staying up to date with what’s out there).īut I also want to balance knowledge and experience of what’s out there with a level of pragmatism. There are alternative web servers (such as Nginx)Īnd there is a segment of developers in the industry who are not a fan of solutions like that.There are new ways of building web applications.The thing is, a lot of new technologies have been released since then. It’s been around for a long time (that is, 2012 if I remember correctly) which is practically forever in Internet time. MAMP is a useful, powerful piece of software for web developers who want to get quickly and easily a web server, database, and several versions of PHP setup on their machine. But first, I want to talk a little bit about MAMP. In short, as the site suggests, “it’s a dependency manager for PHP.” But what does that mean? I’ll cover this in just a moment. If you’re working with WordPress, then you’re familiar with PHP at least to some degree however, Composer is still one of those things that are relatively new to a certain segment of the industry.
Ultimately, the goal is to make it easier for you to write more modular code using third-party dependencies and with keeping things well-organized on your system and in your projects. I mean, if you’re completely inexperienced, there may be a bit of a learning curve, but I’m going to do what I can to break this down for you regardless of the level of experience you have. It’s not that any of this is intimidating.