<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/new-in-symfony-8-2-json-schema-for-configuration-symfony-blog--qgzodny5q" -->

---
title: New in Symfony 8.2: JSON Schema for Configuration...
description: Symfony 8.2 generates a dynamic config/schema.json file that merges the configuration trees of every registered bundle, including when@<env> blocks, giving IDE...
canonical: https://daily.dev/posts/new-in-symfony-8-2-json-schema-for-configuration-symfony-blog--qgzodny5q
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: New in Symfony 8.2: JSON Schema for Configuration (Symfony Blog) | daily.dev
og:description: Symfony 8.2 generates a dynamic config/schema.json file that merges the configuration trees of every registered bundle, including when@<env> blocks, giving IDE...
og:url: https://daily.dev/posts/new-in-symfony-8-2-json-schema-for-configuration-symfony-blog--qgzodny5q
og:image: https://api.daily.dev/og/posts/qGZOdny5q.png
og:image:alt: New in Symfony 8.2: JSON Schema for Configuration (Symfony Blog)
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# New in Symfony 8.2: JSON Schema for Configuration (Symfony Blog)

**[Symfony](https://daily.dev/sources/symfony)** · 3 min read · 5 upvotes · 0 comments

## Summary

Symfony 8.2 generates a dynamic config/schema.json file that merges the configuration trees of every registered bundle, including when@<env> blocks, giving IDE autocomplete and validation for YAML files in config/packages/ - something previous JSON schemas for services.yaml and routes.yaml didn't cover. Editors based on yaml-language-server (VS Code, Neovim, Emacs) and PhpStorm can be pointed to the schema via a comment or settings mapping. The lint:yaml command gains a --check-schema option to validate YAML against a JSON Schema in CI, requiring the opis/json-schema library. A caveat: the generated schema only describes the static configuration tree, so options relying on runtime normalization (like beforeNormalization() closures) may trigger false errors.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://symfony.com/blog/new-in-symfony-8-2-json-schema-for-configuration>

## Questions this post answers

### How do I get IDE autocomplete for Symfony YAML config files in config/packages?

Symfony 8.2 writes a config/schema.json file when the container is compiled in debug mode with symfony/yaml installed, merging every registered bundle's configuration tree including when@<env> blocks. Point your editor to it by adding a top-of-file comment '# yaml-language-server: $schema=../schema.json' for yaml-language-server editors, or map it in .vscode/settings.json or PhpStorm's JSON Schema Mappings.

_daily.dev helps php developers keep pace with Symfony configuration tooling changes like this one._

### How do I validate Symfony YAML config files against a schema in CI?

Use the lint:yaml command's new --check-schema option in Symfony 8.2, after installing the opis/json-schema library via composer require opis/json-schema. Run 'php bin/console lint:yaml config/packages/ --check-schema=config/schema.json' for a specific schema, or 'php bin/console lint:yaml config/ --check-schema' to validate each file against its own detected schema.

_Teams wiring config validation into CI can track Symfony release details like this via daily.dev._

### Why does lint:yaml report errors for valid Symfony configuration after enabling schema checking?

The generated schema only describes the static configuration tree, so it cannot represent values that bundles accept through runtime normalization, such as options that accept a list only because of a beforeNormalization() closure. In those cases lint:yaml may flag valid configuration as an error, since the schema doesn't reflect that normalization logic.

_daily.dev keeps php developers current on Symfony gotchas like this before they hit CI._

## Similar posts on daily.dev

- [New in Symfony 8.2: JsonSchema Component \(Symfony Blog\)](https://daily.dev/posts/new-in-symfony-8-2-jsonschema-component-symfony-blog--eps4sbfhs) · Symfony · 3 upvotes · 0 comments
- [New in Symfony 7.4: Better PHP Configuration \(Symfony Blog\)](https://daily.dev/posts/new-in-symfony-7-4-better-php-configuration-symfony-blog--uwqqhfafi) · Symfony · 31 upvotes · 0 comments
- [Your Symfony events have a contract: generate the AsyncAPI docs from your code](https://daily.dev/posts/your-symfony-events-have-a-contract-generate-the-asyncapi-docs-from-your-code-1vzjys2sg) · Medium · 0 upvotes · 0 comments
- [Stop fighting forms: The schema-driven approach to validation](https://daily.dev/posts/stop-fighting-forms-the-schema-driven-approach-to-validation-8vq511w0o) · LogRocket · 1 upvotes · 0 comments

---

Tags: [#cicd](https://daily.dev/tags/cicd), [#php](https://daily.dev/tags/php), [#symfony](https://daily.dev/tags/symfony)

[View this post on daily.dev](https://daily.dev/posts/new-in-symfony-8-2-json-schema-for-configuration-symfony-blog--qgzodny5q)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"New in Symfony 8.2: JSON Schema for Configuration (Symfony Blog)","url":"https://daily.dev/posts/new-in-symfony-8-2-json-schema-for-configuration-symfony-blog--qgzodny5q","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/new-in-symfony-8-2-json-schema-for-configuration-symfony-blog--qgzodny5q"},"datePublished":"2026-09-23T07:32:36.582Z","dateModified":"2026-09-23T07:33:00.208Z","description":"Symfony 8.2 generates a dynamic config/schema.json file that merges the configuration trees of every registered bundle, including when@\u003cenv\u003e blocks, giving IDE...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/327b244859fddae8f3a20d0225898aa0?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/327b244859fddae8f3a20d0225898aa0?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Symfony","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Symfony","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/cc07051b7112472f9729e73c14660a64","url":"https://daily.dev/sources/symfony"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/new-in-symfony-8-2-json-schema-for-configuration-symfony-blog--qgzodny5q","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":5},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"cicd,php,symfony","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Symfony","item":"https://daily.dev/sources/symfony"},{"@type":"ListItem","position":3,"name":"New in Symfony 8.2: JSON Schema for Configuration (Symfony Blog)"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/new-in-symfony-8-2-json-schema-for-configuration-symfony-blog--qgzodny5q#faq","mainEntity":[{"@type":"Question","name":"How do I get IDE autocomplete for Symfony YAML config files in config/packages?","acceptedAnswer":{"@type":"Answer","text":"Symfony 8.2 writes a config/schema.json file when the container is compiled in debug mode with symfony/yaml installed, merging every registered bundle's configuration tree including when@\u003cenv\u003e blocks. Point your editor to it by adding a top-of-file comment '# yaml-language-server: $schema=../schema.json' for yaml-language-server editors, or map it in .vscode/settings.json or PhpStorm's JSON Schema Mappings. daily.dev helps php developers keep pace with Symfony configuration tooling changes like this one."}},{"@type":"Question","name":"How do I validate Symfony YAML config files against a schema in CI?","acceptedAnswer":{"@type":"Answer","text":"Use the lint:yaml command's new --check-schema option in Symfony 8.2, after installing the opis/json-schema library via composer require opis/json-schema. Run 'php bin/console lint:yaml config/packages/ --check-schema=config/schema.json' for a specific schema, or 'php bin/console lint:yaml config/ --check-schema' to validate each file against its own detected schema. Teams wiring config validation into CI can track Symfony release details like this via daily.dev."}},{"@type":"Question","name":"Why does lint:yaml report errors for valid Symfony configuration after enabling schema checking?","acceptedAnswer":{"@type":"Answer","text":"The generated schema only describes the static configuration tree, so it cannot represent values that bundles accept through runtime normalization, such as options that accept a list only because of a beforeNormalization() closure. In those cases lint:yaml may flag valid configuration as an error, since the schema doesn't reflect that normalization logic. daily.dev keeps php developers current on Symfony gotchas like this before they hit CI."}}]}
```

