Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()`.
12 changes: 3 additions & 9 deletions src/FileSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was already declared in the parent interface


/**
* @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
*/
Expand Down
3 changes: 3 additions & 0 deletions src/SymfonyFileSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down