- Issue created by @Nebel54
- @nebel54 opened merge request.
- 🇨🇦Canada deviantintegral
I was pointed here from https://www.drupal.org/project/media_entity_download/issues/2951316 ✨ Add support for Stage File Proxy Needs review .
I'm curious, given your hook effectively ends up replacing half of the code in the
\Drupal\media_entity_download\Controller\DownloadController::download()
method, is there a good reason to do this as a hook instead of decorating or completely replacing the download controller?As well, your hook implementation returns the first hook's response, even though multiple hooks may be invoked. I think most developers expect that hooks generally merge data together, instead of a "lowest weight wins". Actually, even if it did only return the response from one hook, I think in this case a "highest weight wins" would be the expected behaviour.