Skip to content

Commit cb40a65

Browse files
committed
Merge branch '9.x' into 10.x
# Conflicts: # composer.json # src/Illuminate/Auth/composer.json # src/Illuminate/Broadcasting/composer.json # src/Illuminate/Console/composer.json # src/Illuminate/Cookie/composer.json # src/Illuminate/Database/composer.json # src/Illuminate/Encryption/composer.json # src/Illuminate/Http/composer.json # src/Illuminate/Mail/composer.json # src/Illuminate/Pagination/composer.json # src/Illuminate/Queue/composer.json # src/Illuminate/Routing/composer.json # src/Illuminate/Session/composer.json # src/Illuminate/Support/composer.json # src/Illuminate/Testing/composer.json # src/Illuminate/Translation/composer.json # src/Illuminate/Validation/composer.json # src/Illuminate/View/composer.json
2 parents 6adf7f9 + 1f60081 commit cb40a65

40 files changed

+671
-44
lines changed

composer.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,19 @@
1616
],
1717
"require": {
1818
"php": "^8.1",
19+
"ext-ctype": "*",
20+
"ext-filter": "*",
21+
"ext-hash": "*",
1922
"ext-mbstring": "*",
2023
"ext-openssl": "*",
24+
"ext-session": "*",
25+
"ext-tokenizer": "*",
2126
"brick/math": "^0.9.3|^0.10.2|^0.11",
2227
"doctrine/inflector": "^2.0.5",
2328
"dragonmantank/cron-expression": "^3.3.2",
2429
"egulias/email-validator": "^3.2.1|^4.0",
2530
"fruitcake/php-cors": "^1.2",
31+
"guzzlehttp/uri-template": "^1.0",
2632
"laravel/serializable-closure": "^1.3",
2733
"league/commonmark": "^2.2.1",
2834
"league/flysystem": "^3.8.0",
@@ -83,6 +89,7 @@
8389
"illuminate/view": "self.version"
8490
},
8591
"require-dev": {
92+
"ext-gmp": "*",
8693
"ably/ably-php": "^1.0",
8794
"aws/aws-sdk-php": "^3.235.5",
8895
"doctrine/dbal": "^3.5.1",
@@ -140,10 +147,13 @@
140147
}
141148
},
142149
"suggest": {
150+
"ext-apcu": "Required to use the APC cache driver.",
151+
"ext-fileinfo": "Required to use the Filesystem class.",
143152
"ext-ftp": "Required to use the Flysystem FTP driver.",
144153
"ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().",
145154
"ext-memcached": "Required to use the memcache cache driver.",
146-
"ext-pcntl": "Required to use all features of the queue worker.",
155+
"ext-pcntl": "Required to use all features of the queue worker and console signal trapping.",
156+
"ext-pdo": "Required to use all database features.",
147157
"ext-posix": "Required to use all features of the queue worker.",
148158
"ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).",
149159
"ably/ably-php": "Required to use the Ably broadcast driver (^1.0).",

src/Illuminate/Auth/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
],
1616
"require": {
1717
"php": "^8.1",
18+
"ext-hash": "*",
1819
"illuminate/collections": "^10.0",
1920
"illuminate/contracts": "^10.0",
2021
"illuminate/http": "^10.0",

src/Illuminate/Broadcasting/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
],
1616
"require": {
1717
"php": "^8.1",
18-
"ext-json": "*",
1918
"psr/log": "^1.0|^2.0|^3.0",
2019
"illuminate/bus": "^10.0",
2120
"illuminate/collections": "^10.0",
@@ -35,6 +34,7 @@
3534
}
3635
},
3736
"suggest": {
37+
"ext-hash": "Required to use the Ably and Pusher broadcast drivers.",
3838
"ably/ably-php": "Required to use the Ably broadcast driver (^1.0).",
3939
"pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0)."
4040
},

