Skip to content

Commit

Permalink
Merge pull request #1214 from phpDocumentor/fix/regression-filesystem
Browse files Browse the repository at this point in the history
Fix regression on missing resource put
  • Loading branch information
jaapio authored Mar 10, 2025
2 parents b6bec6f + fc5f4db commit 8330dec
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/filesystem/src/FileSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ public function read(string $path): string|false;

public function put(string $path, string $contents): bool;

/** @param resource $resource */
public function putStream(string $path, $resource): void;

/** @return StorageAttributes[] */
public function listContents(string $directory = '', bool $recursive = false): array;

Expand Down
6 changes: 6 additions & 0 deletions packages/filesystem/src/FlySystemAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ public function put(string $path, string $contents): bool
return $this->filesystem->put($path, $contents);
}

/** @param resource $resource */
public function putStream(string $path, $resource): void
{
$this->filesystem->putStream($path, $resource);
}

/** @return StorageAttributes[] */
public function listContents(string $directory = '', bool $recursive = false): array
{
Expand Down
6 changes: 6 additions & 0 deletions packages/filesystem/src/FlysystemV1/FlysystemV1.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ public function put(string $path, string $contents): bool
return $this->filesystem->put($path, $contents);
}

/** @param resource $resource */
public function putStream(string $path, $resource): void
{
$this->filesystem->putStream($path, $resource);
}

/** @return StorageAttributes[] */
public function listContents(string $directory = '', bool $recursive = false): array
{
Expand Down
6 changes: 6 additions & 0 deletions packages/filesystem/src/FlysystemV3/FlysystemV3.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ public function put(string $path, string $contents): bool
return true;
}

/** @param resource $resource */
public function putStream(string $path, $resource): void
{
$this->filesystem->writeStream($path, $resource);
}

/** @return FileAttributes[] */
public function listContents(string $directory = '', bool $recursive = false): array
{
Expand Down

0 comments on commit 8330dec

Please sign in to comment.