Run Rector on your code to see what it can do for you:

         ],
     ];
     
-    public function getCacheDirectory(): ?string
+    public function getCacheDirectory(): string
     {
         $dir = $this->config['cache']['directory'] ?? null;
         \assert(\is_string($dir) || $dir === null, 'Invalid cache directory.');
PHP snippet to change

Applied Rules:

Not a change you expect?

Config  rector.php
Rector version: 60130e - released at 2026-08-04 14:20