Skip to content

Commit 8a4aeca

Browse files
Merge branch '9.x'
2 parents 9f4d663 + 1ac281b commit 8a4aeca

File tree

51 files changed

+410
-118
lines changed

Some content is hidden

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

51 files changed

+410
-118
lines changed

.github/workflows/tests.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
with:
6666
timeout_minutes: 5
6767
max_attempts: 5
68-
command: composer require ramsey/collection:^1.2 brick/math:^0.9.3 --no-interaction --no-update
68+
command: composer require ramsey/collection:^1.2 brick/math:^0.9.3 symfony/css-selector:^6.0 --no-interaction --no-update
6969
if: matrix.php >= 8.1
7070

7171
- name: Set Minimum PHP 8.2 Versions
@@ -137,12 +137,20 @@ jobs:
137137
command: composer require ramsey/collection:^1.2 brick/math:^0.9.3 --no-interaction --no-update
138138
if: matrix.php >= 8.1
139139

140+
- name: Set Minimum PHP 8.1 Versions
141+
uses: nick-fields/retry@v2
142+
with:
143+
timeout_minutes: 5
144+
max_attempts: 5
145+
command: composer require ramsey/collection:~1.2 brick/math:~0.9.3 symfony/css-selector:~6.0 --no-interaction --no-update
146+
if: matrix.php >= 8.1
147+
140148
- name: Set Minimum PHP 8.2 Versions
141149
uses: nick-fields/retry@v2
142150
with:
143151
timeout_minutes: 5
144152
max_attempts: 5
145-
command: composer require guzzlehttp/guzzle:~7.5 guzzlehttp/psr7:~2.4 predis/predis:^2.0.2 --no-interaction --no-update
153+
command: composer require guzzlehttp/guzzle:~7.5 guzzlehttp/psr7:~2.4 predis/predis:~2.0.2 --no-interaction --no-update
146154
if: matrix.php >= 8.2
147155

148156
- name: Install dependencies

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"egulias/email-validator": "^3.2.1",
2424
"fruitcake/php-cors": "^1.2",
2525
"laravel/serializable-closure": "^1.2.2",
26-
"league/commonmark": "^2.2",
26+
"league/commonmark": "^2.2.1",
2727
"league/flysystem": "^3.8.0",
2828
"monolog/monolog": "^3.0",
2929
"nesbot/carbon": "^2.62.1",
@@ -85,7 +85,7 @@
8585
"ably/ably-php": "^1.0",
8686
"aws/aws-sdk-php": "^3.235.5",
8787
"doctrine/dbal": "^3.5.1",
88-
"fakerphp/faker": "^1.9.2",
88+
"fakerphp/faker": "^1.21",
8989
"guzzlehttp/guzzle": "^7.5",
9090
"league/flysystem-aws-s3-v3": "^3.0",
9191
"league/flysystem-ftp": "^3.0",

src/Illuminate/Auth/EloquentUserProvider.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ public function retrieveByToken($identifier, $token)
8080

8181
$rememberToken = $retrievedModel->getRememberToken();
8282

83-
return $rememberToken && hash_equals($rememberToken, $token)
84-
? $retrievedModel : null;
83+
return $rememberToken && hash_equals($rememberToken, $token) ? $retrievedModel : null;
8584
}
8685

8786
/**

src/Illuminate/Console/Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Command extends SymfonyCommand
4242
/**
4343
* The console command description.
4444
*
45-
* @var string
45+
* @var string|null
4646
*/
4747
protected $description;
4848

src/Illuminate/Console/Scheduling/CallbackEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public function getSummaryForDisplay()
184184
*/
185185
public function mutexName()
186186
{
187-
return 'framework/schedule-'.sha1($this->description);
187+
return 'framework/schedule-'.sha1($this->description ?? '');
188188
}
189189

190190
/**

src/Illuminate/Console/Scheduling/Event.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Event
2626
/**
2727
* The command string.
2828
*
29-
* @var string
29+
* @var string|null
3030
*/
3131
public $command;
3232

