Issue #3239762 by alexpott, daffie: \Drupal\Core\Template\AttributeString::__toString() can cause deprecations in PHP 8.1