src/Illuminate/Cache/composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
}
3535
},
3636
"suggest": {
37+
"ext-apcu": "Required to use the APC cache driver.",
38+
"ext-filter": "Required to use the DynamoDb cache driver.",
3739
"ext-memcached": "Required to use the memcache cache driver.",
3840
"illuminate/database": "Required to use the database cache driver (^10.0).",
3941
"illuminate/filesystem": "Required to use the file cache driver (^10.0).",

src/Illuminate/Collections/Enumerable.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,10 @@ public static function range($from, $to);
5151
/**
5252
* Wrap the given value in a collection if applicable.
5353
*
54-
* @template TWrapKey of array-key
5554
* @template TWrapValue
5655
*
57-
* @param iterable<TWrapKey, TWrapValue> $value
58-
* @return static<TWrapKey, TWrapValue>
56+
* @param iterable<array-key, TWrapValue>|TWrapValue $value
57+
* @return static<array-key, TWrapValue>
5958
*/
6059
public static function wrap($value);
6160

src/Illuminate/Collections/Traits/EnumeratesValues.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,10 @@ public static function make($items = [])
114114
/**
115115
* Wrap the given value in a collection if applicable.
116116
*
117-
* @template TWrapKey of array-key
118117
* @template TWrapValue
119118
*
120-
* @param iterable<TWrapKey, TWrapValue> $value
121-
* @return static<TWrapKey, TWrapValue>
119+
* @param iterable<array-key, TWrapValue>|TWrapValue $value
120+
* @return static<array-key, TWrapValue>
122121
*/
123122
public static function wrap($value)
124123
{

src/Illuminate/Console/Scheduling/CallbackEvent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ protected function execute($container)
129129
/**
130130
* Do not allow the event to overlap each other.
131131
*
132+
* The expiration time of the underlying cache lock may be specified in minutes.
133+
*
132134
* @param int $expiresAt
133135
* @return $this
134136
*

src/Illuminate/Console/Scheduling/Event.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,8 @@ public function evenInMaintenanceMode()
659659
/**
660660
* Do not allow the event to overlap each other.
661661
*
662+
* The expiration time of the underlying cache lock may be specified in minutes.
663+
*
662664
* @param int $expiresAt
663665
* @return $this
664666
*/

src/Illuminate/Console/Scheduling/ScheduleWorkCommand.php

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,20 @@
44

55
use Illuminate\Console\Command;
66
use Illuminate\Support\Carbon;
7+
use Illuminate\Support\ProcessUtils;
78
use Symfony\Component\Console\Attribute\AsCommand;
9+
use Symfony\Component\Console\Output\OutputInterface;
810
use Symfony\Component\Process\Process;
911

1012
#[AsCommand(name: 'schedule:work')]
1113
class ScheduleWorkCommand extends Command
1214
{
1315
/**
14-
* The console command name.
16+
* The name and signature of the console command.
1517
*
1618
* @var string
1719
*/
18-
protected $name = 'schedule:work';
20+
protected $signature = 'schedule:work {--run-output-file= : The file to direct <info>schedule:run</info> output to}';
1921

2022
/**
2123
* The console command description.
@@ -31,20 +33,29 @@ class ScheduleWorkCommand extends Command
3133
*/
3234
public function handle()
3335
{
34-
$this->components->info('Running schedule tasks every minute.');
36+
$this->components->info(
37+
'Running scheduled tasks every minute.',
38+
$this->getLaravel()->isLocal() ? OutputInterface::VERBOSITY_NORMAL : OutputInterface::VERBOSITY_VERBOSE
39+
);
3540

3641
[$lastExecutionStartedAt, $executions] = [null, []];
3742

43+
$command = implode(' ', array_map(fn ($arg) => ProcessUtils::escapeArgument($arg), [
44+
PHP_BINARY,
45+
defined('ARTISAN_BINARY') ? ARTISAN_BINARY : 'artisan',
46+
'schedule:run',
47+
]));
48+
49+
if ($this->option('run-output-file')) {
50+
$command .= ' >> '.ProcessUtils::escapeArgument($this->option('run-output-file')).' 2>&1';
51+
}
52+
3853
while (true) {
3954
usleep(100 * 1000);
4055

4156
if (Carbon::now()->second === 0 &&
4257
! Carbon::now()->startOfMinute()->equalTo($lastExecutionStartedAt)) {
43-
$executions[] = $execution = new Process([
44-
PHP_BINARY,
45-
defined('ARTISAN_BINARY') ? ARTISAN_BINARY : 'artisan',
46-
'schedule:run',
47-
]);
58+
$executions[] = $execution = Process::fromShellCommandline($command);
4859

4960
$execution->start();
5061

@@ -53,7 +64,7 @@ public function handle()
5364

5465
foreach ($executions as $key => $execution) {
5566
$output = $execution->getIncrementalOutput().
56-
$execution->getIncrementalErrorOutput();
67+
$execution->getIncrementalErrorOutput();
5768

5869
$this->output->write(ltrim($output, "\n"));
5970

src/Illuminate/Console/composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
],
1616
"require": {
1717
"php": "^8.1",
18+
"ext-mbstring": "*",
1819
"illuminate/collections": "^10.0",
1920
"illuminate/contracts": "^10.0",
2021
"illuminate/macroable": "^10.0",
@@ -35,6 +36,7 @@
3536
}
3637
},
3738
"suggest": {
39+
"ext-pcntl": "Required to use signal trapping.",
3840
"dragonmantank/cron-expression": "Required to use scheduler (^3.3.2).",
3941
"guzzlehttp/guzzle": "Required to use the ping methods on schedules (^7.5).",
4042
"illuminate/bus": "Required to use the scheduled job dispatcher (^10.0).",

0 commit comments

Comments
 (0)