Composer Yaml

Packagist GitHub Gitlab Bitbucket

(Almost) real support for yaml in Composer for your local project! As easy as composer yaml update!


Global installation is required

composer global require sandfoxme/composer-yaml

Plugins require composer.json to initialize. Obviously, without composer.json in the project you need global composer.json to initialize.


composer yaml

The main proxy command that allows usage of YAML config for composer. Your config should be named composer.yml or composer.yaml

Prefix any command you want to run with yaml:

  • composer yaml install

  • composer yaml update

  • Works with plugins: composer yaml viz


The proxy command silently creates composer.json and resets the Composer to use it and then deletes it afterwards. So any command that tries to modify composer.json will have no effect because the updated file will be removed. Therefore don’t expect composer yaml require and composer yaml init and such to work.

composer yaml:create

Create composer.yml from existing composer.json

--input, -i

Override input file name (default is composer.json)

--output, -o

Override output file name (default is composer.yml)

composer yaml:dump

Create composer.json from composer.yml

--input, -i

Override input file name (default is to try both composer.yml and composer.yaml)

--output, -o

Override output file name (default is composer.json)


The library is available as open source under the terms of the MIT License. See