Skip to content

Commit 34439eb

Browse files
committed
Merge branch '9.x'
# Conflicts: # CHANGELOG.md # composer.json # src/Illuminate/Foundation/Application.php # src/Illuminate/Http/composer.json
2 parents 7f932e4 + 22222b3 commit 34439eb

File tree

184 files changed

+2063
-580
lines changed

Some content is hidden

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

184 files changed

+2063
-580
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
## [Unreleased](https://github.com/laravel/framework/compare/v10.0.0..master)
44

55

6-
## [v10.0.0 (2022-??-??)](https://github.com/laravel/framework/compare/v9.1.0...master)
6+
## [v10.0.0 (2022-??-??)](https://github.com/laravel/framework/compare/v9.2.0...master)
77

88
Check the upgrade guide in the [Official Laravel Upgrade Documentation](https://laravel.com/docs/10.x/upgrade). Also you can see some release notes in the [Official Laravel Release Documentation](https://laravel.com/docs/10.x/releases).

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"doctrine/inflector": "^2.0",
2222
"dragonmantank/cron-expression": "^3.1",
2323
"egulias/email-validator": "^3.1",
24+
"fruitcake/php-cors": "^1.2",
2425
"laravel/serializable-closure": "^1.0",
2526
"league/commonmark": "^2.2",
2627
"league/flysystem": "^3.0",
@@ -90,8 +91,8 @@
9091
"orchestra/testbench-core": "^8.0",
9192
"pda/pheanstalk": "^4.0",
9293
"phpstan/phpstan": "^1.0",
93-
"predis/predis": "^1.1.9",
9494
"phpunit/phpunit": "^9.5.8",
95+
"predis/predis": "^1.1.9",
9596
"symfony/cache": "^6.1"
9697
},
9798
"provide": {
@@ -142,8 +143,8 @@
142143
"aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.198.1).",
143144
"brianium/paratest": "Required to run tests in parallel (^6.0).",
144145
"doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.4).",
145-
"filp/whoops": "Required for friendly error pages in development (^2.14.3).",
146146
"fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).",
147+
"filp/whoops": "Required for friendly error pages in development (^2.14.3).",
147148
"guzzlehttp/guzzle": "Required to use the HTTP Client and the ping methods on schedules (^7.2).",
148149
"laravel/tinker": "Required to use the tinker console command (^2.0).",
149150
"league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.0).",

src/Illuminate/Auth/Access/Gate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ protected function callAfterCallbacks($user, $ability, array $arguments, $result
575575

576576
$afterResult = $after($user, $ability, $result, $arguments);
577577

578-
$result = $result ?? $afterResult;
578+
$result ??= $afterResult;
579579
}
580580

581581
return $result;

src/Illuminate/Broadcasting/BroadcastManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ public function setDefaultDriver($name)
346346
*/
347347
public function purge($name = null)
348348
{
349-
$name = $name ?? $this->getDefaultDriver();
349+
$name ??= $this->getDefaultDriver();
350350

351351
unset($this->drivers[$name]);
352352
}

src/Illuminate/Bus/Queueable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public function allOnQueue($queue)
127127
}
128128

129129
/**
130-
* Set the desired delay for the job.
130+
* Set the desired delay in seconds for the job.
131131
*
132132
* @param \DateTimeInterface|\DateInterval|int|null $delay
133133
* @return $this

src/Illuminate/Cache/CacheManager.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ protected function newDynamodbClient(array $config)
264264
'endpoint' => $config['endpoint'] ?? null,
265265
];
266266

267-
if (isset($config['key']) && isset($config['secret'])) {
267+
if (isset($config['key'], $config['secret'])) {
268268
$dynamoConfig['credentials'] = Arr::only(
269269
$config, ['key', 'secret', 'token']
270270
);
@@ -368,7 +368,7 @@ public function setDefaultDriver($name)
368368
*/
369369
public function forgetDriver($name = null)
370370
{
371-
$name = $name ?? $this->getDefaultDriver();
371+
$name ??= $this->getDefaultDriver();
372372

373373
foreach ((array) $name as $cacheName) {
374374
if (isset($this->stores[$cacheName])) {
@@ -387,7 +387,7 @@ public function forgetDriver($name = null)
387387
*/
388388
public function purge($name = null)
389389
{
390-
$name = $name ?? $this->getDefaultDriver();
390+
$name ??= $this->getDefaultDriver();
391391

392392
unset($this->stores[$name]);
393393
}

src/Illuminate/Cache/DatabaseLock.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ public function __construct(Connection $connection, $table, $name, $seconds, $ow
5656
*/
5757
public function acquire()
5858
{
59-
$acquired = false;
60-
6159
try {
6260
$this->connection->table($this->table)->insert([
6361
'key' => $this->name,

src/Illuminate/Collections/Collection.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public function collapse()
167167
/**
168168
* Determine if an item exists in the collection.
169169
*
170-
* @param (callable(TValue): bool)|TValue|string $key
170+
* @param (callable(TValue, TKey): bool)|TValue|string $key
171171
* @param mixed $operator
172172
* @param mixed $value
173173
* @return bool
@@ -1208,12 +1208,14 @@ public function sole($key = null, $operator = null, $value = null)
12081208

12091209
$items = $this->unless($filter == null)->filter($filter);
12101210

1211-
if ($items->isEmpty()) {
1211+
$count = $items->count();
1212+
1213+
if ($count === 0) {
12121214
throw new ItemNotFoundException;
12131215
}
12141216

1215-
if ($items->count() > 1) {
1216-
throw new MultipleItemsFoundException;
1217+
if ($count > 1) {
1218+
throw new MultipleItemsFoundException($count);
12171219
}
12181220

12191221
return $items->first();
@@ -1369,8 +1371,6 @@ protected function sortByMany(array $comparisons = [])
13691371
$ascending = Arr::get($comparison, 1, true) === true ||
13701372
Arr::get($comparison, 1, true) === 'asc';
13711373

1372-
$result = 0;
1373-
13741374
if (! is_string($prop) && is_callable($prop)) {
13751375
$result = $prop($a, $b);
13761376
} else {

src/Illuminate/Collections/Enumerable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ public function pipe(callable $callback);
10741074
/**
10751075
* Pass the collection into a new class.
10761076
*
1077-
* @param string-class $class
1077+
* @param class-string $class
10781078
* @return mixed
10791079
*/
10801080
public function pipeInto($class);

src/Illuminate/Collections/LazyCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public function collapse()
207207
/**
208208
* Determine if an item exists in the enumerable.
209209
*
210-
* @param (callable(TValue): bool)|TValue|string $key
210+
* @param (callable(TValue, TKey): bool)|TValue|string $key
211211
* @param mixed $operator
212212
* @param mixed $value
213213
* @return bool

0 commit comments

Comments
 (0)