Doctrine is using the following legacy format on some places:
self::assertInstanceOf(__NAMESPACE__.'\\MyFetchClass', $results[0]);
in a test located inside the Doctrine\Tests\DBAL\Functional\DataAccessTest test case.
The above incorrectly resolves as Doctrine\MyFetchClass instead of Doctrine\Tests\DBAL\Functional\MyFetchClass. Replacing with MyFetchClass::class is a workaround.