My new library to allow composer to read config from YAML file. There is some demand in comments for composer config but the developers are not interested and most 3rd party attempts to solve it are limited to yaml2json converters.

I tried a slightly different approach. There is a command in the composer itself that changes the way the config is read: composer global. During its execution it changes current working directory, resets composer state, and forces the composer to read config from another directory.

What I tried to do: I put yaml2json converter in place of globals directory changing code, and it seems it worked. Of course, some things got broken like any command that tries to change composer.json will no longer have any effect, however many people don’t use them and it may be an acceptable tradeoff for using yml-based config.

You can find the project on my new dev website: https://sandfox.dev/composer-yaml.html