# symfony/yaml

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/symfony-yaml).**

3,843 stars · 133 forks · PHP · MIT

## Links

- GitHub: https://github.com/symfony/yaml
- Homepage: https://symfony.com/yaml
- awesome-repositories: https://awesome-repositories.com/repository/symfony-yaml.md

## Topics

`component` `php` `symfony` `symfony-component`

## Description

This project is a PHP library that serves as a configuration file processor, providing a bridge to translate human-readable YAML text into native PHP arrays and objects. It functions as both a parser for converting YAML content into application-ready data structures and a serializer for transforming PHP data back into formatted YAML strings.

The library includes security protections designed to prevent memory exhaustion and stack overflow attacks when processing untrusted documents. It ensures structural integrity through syntax validation and provides a command-line utility to check files for errors and deprecations with text or JSON output.

The system supports custom tag handling for value transformation, binary data processing, and configurable data dumping for multi-line blocks and numeric keys. It also manages application settings and parameters through its parsing and serialization capabilities.

## Tags

### Software Engineering & Architecture

- [Configuration File Processors](https://awesome-repositories.com/f/software-engineering-architecture/type-safe-data-handling/binary-data-processing/command-line-stream-processing/configuration-file-processors.md) — Serves as a bridge that translates human-readable YAML files into application-ready PHP data structures.
- [YAML Serializers](https://awesome-repositories.com/f/software-engineering-architecture/application-lifecycle-management/configuration-management/configuration-formats-and-schemas/yaml-configuration-files/yaml-serializers.md) — Implements serialization logic to transform PHP data structures into formatted YAML documents.
- [YAML Data Dumpers](https://awesome-repositories.com/f/software-engineering-architecture/application-lifecycle-management/configuration-management/configuration-formats-and-schemas/yaml-configuration-files/yaml-serializers/yaml-data-dumpers.md) — Converts PHP arrays and objects into YAML strings with configurable formatting for blocks and numeric keys. ([source](https://symfony.com/doc/current/components/yaml.html))
- [YAML Tag Customization](https://awesome-repositories.com/f/software-engineering-architecture/application-lifecycle-management/configuration-management/configuration-formats-and-schemas/yaml-configuration-files/yaml-serializers/yaml-tag-customization.md) — Provides registration and customization of custom YAML tags to map specific value objects during parsing and serialization.
- [Circular Dependency Detectors](https://awesome-repositories.com/f/software-engineering-architecture/circular-dependency-detectors.md) — Implements reference tracking to block circular dependencies that would otherwise cause memory exhaustion.
- [Markup State Machines](https://awesome-repositories.com/f/software-engineering-architecture/markup-state-machines.md) — Employs a deterministic state machine to tokenize raw input strings for syntax analysis.

### Part of an Awesome List

- [YAML Content Parsers](https://awesome-repositories.com/f/awesome-lists/data/yaml-processing/yaml-content-parsers.md) — Converts YAML strings and files into native PHP structures with support for date and binary data. ([source](https://symfony.com/doc/current/components/yaml.html))

### Data & Databases

- [YAML Parsers](https://awesome-repositories.com/f/data-databases/data-serialization-formats/data-formats/yaml-parsers.md) — Provides a comprehensive library for parsing YAML text into native PHP arrays and objects.
- [YAML Data Serialization](https://awesome-repositories.com/f/data-databases/yaml-data-serialization.md) — Converts PHP arrays and objects into formatted YAML strings for data exchange and storage.
- [Recursive Descent Parsers](https://awesome-repositories.com/f/data-databases/data-transformation-functions/recursive-processors/recursive-logic-implementations/recursive-descent-parsers.md) — Uses a recursive descent parsing engine to translate YAML token streams into nested data hierarchies.

### Programming Languages & Runtimes

- [Language-Native Mappings](https://awesome-repositories.com/f/programming-languages-runtimes/native-array-transformations/language-native-mappings.md) — Transforms YAML structured text directly into native PHP associative arrays and objects.

### Security & Cryptography

- [Parsing Depth Limits](https://awesome-repositories.com/f/security-cryptography/parsing-depth-limits.md) — Enforces maximum nesting levels during parsing to prevent stack overflow and resource exhaustion attacks.
- [YAML Parser Hardening](https://awesome-repositories.com/f/security-cryptography/yaml-parser-hardening.md) — Provides hardening measures to prevent resource exhaustion and DoS attacks when processing untrusted YAML documents. ([source](https://symfony.com/doc/current/components/yaml.html))

### Development Tools & Productivity

- [Application Configuration Management](https://awesome-repositories.com/f/development-tools-productivity/application-configuration-management.md) — Facilitates the management of application settings and parameters via YAML reading and writing.

### DevOps & Infrastructure

- [General YAML Syntax Validation](https://awesome-repositories.com/f/devops-infrastructure/cicd-pipeline-automation/cicd-pipeline-management/ci-cd-workflows/ci-formatting-checks/general-yaml-syntax-validation.md) — Checks YAML files for structural errors and deprecations to ensure valid formatting.
- [General YAML Syntax Validators](https://awesome-repositories.com/f/devops-infrastructure/cicd-pipeline-automation/cicd-pipeline-management/ci-cd-workflows/ci-formatting-checks/general-yaml-syntax-validators.md) — Includes a command-line utility to validate YAML files for syntax errors and deprecations. ([source](https://symfony.com/doc/current/components/yaml.html))
