Composer usage can also be global

As an every-day Composer user, I always used it on a project scope, i.e with a composer.json lying in a specific project directory. I discover recently than it can also be used on a global way (meaning not related to a project) using global modifier:

composer global require squizlabs/php_codesniffer

The globally installed package will be accessible user-system wide. On my Ubuntu system, global vendor folder lies on ~/.config/composer/.

It strikes me yesterday that this feature is exactly the same one which is provided by npm, yarn or bower, other packages/dependencies manager.

Tags: php, composer