Tool to convert from composer.yml to composer.json.

3.0.2 2021-12-05 22:49 UTC

This package is auto-updated.

Last update: 2024-07-17 02:56:31 UTC



Download yaml-convert.phar (latest main)

this project is a fork of https://github.com/igorw/composer-yaml which looks abandoned. the purpose is still the same, yaml-convert.phar allows you to convert a composer.yaml file into composer.json format.

Stable download url for download from gitlab package repository via public api:


download it like:

wget https://gitlab.com/api/v4/projects/10924742/packages/generic/yaml-convert/3.0.2/yaml-convert.phar

see CHANGELOG.md for the detailed differences to the original project. the main differences are:

  • support for composer.yml and composer.yaml
  • example scripts to use
  • downloadable phar file
  • added lint command

Warning: If you already have a composer.json file, it will overwrite it.


To convert from yaml to json, run:

$ php yaml-convert.phar convert

To convert from json to yaml, run:

$ php yaml-convert.phar convert composer.json composer.yaml

To lint a yaml file:

$ php yaml-convert.phar lint myfile.yaml