@@ -47,7 +47,7 @@ class Event
4747
/**
4848
* The user the command should run as.
4949
*
50-
* @var string
50+
* @var string|null
5151
*/
5252
public $user;
5353

@@ -138,7 +138,7 @@ class Event
138138
/**
139139
* The human readable description of the event.
140140
*
141-
* @var string
141+
* @var string|null
142142
*/
143143
public $description;
144144

src/Illuminate/Console/Scheduling/ScheduleListCommand.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,19 +69,20 @@ public function handle(Schedule $schedule)
6969
$events = $events->map(function ($event) use ($terminalWidth, $expressionSpacing, $timezone) {
7070
$expression = $this->formatCronExpression($event->expression, $expressionSpacing);
7171

72-
$command = $event->command;
73-
$description = $event->description;
72+
$command = $event->command ?? '';
73+
74+
$description = $event->description ?? '';
7475

7576
if (! $this->output->isVerbose()) {
7677
$command = str_replace([Application::phpBinary(), Application::artisanBinary()], [
7778
'php',
7879
preg_replace("#['\"]#", '', Application::artisanBinary()),
79-
], $event->command);
80+
], $command);
8081
}
8182

8283
if ($event instanceof CallbackEvent) {
83-
if (class_exists($event->description)) {
84-
$command = $event->description;
84+
if (class_exists($description)) {
85+
$command = $description;
8586
$description = '';
8687
} else {
8788
$command = 'Closure at: '.$this->getClosureLocation($event);
@@ -138,7 +139,7 @@ private function getCronExpressionSpacing($events)
138139
{
139140
$rows = $events->map(fn ($event) => array_map('mb_strlen', preg_split("/\s+/", $event->expression)));
140141

141-
return collect($rows[0] ?? [])->keys()->map(fn ($key) => $rows->max($key));
142+
return collect($rows[0] ?? [])->keys()->map(fn ($key) => $rows->max($key))->all();
142143
}
143144

144145
/**
@@ -164,7 +165,7 @@ private function sortEvents(\Illuminate\Support\Collection $events, DateTimeZone
164165
*/
165166
private function getNextDueDateForEvent($event, DateTimeZone $timezone)
166167
{
167-
return Carbon::create(
168+
return Carbon::instance(
168169
(new CronExpression($event->expression))
169170
->getNextRunDate(Carbon::now()->setTimezone($event->timezone))
170171
->setTimezone($timezone)

src/Illuminate/Database/Eloquent/BroadcastableModelEventOccurred.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ class BroadcastableModelEventOccurred implements ShouldBroadcast
4646
*/
4747
public $queue;
4848

49+
/**
50+
* Indicates whether the job should be dispatched after all database transactions have committed.
51+
*
52+
* @var bool|null
53+
*/
54+
public $afterCommit;
55+
4956
/**
5057
* Create a new event instance.
5158
*

src/Illuminate/Database/Eloquent/Builder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1910,8 +1910,8 @@ public static function __callStatic($method, $parameters)
19101910
protected static function registerMixin($mixin, $replace)
19111911
{
19121912
$methods = (new ReflectionClass($mixin))->getMethods(
1913-
ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PROTECTED
1914-
);
1913+
ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PROTECTED
1914+
);
19151915

19161916
foreach ($methods as $method) {
19171917
if ($replace || ! static::hasGlobalMacro($method->name)) {

src/Illuminate/Database/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
},
3737
"suggest": {
3838
"doctrine/dbal": "Required to rename columns and drop SQLite columns (^3.5.1).",
39-
"fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).",
39+
"fakerphp/faker": "Required to use the eloquent factory builder (^1.21).",
4040
"illuminate/console": "Required to use the database commands (^10.0).",
4141
"illuminate/events": "Required to use the observers with Eloquent (^10.0).",
4242
"illuminate/filesystem": "Required to use the migrations (^10.0).",

0 commit comments

Comments
 (0)