A couple of months back, I wrote a PHP library that abstracts the API of Paystack (A Nigerian FinTech company) into a pluggable composer package. The library has since gotten more than 100 installs, and another package is dependent on it. Since then, a host of other payment systems/providers and other services have popped up, so I thought to write this tutorial or guide to building your own composer installable composer package. So, off we go. Directory Structure The first thing to do is to create the directory that holds your package. It is also where you will develop the package from. Usually, the basic directory structure for PHP packages looks like; The parent_directory holds all the files of the package. The src (short for source) directory holds the package codes, the tests directory holds the package’s tests, composer.json describes your package. readme.md contains the information about your package, forming ...(Read More)