From ca30d36b508b4efcf6c7304b24386e36da10708e Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Wed, 12 Feb 2020 16:40:45 +0100 Subject: [PATCH] Closes #4071 --- ChangeLog-9.1.md | 1 + src/Framework/Assert.php | 6 ++++++ src/Framework/Assert/Functions.php | 3 +++ 3 files changed, 10 insertions(+) diff --git a/ChangeLog-9.1.md b/ChangeLog-9.1.md index d0140d2d9f0..596d5ea2812 100644 --- a/ChangeLog-9.1.md +++ b/ChangeLog-9.1.md @@ -23,5 +23,6 @@ All notable changes of the PHPUnit 9.1 release series are documented in this fil * Implemented [#4062](https://github.com/sebastianbergmann/phpunit/issues/4062): Deprecate `assertNotIsReadable()` * Implemented [#4065](https://github.com/sebastianbergmann/phpunit/issues/4065): Deprecate `assertNotIsWritable()` * Implemented [#4068](https://github.com/sebastianbergmann/phpunit/issues/4068): Deprecate `assertDirectoryNotExists()` +* Implemented [#4071](https://github.com/sebastianbergmann/phpunit/issues/4071): Deprecate `assertDirectoryNotIsReadable()` [9.1.0]: https://github.com/sebastianbergmann/phpunit/compare/9.0...master diff --git a/src/Framework/Assert.php b/src/Framework/Assert.php index 8be652062f6..25fcc3561b4 100644 --- a/src/Framework/Assert.php +++ b/src/Framework/Assert.php @@ -836,9 +836,15 @@ public static function assertDirectoryIsNotReadable(string $directory, string $m * * @throws ExpectationFailedException * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4071 */ public static function assertDirectoryNotIsReadable(string $directory, string $message = ''): void { + self::createWarning('assertDirectoryNotIsReadable() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertDirectoryIsNotReadable() instead.'); + self::assertDirectoryExists($directory, $message); self::assertIsNotReadable($directory, $message); } diff --git a/src/Framework/Assert/Functions.php b/src/Framework/Assert/Functions.php index c3142b537e1..6ca0483abfa 100644 --- a/src/Framework/Assert/Functions.php +++ b/src/Framework/Assert/Functions.php @@ -724,6 +724,9 @@ function assertDirectoryIsNotReadable(string $directory, string $message = ''): * @throws ExpectationFailedException * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * + * @codeCoverageIgnore + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4071 * @see Assert::assertDirectoryNotIsReadable */ function assertDirectoryNotIsReadable(string $directory, string $message = ''): void