Skip to content

Commit b05f89a

Browse files
Merge branch '9.x'
2 parents 20f8658 + 5897180 commit b05f89a

File tree

119 files changed

+1445
-301
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+1445
-301
lines changed

.github/workflows/update-changelog.yml

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,4 @@ on:
66

77
jobs:
88
update:
9-
runs-on: ubuntu-latest
10-
11-
steps:
12-
- name: Checkout code
13-
uses: actions/checkout@v2
14-
with:
15-
ref: ${{ github.ref_name }}
16-
17-
- name: Update Changelog
18-
uses: stefanzweifel/changelog-updater-action@v1
19-
with:
20-
latest-version: ${{ github.event.release.tag_name }}
21-
release-notes: ${{ github.event.release.body }}
22-
compare-url-target-revision: ${{ github.event.release.target_commitish }}
23-
24-
- name: Commit updated CHANGELOG
25-
uses: stefanzweifel/git-auto-commit-action@v4
26-
with:
27-
branch: ${{ github.event.release.target_commitish }}
28-
commit_message: Update CHANGELOG.md
29-
file_pattern: CHANGELOG.md
9+
uses: laravel/.github/.github/workflows/update-changelog.yml@main

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
## [Unreleased](https://github.com/laravel/framework/compare/v10.0.0..master)
44

55

6-
## [v10.0.0 (2022-??-??)](https://github.com/laravel/framework/compare/v9.2.0...master)
6+
## [v10.0.0 (2023-??-??)](https://github.com/laravel/framework/compare/v10.0.0...master)
77

88
Check the upgrade guide in the [Official Laravel Upgrade Documentation](https://laravel.com/docs/10.x/upgrade). Also you can see some release notes in the [Official Laravel Release Documentation](https://laravel.com/docs/10.x/releases).

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"mockery/mockery": "^1.4.4",
9191
"orchestra/testbench-core": "^8.0",
9292
"pda/pheanstalk": "^4.0",
93-
"phpstan/phpstan": "^1.0",
93+
"phpstan/phpstan": "^1.4.7",
9494
"phpunit/phpunit": "^9.5.8",
9595
"predis/predis": "^1.1.9",
9696
"symfony/cache": "^6.1"

src/Illuminate/Auth/Console/ClearResetsCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ public function handle()
3838
{
3939
$this->laravel['auth.password']->broker($this->argument('name'))->getRepository()->deleteExpired();
4040

41-
$this->info('Expired reset tokens cleared!');
41+
$this->info('Expired reset tokens cleared successfully.');
4242
}
4343
}

src/Illuminate/Auth/DatabaseUserProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ public function retrieveByCredentials(array $credentials)
124124
}
125125
}
126126

127-
// Now we are ready to execute the query to see if we have an user matching
128-
// the given credentials. If not, we will just return nulls and indicate
129-
// that there are no matching users for these given credential arrays.
127+
// Now we are ready to execute the query to see if we have a user matching
128+
// the given credentials. If not, we will just return null and indicate
129+
// that there are no matching users from the given credential arrays.
130130
$user = $query->first();
131131

132132
return $this->getGenericUser($user);

src/Illuminate/Bus/Batch.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public function fresh()
155155
/**
156156
* Add additional jobs to the batch.
157157
*
158-
* @param \Illuminate\Support\Enumerable|array $jobs
158+
* @param \Illuminate\Support\Enumerable|object|array $jobs
159159
* @return self
160160
*/
161161
public function add($jobs)
@@ -466,4 +466,15 @@ public function jsonSerialize(): array
466466
{
467467
return $this->toArray();
468468
}
469+
470+
/**
471+
* Dynamically access the batch's "options" via properties.
472+
*
473+
* @param string $key
474+
* @return mixed
475+
*/
476+
public function __get($key)
477+
{
478+
return $this->options[$key] ?? null;
479+
}
469480
}

src/Illuminate/Cache/Console/CacheTableCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function handle()
6969

7070
$this->files->put($fullPath, $this->files->get(__DIR__.'/stubs/cache.stub'));
7171

72-
$this->info('Migration created successfully!');
72+
$this->info('Migration created successfully.');
7373

7474
$this->composer->dumpAutoloads();
7575
}

src/Illuminate/Cache/Console/ClearCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function handle()
8585
'cache:cleared', [$this->argument('store'), $this->tags()]
8686
);
8787

88-
$this->info('Application cache cleared!');
88+
$this->info('Application cache cleared successfully.');
8989
}
9090

