Skip to content

Commit

Permalink
Merge pull request #1338 from nextcloud/fix/bump-icewind/streams-to-0…
Browse files Browse the repository at this point in the history
….7.7-in-master

Bump icewind/streams to 0.7.7 in master
  • Loading branch information
come-nc committed Mar 27, 2023
2 parents af47867 + c074e11 commit 61a2578
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 28 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -29,7 +29,7 @@
"giggsey/libphonenumber-for-php": "^8.12.37",
"guzzlehttp/guzzle": "^7.5.0",
"icewind/searchdav": "^3.0",
"icewind/streams": "v0.7.5",
"icewind/streams": "^0.7.7",
"laravel/serializable-closure": "^1.2.2",
"mexitek/phpcolors": "^1.0",
"microsoft/azure-storage-blob": "^1.5.4",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions composer/installed.json
Expand Up @@ -1806,17 +1806,17 @@
},
{
"name": "icewind/streams",
"version": "v0.7.5",
"version_normalized": "0.7.5.0",
"version": "v0.7.7",
"version_normalized": "0.7.7.0",
"source": {
"type": "git",
"url": "https://github.com/icewind1991/Streams.git",
"reference": "0c6aae16ebdadb257f0bd089c1e1e4cf5e20ddc2"
"reference": "64200fd7cfcc7f550c3c695c48d8fd8bba97fecb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/icewind1991/Streams/zipball/0c6aae16ebdadb257f0bd089c1e1e4cf5e20ddc2",
"reference": "0c6aae16ebdadb257f0bd089c1e1e4cf5e20ddc2",
"url": "https://api.github.com/repos/icewind1991/Streams/zipball/64200fd7cfcc7f550c3c695c48d8fd8bba97fecb",
"reference": "64200fd7cfcc7f550c3c695c48d8fd8bba97fecb",
"shasum": ""
},
"require": {
Expand All @@ -1827,7 +1827,7 @@
"phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^9"
},
"time": "2021-06-14T14:02:48+00:00",
"time": "2023-03-16T14:52:25+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand All @@ -1848,7 +1848,7 @@
"description": "A set of generic stream wrappers",
"support": {
"issues": "https://github.com/icewind1991/Streams/issues",
"source": "https://github.com/icewind1991/Streams/tree/v0.7.5"
"source": "https://github.com/icewind1991/Streams/tree/v0.7.7"
},
"install-path": "../icewind/streams"
},
Expand Down
10 changes: 5 additions & 5 deletions composer/installed.php
Expand Up @@ -3,7 +3,7 @@
'name' => 'nextcloud/3rdparty',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '0eb92e4624ac87a31a767628853dca656e99db17',
'reference' => '95330ecbe44f864edd0d193f249ca2acc84d9d06',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
Expand Down Expand Up @@ -236,9 +236,9 @@
'dev_requirement' => false,
),
'icewind/streams' => array(
'pretty_version' => 'v0.7.5',
'version' => '0.7.5.0',
'reference' => '0c6aae16ebdadb257f0bd089c1e1e4cf5e20ddc2',
'pretty_version' => 'v0.7.7',
'version' => '0.7.7.0',
'reference' => '64200fd7cfcc7f550c3c695c48d8fd8bba97fecb',
'type' => 'library',
'install_path' => __DIR__ . '/../icewind/streams',
'aliases' => array(),
Expand Down Expand Up @@ -328,7 +328,7 @@
'nextcloud/3rdparty' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '0eb92e4624ac87a31a767628853dca656e99db17',
'reference' => '95330ecbe44f864edd0d193f249ca2acc84d9d06',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
Expand Down
2 changes: 1 addition & 1 deletion icewind/streams/src/CallbackWrapper.php
Expand Up @@ -58,7 +58,7 @@ class CallbackWrapper extends Wrapper {
* @param callable|null $close (optional)
* @param callable|null $readDir (optional)
* @param callable|null $preClose (optional)
* @return resource|bool
* @return resource|false
*
*/
public static function wrap($source, $read = null, $write = null, $close = null, $readDir = null, $preClose = null) {
Expand Down
2 changes: 1 addition & 1 deletion icewind/streams/src/CountWrapper.php
Expand Up @@ -55,7 +55,7 @@ class CountWrapper extends Wrapper {
*
* @param resource $source
* @param callable $callback
* @return resource|bool
* @return resource|false
*
* @throws \BadMethodCallException
*/
Expand Down
2 changes: 1 addition & 1 deletion icewind/streams/src/DirectoryFilter.php
Expand Up @@ -46,7 +46,7 @@ public function dir_readdir() {
/**
* @param resource $source
* @param callable $filter
* @return resource|bool
* @return resource|false
*/
public static function wrap($source, callable $filter) {
return self::wrapSource($source, [
Expand Down
2 changes: 1 addition & 1 deletion icewind/streams/src/DirectoryWrapper.php
Expand Up @@ -23,7 +23,7 @@ public function dir_opendir($path, $options) {
}

/**
* @return string
* @return string|false
*/
public function dir_readdir() {
return readdir($this->source);
Expand Down
2 changes: 1 addition & 1 deletion icewind/streams/src/HashWrapper.php
Expand Up @@ -41,7 +41,7 @@ abstract class HashWrapper extends Wrapper {
* @param resource $source
* @param string $hash
* @param callable $callback
* @return resource|bool
* @return resource|false
*
* @throws \BadMethodCallException
*/
Expand Down
2 changes: 1 addition & 1 deletion icewind/streams/src/IteratorDirectory.php
Expand Up @@ -92,7 +92,7 @@ public function dir_rewinddir() {
* Creates a directory handle from the provided array or iterator
*
* @param \Iterator | array $source
* @return resource|bool
* @return resource|false
*
* @throws \BadMethodCallException
*/
Expand Down
21 changes: 20 additions & 1 deletion icewind/streams/src/Wrapper.php
Expand Up @@ -44,7 +44,7 @@ protected function loadContext($name = null) {

public function stream_seek($offset, $whence = SEEK_SET) {
$result = fseek($this->source, $offset, $whence);
return $result == 0 ? true : false;
return $result == 0;
}

public function stream_tell() {
Expand Down Expand Up @@ -109,4 +109,23 @@ public function dir_closedir() {
public function dir_rewinddir() {
return rewind($this->source);
}

public function getSource() {
return $this->source;
}

/**
* Retrieves header/metadata from the source stream.
*
* This is equivalent to calling `stream_get_meta_data` on the source stream except nested stream wrappers are handled transparently
*
* @return array
*/
public function getMetaData(): array {
$meta = stream_get_meta_data($this->source);
while (isset($meta['wrapper_data']) && $meta['wrapper_data'] instanceof Wrapper) {
$meta = $meta['wrapper_data']->getMetaData();
}
return $meta;
}
}
2 changes: 1 addition & 1 deletion icewind/streams/src/WrapperHandler.php
Expand Up @@ -55,7 +55,7 @@ private static function buildContext($protocol, $context, $source) {
* @param resource|array $context
* @param string|null $protocol deprecated, protocol is now automatically generated
* @param string|null $class deprecated, class is now automatically generated
* @return bool|resource
* @return resource|false
*/
protected static function wrapSource($source, $context = [], $protocol = null, $class = null, $mode = 'r+') {
if ($class === null) {
Expand Down

0 comments on commit 61a2578

Please sign in to comment.