Skip to content

HTML Sanitizer Autowiring a Total Mystery #21025

Open
@miqrogroove

Description

@miqrogroove

service. This service will be :doc:`autowired </service_container/autowiring>`
for services having an ``HtmlSanitizerInterface $appPostSanitizer`` parameter.

This one sentence seems to go completely without explanation. It links to the Autowiring page, which says nothing about named arguments.

The closest thing I could find is here https://symfony.com/doc/current/service_container.html#binding-arguments-by-name-or-type

That part of the Service Container doc is suggestive of autowiring for specific argument names, but again says nothing about how the service name is being magically converted to a name binding.

Where the heck did this $appPostSanitizer name come from? Is it case sensitive? Can I change it? What happens if I use a different name that's not configured? This just sounds so fragile without some logic behind it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions