PHPackages                             forrest79/composer-yaml-neon-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. forrest79/composer-yaml-neon-plugin

ActiveComposer-plugin[Parsing &amp; Serialization](/categories/parsing)

forrest79/composer-yaml-neon-plugin
===================================

Plugin to use composer config file in YAML or NEON format.

v1.0.1(1y ago)12BSD-3-ClausePHPPHP ^8.2CI passing

Since Dec 13Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/forrest79/composer-yaml-neon-plugin)[ Packagist](https://packagist.org/packages/forrest79/composer-yaml-neon-plugin)[ RSS](/packages/forrest79-composer-yaml-neon-plugin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (8)Versions (3)Used By (0)

Composer Yaml Neon Plugin
=========================

[](#composer-yaml-neon-plugin)

[![Latest Stable Version](https://camo.githubusercontent.com/24da562e4fc6531db48fa0c2e96601d28738542f80047cf455ba9b65c5c6bc37/68747470733a2f2f706f7365722e707567782e6f72672f666f727265737437392f636f6d706f7365722d79616d6c2d6e656f6e2d706c7567696e2f76)](//packagist.org/packages/forrest79/composer-yaml-neon-plugin)[![Monthly Downloads](https://camo.githubusercontent.com/17a2e9ac08b3e8c3649c9594bdc45d2f56d9fe0d2ed3707bbb21fb27fb3622dd/68747470733a2f2f706f7365722e707567782e6f72672f666f727265737437392f636f6d706f7365722d79616d6c2d6e656f6e2d706c7567696e2f642f6d6f6e74686c79)](//packagist.org/packages/forrest79/composer-yaml-neon-plugin)[![License](https://camo.githubusercontent.com/91a2d3262014232da07d583506b5d9051f6503438e0fcbec69350d7dfc28e0da/68747470733a2f2f706f7365722e707567782e6f72672f666f727265737437392f636f6d706f7365722d79616d6c2d6e656f6e2d706c7567696e2f6c6963656e7365)](//packagist.org/packages/forrest79/composer-yaml-neon-plugin)[![Build](https://github.com/forrest79/composer-yaml-neon-plugin/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/forrest79/composer-yaml-neon-plugin/actions/workflows/build.yml)

tl;dr
-----

[](#tldr)

Plugin to use [Composer](https://github.com/composer/composer) with the config file in [YAML](https://yaml.org/) (`composer.yaml`/`composer.yml`) or [NEON](https://ne-on.org/) (`composer.neon`) format instead of JSON.

Installation
------------

[](#installation)

This plugin must be installed globally:

```
$ composer global require forrest79/composer-yaml-neon-plugin && composer global update
```

It is recommended to disable [use-parent-dir](https://getcomposer.org/doc/06-config.md#use-parent-dir) to omit question `No composer.json in current directory, do you want to use the one at ...?` where there is a config file in a `YAML` or `NEON` format and in some parent directory is a config file in `JSON` format.

```
$ composer config --global use-parent-dir false
```

How to use it
-------------

[](#how-to-use-it)

Prepare a config file `composer.yaml`/`composer.yml` (for the `YAML` format), or `composer.neon` (for the `NEON` format) instead of `composer.json`.

> Different config file/path via environment variable `COMPOSER` is also supported. Don't point directly to a `YAML` or `NEON` config file, always point to the (virtual) `JSON` config file and let plugin detect correct config file.

For example `YAML` format:

```
# You can use comments...

name: forrest79/composer-yaml-neon-plugin # ...or this comments

authors:
    -
        name: 'Jakub Trmota'
        email: jakub@trmota.cz

require:
    composer/composer: 2.3.6
    php: '>=8.0'

require-dev:
    squizlabs/php_codesniffer: ^3.5

autoload:
    psr-4:
        Forrest79\ComposerYamlNeonPlugin\: src

bin:
    - bin/composer

scripts:
    phpcs: 'vendor/bin/phpcs -s src'

config:
    allow-plugins:
        dealerdirect/phpcodesniffer-composer-installer: false
```

or `NEON` format:

```
# You can use comments...

name: forrest79/composer-yaml-neon-plugin # ...or this comments

authors:
	-
		name: Jakub Trmota
		email: jakub@trmota.cz

require:
	composer/composer: '2.3.6'
	php: '>=8.0'

require-dev:
	squizlabs/php_codesniffer: ^3.5

autoload:
	psr-4:
		Forrest79\ComposerYamlNeonPlugin\: src

bin:
	- bin/composer

scripts:
	phpcs: vendor/bin/phpcs -s src

config:
	allow-plugins:
		dealerdirect/phpcodesniffer-composer-installer: false

```

> IMPORTANT: You can use only one config file in a directory.

### Generate composer.json

[](#generate-composerjson)

To generate classic `composer.json` file, use `composer generate-composer-json` command.

How does it work?
-----------------

[](#how-does-it-work)

Simply! If plugin detects `YAML` or `NEON` config file at the startup, it will generate `composer.json` and at the end is JSON file cleaned. That's the magic.

When `composer.json` is changed by Composer (i.e., after `composer require` command etc.), the new config file in YAML or NEON format is saved next to the original one, and you must make manual diff and merge.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance63

Regular maintenance activity

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

513d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d979cd353c6593b44b50f90ff5a5eb4be224f501a70f7cce89d0735867e488e5?d=identicon)[forrest79](/maintainers/forrest79)

---

Top Contributors

[![forrest79](https://avatars.githubusercontent.com/u/160766?v=4)](https://github.com/forrest79 "forrest79 (8 commits)")

---

Tags

plugincomposeryamlneon

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/forrest79-composer-yaml-neon-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/forrest79-composer-yaml-neon-plugin/health.svg)](https://phpackages.com/packages/forrest79-composer-yaml-neon-plugin)
```

###  Alternatives

[nette/neon

🍸 Nette NEON: encodes and decodes NEON file format.

93462.1M333](/packages/nette-neon)[phppkg/config

Config manage, load, get. Supports INI,JSON,YAML,NEON,PHP format file

133.5k](/packages/phppkg-config)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
