8000 fix conflicts · laravel/framework@5900088 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5900088

Browse files
committed
fix conflicts
2 parents 3233f4c + aa6538e commit 5900088

File tree

110 files changed

+1940
-362
lines changed

Some content is hidden

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

110 files changed

+1940
-362
lines changed

.github/workflows/update-assets.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
- '/src/Illuminate/Foundation/resources/exceptions/renderer/package-lock.json'
99
workflow_dispatch:
1010

11+
permissions:
12+
contents: write
13+
1114
jobs:
1215
update:
1316
runs-on: ubuntu-latest

CHANGELOG.md

Lines changed: 92 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,97 @@
11
# Release Notes for 12.x
22

3-
## [Unreleased](https://github.com/laravel/framework/compare/v12.9.2...12.x)
3+
## [Unreleased](https://github.com/laravel/framework/compare/v12.13.0...12.x)
4+
5+
## [v12.13.0](https://github.com/laravel/framework/compare/v12.12.0...v12.13.0) - 2025-05-07
6+
7+
* [12.x] fix no arguments return type in request class by [@olivernybroe](https://github.com/olivernybroe) in https://github.com/laravel/framework/pull/55631
8+
* [12.x] Add support for callback evaluation in containsOneItem method by [@fernandokbs](https://github.com/fernandokbs) in https://github.com/laravel/framework/pull/55622
9+
* [12.x] add generics to aggregate related methods and properties by [@taka-oyama](https://github.com/taka-oyama) in https://github.com/laravel/framework/pull/55628
10+
* [12.x] Fix typo in PHPDoc by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/framework/pull/55636
11+
* [12.x] Allow naming queued closures by [@willrowe](https://github.com/willrowe) in https://github.com/laravel/framework/pull/55634
12+
* [12.x] Add `assertRedirectBack` assertion method by [@ryangjchandler](https://github.com/ryangjchandler) in https://github.com/laravel/framework/pull/55635
13+
* [12.x] Typehints for bindings by [@cosmastech](https://github.com/cosmastech) in https://github.com/laravel/framework/pull/55633
14+
* [12.x] add PHP Doc types to arrays for methods in Database\Grammar by [@taka-oyama](https://github.com/taka-oyama) in https://github.com/laravel/framework/pull/55629
15+
* fix trim null arg deprecation by [@apreiml](https://github.com/apreiml) in https://github.com/laravel/framework/pull/55649
16+
* [12.x] Support predis/predis 3.x by [@gabrielrbarbosa](https://github.com/gabrielrbarbosa) in https://github.com/laravel/framework/pull/55641
17+
* Bump vite from 5.4.18 to 5.4.19 in /src/Illuminate/Foundation/resources/exceptions/renderer by [@dependabot](https://github.com/dependabot) in https://github.com/laravel/framework/pull/55655
18+
* [12.x] Fix predis versions by [@GrahamCampbell](https://github.com/GrahamCampbell) in https://github.com/laravel/framework/pull/55654
19+
* [12.x] Bump minimum league/commonmark by [@szepeviktor](https://github.com/szepeviktor) in https://github.com/laravel/framework/pull/55659
20+
* [12.x] Fix typo in MemoizedStoreTest by [@szepeviktor](https://github.com/szepeviktor) in https://github.com/laravel/framework/pull/55662
21+
* [12.x] Queue event listeners with enum values by [@wgriffioen](https://github.com/wgriffioen) in https://github.com/laravel/framework/pull/55656
22+
* [12.x] Implement releaseAfter method in RateLimited middleware by [@adamjgriffith](https://github.com/adamjgriffith) in https://github.com/laravel/framework/pull/55671
23+
* [12.x] Improve Cache Tests by [@nuernbergerA](https://github.com/nuernbergerA) in https://github.com/laravel/framework/pull/55670
24+
* [12.x] Only pass model IDs to Eloquent `whereAttachedTo` method by [@ashleyshenton](https://github.com/ashleyshenton) in https://github.com/laravel/framework/pull/55666
25+
* feat(bus): allow adding multiple jobs to chain by [@dallyger](https://github.com/dallyger) in https://github.com/laravel/framework/pull/55668
26+
* [12.x] add generics to QueryBuilder’s column related methods by [@taka-oyama](https://github.com/taka-oyama) in https://github.com/laravel/framework/pull/55663
27+
28+
## [v12.12.0](https://github.com/laravel/framework/compare/v12.11.1...v12.12.0) - 2025-05-01
29+
30+
* [12.x] Make Blueprint Resolver Statically by [@finagin](https://github.com/finagin) in https://github.com/laravel/framework/pull/55607
31+
* [12.x] Allow limiting number of assets to preload by [@timacdonald](https://github.com/timacdonald) in https://github.com/laravel/framework/pull/55618
32+
* [12.x] Set job instance on "failed" command instance by [@willrowe](https://github.com/willrowe) in https://github.com/laravel/framework/pull/55617
33+
34+
## [v12.11.1](https://github.com/laravel/framework/compare/v12.11.0...v12.11.1) - 2025-04-30
35+
36+
* Revert "[12.x]`ScheduledTaskFailed` not dispatched on scheduled task failing" by [@taylorotwell](https://github.com/taylorotwell) in https://github.com/laravel/framework/pull/55612
37+
* [12.x] Resolve issue with BelongsToManyRelationship factory by [@jackbayliss](https://github.com/jackbayliss) in https://github.com/laravel/framework/pull/55608
38+
39+
## [v12.11.0](https://github.com/laravel/framework/compare/v12.10.2...v12.11.0) - 2025-04-29
40+
41+
* Add payload creation and original delay info to job payload by [@taylorotwell](https://github.com/taylorotwell) in https://github.com/laravel/framework/pull/55529
42+
* Add config option to ignore view cache timestamps by [@pizkaz](https://github.com/pizkaz) in https://github.com/laravel/framework/pull/55536
43+
* [12.x] Dispatch NotificationFailed when sending fails by [@rodrigopedra](https://github.com/rodrigopedra) in https://github.com/laravel/framework/pull/55507
44+
* [12.x] Option to disable dispatchAfterResponse in a test by [@gdebrauwer](https://github.com/gdebrauwer) in https://github.com/laravel/framework/pull/55456
45+
* [12.x] Pass flags to custom Json::$encoder by [@rodrigopedra](https://github.com/rodrigopedra) in https://github.com/laravel/framework/pull/55548
46+
* [12.x] Use pendingAttributes of relationships when creating relationship models via model factories by [@gdebrauwer](https://github.com/gdebrauwer) in https://github.com/laravel/framework/pull/55558
47+
* [12.x] Fix double query in model relation serialization by [@AndrewMast](https://github.com/AndrewMast) in https://github.com/laravel/framework/pull/55547
48+
* [12.x] Improve circular relation check in Automatic Relation Loading by [@litvinchuk](https://github.com/litvinchuk) in https://github.com/laravel/framework/pull/55542
49+
* [12.x] Prevent relation autoload context from being serialized by [@litvinchuk](https://github.com/litvinchuk) in https://github.com/laravel/framework/pull/55582
50+
* Remove `@internal` Annotation from `$components` Property in `InteractsWithIO` by [@michaelnabil230](https://github.com/michaelnabil230) in https://github.com/laravel/framework/pull/55580
51+
* Ensure fake job implements job contract by [@timacdonald](https://github.com/timacdonald) in https://github.com/laravel/framework/pull/55574
52+
* [12.x] Fix `AnyOf` constructor parameter type by [@axlon](https://github.com/axlon) in https://github.com/laravel/framework/pull/55577
53+
* Sync changes to Illuminate components before release by [@driesvints](https://github.com/driesvints) in https://github.com/laravel/framework/pull/55591
54+
* [12.x] Set class-string generics on `Enum` rule by [@cosmastech](https://github.com/cosmastech) in https://github.com/laravel/framework/pull/55588
55+
* [12.x] added detailed doc types to bindings related methods by [@taka-oyama](https://github.com/taka-oyama) in https://github.com/laravel/framework/pull/55576
56+
* [12.x] Improve [@use](https://github.com/use) directive to support function and const modifiers by [@rodolfosrg](https://github.com/rodolfosrg) in https://github.com/laravel/framework/pull/55583
57+
* 12.x scheduled task failed not dispatched on scheduled task failing by [@achrafAa](https://github.com/achrafAa) in https://github.com/laravel/framework/pull/55572
58+
* [12.x] Introduce Reflector methods for accessing class attributes by [@daniser](https://github.com/daniser) in https://github.com/laravel/framework/pull/55568
59+
* [12.x] Typed getters for Arr helper by [@tibbsa](https://github.com/tibbsa) in https://github.com/laravel/framework/pull/55567
60+
61+
## [v12.10.2](https://github.com/laravel/framework/compare/v12.10.1...v12.10.2) - 2025-04-24
62+
63+
* [12.x] Address Model@relationLoaded when relation is null by [@rodrigopedra](https://github.com/rodrigopedra) in https://github.com/laravel/framework/pull/55531
64+
65+
## [v12.10.1](https://github.com/laravel/framework/compare/v12.10.0...v12.10.1) - 2025-04-23
66+
67+
* Revert "Use value() helper in 'when' method to simplify code" #55465 by [@mohammadrasoulasghari](https://github.com/mohammadrasoulasghari) in https://github.com/laravel/framework/pull/55514
68+
* [12.x] Use xxh128 when comparing views for changes by [@shawnlindstrom](https://github.com/shawnlindstrom) in https://github.com/laravel/framework/pull/55517
69+
* [12.x] Ensure related models is iterable on `HasRelationships@relationLoaded()` by [@rodrigopedra](https://github.com/rodrigopedra) in https://github.com/laravel/framework/pull/55519
70+
* [12.x] Add Enum support for assertJsonPath in AssertableJsonString.php by [@azim-kordpour](https://github.com/azim-kordpour) in https://github.com/laravel/framework/pull/55516
71+
72+
## [v12.10.0](https://github.com/laravel/framework/compare/v12.9.2...v12.10.0) - 2025-04-22
73+
74+
* Use value() helper in 'when' method by [@mohammadrasoulasghari](https://github.com/mohammadrasoulasghari) in https://github.com/laravel/framework/pull/55465
75+
* [12.x] Test `@use` directive without quotes by [@osbre](https://github.com/osbre) in https://github.com/laravel/framework/pull/55462
76+
* [12.x] Enhance Broadcast Events Test Coverage by [@roshandelpoor](https://github.com/roshandelpoor) in https://github.com/laravel/framework/pull/55458
77+
* [12.x] Add `Conditionable` Trait to `Fluent` by [@michaelnabil230](https://github.com/michaelnabil230) in https://github.com/laravel/framework/pull/55455
78+
* [12.x] Fix relation auto loading with manually set relations by [@patrickweh](https://github.com/patrickweh) in https://github.com/laravel/framework/pull/55452
79+
* Add missing types to RateLimiter by [@ClaudioEyzaguirre](https://github.com/ClaudioEyzaguirre) in https://github.com/laravel/framework/pull/55445
80+
* [12.x] Fix for global autoload relationships not working in certain cases by [@litvinchuk](https://github.com/litvinchuk) in https://github.com/laravel/framework/pull/55443
81+
* [12.x] Fix adding `setTags` method on new cache flush events by [@erikn69](https://github.com/erikn69) in https://github.com/laravel/framework/pull/55405
82+
* Fix: Unique lock not being released after transaction rollback in ShouldBeUnique jobs with afterCommit() by [@toshitsuna-otsuka](https://github.com/toshitsuna-otsuka) in https://github.com/laravel/framework/pull/55420
83+
* [12.x] Extends `AsCollection` to map items into objects or other values by [@DarkGhostHunter](https://github.com/DarkGhostHunter) in https://github.com/laravel/framework/pull/55383
84+
* [12.x] Fix group imports in Blade `@use` directive by [@osbre](https://github.com/osbre) in https://github.com/laravel/framework/pull/55461
85+
* chore(tests): align test names with idiomatic naming style by [@kauffinger](https://github.com/kauffinger) in https://github.com/laravel/framework/pull/55496
86+
* Update compiled views only if they actually changed by [@pizkaz](https://github.com/pizkaz) in https://github.com/laravel/framework/pull/55450
87+
* Improve performance of Arr::dot method - 300x in some cases by [@cyppe](https://github.com/cyppe) in https://github.com/laravel/framework/pull/55495
88+
* [12.x] Add tests for `CacheBasedSessionHandler` by [@imanghafoori1](https://github.com/imanghafoori1) in 10000 https://github.com/laravel/framework/pull/55487
89+
* [12.x] Add tests for `FileSessionHandler` by [@imanghafoori1](https://github.com/imanghafoori1) in https://github.com/laravel/framework/pull/55484
90+
* [12.x] Add tests for `DatabaseSessionHandler` by [@imanghafoori1](https://github.com/imanghafoori1) in https://github.com/laravel/framework/pull/55485
91+
* [12.x] Fix many to many detach without IDs broken with custom pivot class by [@amir9480](https://github.com/amir9480) in https://github.com/laravel/framework/pull/55490
92+
* [12.x] Support nested relations on `relationLoaded` method by [@tmsperera](https://github.com/tmsperera) in https://github.com/laravel/framework/pull/55471
93+
* Bugfix for Cache::memo()->many() returning the wrong value with an integer key type by [@bmckay959](https://github.com/bmckay959) in https://github.com/laravel/framework/pull/55503
94+
* [12.x] Allow Container to build `Migrator` from class name by [@cosmastech](https://github.com/cosmastech) in https://github.com/laravel/framework/pull/55501
495

596
## [v12.9.2](https://github.com/laravel/framework/compare/v12.9.1...v12.9.2) - 2025-04-16
697

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"guzzlehttp/uri-template": "^1.0",
3434
"laravel/prompts": "^0.3.0",
3535
"laravel/serializable-closure": "^1.3|^2.0",
36-
"league/commonmark": "^2.6",
36+
"league/commonmark": "^2.7",
3737
"league/flysystem": "^3.25.1",
3838
"league/flysystem-local": "^3.25.1",
3939
"league/uri": "^7.5.1",
@@ -115,7 +115,7 @@
115115
"php-http/discovery": "^1.15",
116116
"phpstan/phpstan": "^2.0",
117117
"phpunit/phpunit": "^10.5.35|^11.5.3|^12.0.1",
118-
"predis/predis": "^2.3",
118+
"predis/predis": "^2.3|^3.0",
119119
"resend/resend-php": "^0.10.0",
120120
"symfony/cache": "^7.2.0",
121121
"symfony/http-client": "^7.2.0",
@@ -188,7 +188,7 @@
188188
"pda/pheanstalk": "Required to use the beanstalk queue driver (^5.0).",
189189
"php-http/discovery": "Required to use PSR-7 bridging features (^1.15).",
190190
"phpunit/phpunit": "Required to use assertions and run tests (^10.5.35|^11.5.3|^12.0.1).",
191-
"predis/predis": "Required to use the predis connector (^2.3).",
191+
"predis/predis": "Required to use the predis connector (^2.3|^3.0).",
192192
"psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).",
193193
"pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).",
194194
"resend/resend-php": "Required to enable support for the Resend mail transport (^0.10.0).",

src/Illuminate/Bus/Dispatcher.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ class Dispatcher implements QueueingDispatcher
5151
*/
5252
protected $queueResolver;
5353

54+
/**
55+
* Indicates if dispatching after response is disabled.
56+
*
57+
* @var bool
58+
*/
59+
protected $allowsDispatchingAfterResponses = true;
60+
5461
/**
5562
* Create a new command dispatcher instance.
5663
*
@@ -252,6 +259,12 @@ protected function pushCommandToQueue($queue, $command)
252259
*/
253260
public function dispatchAfterResponse($command, $handler = null)
254261
{
262+
if (! $this->allowsDispatchingAfterResponses) {
263+
$this->dispatchSync($command);
264+
265+
return;
266+
}
267+
255268
$this->container->terminating(function () use ($command, $handler) {
256269
$this->dispatchSync($command, $handler);
257270
});
@@ -282,4 +295,28 @@ public function map(array $map)
282295

283296
return $this;
284297
}
298+
299+
/**
300+
* Allow dispatching after responses.
301+
*
302+
* @return $this
303+
*/
304+
public function withDispatchingAfterResponses()
305+
{
306+
$this->allowsDispatchingAfterResponses = true;
307+
308+
return $this;
309+
}
310+
311+
/**
312+
* Disable dispatching after responses.
313+
*
314+
* @return $this
315+
*/
316+
public function withoutDispatchingAfterResponses()
317+
{
318+
$this->allowsDispatchingAfterResponses = false;
319+
320+
return $this;
321+
}
285322
}

src/Illuminate/Bus/Queueable.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,11 @@ public function chain($chain)
221221
*/
222222
public function prependToChain($job)
223223
{
224-
$jobs = ChainedBatch::prepareNestedBatches(new Collection([$job]));
224+
$jobs = ChainedBatch::prepareNestedBatches(Collection::wrap($job));
225225

226-
$this->chained = Arr::prepend($this->chained, $this->serializeJob($jobs->first()));
226+
foreach ($jobs->reverse() as $job) {
227+
$this->chained = Arr::prepend($this->chained, $this->serializeJob($job));
228+
}
227229

228230
return $this;
229231
}
@@ -236,9 +238,11 @@ public function prependToChain($job)
236238
*/
237239
public function appendToChain($job)
238240
{
239-
$jobs = ChainedBatch::prepareNestedBatches(new Collection([$job]));
241+
$jobs = ChainedBatch::prepareNestedBatches(Collection::wrap($job));
240242

241-
$this->chained = array_merge($this->chained, [$this->serializeJob($jobs->first())]);
243+
foreach ($jobs as $job) {
244+
$this->chained = array_merge($this->chained, [$this->serializeJob($job)]);
245+
}
242246

243247
return $this;
244248
}

src/Illuminate/Collections/Arr.php

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,38 @@ public static function add($array, $key, $value)
4040
return $array;
4141
}
4242

43+
/**
44+
* Get an array item from an array using "dot" notation.
45+
*/
46+
public static function array(ArrayAccess|array $array, string|int|null $key, ?array $default = null): array
47+
{
48+
$value = Arr::get($array, $key, $default);
49+
50+
if (! is_array($value)) {
51+
throw new InvalidArgumentException(
52+
sprintf('Array value for key [%s] must be an array, %s found.', $key, gettype($value))
53+
);
54+
}
55+
56+
return $value;
57+
}
58+
59+
/**
60+
* Get a boolean item from an array using "dot" notation.
61+
*/
62+
public static function boolean(ArrayAccess|array $array, string|int|null $key, ?bool $default = null): bool
63+
{
64+
$value = Arr::get($array, $key, $default);
65+
66+
if (! is_bool($value)) {
67+
throw new InvalidArgumentException(
68+
sprintf('Array value for key [%s] must be a boolean, %s found.', $key, gettype($value))
69+
);
70+
}
71+
72+
return $value;
73+
}
74+
4375
/**
4476
* Collapse an array of arrays into a single array.
4577
*
@@ -286,6 +318,22 @@ public static function flatten($array, $depth = INF)
286318
return $result;
287319
}
288320

321+
/**
322+
* Get a float item from an array using "dot" notation.
323+
*/
324+
public static function float(ArrayAccess|array $array, string|int|null $key, ?float $default = null): float
325+
{
326+
$value = Arr::get($array, $key, $default);
327+
328+
if (! is_float($value)) {
329+
throw new InvalidArgumentException(
330+
sprintf('Array value for key [%s] must be a float, %s found.', $key, gettype($value))
331+
);
332+
}
333+
334+
return $value;
335+
}
336+
289337
/**
290338
* Remove one or many array items from a given array using "dot" notation.
291339
*
@@ -433,6 +481,22 @@ public static function hasAny($array, $keys)
433481
return false;
434482
}
435483

484+
/**
485+
* Get an integer item from an array using "dot" notation.
486+
*/
487+
public static function integer(ArrayAccess|array $array, string|int|null $key, ?int $default = null): int
488+
{
489+
$value = Arr::get($array, $key, $default);
490+
491+
if (! is_integer($value)) {
492+
throw new InvalidArgumentException(
493+
sprintf('Array value for key [%s] must be an integer, %s found.', $key, gettype($value))
494+
);
495+
}
496+
497+
return $value;
498+
}
499+
436500
/**
437501
* Determines if an array is associative.
438502
*
@@ -906,6 +970,22 @@ public static function sortRecursiveDesc($array, $options = SORT_REGULAR)
906970
return static::sortRecursive($array, $options, true);
907971
}
908972

973+
/**
974+
* Get a string item from an array using "dot" notation.
975+
*/
976+
public static function string(ArrayAccess|array $array, string|int|null $key, ?string $default = null): string
977+
{
978+
$value = Arr::get($array, $key, $default);
979+
980+
if (! is_string($value)) {
981+
throw new InvalidArgumentException(
982+
sprintf('Array value for key [%s] must be a string, %s found.', $key, gettype($value))
983+
);
984+
}
985+
986+
return $value;
987+
}
988+
909989
/**
910990
* Conditionally compile classes from an array into a CSS class list.
911991
*

src/Illuminate/Collections/Collection.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,12 +712,17 @@ public function isEmpty()
712712
}
713713

714714
/**
715-
* Determine if the collection contains a single item.
715+
* Determine if the collection contains exactly one item. If a callback is provided, determine if exactly one item matches the condition.
716716
*
717+
* @param (callable(TValue, TKey): bool)|null $callback
717718
* @return bool
718719
*/
719-
public function containsOneItem()
720+
public function containsOneItem(?callable $callback = null): bool
720721
{
722+
if ($callback) {
723+
return $this->filter($callback)->count() === 1;
724+
}
725+
721726
return $this->count() === 1;
722727
}
723728

0 commit comments

Comments
 (0)
0