Skip to content

Docs: replace XML config examples with array-based PHP - #2274

Open
llupa wants to merge 1 commit into
doctrine:3.3.xfrom
llupa:drop-xml-config
Open

Docs: replace XML config examples with array-based PHP#2274
llupa wants to merge 1 commit into
doctrine:3.3.xfrom
llupa:drop-xml-config

Conversation

@llupa

@llupa llupa commented Aug 11, 2026

Copy link
Copy Markdown

Fixes #2273

@llupa

llupa commented Aug 11, 2026

Copy link
Copy Markdown
Author

Fixes #2273

A second more thorough read needs to be done before merging it directly 😅. I can say that I based the "style" off of YAML, because it felt natural to switch between YAML and PHP and have the same comments.

@GromNaN GromNaN left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you!

Comment thread docs/en/configuration.rst
Comment on lines +352 to +353
return static function (ContainerConfigurator $containerConfigurator): void {
$containerConfigurator->extension('doctrine', [

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the syntax before Symfony 7.4. It's now possible to just return a PHP array, eventually wrapped by App::config([...]) (see announcement blogpost).

I'm fine with keeping this version for now as it's supported by all supported Symfony versions from 6.4 to 8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: drop XML config examples and use the new array-based PHP config format (Symfony 7.4)

3 participants