Skip to content

Invalid YAML in example in core/state-processors.md and state-providers.md #2213

@xalopp

Description

@xalopp

Invalid YAML in “Registering Services Without Autowiring” examples

The documentation contains invalid YAML in the following pages:

The examples currently include a ~ after the service class, which makes the YAML invalid:

services:
    # ...
    App\State\BlogPostProvider: ~
        tags: [ 'api_platform.state_provider' ]

✅ Correct version:

services:
    # ...
    App\State\BlogPostProvider:
        tags: [ 'api_platform.state_provider' ]

This fix should be applied to both pages to prevent confusion and ensure valid YAML examples.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions