Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.x] Add missing methods to the Illuminate\Contracts\Container\Container interface #52543

Closed
wants to merge 345 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
345 commits
Select commit Hold shift + click to select a range
97058e2
Update facade docblocks
taylorotwell Aug 1, 2024
d164bbf
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
b39720e
Update facade docblocks
taylorotwell Aug 1, 2024
bdc4aad
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
efe4fde
Update facade docblocks
taylorotwell Aug 1, 2024
c417c6a
Support passing default as named parameter in whenLoaded, whenAggrega…
hn-seoai Aug 1, 2024
ee8d733
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
e7b8f6d
Update facade docblocks
taylorotwell Aug 1, 2024
7d02eb0
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
c016de2
Update facade docblocks
taylorotwell Aug 1, 2024
cce61a1
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
75c85fb
Update facade docblocks
taylorotwell Aug 1, 2024
e4678bc
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
485898f
Update facade docblocks
taylorotwell Aug 1, 2024
d268193
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
3dad44e
Update facade docblocks
taylorotwell Aug 1, 2024
f2046ea
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
36c86f4
Update facade docblocks
taylorotwell Aug 1, 2024
dd68539
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
ff90751
Update facade docblocks
taylorotwell Aug 1, 2024
7dc8c26
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
2a87f91
Declare exceptions unreportable using the ShouldntReport interface (#…
chrispage1 Aug 1, 2024
cbd407c
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
977abf5
Update facade docblocks
taylorotwell Aug 1, 2024
e0b3d5b
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
5b209a4
Update facade docblocks
taylorotwell Aug 1, 2024
a64ee24
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
fd66c14
Update facade docblocks
taylorotwell Aug 1, 2024
1a1b87c
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
ce5507a
Update facade docblocks
taylorotwell Aug 1, 2024
9ff76e2
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
7c81b26
Update facade docblocks
taylorotwell Aug 1, 2024
d7bf4c1
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
7dcce1a
Update facade docblocks
taylorotwell Aug 1, 2024
6177bab
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
1a0b00a
Update facade docblocks
taylorotwell Aug 1, 2024
2f7cf2b
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
41f97a8
Update facade docblocks
taylorotwell Aug 1, 2024
516fc2d
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
9d5c4dd
Update facade docblocks
taylorotwell Aug 1, 2024
5b939e1
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
eb1d94d
Update facade docblocks
taylorotwell Aug 1, 2024
05421a0
[11.x] Enable extension of connection inspection methods (#52231)
GromNaN Aug 1, 2024
a8d75de
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
dc6a280
Update facade docblocks
taylorotwell Aug 1, 2024
e2ede44
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
44d1441
Update facade docblocks
taylorotwell Aug 1, 2024
2c72464
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
3c30985
Update facade docblocks
taylorotwell Aug 1, 2024
2f68433
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
50196eb
Update facade docblocks
taylorotwell Aug 1, 2024
67f6e4c
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
c5d07ad
Update facade docblocks
taylorotwell Aug 1, 2024
078391f
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
edc106e
[11.x] Add `whenExistsLoaded` method to conditionally include relatio…
CodeWithKyrian Aug 1, 2024
b819bc0
Update facade docblocks
taylorotwell Aug 1, 2024
0d93c5f
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
bf319d9
Update facade docblocks
taylorotwell Aug 1, 2024
9d17032
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
1c6dd27
Update facade docblocks
taylorotwell Aug 1, 2024
5d8881b
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
985fc9d
Update facade docblocks
taylorotwell Aug 1, 2024
3a64a55
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
8c4effc
Update facade docblocks
taylorotwell Aug 1, 2024
18716ff
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
9e2bcb4
Update facade docblocks
taylorotwell Aug 1, 2024
ef01b95
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
fe50eb0
Update facade docblocks
taylorotwell Aug 1, 2024
eecb209
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
d485638
Update facade docblocks
taylorotwell Aug 1, 2024
8dc87c3
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
95e27a7
Update facade docblocks
taylorotwell Aug 1, 2024
36fae55
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
ae05e27
Update facade docblocks
taylorotwell Aug 1, 2024
a81c4b6
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
e051903
Update facade docblocks
taylorotwell Aug 1, 2024
effae62
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
7b6bc27
Update facade docblocks
taylorotwell Aug 1, 2024
ac0f642
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
6e6e5eb
Update facade docblocks
taylorotwell Aug 1, 2024
1766cd4
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
9f7f8f2
Update facade docblocks
taylorotwell Aug 1, 2024
8f10920
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
eedc27b
Update facade docblocks
taylorotwell Aug 1, 2024
8ae79fd
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
bf2a48d
Update facade docblocks
taylorotwell Aug 1, 2024
bb79576
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
63bafef
Update facade docblocks
taylorotwell Aug 1, 2024
52344b1
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
5a22036
Update facade docblocks
taylorotwell Aug 1, 2024
7ffe6d9
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
4281697
Update facade docblocks
taylorotwell Aug 1, 2024
b1884d8
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
c2d1967
Update facade docblocks
taylorotwell Aug 1, 2024
c561161
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
f613ba1
Update facade docblocks
taylorotwell Aug 1, 2024
628cdf9
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
39e499f
Update facade docblocks
taylorotwell Aug 1, 2024
863fdd4
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
19bb00f
Update facade docblocks
taylorotwell Aug 1, 2024
bd73437
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
95e7a63
Update facade docblocks
taylorotwell Aug 1, 2024
d310432
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
1c4d78e
Update facade docblocks
taylorotwell Aug 1, 2024
4b7e59e
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
3684500
Update facade docblocks
taylorotwell Aug 1, 2024
f95fa09
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
aadc48d
Update facade docblocks
taylorotwell Aug 1, 2024
2d10198
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
2d891a5
Update facade docblocks
taylorotwell Aug 1, 2024
87ebe3b
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
a71cdd9
Update facade docblocks
taylorotwell Aug 1, 2024
051347a
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
abe3579
Update facade docblocks
taylorotwell Aug 1, 2024
0aa1151
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
f91f487
Update facade docblocks
taylorotwell Aug 1, 2024
6e031bf
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
bd51b84
Update facade docblocks
taylorotwell Aug 1, 2024
34c7668
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
dadd70e
Update facade docblocks
taylorotwell Aug 1, 2024
a3fcef8
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
a044973
Update facade docblocks
taylorotwell Aug 1, 2024
252dda6
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
21780c3
Update facade docblocks
taylorotwell Aug 1, 2024
089f6a3
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
55eeff8
Update facade docblocks
taylorotwell Aug 1, 2024
9353b77
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
e27adb9
Update facade docblocks
taylorotwell Aug 1, 2024
f9472f2
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
d5a2f08
Update facade docblocks
taylorotwell Aug 1, 2024
123dc7c
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
b36279f
Update facade docblocks
taylorotwell Aug 1, 2024
e8de26a
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
e7c7a62
Update facade docblocks
taylorotwell Aug 1, 2024
8c0461c
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
46bdfc0
Update facade docblocks
taylorotwell Aug 1, 2024
4275409
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
d980441
Update facade docblocks
taylorotwell Aug 1, 2024
4e3faa2
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
ff2a3e7
Update facade docblocks
taylorotwell Aug 1, 2024
444aa11
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
746d601
Update facade docblocks
taylorotwell Aug 1, 2024
4f9ca56
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
eb5dff0
Update facade docblocks
taylorotwell Aug 1, 2024
44538ff
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
c9f17e2
Update facade docblocks
taylorotwell Aug 1, 2024
1543296
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
0767f5b
Update facade docblocks
taylorotwell Aug 1, 2024
709ed02
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
80c38cf
Update facade docblocks
taylorotwell Aug 1, 2024
4248abe
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
7337aae
Update facade docblocks
taylorotwell Aug 1, 2024
0caeb58
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
f25c7f3
Update facade docblocks
taylorotwell Aug 1, 2024
61c3564
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
3f94a9a
Update facade docblocks
taylorotwell Aug 1, 2024
fa71a81
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
7c9ea8f
Update facade docblocks
taylorotwell Aug 1, 2024
16e5ca2
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
aeb52b6
Update facade docblocks
taylorotwell Aug 1, 2024
a2de882
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
87c3efd
Update facade docblocks
taylorotwell Aug 1, 2024
f0af879
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
dc1d3cf
Update facade docblocks
taylorotwell Aug 1, 2024
c6891f9
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
4e14166
Update facade docblocks
taylorotwell Aug 1, 2024
a0a47c6
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
b50f9f0
Update facade docblocks
taylorotwell Aug 1, 2024
c7ab544
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
408a0b9
Update facade docblocks
taylorotwell Aug 1, 2024
adb49f0
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
b47e1d2
Update facade docblocks
taylorotwell Aug 1, 2024
4c4442b
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
a6942ee
Update facade docblocks
taylorotwell Aug 1, 2024
60fbec9
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
46c0db4
Update facade docblocks
taylorotwell Aug 1, 2024
517adee
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
0d4fa82
Update facade docblocks
taylorotwell Aug 1, 2024
02a7b29
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
90145de
wip
taylorotwell Aug 1, 2024
5816826
Apply fixes from StyleCI
StyleCIBot Aug 1, 2024
630df64
Update facade docblocks
taylorotwell Aug 1, 2024
4980576
[11.x] Add `in()` and `inHidden()` functions to Context Stacks (#52346)
lessevv Aug 1, 2024
f1e28c5
wip
taylorotwell Aug 1, 2024
8fd4e65
Update facade docblocks
taylorotwell Aug 1, 2024
c24fb24
Fixed static analysis
driesvints Aug 2, 2024
2267834
Fixed static analysis
driesvints Aug 2, 2024
cfe5f84
Apply fixes from StyleCI
StyleCIBot Aug 2, 2024
53b2ee6
Use Command::fail() method for single error messages (#52387)
seriquynh Aug 5, 2024
c03c298
Rework `Context::stackContains` (#52381)
timacdonald Aug 5, 2024
fd8e150
Allow enums to be passed to AssertableJson where methods (#52360)
patrickomeara Aug 5, 2024
4d7835b
[11.x] Made `list` validation rule as array for "size" rules in valid…
siarheipashkevich Aug 5, 2024
b8a6d7c
[11.x] Add contextual attributes to resolve drivers (#52265)
ziadoz Aug 5, 2024
cef2ce3
Apply fixes from StyleCI
StyleCIBot Aug 5, 2024
7e69645
Fix docblocks for where(All|AnyNone) query methods (#52388)
einar-hansen Aug 5, 2024
e1e7cd1
fix: Request::json() json errors when decoding empty string (#52389)
calebdw Aug 5, 2024
d984d0d
In MySQL, harvest last insert ID immediately after query is executed
piurafunk Aug 5, 2024
64c45e0
Fix Http Client Pool requests that have no response (#52393)
andrewbroberg Aug 6, 2024
5e5cbc7
[11.x] Introduce MixFileNotFoundException for handling missing Mix fi…
Ex10Dios Aug 6, 2024
ffab5fc
Merge branch '10.x' of github.com:laravel/framework into 10.x
taylorotwell Aug 6, 2024
332e29a
Merge branch '10.x' of https://github.com/piurafunk/framework into pi…
taylorotwell Aug 6, 2024
16ac9c5
formatting
taylorotwell Aug 6, 2024
d2546d5
Apply fixes from StyleCI
StyleCIBot Aug 6, 2024
d816681
Update version to v10.48.19
driesvints Aug 6, 2024
763b942
Update CHANGELOG
driesvints Aug 6, 2024
8bd7a9b
Merge branch '10.x' into 11.x
driesvints Aug 6, 2024
3be925c
wip
driesvints Aug 6, 2024
a6e916e
wip
driesvints Aug 6, 2024
0a31202
wip
driesvints Aug 6, 2024
3cd7593
Update version to v11.20.0
driesvints Aug 6, 2024
6c07bca
Update CHANGELOG
driesvints Aug 6, 2024
5ae7da1
[11.x] Test Improvements (#52402)
crynobone Aug 7, 2024
b5e1a9f
Fix docblock for the event dispatcher (#52411)
seriquynh Aug 7, 2024
ef9cf47
update text email template (#52417)
tranvanhieu01012002 Aug 7, 2024
5a9d85b
[11.x] Make `expectsChoice` assertion more intuitive with associative…
jessarcher Aug 7, 2024
56200cb
[11.x] Add `resource()` method to Illuminate\Http\Client\Response (#…
einar-hansen Aug 7, 2024
0138d78
fix: prevent casting empty string to array from triggering json error…
calebdw Aug 7, 2024
fd0f381
Add mixing to Http/Client/Response class (#52410)
einar-hansen Aug 7, 2024
dd649c6
[11.x] Don't touch BelongsTo relationship when it doesn't exist (#52407)
patrickomeara Aug 7, 2024
5317d40
[11.x] Fix Factory::afterCreating callable argument type (#52424)
villfa Aug 8, 2024
6ae8c9a
[11.x] Auto-secure cookies (#52422)
fabricecw Aug 8, 2024
e1a9c5d
fix: add missing phpdoc types for Eloquent properties (#52425)
taka-oyama Aug 8, 2024
be2be34
Update version to v10.48.20
driesvints Aug 9, 2024
05a9554
Update CHANGELOG
driesvints Aug 9, 2024
0e39947
Merge branch '10.x' into 11.x
driesvints Aug 9, 2024
6ce800f
[11.x] Add `withoutHeaders` method (#52435)
milwad-dev Aug 9, 2024
b8ca298
Checking availability before calling Log::flushSharedContext() method…
ajaxray Aug 13, 2024
2d899e2
[11.x] MessageBag errors out when custom rules are created and the cl…
DanteB918 Aug 13, 2024
320269a
Create Notification make command markdown name placeholder from Notif…
hosseinakbari-liefermia Aug 13, 2024
cc31ca2
[11.x] Add `forceDestroy` to `SoftDeletes` (#52432)
jasonmccreary Aug 13, 2024
6f7908f
Make SQLiteProcessor cope with '/' in column names (#52490)
vroomfondle Aug 14, 2024
0b85e15
improvement test coverage (#52472)
saMahmoudzadeh Aug 14, 2024
85165d7
[11.x] Fix for #52436 artisan schema:dump infinite recursion (#52492)
rust17 Aug 15, 2024
0b3d2aa
Run prepareNestedBatches on append/prependToChain & chain (#52486)
SabatinoMasala Aug 15, 2024
f0de069
[11.x] Enhance DB inspection commands (#52501)
hafezdivandari Aug 15, 2024
451bc21
[11.x] Constrain key when asserting database has a model (#52464)
patrickomeara Aug 16, 2024
58718c6
Add `between` to `AssertableJson` (#52479)
rudashi Aug 16, 2024
9c481ac
[11.x] Eager asset prefetching strategies for Vite (#52462)
timacdonald Aug 16, 2024
0245430
Apply fixes from StyleCI
StyleCIBot Aug 16, 2024
273b41a
Update facade docblocks
taylorotwell Aug 16, 2024
14ee5d4
[11.x] Support attributes in `app()->call()` (#52428)
innocenzi Aug 17, 2024
429f0d2
Update facade docblocks
taylorotwell Aug 17, 2024
29e8040
applying value function into the $default of transform helper (#52510)
devajmeireles Aug 19, 2024
9c2f7f8
[11.x] Enhanced typing for `HigherOrderCollectionProxy` (#52484)
Voltra Aug 19, 2024
d35f4ff
Apply fixes from StyleCI
StyleCIBot Aug 19, 2024
81a0b5b
[11.x] Add `expectsSearch()` assertion for testing prompts that use `…
JayBizzle Aug 19, 2024
369b585
revert #52510 which added a unneeded function call (#52526)
rodrigopedra Aug 20, 2024
9d9d367
Update version to v11.21.0
driesvints Aug 20, 2024
ecb3fa7
Update CHANGELOG
driesvints Aug 20, 2024
127f260
added refresh() and rebinding() method to the contract
subhamchbty Aug 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ If you discover a security vulnerability within Laravel, please send an email to
```
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: OpenPGP v2.0.8
Comment: https://sela.io/pgp/
Comment: Report Security Vulnerabilities to [email protected]
xsFNBFugFSQBEACxEKhIY9IoJzcouVTIYKJfWFGvwFgbRjQWBiH3QdHId5vCrbWo
s2l+4Rv03gMG+yHLJ3rWElnNdRaNdQv59+lShrZF7Bvu7Zvc0mMNmFOM/mQ/K2Lt
Expand Down
134 changes: 133 additions & 1 deletion CHANGELOG.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion phpstan.src.neon.dist
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
parameters:
level: 0
level: 1
paths:
- src
excludePaths:
- src/Illuminate/Testing/ParallelRunner.php
- src/*/views/*
ignoreErrors:
- "#\\(void\\) is used#"
- "#Access to an undefined property#"
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Auth/Access/Gate.php
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ protected function callBeforeCallbacks($user, $ability, array $arguments)
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param string $ability
* @param array $arguments
* @param bool $result
* @param bool|null $result
* @return bool|null
*/
protected function callAfterCallbacks($user, $ability, array $arguments, $result)
Expand Down
4 changes: 1 addition & 3 deletions src/Illuminate/Bus/PendingBatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,7 @@ protected function dispatchExistingBatch($batch)
try {
$batch = $batch->add($this->jobs);
} catch (Throwable $e) {
if (isset($batch)) {
$batch->delete();
}
$batch->delete();

throw $e;
}
Expand Down
12 changes: 9 additions & 3 deletions src/Illuminate/Bus/Queueable.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ public function through($middleware)
*/
public function chain($chain)
{
$this->chained = collect($chain)->map(function ($job) {
$jobs = ChainedBatch::prepareNestedBatches(collect($chain));

$this->chained = $jobs->map(function ($job) {
return $this->serializeJob($job);
})->all();

Expand All @@ -212,7 +214,9 @@ public function chain($chain)
*/
public function prependToChain($job)
{
$this->chained = Arr::prepend($this->chained, $this->serializeJob($job));
$jobs = ChainedBatch::prepareNestedBatches(collect([$job]));

$this->chained = Arr::prepend($this->chained, $this->serializeJob($jobs->first()));

return $this;
}
Expand All @@ -225,7 +229,9 @@ public function prependToChain($job)
*/
public function appendToChain($job)
{
$this->chained = array_merge($this->chained, [$this->serializeJob($job)]);
$jobs = ChainedBatch::prepareNestedBatches(collect([$job]));

$this->chained = array_merge($this->chained, [$this->serializeJob($jobs->first())]);

return $this;
}
Expand Down
10 changes: 7 additions & 3 deletions src/Illuminate/Cache/Lock.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,18 @@ public function get($callback = null)
*/
public function block($seconds, $callback = null)
{
$starting = $this->currentTime();
$starting = ((int) now()->format('Uu')) / 1000;

$milliseconds = $seconds * 1000;

while (! $this->acquire()) {
Sleep::usleep($this->sleepMilliseconds * 1000);
$now = ((int) now()->format('Uu')) / 1000;

if ($this->currentTime() - $seconds >= $starting) {
if (($now + $this->sleepMilliseconds - $milliseconds) >= $starting) {
throw new LockTimeoutException;
}

Sleep::usleep($this->sleepMilliseconds * 1000);
}

if (is_callable($callback)) {
Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Cache/RetrievesMultipleKeys.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public function many(array $keys)
})->all();

foreach ($keys as $key => $default) {
/** @phpstan-ignore arguments.count (some clients don't accept a default) */
$return[$key] = $this->get($key, $default);
}

Expand Down
24 changes: 23 additions & 1 deletion src/Illuminate/Collections/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,28 @@ public function collapse()
return new static(Arr::collapse($this->items));
}

/**
* Collapse the collection of items into a single array while preserving its keys.
*
* @return static<mixed, mixed>
*/
public function collapseWithKeys()
{
$results = [];

foreach ($this->items as $key => $values) {
if ($values instanceof Collection) {
$values = $values->all();
} elseif (! is_array($values)) {
continue;
}

$results[$key] = $values;
}

return new static(array_replace(...$results));
}

/**
* Determine if an item exists in the collection.
*
Expand Down Expand Up @@ -582,7 +604,7 @@ public function hasAny($key)
/**
* Concatenate values of a given key as a string.
*
* @param callable|string $value
* @param callable|string|null $value
* @param string|null $glue
* @return string
*/
Expand Down
11 changes: 8 additions & 3 deletions src/Illuminate/Collections/HigherOrderCollectionProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@
namespace Illuminate\Support;

/**
* @mixin \Illuminate\Support\Enumerable
* @template TKey of array-key
*
* @template-covariant TValue
*
* @mixin \Illuminate\Support\Enumerable<TKey, TValue>
* @mixin TValue
*/
class HigherOrderCollectionProxy
{
/**
* The collection being operated on.
*
* @var \Illuminate\Support\Enumerable
* @var \Illuminate\Support\Enumerable<TKey, TValue>
*/
protected $collection;

Expand All @@ -24,7 +29,7 @@ class HigherOrderCollectionProxy
/**
* Create a new proxy instance.
*
* @param \Illuminate\Support\Enumerable $collection
* @param \Illuminate\Support\Enumerable<TKey, TValue> $collection
* @param string $method
* @return void
*/
Expand Down
18 changes: 18 additions & 0 deletions src/Illuminate/Collections/LazyCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,24 @@ public function collapse()
});
}

/**
* Collapse the collection of items into a single array while preserving its keys.
*
* @return static<mixed, mixed>
*/
public function collapseWithKeys()
{
return new static(function () {
foreach ($this as $values) {
if (is_array($values) || $values instanceof Enumerable) {
foreach ($values as $key => $value) {
yield $key => $value;
}
}
}
});
}

/**
* Determine if an item exists in the enumerable.
*
Expand Down
58 changes: 29 additions & 29 deletions src/Illuminate/Collections/Traits/EnumeratesValues.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,35 @@
*
* @template-covariant TValue
*
* @property-read HigherOrderCollectionProxy $average
* @property-read HigherOrderCollectionProxy $avg
* @property-read HigherOrderCollectionProxy $contains
* @property-read HigherOrderCollectionProxy $doesntContain
* @property-read HigherOrderCollectionProxy $each
* @property-read HigherOrderCollectionProxy $every
* @property-read HigherOrderCollectionProxy $filter
* @property-read HigherOrderCollectionProxy $first
* @property-read HigherOrderCollectionProxy $flatMap
* @property-read HigherOrderCollectionProxy $groupBy
* @property-read HigherOrderCollectionProxy $keyBy
* @property-read HigherOrderCollectionProxy $map
* @property-read HigherOrderCollectionProxy $max
* @property-read HigherOrderCollectionProxy $min
* @property-read HigherOrderCollectionProxy $partition
* @property-read HigherOrderCollectionProxy $percentage
* @property-read HigherOrderCollectionProxy $reject
* @property-read HigherOrderCollectionProxy $skipUntil
* @property-read HigherOrderCollectionProxy $skipWhile
* @property-read HigherOrderCollectionProxy $some
* @property-read HigherOrderCollectionProxy $sortBy
* @property-read HigherOrderCollectionProxy $sortByDesc
* @property-read HigherOrderCollectionProxy $sum
* @property-read HigherOrderCollectionProxy $takeUntil
* @property-read HigherOrderCollectionProxy $takeWhile
* @property-read HigherOrderCollectionProxy $unique
* @property-read HigherOrderCollectionProxy $unless
* @property-read HigherOrderCollectionProxy $until
* @property-read HigherOrderCollectionProxy $when
* @property-read HigherOrderCollectionProxy<TKey, TValue> $average
* @property-read HigherOrderCollectionProxy<TKey, TValue> $avg
* @property-read HigherOrderCollectionProxy<TKey, TValue> $contains
* @property-read HigherOrderCollectionProxy<TKey, TValue> $doesntContain
* @property-read HigherOrderCollectionProxy<TKey, TValue> $each
* @property-read HigherOrderCollectionProxy<TKey, TValue> $every
* @property-read HigherOrderCollectionProxy<TKey, TValue> $filter
* @property-read HigherOrderCollectionProxy<TKey, TValue> $first
* @property-read HigherOrderCollectionProxy<TKey, TValue> $flatMap
* @property-read HigherOrderCollectionProxy<TKey, TValue> $groupBy
* @property-read HigherOrderCollectionProxy<TKey, TValue> $keyBy
* @property-read HigherOrderCollectionProxy<TKey, TValue> $map
* @property-read HigherOrderCollectionProxy<TKey, TValue> $max
* @property-read HigherOrderCollectionProxy<TKey, TValue> $min
* @property-read HigherOrderCollectionProxy<TKey, TValue> $partition
* @property-read HigherOrderCollectionProxy<TKey, TValue> $percentage
* @property-read HigherOrderCollectionProxy<TKey, TValue> $reject
* @property-read HigherOrderCollectionProxy<TKey, TValue> $skipUntil
* @property-read HigherOrderCollectionProxy<TKey, TValue> $skipWhile
* @property-read HigherOrderCollectionProxy<TKey, TValue> $some
* @property-read HigherOrderCollectionProxy<TKey, TValue> $sortBy
* @property-read HigherOrderCollectionProxy<TKey, TValue> $sortByDesc
* @property-read HigherOrderCollectionProxy<TKey, TValue> $sum
* @property-read HigherOrderCollectionProxy<TKey, TValue> $takeUntil
* @property-read HigherOrderCollectionProxy<TKey, TValue> $takeWhile
* @property-read HigherOrderCollectionProxy<TKey, TValue> $unique
* @property-read HigherOrderCollectionProxy<TKey, TValue> $unless
* @property-read HigherOrderCollectionProxy<TKey, TValue> $until
* @property-read HigherOrderCollectionProxy<TKey, TValue> $when
*/
trait EnumeratesValues
{
Expand Down
3 changes: 2 additions & 1 deletion src/Illuminate/Console/View/Components/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
* @method void bulletList(array $elements, int $verbosity = \Symfony\Component\Console\Output\OutputInterface::VERBOSITY_NORMAL)
* @method mixed choice(string $question, array $choices, $default = null, int $attempts = null, bool $multiple = false)
* @method bool confirm(string $question, bool $default = false)
* @method void error(string $string, int $verbosity = \Symfony\Component\Console\Output\OutputInterface::VERBOSITY_NORMAL)
* @method void info(string $string, int $verbosity = \Symfony\Component\Console\Output\OutputInterface::VERBOSITY_NORMAL)
* @method void success(string $string, int $verbosity = \Symfony\Component\Console\Output\OutputInterface::VERBOSITY_NORMAL)
* @method void error(string $string, int $verbosity = \Symfony\Component\Console\Output\OutputInterface::VERBOSITY_NORMAL)
* @method void line(string $style, string $string, int $verbosity = \Symfony\Component\Console\Output\OutputInterface::VERBOSITY_NORMAL)
* @method void secret(string $question, bool $fallback = true)
* @method void task(string $description, ?callable $task = null, int $verbosity = \Symfony\Component\Console\Output\OutputInterface::VERBOSITY_NORMAL)
Expand Down
30 changes: 30 additions & 0 deletions src/Illuminate/Container/Attributes/Auth.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

namespace Illuminate\Container\Attributes;

use Attribute;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Container\ContextualAttribute;

#[Attribute(Attribute::TARGET_PARAMETER)]
class Auth implements ContextualAttribute
{
/**
* Create a new class instance.
*/
public function __construct(public ?string $guard = null)
{
}

/**
* Resolve the authentication guard.
*
* @param self $attribute
* @param \Illuminate\Contracts\Container\Container $container
* @return \Illuminate\Contracts\Auth\Guard|\Illuminate\Contracts\Auth\StatefulGuard
*/
public static function resolve(self $attribute, Container $container)
{
return $container->make('auth')->guard($attribute->guard);
}
}
30 changes: 30 additions & 0 deletions src/Illuminate/Container/Attributes/Authenticated.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

namespace Illuminate\Container\Attributes;

use Attribute;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Container\ContextualAttribute;

#[Attribute(Attribute::TARGET_PARAMETER)]
class Authenticated implements ContextualAttribute
{
/**
* Create a new class instance.
*/
public function __construct(public ?string $guard = null)
{
}

/**
* Resolve the currently authenticated user.
*
* @param self $attribute
* @param \Illuminate\Contracts\Container\Container $container
* @return \Illuminate\Contracts\Auth\Authenticatable|null
*/
public static function resolve(self $attribute, Container $container)
{
return $container->make('auth')->guard($attribute->guard)->user();
}
}
30 changes: 30 additions & 0 deletions src/Illuminate/Container/Attributes/Cache.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

namespace Illuminate\Container\Attributes;

use Attribute;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Container\ContextualAttribute;

#[Attribute(Attribute::TARGET_PARAMETER)]
class Cache implements ContextualAttribute
{
/**
* Create a new class instance.
*/
public function __construct(public ?string $store = null)
{
}

/**
* Resolve the cache store.
*
* @param self $attribute
* @param \Illuminate\Contracts\Container\Container $container
* @return \Illuminate\Contracts\Cache\Repository
*/
public static function resolve(self $attribute, Container $container)
{
return $container->make('cache')->store($attribute->store);
}
}
11 changes: 11 additions & 0 deletions src/Illuminate/Container/Attributes/CurrentUser.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Illuminate\Container\Attributes;

use Attribute;

#[Attribute(Attribute::TARGET_PARAMETER)]
class CurrentUser extends Authenticated
{
//
}
11 changes: 11 additions & 0 deletions src/Illuminate/Container/Attributes/DB.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Illuminate\Container\Attributes;

use Attribute;

#[Attribute(Attribute::TARGET_PARAMETER)]
class DB extends Database
{
//
}
Loading