From 810a10af5c237d1ee8033c6c363ca8bbe59bc376 Mon Sep 17 00:00:00 2001 From: Sergey Golyshev Date: Mon, 5 Jun 2023 11:26:45 +0300 Subject: [PATCH 1/3] add #[\ReturnTypeWillChange] attribute to suppress notices of incompatible return types in php8 --- src/Utf8Filter.php | 1 + src/XmlIterator.php | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/Utf8Filter.php b/src/Utf8Filter.php index ebc9094..da8e20c 100644 --- a/src/Utf8Filter.php +++ b/src/Utf8Filter.php @@ -16,6 +16,7 @@ class Utf8Filter extends php_user_filter * * @link http://stackoverflow.com/a/3466609/372654 */ + #[\ReturnTypeWillChange] public function filter($in, $out, &$consumed, $closing) { while ($bucket = stream_bucket_make_writeable($in)) { diff --git a/src/XmlIterator.php b/src/XmlIterator.php index 885f68c..aeb49a1 100644 --- a/src/XmlIterator.php +++ b/src/XmlIterator.php @@ -94,6 +94,7 @@ public function __construct( * @link http://stackoverflow.com/a/1835324/372654 * @return false|array|\SimpleXMLElement */ + #[\ReturnTypeWillChange] public function current() { $node = $this->reader->expand(); @@ -121,6 +122,7 @@ public function current() * @link http://php.net/manual/en/iterator.next.php * @return void Any returned value is ignored. */ + #[\ReturnTypeWillChange] public function next() { if ($this->reader->next($this->delimiterTagName)) { @@ -133,6 +135,7 @@ public function next() * @link http://php.net/manual/en/iterator.key.php * @return int scalar on success, or null on failure. */ + #[\ReturnTypeWillChange] public function key() { return $this->position; @@ -144,6 +147,7 @@ public function key() * @return boolean The return value will be casted to boolean and then evaluated. * Returns true on success or false on failure. */ + #[\ReturnTypeWillChange] public function valid() { return $this->reader->name === $this->delimiterTagName; @@ -155,6 +159,7 @@ public function valid() * @throws \Exception * @return void Any returned value is ignored. */ + #[\ReturnTypeWillChange] public function rewind() { $uri = $this->xmlFileUri; From 5ed79e29536ca1f2f0e229db5cda92cbb8714241 Mon Sep 17 00:00:00 2001 From: Sergey Golyshev Date: Fri, 14 Jul 2023 16:27:54 +0300 Subject: [PATCH 2/3] Rename packet name to use --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0ad7b97..3584d37 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "halilim/xml-iterator", + "name": "glsv/xml-iterator", "type": "library", "description": "XML Reader to simplexml/array iterator with low memory usage and an acceptable level of ease of use.", "keywords": [ From c85f7400e03bde1c378b6ba5d14fa616b5eb7f8c Mon Sep 17 00:00:00 2001 From: Sergey Golyshev Date: Fri, 14 Jul 2023 16:35:31 +0300 Subject: [PATCH 3/3] Change the branch alias --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3584d37..b74fd83 100644 --- a/composer.json +++ b/composer.json @@ -44,7 +44,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "develop" } }, "config": {