Problem/Motivation

_batch_page() doesn't document its return type.

This makes it harder to debug issues like #3636610: Error when using update.php: TypeError: Drupal\Core\ProxyClass\Render\BareHtmlPageRenderer::renderBarePage(): Argument #1 ($content) must be of type array, false given, and could even help prevent them in the first place with PHPStan.

Steps to reproduce

Proposed resolution

Add a @return docs tag.

Since this function is not something that can be overridden, we can add a return type too.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Comments

joachim created an issue.