Below you will find pages that utilize the taxonomy term “Composer”
Composer "provide" and dependency inversion
This is a response to Peter Petermann’s article Composer and virtual packages. First, let’s make this totally clear: I don’t want to start an Internet war about this, I’m just pointing out some design issues that may arise from using Composer’s provide
option in your package’s composer.json
file. This means it’s also nothing personal. To Peter: you wrote a very nice article and shed light on an underused feature of Composer. Thank you for that!
There's no such thing as an optional dependency
On several occasions I have tried to explain my opinion about “optional dependencies” (also known as “suggested dependencies” or “dev requirements”) and I’m doing it again:
There’s no such thing as an optional dependency.
I’m talking about PHP packages here and specifically those defined by a composer.json
file.
What is a dependency?
First let’s make sure we all agree about what a dependency is. Take a look at the following piece of code:
PHP - The Future of Packages
Recently I tweeted about phpclasses.org. It was not such a friendly statement:
Why does phpclasses.org still exist? Most of the “packages” contain dangerous, stupid or useless code.
Manuel Lemos, the man behind PHP Classes, made me pull back a bit by pointing out that I was generalizing and that they do what they can to encourage people to do a good job. I recognize their effort. And of course, there is also good code on phpclasses.org
.
Experiences with PHP open source software in a Symfony-friendly environment
These days, good PHP object-oriented libraries are all around and easily available. To me, it is actually thrilling to be part of this flourishing community, while working with Symfony2 and blogging about the Framework, the Components and their neighbors (like Silex). It seems like everything is made for contributing to this nice and friendly environment, with tools like GitHub (online collaboration), Composer (dependency management), Packagist (package archive) and Travis CI (continuous integration).
Still, to me, contributing felt like too big a step to take right now. Until a few weeks ago, when I was looking for something I needed (a PHP client for the Microsoft Translator API) and could not find a decent solution. I decided to make it myself, and share it online. Below I’ve written down my steps. As you can see, they are very easy and would require just a bit of extra time. So, take from it what you need, and start contributing!