diff --git a/src/Illuminate/Cache/RedisStore.php b/src/Illuminate/Cache/RedisStore.php index c61e925f3687..259f2c3fd648 100755 --- a/src/Illuminate/Cache/RedisStore.php +++ b/src/Illuminate/Cache/RedisStore.php @@ -313,7 +313,7 @@ protected function currentTags($chunkSize = 1000) $prefix = $connectionPrefix.$this->getPrefix(); - return LazyCollection::make(function () use ($connection, $chunkSize, $prefix, $defaultCursorValue) { + return (new LazyCollection(function () use ($connection, $chunkSize, $prefix, $defaultCursorValue) { $cursor = $defaultCursorValue; do { @@ -336,7 +336,7 @@ protected function currentTags($chunkSize = 1000) yield $tag; } } while (((string) $cursor) !== $defaultCursorValue); - })->map(fn (string $tagKey) => Str::match('/^'.preg_quote($prefix, '/').'tag:(.*):entries$/', $tagKey)); + }))->map(fn (string $tagKey) => Str::match('/^'.preg_quote($prefix, '/').'tag:(.*):entries$/', $tagKey)); } /** diff --git a/src/Illuminate/Cache/RedisTagSet.php b/src/Illuminate/Cache/RedisTagSet.php index c6aea191a83b..267c11607cd4 100644 --- a/src/Illuminate/Cache/RedisTagSet.php +++ b/src/Illuminate/Cache/RedisTagSet.php @@ -43,7 +43,7 @@ public function entries() default => '0', }; - return LazyCollection::make(function () use ($connection, $defaultCursorValue) { + return new LazyCollection(function () use ($connection, $defaultCursorValue) { foreach ($this->tagIds() as $tagKey) { $cursor = $defaultCursorValue; diff --git a/src/Illuminate/Database/Concerns/BuildsQueries.php b/src/Illuminate/Database/Concerns/BuildsQueries.php index cf1f6e2db925..385f3f964c40 100644 --- a/src/Illuminate/Database/Concerns/BuildsQueries.php +++ b/src/Illuminate/Database/Concerns/BuildsQueries.php @@ -236,7 +236,7 @@ public function lazy($chunkSize = 1000) $this->enforceOrderBy(); - return LazyCollection::make(function () use ($chunkSize) { + return new LazyCollection(function () use ($chunkSize) { $page = 1; while (true) { @@ -304,7 +304,7 @@ protected function orderedLazyById($chunkSize = 1000, $column = null, $alias = n $alias ??= $column; - return LazyCollection::make(function () use ($chunkSize, $column, $alias, $descending) { + return new LazyCollection(function () use ($chunkSize, $column, $alias, $descending) { $lastId = null; while (true) { diff --git a/src/Illuminate/Filesystem/Filesystem.php b/src/Illuminate/Filesystem/Filesystem.php index 8bba99a2f2ed..67e31c0bf4f9 100644 --- a/src/Illuminate/Filesystem/Filesystem.php +++ b/src/Illuminate/Filesystem/Filesystem.php @@ -168,7 +168,7 @@ public function lines($path) ); } - return LazyCollection::make(function () use ($path) { + return new LazyCollection(function () use ($path) { $file = new SplFileObject($path); $file->setFlags(SplFileObject::DROP_NEW_LINE);