From 232be8ff4bbe1a2ea8897d8ceb24b9cacc9b7970 Mon Sep 17 00:00:00 2001 From: Denis Lyamkin Date: Mon, 27 Mar 2023 16:58:35 +0400 Subject: [PATCH 1/2] [*] {1-32770} Added attributes to support php 8.1. --- src/Illuminate/Support/Collection.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Illuminate/Support/Collection.php b/src/Illuminate/Support/Collection.php index 43895b2..c9c6bc2 100644 --- a/src/Illuminate/Support/Collection.php +++ b/src/Illuminate/Support/Collection.php @@ -1229,6 +1229,7 @@ public function toJson($options = 0) * * @return \ArrayIterator */ + #[\ReturnTypeWillChange] public function getIterator() { return new ArrayIterator($this->items); @@ -1250,6 +1251,7 @@ public function getCachingIterator($flags = CachingIterator::CALL_TOSTRING) * * @return int */ + #[\ReturnTypeWillChange] public function count() { return count($this->items); @@ -1271,6 +1273,7 @@ public function toBase() * @param mixed $key * @return bool */ + #[\ReturnTypeWillChange] public function offsetExists($key) { return array_key_exists($key, $this->items); @@ -1282,6 +1285,7 @@ public function offsetExists($key) * @param mixed $key * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($key) { return $this->items[$key]; @@ -1294,6 +1298,7 @@ public function offsetGet($key) * @param mixed $value * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($key, $value) { if (is_null($key)) { @@ -1309,6 +1314,7 @@ public function offsetSet($key, $value) * @param string $key * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($key) { unset($this->items[$key]); From d6f5b76cb3fb509471f99831367821d00533aa7e Mon Sep 17 00:00:00 2001 From: Denis Lyamkin Date: Wed, 29 Mar 2023 14:46:29 +0400 Subject: [PATCH 2/2] [~] {1-32770} Added attribute to php 8.1. --- src/Illuminate/Support/Collection.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Illuminate/Support/Collection.php b/src/Illuminate/Support/Collection.php index c9c6bc2..d76d799 100644 --- a/src/Illuminate/Support/Collection.php +++ b/src/Illuminate/Support/Collection.php @@ -1198,6 +1198,7 @@ public function toArray() * * @return array */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return array_map(function ($value) {