9191
/**

src/Illuminate/Collections/Collection.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public function diff($items)
231231
* Get the items in the collection that are not present in the given items, using the callback.
232232
*
233233
* @param \Illuminate\Contracts\Support\Arrayable<array-key, TValue>|iterable<array-key, TValue> $items
234-
* @param callable(TValue): int $callback
234+
* @param callable(TValue, TValue): int $callback
235235
* @return static
236236
*/
237237
public function diffUsing($items, callable $callback)
@@ -254,7 +254,7 @@ public function diffAssoc($items)
254254
* Get the items in the collection whose keys and values are not present in the given items, using the callback.
255255
*
256256
* @param \Illuminate\Contracts\Support\Arrayable<TKey, TValue>|iterable<TKey, TValue> $items
257-
* @param callable(TKey): int $callback
257+
* @param callable(TKey, TKey): int $callback
258258
* @return static
259259
*/
260260
public function diffAssocUsing($items, callable $callback)
@@ -277,7 +277,7 @@ public function diffKeys($items)
277277
* Get the items in the collection whose keys are not present in the given items, using the callback.
278278
*
279279
* @param \Illuminate\Contracts\Support\Arrayable<TKey, TValue>|iterable<TKey, TValue> $items
280-
* @param callable(TKey): int $callback
280+
* @param callable(TKey, TKey): int $callback
281281
* @return static
282282
*/
283283
public function diffKeysUsing($items, callable $callback)
@@ -577,12 +577,16 @@ public function hasAny($key)
577577
/**
578578
* Concatenate values of a given key as a string.
579579
*
580-
* @param string $value
580+
* @param callable|string $value
581581
* @param string|null $glue
582582
* @return string
583583
*/
584584
public function implode($value, $glue = null)
585585
{
586+
if (is_callable($value)) {
587+
return implode($glue ?? '', $this->map($value)->all());
588+
}
589+
586590
$first = $this->first();
587591

588592
if (is_array($first) || (is_object($first) && ! $first instanceof Stringable)) {
@@ -852,7 +856,7 @@ public function nth($step, $offset = 0)
852856
/**
853857
* Get the items with the specified keys.
854858
*
855-
* @param \Illuminate\Support\Enumerable<array-key, TKey>|array<array-key, TKey> $keys
859+
* @param \Illuminate\Support\Enumerable<array-key, TKey>|array<array-key, TKey>|string $keys
856860
* @return static
857861
*/
858862
public function only($keys)
@@ -1436,7 +1440,7 @@ public function sortKeysDesc($options = SORT_REGULAR)
14361440
/**
14371441
* Sort the collection keys using a callback.
14381442
*
1439-
* @param callable $callback
1443+
* @param callable(TKey, TKey): int $callback
14401444
* @return static
14411445
*/
14421446
public function sortKeysUsing(callable $callback)

src/Illuminate/Collections/Enumerable.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public function diff($items);
200200
* Get the items that are not present in the given items, using the callback.
201201
*
202202
* @param \Illuminate\Contracts\Support\Arrayable<array-key, TValue>|iterable<array-key, TValue> $items
203-
* @param callable(TValue): int $callback
203+
* @param callable(TValue, TValue): int $callback
204204
* @return static
205205
*/
206206
public function diffUsing($items, callable $callback);
@@ -217,7 +217,7 @@ public function diffAssoc($items);
217217
* Get the items whose keys and values are not present in the given items, using the callback.
218218
*
219219
* @param \Illuminate\Contracts\Support\Arrayable<TKey, TValue>|iterable<TKey, TValue> $items
220-
* @param callable(TKey): int $callback
220+
* @param callable(TKey, TKey): int $callback
221221
* @return static
222222
*/
223223
public function diffAssocUsing($items, callable $callback);
@@ -234,7 +234,7 @@ public function diffKeys($items);
234234
* Get the items whose keys are not present in the given items, using the callback.
235235
*
236236
* @param \Illuminate\Contracts\Support\Arrayable<TKey, TValue>|iterable<TKey, TValue> $items
237-
* @param callable(TKey): int $callback
237+
* @param callable(TKey, TKey): int $callback
238238
* @return static
239239
*/
240240
public function diffKeysUsing($items, callable $callback);
@@ -757,7 +757,7 @@ public function nth($step, $offset = 0);
757757
/**
758758
* Get the items with the specified keys.
759759
*
760-
* @param \Illuminate\Support\Enumerable<array-key, TKey>|array<array-key, TKey> $keys
760+
* @param \Illuminate\Support\Enumerable<array-key, TKey>|array<array-key, TKey>|string $keys
761761
* @return static
762762
*/
763763
public function only($keys);
@@ -1016,7 +1016,7 @@ public function sortKeysDesc($options = SORT_REGULAR);
10161016
/**
10171017
* Sort the collection keys using a callback.
10181018
*
1019-
* @param callable $callback
1019+
* @param callable(TKey, TKey): int $callback
10201020
* @return static
10211021
*/
10221022
public function sortKeysUsing(callable $callback);

0 commit comments

Comments
 (0)