Skip to content

Commit 08728a3

Browse files
committed
Merge branch '8.x'
# Conflicts: # CHANGELOG-8.x.md # src/Illuminate/Foundation/Application.php
2 parents 8a1a7b5 + ab5a864 commit 08728a3

File tree

70 files changed

+309
-219
lines changed

Some content is hidden

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

70 files changed

+309
-219
lines changed

src/Illuminate/Auth/Access/Gate.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,10 @@ public function resource($name, $class, array $abilities = null)
157157
{
158158
$abilities = $abilities ?: [
159159
'viewAny' => 'viewAny',
160-
'view' => 'view',
161-
'create' => 'create',
162-
'update' => 'update',
163-
'delete' => 'delete',
160+
'view' => 'view',
161+
'create' => 'create',
162+
'update' => 'update',
163+
'delete' => 'delete',
164164
];
165165

166166
foreach ($abilities as $ability => $method) {

src/Illuminate/Auth/SessionGuard.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ protected function cycleRememberToken(AuthenticatableContract $user)
628628
*
629629
* @param string $password
630630
* @param string $attribute
631-
* @return bool|null
631+
* @return \Illuminate\Contracts\Auth\Authenticatable|null
632632
*
633633
* @throws \Illuminate\Auth\AuthenticationException
634634
*/
@@ -655,7 +655,7 @@ public function logoutOtherDevices($password, $attribute = 'password')
655655
*
656656
* @param string $password
657657
* @param string $attribute
658-
* @return bool|null
658+
* @return \Illuminate\Contracts\Auth\Authenticatable|null
659659
*
660660
* @throws \InvalidArgumentException
661661
*/

src/Illuminate/Bus/Batch.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Illuminate\Support\Arr;
1212
use Illuminate\Support\Collection;
1313
use JsonSerializable;
14+
use ReturnTypeWillChange;
1415
use Throwable;
1516

1617
class Batch implements Arrayable, JsonSerializable
@@ -459,6 +460,7 @@ public function toArray()
459460
*
460461
* @return array
461462
*/
463+
#[ReturnTypeWillChange]
462464
public function jsonSerialize()
463465
{
464466
return $this->toArray();

src/Illuminate/Collections/Traits/EnumeratesValues.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Illuminate\Support\Enumerable;
1313
use Illuminate\Support\HigherOrderCollectionProxy;
1414
use JsonSerializable;
15+
use ReturnTypeWillChange;
1516
use Symfony\Component\VarDumper\VarDumper;
1617
use Traversable;
1718

@@ -802,6 +803,7 @@ public function toArray()
802803
*
803804
* @return array
804805
*/
806+
#[ReturnTypeWillChange]
805807
public function jsonSerialize()
806808
{
807809
return array_map(function ($value) {

src/Illuminate/Database/Concerns/BuildsQueries.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ protected function simplePaginator($items, $perPage, $currentPage, $options)
332332
* @param int $perPage
333333
* @param \Illuminate\Pagination\Cursor $cursor
334334
* @param array $options
335-
* @return \Illuminate\Pagination\Paginator
335+
* @return \Illuminate\Pagination\CursorPaginator
336336
*/
337337
protected function cursorPaginator($items, $perPage, $cursor, $options)
338338
{

src/Illuminate/Database/Eloquent/Casts/ArrayObject.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use ArrayObject as BaseArrayObject;
66
use Illuminate\Contracts\Support\Arrayable;
77
use JsonSerializable;
8+
use ReturnTypeWillChange;
89

910
class ArrayObject extends BaseArrayObject implements Arrayable, JsonSerializable
1011
{
@@ -33,6 +34,7 @@ public function toArray()
3334
*
3435
* @return array
3536
*/
37+
#[ReturnTypeWillChange]
3638
public function jsonSerialize()
3739
{
3840
return $this->getArrayCopy();

src/Illuminate/Database/Eloquent/Model.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use Illuminate\Support\Traits\ForwardsCalls;
2222
use JsonSerializable;
2323
use LogicException;
24+
use ReturnTypeWillChange;
2425

2526
abstract class Model implements Arrayable, ArrayAccess, HasBroadcastChannel, Jsonable, JsonSerializable, QueueableEntity, UrlRoutable
2627
{
@@ -1426,6 +1427,7 @@ public function toJson($options = 0)
14261427
*
14271428
* @return array
14281429
*/
1430+
#[ReturnTypeWillChange]
14291431
public function jsonSerialize()
14301432
{
14311433
return $this->toArray();

src/Illuminate/Database/Migrations/Migrator.php

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Illuminate\Database\Migrations;
44

5+
use Doctrine\DBAL\Schema\SchemaException;
56
use Illuminate\Contracts\Events\Dispatcher;
67
use Illuminate\Database\ConnectionResolverInterface as Resolver;
78
use Illuminate\Database\Events\MigrationEnded;
@@ -411,16 +412,22 @@ protected function runMigration($migration, $method)
411412
*/
412413
protected function pretendToRun($migration, $method)
413414
{
414-
foreach ($this->getQueries($migration, $method) as $query) {
415-
$name = get_class($migration);
415+
try {
416+
foreach ($this->getQueries($migration, $method) as $query) {
417+
$name = get_class($migration);
418+
419+
$reflectionClass = new ReflectionClass($migration);
416420

417-
$reflectionClass = new ReflectionClass($migration);
421+
if ($reflectionClass->isAnonymous()) {
422+
$name = $this->getMigrationName($reflectionClass->getFileName());
423+
}
418424

419-
if ($reflectionClass->isAnonymous()) {
420-
$name = $this->getMigrationName($reflectionClass->getFileName());
425+
$this->note("<info>{$name}:</info> {$query['query']}");
421426
}
427+
} catch (SchemaException $e) {
428+
$name = get_class($migration);
422429

423-
$this->note("<info>{$name}:</info> {$query['query']}");
430+
$this->note("<info>{$name}:</info> failed to dump queries. This may be due to changing database columns using Doctrine, which is not supported while pretending to run migrations.");
424431
}
425432
}
426433

src/Illuminate/Database/PDO/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function lastInsertId($name = null)
110110
/**
111111
* Create a new statement instance.
112112
*
113-
* @param \PDOStatement
113+
* @param \PDOStatement $stmt
114114
* @return \Doctrine\DBAL\Driver\PDO\Statement
115115
*/
116116
protected function createStatement(PDOStatement $stmt): Statement

src/Illuminate/Database/Query/Builder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2460,7 +2460,7 @@ public function simplePaginate($perPage = 15, $columns = ['*'], $pageName = 'pag
24602460
* @param array $columns
24612461
* @param string $cursorName
24622462
* @param string|null $cursor
2463-
* @return \Illuminate\Contracts\Pagination\Paginator
2463+
* @return \Illuminate\Contracts\Pagination\CursorPaginator
24642464
* @throws \Illuminate\Pagination\CursorPaginationException
24652465
*/
24662466
public function cursorPaginate($perPage = 15, $columns = ['*'], $cursorName = 'cursor', $cursor = null)
@@ -2630,7 +2630,7 @@ protected function enforceOrderBy()
26302630
}
26312631

26322632
/**
2633-
* Get an array with the values of a given column.
2633+
* Get a collection instance containing the values of a given column.
26342634
*
26352635
* @param string $column
26362636
* @param string|null $key

0 commit comments

Comments
 (0)