diff -ruN a/Exception/FileNotFoundException.php b/Exception/FileNotFoundException.php --- a/Exception/FileNotFoundException.php 2026-07-15 12:28:18 +++ b/Exception/FileNotFoundException.php 2026-07-15 12:28:18 @@ -19,7 +19,7 @@ */ class FileNotFoundException extends IOException { - public function __construct(string $message = null, int $code = 0, \Throwable $previous = null, string $path = null) + public function __construct(?string $message = null, int $code = 0, ?\Throwable $previous = null, ?string $path = null) { if (null === $message) { if (null === $path) { diff -ruN a/Exception/IOException.php b/Exception/IOException.php --- a/Exception/IOException.php 2026-07-15 12:28:18 +++ b/Exception/IOException.php 2026-07-15 12:28:18 @@ -22,7 +22,7 @@ { private ?string $path; - public function __construct(string $message, int $code = 0, \Throwable $previous = null, string $path = null) + public function __construct(string $message, int $code = 0, ?\Throwable $previous = null, ?string $path = null) { $this->path = $path; diff -ruN a/Filesystem.php b/Filesystem.php --- a/Filesystem.php 2026-07-15 12:28:18 +++ b/Filesystem.php 2026-07-15 12:28:18 @@ -125,7 +125,7 @@ * * @throws IOException When touch fails */ - public function touch(string|iterable $files, int $time = null, int $atime = null) + public function touch(string|iterable $files, ?int $time = null, ?int $atime = null) { foreach ($this->toIterable($files) as $file) { if (!($time ? self::box('touch', $file, $time, $atime) : self::box('touch', $file))) { @@ -510,7 +510,7 @@ * * @throws IOException When file type is unknown */ - public function mirror(string $originDir, string $targetDir, \Traversable $iterator = null, array $options = []) + public function mirror(string $originDir, string $targetDir, ?\Traversable $iterator = null, array $options = []) { $targetDir = rtrim($targetDir, '/\\'); $originDir = rtrim($originDir, '/\\'); diff -ruN a/Path.php b/Path.php --- a/Path.php 2026-07-15 12:28:18 +++ b/Path.php 2026-07-15 12:28:18 @@ -257,7 +257,7 @@ * @param string|null $extension if specified, only that extension is cut * off (may contain leading dot) */ - public static function getFilenameWithoutExtension(string $path, string $extension = null): string + public static function getFilenameWithoutExtension(string $path, ?string $extension = null): string { if ('' === $path) { return '';