Skip to content

Commit bef2e12

Browse files
committed
Merge branch '11.x'
# Conflicts: # CHANGELOG.md # src/Illuminate/Foundation/Application.php
2 parents fb14d43 + fd9fa89 commit bef2e12

File tree

241 files changed

+2884
-661
lines changed

Some content is hidden

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

241 files changed

+2884
-661
lines changed

config/hashing.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
'bcrypt' => [
3232
'rounds' => env('BCRYPT_ROUNDS', 12),
33-
'verify' => true,
33+
'verify' => env('HASH_VERIFY', true),
3434
],
3535

3636
/*
@@ -48,7 +48,7 @@
4848
'memory' => env('ARGON_MEMORY', 65536),
4949
'threads' => env('ARGON_THREADS', 1),
5050
'time' => env('ARGON_TIME', 4),
51-
'verify' => true,
51+
'verify' => env('HASH_VERIFY', true),
5252
],
5353

5454
/*

src/Illuminate/Auth/Access/AuthorizationException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class AuthorizationException extends Exception
2929
* @param \Throwable|null $previous
3030
* @return void
3131
*/
32-
public function __construct($message = null, $code = null, Throwable $previous = null)
32+
public function __construct($message = null, $code = null, ?Throwable $previous = null)
3333
{
3434
parent::__construct($message ?? 'This action is unauthorized.', 0, $previous);
3535

src/Illuminate/Auth/Access/Gate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function __construct(Container $container,
100100
array $policies = [],
101101
array $beforeCallbacks = [],
102102
array $afterCallbacks = [],
103-
callable $guessPolicyNamesUsingCallback = null)
103+
?callable $guessPolicyNamesUsingCallback = null)
104104
{
105105
$this->policies = $policies;
106106
$this->container = $container;
@@ -224,7 +224,7 @@ public function define($ability, $callback)
224224
* @param array|null $abilities
225225
* @return $this
226226
*/
227-
public function resource($name, $class, array $abilities = null)
227+
public function resource($name, $class, ?array $abilities = null)
228228
{
229229
$abilities = $abilities ?: [
230230
'viewAny' => 'viewAny',

src/Illuminate/Auth/Middleware/Authorize.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function handle($request, Closure $next, $ability, ...$models)
6262
*
6363
* @param \Illuminate\Http\Request $request
6464
* @param array|null $models
65-
* @return \Illuminate\Database\Eloquent\Model|array|string
65+
* @return array
6666
*/
6767
protected function getGateArguments($request, $models)
6868
{

src/Illuminate/Auth/Passwords/PasswordBroker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct(TokenRepositoryInterface $tokens, UserProvider $user
4545
* @param \Closure|null $callback
4646
* @return string
4747
*/
48-
public function sendResetLink(array $credentials, Closure $callback = null)
48+
public function sendResetLink(array $credentials, ?Closure $callback = null)
4949
{
5050
// First we will check to see if we found a user at the given credentials and
5151
// if we did not we will redirect back to this current URI with a piece of

src/Illuminate/Auth/RequestGuard.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class RequestGuard implements Guard
3333
* @param \Illuminate\Contracts\Auth\UserProvider|null $provider
3434
* @return void
3535
*/
36-
public function __construct(callable $callback, Request $request, UserProvider $provider = null)
36+
public function __construct(callable $callback, Request $request, ?UserProvider $provider = null)
3737
{
3838
$this->request = $request;
3939
$this->callback = $callback;

src/Illuminate/Auth/SessionGuard.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth
131131
public function __construct($name,
132132
UserProvider $provider,
133133
Session $session,
134-
Request $request = null,
135-
Timebox $timebox = null,
134+
?Request $request = null,
135+
?Timebox $timebox = null,
136136
bool $rehashOnLogin = true)
137137
{
138138
$this->name = $name;
@@ -253,6 +253,8 @@ public function once(array $credentials = [])
253253
$this->fireAttemptEvent($credentials);
254254

255255
if ($this->validate($credentials)) {
256+
$this->rehashPasswordIfRequired($this->lastAttempted, $credentials);
257+
256258
$this->setUser($this->lastAttempted);
257259

258260
return true;

src/Illuminate/Broadcasting/BroadcastManager.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function __construct($app)
6464
* @param array|null $attributes
6565
* @return void
6666
*/
67-
public function routes(array $attributes = null)
67+
public function routes(?array $attributes = null)
6868
{
6969
if ($this->app instanceof CachesRoutes && $this->app->routesAreCached()) {
7070
return;
@@ -86,7 +86,7 @@ public function routes(array $attributes = null)
8686
* @param array|null $attributes
8787
* @return void
8888
*/
89-
public function userRoutes(array $attributes = null)
89+
public function userRoutes(?array $attributes = null)
9090
{
9191
if ($this->app instanceof CachesRoutes && $this->app->routesAreCached()) {
9292
return;
@@ -110,7 +110,7 @@ public function userRoutes(array $attributes = null)
110110
* @param array|null $attributes
111111
* @return void
112112
*/
113-
public function channelRoutes(array $attributes = null)
113+
public function channelRoutes(?array $attributes = null)
114114
{
115115
$this->routes($attributes);
116116
}

src/Illuminate/Bus/Batch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ public function delete()
450450
* @param \Throwable|null $e
451451
* @return void
452452
*/
453-
protected function invokeHandlerCallback($handler, Batch $batch, Throwable $e = null)
453+
protected function invokeHandlerCallback($handler, Batch $batch, ?Throwable $e = null)
454454
{
455455
try {
456456
return $handler($batch, $e);

src/Illuminate/Bus/DatabaseBatchRepository.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,9 @@ protected function toBatch($batch)
374374
(int) $batch->failed_jobs,
375375
(array) json_decode($batch->failed_job_ids, true),
376376
$this->unserialize($batch->options),
377-
CarbonImmutable::createFromTimestamp($batch->created_at),
378-
$batch->cancelled_at ? CarbonImmutable::createFromTimestamp($batch->cancelled_at) : $batch->cancelled_at,
379-
$batch->finished_at ? CarbonImmutable::createFromTimestamp($batch->finished_at) : $batch->finished_at
377+
CarbonImmutable::createFromTimestamp($batch->created_at, date_default_timezone_get()),
378+
$batch->cancelled_at ? CarbonImmutable::createFromTimestamp($batch->cancelled_at, date_default_timezone_get()) : $batch->cancelled_at,
379+
$batch->finished_at ? CarbonImmutable::createFromTimestamp($batch->finished_at, date_default_timezone_get()) : $batch->finished_at
380380
);
381381
}
382382

0 commit comments

Comments
 (0)