Invalid YAML in example in core/state-processors.md and state-providers.md · Issue #2213 · api-platform/docs · GitHub
Skip to content

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

Closed

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.

Activity

  1. vinceAmstoutz commented on Sep 23, 2025

    @vinceAmstoutz
    Member

    @xalopp You're welcome to contribute, check our CONTRIBUTING.md and submit your suggestions. Thanks!

  2. added a commit that references this issue on Oct 27, 2025
    34c04a2
  3. added a commit that references this issue on Nov 25, 2025
    e98c7fb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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