Skip to content

Commit

Permalink
feat: add stream_lock to stream wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
carlalexander committed Feb 12, 2022
1 parent 70fb544 commit 7c6842e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/CloudStorage/AbstractCloudStorageStreamWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,16 @@ public function stream_flush()
});
}

/**
* Advisory file locking.
*
* @see https://www.php.net/manual/en/streamwrapper.stream-lock.php
*/
public function stream_lock(): bool
{
return false;
}

/**
* Change stream metadata.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,11 @@ public function testStreamFlushWhenReading()
$this->assertFalse($wrapper->stream_flush());
}

public function testStreamLock()
{
$this->assertFalse(($this->getStreamWrapperObject())->stream_lock());
}

public function testStreamMetadata()
{
$this->assertFalse(($this->getStreamWrapperObject())->stream_metadata());
Expand Down

0 comments on commit 7c6842e

Please sign in to comment.