Skip to content

Commit f515026

Browse files
committed
Merge remote-tracking branch 'upstream/12.x'
2 parents 1f51682 + 1b0051d commit f515026

File tree

32 files changed

+688
-59
lines changed

32 files changed

+688
-59
lines changed

CHANGELOG.md

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

3-
## [Unreleased](https://github.com/laravel/framework/compare/v12.17.0...12.x)
3+
## [Unreleased](https://github.com/laravel/framework/compare/v12.18.0...12.x)
4+
5+
## [v12.18.0](https://github.com/laravel/framework/compare/v12.17.0...v12.18.0) - 2025-06-10
6+
7+
* document `through()` method in interfaces to fix IDE warnings by [@harryqt](https://github.com/harryqt) in https://github.com/laravel/framework/pull/55925
8+
* [12.x] Add encrypt and decrypt Str helper methods by [@KIKOmanasijev](https://github.com/KIKOmanasijev) in https://github.com/laravel/framework/pull/55931
9+
* [12.x] Add a command option for making batchable jobs by [@hafezdivandari](https://github.com/hafezdivandari) in https://github.com/laravel/framework/pull/55929
10+
* [12.x] fix: intersect Authenticatable with Model in UserProvider phpdocs by [@calebdw](https://github.com/calebdw) in https://github.com/laravel/framework/pull/54061
11+
* [12.x] feat: create UsePolicy attribute by [@calebdw](https://github.com/calebdw) in https://github.com/laravel/framework/pull/55882
12+
* [12.x] `ScheduledTaskFailed` not dispatched on scheduled forground task fails by [@achrafAa](https://github.com/achrafAa) in https://github.com/laravel/framework/pull/55624
13+
* [12.x] Add generics to `Model::unguarded()` by [@axlon](https://github.com/axlon) in https://github.com/laravel/framework/pull/55932
14+
* [12.x] Fix SSL Certificate and Connection Errors Leaking as Guzzle Exceptions by [@achrafAa](https://github.com/achrafAa) in https://github.com/laravel/framework/pull/55937
15+
* Fix deprecation warning in PHP 8.3 by ensuring string type in explode() by [@Khuthaily](https://github.com/Khuthaily) in https://github.com/laravel/framework/pull/55939
16+
* revert: #55939 by [@NickSdot](https://github.com/NickSdot) in https://github.com/laravel/framework/pull/55943
17+
* [12.x] feat: Add WorkerStarting event when worker daemon starts by [@Orrison](https://github.com/Orrison) in https://github.com/laravel/framework/pull/55941
18+
* [12.x] Allow setting the `RequestException` truncation limit per request by [@cosmastech](https://github.com/cosmastech) in https://github.com/laravel/framework/pull/55897
19+
* [12.x] feat: Make custom eloquent castings comparable for more granular isDirty check by [@SanderSander](https://github.com/SanderSander) in https://github.com/laravel/framework/pull/55945
20+
* [12.x] fix alphabetical order by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/framework/pull/55965
21+
* [12.x] Use native named parameter instead of unused variable by [@imanghafoori1](https://github.com/imanghafoori1) in https://github.com/laravel/framework/pull/55964
22+
* [12.x] add generics to Model attribute related methods and properties by [@taka-oyama](https://github.com/taka-oyama) in https://github.com/laravel/framework/pull/55962
23+
* [12.x] Supports PHPUnit 12.2 by [@crynobone](https://github.com/crynobone) in https://github.com/laravel/framework/pull/55961
24+
* [12.x] feat: Add ability to override SendQueuedNotifications job class by [@Orrison](https://github.com/Orrison) in https://github.com/laravel/framework/pull/55942
25+
* [12.x] Fix timezone validation test for PHP 8.3+ by [@platoindebugmode](https://github.com/platoindebugmode) in https://github.com/laravel/framework/pull/55956
26+
* Broadcasting Utilities by [@taylorotwell](https://github.com/taylorotwell) in https://github.com/laravel/framework/pull/55967
27+
* [12.x] Remove unused $guarded parameter from testChannelNameNormalization method by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/framework/pull/55973
28+
* [12.x] Validate that `outOf` is greater than 0 in `Lottery` helper by [@mrvipchien](https://github.com/mrvipchien) in https://github.com/laravel/framework/pull/55969
29+
* [12.x] Allow retrieving all reported exceptions from `ExceptionHandlerFake` by [@cosmastech](https://github.com/cosmastech) in https://github.com/laravel/framework/pull/55972
430

531
## [v12.17.0](https://github.com/laravel/framework/compare/v12.16.0...v12.17.0) - 2025-06-03
632

src/Illuminate/Collections/Collection.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ public function collapseWithKeys()
165165
$results[$key] = $values;
166166
}
167167

168+
if (! $results) {
169+
return new static;
170+
}
171+
168172
return new static(array_replace(...$results));
169173
}
170174

src/Illuminate/Console/Application.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,20 @@ public function output()
205205
: '';
206206
}
207207

208+
/**
209+
* Add an array of commands to the console.
210+
*
211+
* @param array<int, \Symfony\Component\Console\Command\Command> $commands
212+
* @return void
213+
*/
214+
#[\Override]
215+
public function addCommands(array $commands): void
216+
{
217+
foreach ($commands as $command) {
218+
$this->add($command);
219+
}
220+
}
221+
208222
/**
209223
* Add a command to the console.
210224
*

src/Illuminate/Console/Command.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ public function __construct()
101101
// Once we have constructed the command, we'll set the description and other
102102
// related properties of the command. If a signature wasn't used to build
103103
// the command we'll set the arguments and the options on this command.
104-
if (! isset($this->description)) {
105-
$this->setDescription((string) static::getDefaultDescription());
106-
} else {
104+
if (isset($this->description)) {
107105
$this->setDescription((string) $this->description);
108106
}
109107

src/Illuminate/Contracts/Auth/UserProvider.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface UserProvider
88
* Retrieve a user by their unique identifier.
99
*
1010
* @param mixed $identifier
11-
* @return (\Illuminate\Contracts\Auth\Authenticatable&\Illuminate\Database\Eloquent\Model)|null
11+
* @return \Illuminate\Contracts\Auth\Authenticatable|null
1212
*/
1313
public function retrieveById($identifier);
1414

@@ -17,14 +17,14 @@ public function retrieveById($identifier);
1717
*
1818
* @param mixed $identifier
1919
* @param string $token
20-
* @return (\Illuminate\Contracts\Auth\Authenticatable&\Illuminate\Database\Eloquent\Model)|null
20+
* @return \Illuminate\Contracts\Auth\Authenticatable|null
2121
*/
2222
public function retrieveByToken($identifier, #[\SensitiveParameter] $token);
2323

2424
/**
2525
* Update the "remember me" token for the given user in storage.
2626
*
27-
* @param \Illuminate\Contracts\Auth\Authenticatable&\Illuminate\Database\Eloquent\Model $user
27+
* @param \Illuminate\Contracts\Auth\Authenticatable $user
2828
* @param string $token
2929
* @return void
3030
*/
@@ -34,14 +34,14 @@ public function updateRememberToken(Authenticatable $user, #[\SensitiveParameter
3434
* Retrieve a user by the given credentials.
3535
*
3636
* @param array $credentials
37-
* @return (\Illuminate\Contracts\Auth\Authenticatable&\Illuminate\Database\Eloquent\Model)|null
37+
* @return \Illuminate\Contracts\Auth\Authenticatable|null
3838
*/
3939
public function retrieveByCredentials(#[\SensitiveParameter] array $credentials);
4040

4141
/**
4242
* Validate a user against the given credentials.
4343
*
44-
* @param \Illuminate\Contracts\Auth\Authenticatable&\Illuminate\Database\Eloquent\Model $user
44+
* @param \Illuminate\Contracts\Auth\Authenticatable $user
4545
* @param array $credentials
4646
* @return bool
4747
*/
@@ -50,7 +50,7 @@ public function validateCredentials(Authenticatable $user, #[\SensitiveParameter
5050
/**
5151
* Rehash the user's password if required and supported.
5252
*
53-
* @param \Illuminate\Contracts\Auth\Authenticatable&\Illuminate\Database\Eloquent\Model $user
53+
* @param \Illuminate\Contracts\Auth\Authenticatable $user
5454
* @param array $credentials
5555
* @param bool $force
5656
* @return void

src/Illuminate/Contracts/Queue/Queue.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
namespace Illuminate\Contracts\Queue;
44

5+
/**
6+
* @method int pendingSize(string|null $queue = null)
7+
* @method int delayedSize(string|null $queue = null)
8+
* @method int reservedSize(string|null $queue = null)
9+
* @method int|null creationTimeOfOldestPendingJob(string|null $queue = null)
10+
*/
511
interface Queue
612
{
713
/**
@@ -37,7 +43,6 @@ public function pushOn($queue, $job, $data = '');
3743
*
3844
* @param string $payload
3945
* @param string|null $queue
40-
* @param array $options
4146
* @return mixed
4247
*/
4348
public function pushRaw($payload, $queue = null, array $options = []);
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace Illuminate\Contracts\Support;
4+
5+
interface HasOnceHash
6+
{
7+
/**
8+
* Compute the hash that should be used to represent the object when given to a function using "once".
9+
*
10+
* @return string
11+
*/
12+
public function onceHash();
13+
}

src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,6 +2155,9 @@ public function discardChanges()
21552155
{
21562156
[$this->attributes, $this->changes, $this->previous] = [$this->original, [], []];
21572157

2158+
$this->classCastCache = [];
2159+
$this->attributeCastCache = [];
2160+
21582161
return $this;
21592162
}
21602163

src/Illuminate/Filesystem/Filesystem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ public function delete($paths)
305305

306306
foreach ($paths as $path) {
307307
try {
308-
if (@unlink($path)) {
308+
if (is_file($path) && @unlink($path)) {
309309
clearstatcache(false, $path);
310310
} else {
311311
$success = false;

src/Illuminate/Foundation/resources/exceptions/renderer/package-lock.json

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)