Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
drupal_render() was marked as deprecated, though its still called in quite some places.
Proposed resolution
- Avoid rendering manually by letting the template who is printing the variable render it.
- Inject the renderer service into service, which uses drupal_render()
- Use \Drupal::service('renderer')->render() for old prodecural code.
Remaining tasks
- Find all the actionable fixes: Search for
drupal_render(
- Create a Patch
- Review
User interface changes
None
API changes
None
Comment | File | Size | Author |
---|---|---|---|
#1 | replace_all-2473761-1.patch | 1.54 KB | willzyx |
Comments
Comment #1
willzyx CreditAttribution: willzyx commentedComment #2
webchickThanks @willzyx for all your work on these! Unfortunately, these issues need to be postponed to 8.1.x at least. See the allowed beta changes policy and the comment in #2393329-39: Replace all drupal_render calls with the service, and inject it, if possible..