diff --git a/ChangeLog-10.0.md b/ChangeLog-10.0.md index 2842c46db07..5b719399a06 100644 --- a/ChangeLog-10.0.md +++ b/ChangeLog-10.0.md @@ -7,6 +7,7 @@ All notable changes of the PHPUnit 10.0 release series are documented in this fi ### Removed * [#4063](https://github.com/sebastianbergmann/phpunit/issues/4063): Remove `assertNotIsReadable()` +* [#4066](https://github.com/sebastianbergmann/phpunit/issues/4066): Remove `assertNotIsWritable()` * [#4142](https://github.com/sebastianbergmann/phpunit/issues/4142): Remove Prophecy integration [10.0.0]: https://github.com/sebastianbergmann/phpunit/compare/9.5...master diff --git a/src/Framework/Assert.php b/src/Framework/Assert.php index 8c777eebe8b..d14da88cda8 100644 --- a/src/Framework/Assert.php +++ b/src/Framework/Assert.php @@ -771,23 +771,6 @@ public static function assertIsNotWritable(string $filename, string $message = ' static::assertThat($filename, new LogicalNot(new IsWritable), $message); } - /** - * Asserts that a file/dir exists and is not writable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4065 - */ - public static function assertNotIsWritable(string $filename, string $message = ''): void - { - self::createWarning('assertNotIsWritable() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertIsNotWritable() instead.'); - - static::assertThat($filename, new LogicalNot(new IsWritable), $message); - } - /** * Asserts that a directory exists. * diff --git a/src/Framework/Assert/Functions.php b/src/Framework/Assert/Functions.php index 7767d685d3b..9f90a4cc746 100644 --- a/src/Framework/Assert/Functions.php +++ b/src/Framework/Assert/Functions.php @@ -794,27 +794,6 @@ function assertIsNotWritable(string $filename, string $message = ''): void } } -if (!function_exists('PHPUnit\Framework\assertNotIsWritable')) { - /** - * Asserts that a file/dir exists and is not writable. - * - * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - * - * @codeCoverageIgnore - * - * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4065 - * - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * - * @see Assert::assertNotIsWritable - */ - function assertNotIsWritable(string $filename, string $message = ''): void - { - Assert::assertNotIsWritable(...func_get_args()); - } -} - if (!function_exists('PHPUnit\Framework\assertDirectoryExists')) { /** * Asserts that a directory exists.