Skip to content
Snippets Groups Projects

removed deprecated code from render system

Closed quietone requested to merge issue/drupal-3441392:3441392-removed-deprecated-code into 11.x
Files
9
@@ -130,9 +130,8 @@ public function jsonSerialize(): string {
* An associative array of replacements. Each array key should be the same
* as a placeholder in $string. The corresponding value should be a string
* or an object that implements \Drupal\Component\Render\MarkupInterface.
* Null args[] values are deprecated in Drupal 9.5 and will fail in
* Drupal 11.0. The value replaces the placeholder in $string. Sanitization
* and formatting will be done before replacement. The type of sanitization
* The args[] value replaces the placeholder in $string. Sanitization and
* formatting will be done before replacement. The type of sanitization
* and formatting depends on the first character of the key:
* - @variable: When the placeholder replacement value is:
* - A string, the replaced value in the returned string will be sanitized
@@ -194,15 +193,6 @@ public function jsonSerialize(): string {
protected static function placeholderFormat($string, array $args) {
// Transform arguments before inserting them.
foreach ($args as $key => $value) {
if (is_null($value)) {
// It's probably a bug to provide a null value for the placeholder arg,
// and in D11 this will no longer be allowed. When this trigger_error
// is removed, also remove isset $value checks inside the switch{}
// below.
// phpcs:ignore Drupal.Semantics.FunctionTriggerError
@trigger_error(sprintf('Deprecated NULL placeholder value for key (%s) in: "%s". This will throw a PHP error in drupal:11.0.0. See https://www.drupal.org/node/3318826', (string) $key, (string) $string), E_USER_DEPRECATED);
$value = '';
}
switch ($key[0]) {
case '@':
// Escape if the value is not an object from a class that implements
Loading