drupal_page_footer() has been ported to a terminate listener. It will be broken up further, but the function itself is no longer necessary. It should be removed outright.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bneil’s picture

Assigned: Unassigned » bneil

I'll work on this after the kernel patch lands #1463656: Add a Drupal kernel; leverage HttpFoundation and HttpKernel

Niklas Fiekas’s picture

Yay! It's in :)

bneil’s picture

Assigned: bneil » Unassigned
Status: Active » Needs review
FileSize
1.47 KB

The attached patch:

  • Eliminates drupal_page_footer() function
  • Eliminates call to drupal_page_footer() from drupal_deliver_html_page()
  • Modifies drupal_exit() comment block to remove reference to drupal_page_footer()
Niklas Fiekas’s picture

Thank you, bneil, this looks pretty good.
There's a few more references:

./lib/Drupal/Core/EventSubscriber/RequestCloseSubscriber.php:   *   drupal_page_footer(). There's probably a lot in here that needs to get
./includes/ajax.inc: * This function is the equivalent of drupal_page_footer(), but for Ajax
./includes/ajax.inc: * @see drupal_page_footer()
./includes/bootstrap.inc:  // Called from drupal_page_footer, we write to permanent storage if there

Can the comment in RequestCloseSubscriber be removed?
We probably need another issue to take care of ajax_footer(). The reference to drupal_page_footer() can now probably be removed.
The reference in the comment of bootstrap.inc should also be replaced with something.

Crell’s picture

Let's leave the note in the RequestCloseSubscriber class for now. It's a todo because that class needs refactoring anyway.

ajax_footer()... I hadn't even remembered that function. :-) That should get ported to the new model as well. Can someone open an issue for that?

Niklas Fiekas’s picture

Here it is: #1618072: Remove ajax_footer(). That will take care of the two references in ajax.inc. So we shouldn't touch ajax.inc in this issue. Since we're also not touching the TODO, the only missing thing is to rewrite the comment in boostrap.inc.

Something like Called when closing requests, we ...?

bneil’s picture

This patch incorporates the changes above with the following comment change per Niklas Fiekas:
// Called from drupal_page_footer, we write to permanent storage if there
Changed to:
// Called when closing requests, we write to permanent storage if there

Niklas Fiekas’s picture

Status: Needs review » Reviewed & tested by the community

Thanks bneil, that looks good.

sun’s picture

Looks good to me.

We likely need another follow-up for drupal_exit().

ltwinner’s picture

oops

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.