course when you register on learnphalcon
The examples on this site are currently tested to work on Phalcon V3.4 and Phalcon Devtools V3.2 Some issues may arise when using later versions.

Please get in touch or post a comment below the post if you encounter a problem.

Modern software systems tend to be an assemblage of interdependent components. This is great but complex. Component A won't work unless component B is loaded as it has it uses B's components. Component B work work unless C is loaded. Add the different versions of the various components into this mix and managing the interdependencies becomes a nightmare. This is where package/dependency management comes in. Every language has it's preferred (or couple of preferred) package management systems. Java has Maven, Javascript has npm and bower and PHP has Composer and PEAR. PEAR has fallen away somewhat and Composer is currently the most popular. Once you get comfortable with them, package managers are great. They massively simplify a very complex problem. The only downside is that when you're getting started they add an extra layer of complexity which can be daunting.

As with all the other posts on this blog the objective here will be to get up and running quickly with the expectation that an understanding of the approach will develop as the tool is used. Kinasthetic learning. If you have the PHP path included in your path environment variable you won't need the next bit but as I often work with machines where I don't have admin access I use this workaround. Save the following code into a file called php.bat in your phalcon project folder(in my case this is xampp\htdocs\tennisClub).

set PHPCMD=c:\xampp\php\php

Next go to https://getcomposer.org/download/ - copy each of the lines from the command line installation steps into the CLI in your project folder as follows:

Composer is now installed and ready to use. In the next post I'll show you how to use it to install packages.