Issue #3238942 by andypost, alexpott: \Drupal\Core\Routing\RedirectDestination::get() causes deprecation errors on PHP 8.1