diff --git a/ChangeLog.md b/ChangeLog.md index e9eea253b98f2210b5f3564937b7b0436960dc65..7cc4e3e3190470bb20fee62a0da76d8b6414a327 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -2,6 +2,12 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. +## [6.0.1] - 2024-03-02 + +### Changed + +* Do not use implicitly nullable parameters + ## [6.0.0] - 2024-02-02 ### Removed @@ -133,6 +139,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * This component is no longer supported on PHP 5.6 +[6.0.1]: https://github.com/sebastianbergmann/diff/compare/6.0.0...6.0.1 [6.0.0]: https://github.com/sebastianbergmann/diff/compare/5.1...6.0.0 [5.1.0]: https://github.com/sebastianbergmann/diff/compare/5.0.3...5.1.0 [5.0.3]: https://github.com/sebastianbergmann/diff/compare/5.0.2...5.0.3 diff --git a/src/Differ.php b/src/Differ.php index 19ccf97c33cd6c9397ef658d5414fbb4ee071e20..801fe02aaf1f00b02f8eab0b3e84e94afb0fd131 100644 --- a/src/Differ.php +++ b/src/Differ.php @@ -42,14 +42,14 @@ final class Differ $this->outputBuilder = $outputBuilder; } - public function diff(array|string $from, array|string $to, LongestCommonSubsequenceCalculator $lcs = null): string + public function diff(array|string $from, array|string $to, ?LongestCommonSubsequenceCalculator $lcs = null): string { $diff = $this->diffToArray($from, $to, $lcs); return $this->outputBuilder->getDiff($diff); } - public function diffToArray(array|string $from, array|string $to, LongestCommonSubsequenceCalculator $lcs = null): array + public function diffToArray(array|string $from, array|string $to, ?LongestCommonSubsequenceCalculator $lcs = null): array { if (is_string($from)) { $from = $this->splitStringByLines($from); diff --git a/src/Exception/ConfigurationException.php b/src/Exception/ConfigurationException.php index 6b8c79c46c1466716047ba07cb2dcf10c52b1cf8..b2abf0cbf37994c0cafe5f95056995698d08c657 100644 --- a/src/Exception/ConfigurationException.php +++ b/src/Exception/ConfigurationException.php @@ -21,7 +21,7 @@ final class ConfigurationException extends InvalidArgumentException string $expected, $value, int $code = 0, - Exception $previous = null + ?Exception $previous = null ) { parent::__construct( sprintf(