Problem/Motivation
Web profiler is also overwriting html_response.attachments_processor but in a service provider so its happening later which mean if you use 'js' on an http response with both modules installed you still run into the hardcoded validation and get a fatal error.
This is probably core's fault more then anything but also kinda a bug with webprofiler but wanted to capture it incase someone else ran into the problem.
https://gitlab.com/drupalspoons/webprofiler/-/issues/94
Comments
Comment #2
gappleIt might not be possible to get around this conflict without core changes that allow everyone to decorate instead of replace the service
#3096061: [upstream] html_response.attachments_processor service must be replaced instead of decorated
Comment #3
neclimdulagreed
Comment #4
gappleLooks like Webprofiler has a decoration solution now:
https://git.drupalcode.org/project/webprofiler/-/commit/43e8aba836c7a696...
(though this:
$this->dataCollector->setPlaceholders($attachments['big_pipe_placeholders'] ?? []);looks like it might not handle core's placeholders when bigpipe is disabled -$attached['html_response_attachment_placeholders'])Comment #5
neclimduloh that looks promising. That does look a bit off but it's just their collection so shouldn't be a big deal.
Still agreed core needs a better setup in core but this should solve the immediate issue once its released.
Comment #6
gappleWith webprofiler's change I think this is no longer a problem. The older issue has details on changes needed in core to prevent future conflicts if another module needs to replace the same service.