Just a couple of minutes back, hours to be precise, I wrote my first Composer package.
For those, who don’t know what Composer is, It’s a dependency manager for PHP. Some like to call it a package manager. Thats wrong! It’s a dependency manager.
From past few months, I have been craving for new knowledge. So I started digging up Internet like I used to do earlier. I bumped into Laravel, newest thing happening in PHP world. I tend to stay away from new frameworks, libraries as much as I can. Why? because till the time they are mature enough I cant use them in my code – I write code for enterprises, so can’t fuck up there. I cant afford to.
But Laravel actually reminded me of important, useful actually, it is to write good, clean and efficient code. Let me stop here. Ill save it for next post.
Anyways, One thing I quickly learnt that Laravel uses Composer heavily. Thanks to the docs, I installed Composer and was up and running in few minutes. You can do it in seconds it you have good Internet connection.
The geek inside me quickly woke up. Forget Laravel, what the heck is Composer and how to use it? – all I could hear inside my brain.
So I Googled. And found this and this tutorial. Oh, and THIS – main resource. I must say, Composer is going to save a lot of hassle if everyone starts using it. I mean, look around you. Everywhere you will find poorly written code. Because of a lot of reasons. One of which is there is no standard in PHP. PHP is a loosely typed language.
After this, I quickly started working on a real composer package. First thing that popped into my mind was Facbeook SDK. I have been using it for all sorts of applications in my Company. I am working on it. Let’s see where it goes!
Oh yes, I am not sorry if you find this post all over the place. I am half asleep and it’s 3:30 in the morning. Damn, I should sleep.