PHPackages                             sndsgd/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. sndsgd/yaml

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

sndsgd/yaml
===========

YAML parsing enhancements for PHP

v0.0.7(3y ago)01.1k1MITPHPPHP &gt;=7.4

Since Nov 29Pushed 3y ago1 watchersCompare

[ Source](https://github.com/sndsgd/yaml)[ Packagist](https://packagist.org/packages/sndsgd/yaml)[ Docs](https://github.com/sndsgd/yaml)[ RSS](/packages/sndsgd-yaml/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (7)Dependencies (7)Versions (8)Used By (1)

sndsgd/yaml
===========

[](#sndsgdyaml)

[![Latest Version](https://camo.githubusercontent.com/8f0a3ed9f51303c6471c9bc9d7f1e3b63d438cc37417fe6ce853b854862502c2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f736e647367642f79616d6c2e7376673f7374796c653d666c61742d737175617265)](https://github.com/sndsgd/yaml/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/sndsgd/yaml/LICENSE)[![Build Status](https://camo.githubusercontent.com/588062e2f063efd4fabcd087af7e9514a5dd4cd97fd4f32e8ea015e3679914fd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f736e647367642f79616d6c2f6275696c643f7374796c653d666c61742d737175617265)](https://github.com/sndsgd/yaml/actions?query=workflow%3Abuild+branch%3Amaster)

YAML parsing enhancements for PHP.

### Context

[](#context)

The `sndsgd\yaml\ParserContext` object is a data bag you can jam things into for use in callbacks.

### Callbacks

[](#callbacks)

You can define your own callbacks by implementing [`sndsgd\yaml\Callback`](./src/Callback.php). This repository contains an example: [`sndsgd\yaml\callbacks\SecondsCallback`](./src/callbacks/SecondsCallback.php).

### Parsing

[](#parsing)

1. Create a parser instance with all your callbacks

    ```
    $parser = new sndsgd\yaml\Parser(
        new sndsgd\yaml\ParserContext(),
        sndsgd\yaml\callbacks\SecondsCallback::class,
        your\fun\CoolCallback::class,
    );
    ```
2. Parse strings with `->parse(string $yaml, int $maxDocuments)`
3. Parse files with `->parseFile(string $path, int $maxDocuments)`

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

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 ~139 days

Recently: every ~14 days

Total

7

Last Release

1155d ago

### Community

Maintainers

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

---

Top Contributors

[![sndsgd](https://avatars.githubusercontent.com/u/5289973?v=4)](https://github.com/sndsgd "sndsgd (13 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sndsgd-yaml/health.svg)

```
[![Health](https://phpackages.com/badges/sndsgd-yaml/health.svg)](https://phpackages.com/packages/sndsgd-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)
