Skip to content

HTML Sanitizer Autowiring a Total Mystery #21025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
miqrogroove opened this issue May 31, 2025 · 0 comments
Open

HTML Sanitizer Autowiring a Total Mystery #21025

miqrogroove opened this issue May 31, 2025 · 0 comments

Comments

@miqrogroove
Copy link
Contributor

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.

@miqrogroove miqrogroove changed the title HTML Sanitizer Autowiring a Total Mysery HTML Sanitizer Autowiring a Total Mystery May 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant