Skip to content

Commit 53b0f4e

Browse files
committed
Merge tag 'v11.33.2'
Signed-off-by: Mior Muhammad Zaki <[email protected]>
2 parents 4b1f01f + 6b98327 commit 53b0f4e

File tree

123 files changed

+2557
-844
lines changed

Some content is hidden

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

123 files changed

+2557
-844
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
8787

8888
- name: Execute tests
89-
run: vendor/bin/phpunit --display-deprecation
89+
run: vendor/bin/phpunit --display-deprecation ${{ matrix.stability == 'prefer-stable' && '--fail-on-deprecation' || '' }}
9090
env:
9191
DB_PORT: ${{ job.services.mysql.ports[3306] }}
9292
DB_USERNAME: root

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"guzzlehttp/guzzle": "^7.8",
3333
"guzzlehttp/uri-template": "^1.0",
3434
"laravel/prompts": "^0.3.0",
35-
"laravel/serializable-closure": "^1.3",
35+
"laravel/serializable-closure": "^1.3|^2.0",
3636
"league/commonmark": "^2.2.1",
3737
"league/flysystem": "^3.8.0",
3838
"monolog/monolog": "^3.0",
@@ -105,7 +105,7 @@
105105
"league/flysystem-path-prefixing": "^3.3",
106106
"league/flysystem-read-only": "^3.3",
107107
"league/flysystem-sftp-v3": "^3.0",
108-
"mockery/mockery": "^1.6",
108+
"mockery/mockery": "^1.6.10",
109109
"nyholm/psr7": "^1.2",
110110
"orchestra/testbench-core": "^10.0",
111111
"pda/pheanstalk": "^5.0",

src/Illuminate/Auth/Access/Gate.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,15 @@ class Gate implements GateContract
9696
* @param callable|null $guessPolicyNamesUsingCallback
9797
* @return void
9898
*/
99-
public function __construct(Container $container,
99+
public function __construct(
100+
Container $container,
100101
callable $userResolver,
101102
array $abilities = [],
102103
array $policies = [],
103104
array $beforeCallbacks = [],
104105
array $afterCallbacks = [],
105-
?callable $guessPolicyNamesUsingCallback = null)
106-
{
106+
?callable $guessPolicyNamesUsingCallback = null,
107+
) {
107108
$this->policies = $policies;
108109
$this->container = $container;
109110
$this->abilities = $abilities;
@@ -354,7 +355,7 @@ public function denies($ability, $arguments = [])
354355
*/
355356
public function check($abilities, $arguments = [])
356357
{
357-
return collect($abilities)->every(
358+
return (new Collection($abilities))->every(
358359
fn ($ability) => $this->inspect($ability, $arguments)->allowed()
359360
);
360361
}
@@ -368,7 +369,7 @@ public function check($abilities, $arguments = [])
368369
*/
369370
public function any($abilities, $arguments = [])
370371
{
371-
return collect($abilities)->contains(fn ($ability) => $this->check($ability, $arguments));
372+
return (new Collection($abilities))->contains(fn ($ability) => $this->check($ability, $arguments));
372373
}
373374

374375
/**

src/Illuminate/Auth/Middleware/Authorize.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Closure;
66
use Illuminate\Contracts\Auth\Access\Gate;
77
use Illuminate\Database\Eloquent\Model;
8+
use Illuminate\Support\Collection;
89

910
use function Illuminate\Support\enum_value;
1011

@@ -72,7 +73,7 @@ protected function getGateArguments($request, $models)
7273
return [];
7374
}
7475

75-
return collect($models)->map(function ($model) use ($request) {
76+
return (new Collection($models))->map(function ($model) use ($request) {
7677
return $model instanceof Model ? $model : $this->getModel($request, $model);
7778
})->all();
7879
}

src/Illuminate/Auth/Passwords/CacheTokenRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function create(CanResetPasswordContract $user)
4242

4343
$this->cache->put(
4444
$this->prefix.$user->getEmailForPasswordReset(),
45-
[$token, Carbon::now()->format($this->format)],
45+
[$this->hasher->make($token), Carbon::now()->format($this->format)],
4646
$this->expires,
4747
);
4848

src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,14 @@ class DatabaseTokenRepository implements TokenRepositoryInterface
6363
* @param int $throttle
6464
* @return void
6565
*/
66-
public function __construct(ConnectionInterface $connection, HasherContract $hasher,
67-
$table, $hashKey, $expires = 60,
68-
$throttle = 60)
69-
{
66+
public function __construct(
67+
ConnectionInterface $connection,
68+
HasherContract $hasher,
69+
$table,
70+
$hashKey,
71+
$expires = 60,
72+
$throttle = 60,
73+
) {
7074
$this->table = $table;
7175
$this->hasher = $hasher;
7276
$this->hashKey = $hashKey;

src/Illuminate/Auth/SessionGuard.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,14 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth
128128
* @param bool $rehashOnLogin
129129
* @return void
130130
*/
131-
public function __construct($name,
132-
UserProvider $provider,
133-
Session $session,
134-
?Request $request = null,
135-
?Timebox $timebox = null,
136-
bool $rehashOnLogin = true)
137-
{
131+
public function __construct(
132+
$name,
133+
UserProvider $provider,
134+
Session $session,
135+
?Request $request = null,
136+
?Timebox $timebox = null,
137+
bool $rehashOnLogin = true,
138+
) {
138139
$this->name = $name;
139140
$this->session = $session;
140141
$this->request = $request;

src/Illuminate/Auth/TokenGuard.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ public function __construct(
5454
Request $request,
5555
$inputKey = 'api_token',
5656
$storageKey = 'api_token',
57-
$hash = false)
58-
{
57+
$hash = false,
58+
) {
5959
$this->hash = $hash;
6060
$this->request = $request;
6161
$this->provider = $provider;

src/Illuminate/Broadcasting/AnonymousEvent.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Illuminate\Contracts\Support\Arrayable;
77
use Illuminate\Foundation\Events\Dispatchable;
88
use Illuminate\Support\Arr;
9+
use Illuminate\Support\Collection;
910

1011
class AnonymousEvent implements ShouldBroadcast
1112
{
@@ -73,7 +74,7 @@ public function with(Arrayable|array $payload): static
7374
{
7475
$this->payload = $payload instanceof Arrayable
7576
? $payload->toArray()
76-
: collect($payload)->map(
77+
: (new Collection($payload))->map(
7778
fn ($p) => $p instanceof Arrayable ? $p->toArray() : $p
7879
)->all();
7980

src/Illuminate/Bus/Batch.php

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -115,19 +115,20 @@ class Batch implements Arrayable, JsonSerializable
115115
* @param \Carbon\CarbonImmutable|null $finishedAt
116116
* @return void
117117
*/
118-
public function __construct(QueueFactory $queue,
119-
BatchRepository $repository,
120-
string $id,
121-
string $name,
122-
int $totalJobs,
123-
int $pendingJobs,
124-
int $failedJobs,
125-
array $failedJobIds,
126-
array $options,
127-
CarbonImmutable $createdAt,
128-
?CarbonImmutable $cancelledAt = null,
129-
?CarbonImmutable $finishedAt = null)
130-
{
118+
public function __construct(
119+
QueueFactory $queue,
120+
BatchRepository $repository,
121+
string $id,
122+
string $name,
123+
int $totalJobs,
124+
int $pendingJobs,
125+
int $failedJobs,
126+
array $failedJobIds,
127+
array $options,
128+
CarbonImmutable $createdAt,
129+
?CarbonImmutable $cancelledAt = null,
130+
?CarbonImmutable $finishedAt = null,
131+
) {
131132
$this->queue = $queue;
132133
$this->repository = $repository;
133134
$this->id = $id;

0 commit comments

Comments
 (0)