PHPStan level 8 is nullability and nothing else

Level 8 checks calls on values that may be null, and it is the level where most projects discover how much of their code assumes otherwise.

// level 7: fine
// level 8: Cannot call method getName() on User|null
$name = $this->repo->find($id)->getName();

// three legitimate fixes, in order of preference
$user = $this->repo->findOrFail($id);   // narrow the return

if ($user === null) { throw new UserNotFound($id); }

$name = $user?->getName() ?? 'unknown';   // only if null is real

The temptation at level 8 is to add null-safe operators everywhere, which silences the analyser and pushes the null further along — the error becomes a wrong value rather than a crash. Changing the return type so it cannot be null is the fix that removes the class rather than the message. Level 9 exists and is about mixed, and is a much larger undertaking than the jump from 7 to 8.