diff --git a/src/PackageRegistrator.php b/src/PackageRegistrator.php index 498038a..e47862d 100644 --- a/src/PackageRegistrator.php +++ b/src/PackageRegistrator.php @@ -140,7 +140,7 @@ public static function composerPostAutoloadDump(): void FileSystem::delete(dirname(__DIR__, 4) . '/app/config/package.neon'); if (\is_dir($tempDir = dirname(__DIR__, 4) . '/temp')) { foreach (new \FilesystemIterator($tempDir) as $item) { - FileSystem::delete((string) $item->getPathname()); + FileSystem::delete(\is_string($item) ? $item : (string) $item->getPathname()); } } } catch (\Throwable $e) {