Issue #3298906 by andypost, alexpott: Fix \Drupal\Tests\Core\Test\TestSetupTraitTest::testChangeDatabasePrefix() on PHP 8.2 (cherry picked from commit 35130a738e9cd0b606336ec9c5452e3cc40cb07e)