PHPackages                             walter-a-jablonowski/super-yaml - 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. walter-a-jablonowski/super-yaml

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

walter-a-jablonowski/super-yaml
===============================

Supercharges Symfony YAML

03PHP

Since Apr 27Pushed 6y ago1 watchersCompare

[ Source](https://github.com/walter-a-jablonowski/super-yaml)[ Packagist](https://packagist.org/packages/walter-a-jablonowski/super-yaml)[ RSS](/packages/walter-a-jablonowski-super-yaml/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Super YAML
==========

[](#super-yaml)

**Supercharges YAML**, based on Symfony Yaml, currently adds include feature.

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)

**This is a new project, might still need debugging**

> If you like visit my personal homepage: [walter-a-jablonowski.github.io](https://walter-a-jablonowski.github.io)

Usage
-----

[](#usage)

```
composer require walter-a-jablonowski/super-yaml

```

### Basic usage

[](#basic-usage)

Simliar symfony yaml

```
SuperYaml::parse( $yml );
SuperYaml::parseFile( $fil );
SuperYaml::dump( $yml );

SuperYaml::parse( $yml, [  // use symfony flags while parsing
  'flags' => ...           // difference: additional args as array
]);

SuperYaml::dump( $yml, [   // use symfony inline, indent, flags on dumping
  'inline' => ... ,
  'indent' => ... ,
  'flags' => ...
]);
```

### Include

[](#include)

See `demo/demo.php`: one yml file includes 2 yml-files

```
ANY_KEY:                     "@file(sub/sub/fil.yml)"
"@include [UNIQUE_STRING]":  "@file( sub/sub/fil.yml )"  # also includes key(s)
```

**\[UNIQUE\_STRING\]** = a user defined unique string in case you are using the same key again (yml needs unique keys)

Result:

[![scr.jpg](misc/scr.jpg?raw=true "Scr")](misc/scr.jpg?raw=true)

### Replace constant string

[](#replace-constant-string)

See `demo/demo.php` **sample under construction**

```
ANY_KEY:                     "@file([REPLACE_STRING]sub/sub/fil.yml)"
"@include [UNIQUE_STRING]":  "@file( [REPLACE_STRING]sub/sub/fil.yml )"  # also includes key(s)
```

**\[UNIQUE\_STRING\]** = see above
**\[REPLACE\_STRING\]** = a string that will be replaced as defined in $rpl argument

```
SuperYaml::parse( $yml, [  // additional args as array
  'rpl' => [

  ]
]);
```

### Include conditionally

[](#include-conditionally)

You may define a list of bool vars that are used to decide wheather a file should be included. Calculate all your values before calling SuperYaml.

See `demo/demo.php` **sample under construction**

```
"@includeIf(boolVar) [UNIQUE_STRING]:"    ANY_VALUE
"@includeIf( boolVar ) [UNIQUE_STRING]":  "@file( sub/sub/fil.yml )"
```

**\[UNIQUE\_STRING\]** = see above

```
SuperYaml::parse( $yml, [
  'boolVar' => [

  ]
]);
```

### Include text

[](#include-text)

Include just plain text

```
ANY_KEY: |

   some text

   @text(sub/sub/fil.yml)

   some text

   @text( sub/sub/fil2.yml )

```

Changelog
---------

[](#changelog)

- **2020** - Fix, readme
- **2020** - Added readme, publication
- **2019** - Added class, improved code
- **2018** - Initial development

LICENSE
-------

[](#license)

Copyright (C) Walter A. Jablonowski 2018-2020, MIT [License](LICENSE)

Licenses of third party software see [credits](credits.md)

[Privacy](https://walter-a-jablonowski.github.io/privacy.html) | [Legal](https://walter-a-jablonowski.github.io/imprint.html)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![walter-a-jablonowski](https://avatars.githubusercontent.com/u/31986246?v=4)](https://github.com/walter-a-jablonowski "walter-a-jablonowski (17 commits)")

---

Tags

includephpsymfonysymfony-yamlyaml

### Embed Badge

![Health badge](/badges/walter-a-jablonowski-super-yaml/health.svg)

```
[![Health](https://phpackages.com/badges/walter-a-jablonowski-super-yaml/health.svg)](https://phpackages.com/packages/walter-a-jablonowski-super-yaml)
```

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M284](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[michelf/php-markdown

PHP Markdown

3.5k52.4M345](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

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