Change record status: 
Project: 
Introduced in branch: 
11.2.x
Introduced in version: 
11.2.0
Description: 

Render arrays that specify a #lazy_builder may now specify a #placeholder_strategy_denylist key at the same level.

This allows placeholders to restrict the strategy that they're replaced by, e.g.

 $build = [
      '#lazy_builder' => [static::class . '::renderMessages', [$element['#display']]],
      '#create_placeholder' => TRUE,
      // Prevent this placeholder being handled by big_pipe.
      '#placeholder_strategy_denylist' => [
        BigPipeStrategy::class => TRUE,
        CachedStrategy::class => TRUE,
      ],
    ];

In core this is used to prevent the messages block, which shows on every page in most configurations and is very cheap to render, from being rendered by big pipe, so that it is possible to skip loading big pipe's JavaScript when it is otherwise the only placeholder on the page. In general, the key can be skipped for most situations and the most appropriate render strategy will be selected.

Impacts: 
Module developers