diff --git a/UPGRADE.md b/UPGRADE.md index f2f053c..205a0c9 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -2,4 +2,6 @@ - The class `FileSystem` was renamed `NativeFileSystem`. `FileSystem` is now an interface. -- Deprecated the `::getFileContents()` method in favour of the `::readFile()`. +- Deprecated the `::getFileContents()` method in favour of `::readFile()`. +- Deprecated the `::isAbsolutePath()` method in favour of `Path::isAbsolute()`. +- Deprecated the `::isRelativePath()` method in favour of `Path::isRelative()`. diff --git a/src/FileSystem.php b/src/FileSystem.php index ba048fc..2ae2935 100644 --- a/src/FileSystem.php +++ b/src/FileSystem.php @@ -52,22 +52,16 @@ interface FileSystem extends SymfonyFileSystem { /** - * Returns whether a path is relative. - * - * @param string $path a path string - * - * @return bool returns true if the path is relative or empty, false if - * it is absolute + * @deprecated Deprecated since 2.0. Use `Path::isRelative()` instead. Will be removed in 3.0. + * @see Path::isRelative()) */ public function isRelativePath(string $path): bool; public function escapePath(string $path): string; - public function dumpFile(string $filename, $content = ''): void; - /** * @deprecated Use the `::readFile()` method. Deprecated since 2.0 and it will be removed in 3.0. - * @see readFile + * @see SymfonyFileSystem::readFile() * * @throws IOException If the file cannot be read */ diff --git a/src/SymfonyFileSystem.php b/src/SymfonyFileSystem.php index ea0144f..3aa1783 100644 --- a/src/SymfonyFileSystem.php +++ b/src/SymfonyFileSystem.php @@ -224,6 +224,9 @@ public function mirror(string $originDir, string $targetDir, ?Traversable $itera /** * Returns whether the file path is an absolute path. + * + * @deprecated Deprecated since 2.0. Use `Path::isAbsolute()` instead. + * @see Path::isAbsolute() */ public function isAbsolutePath(string $file): bool;