From 8a135a1959bb49e358d4965c907a5f0a4e04ef7c Mon Sep 17 00:00:00 2001 From: Tetiana Blindaruk Date: Tue, 20 Oct 2020 21:51:29 +0300 Subject: [PATCH 01/81] [6.x] update changelog --- CHANGELOG-6.x.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-6.x.md b/CHANGELOG-6.x.md index a23c297ed01f..06e4a83add64 100644 --- a/CHANGELOG-6.x.md +++ b/CHANGELOG-6.x.md @@ -1,6 +1,12 @@ # Release Notes for 6.x -## [Unreleased](https://github.com/laravel/framework/compare/v6.19.0...6.x) +## [Unreleased](https://github.com/laravel/framework/compare/v6.19.1...6.x) + + +## [v6.19.1 (2020-10-20)](https://github.com/laravel/framework/compare/v6.19.0...v6.19.1) + +### Fixed +- Fixed `bound()` method ([a7759d7](https://github.com/laravel/framework/commit/a7759d70e15b0be946569b8299ac694c08a35d7e)) ## [v6.19.0 (2020-10-20)](https://github.com/laravel/framework/compare/v6.18.43...v6.19.0) From f88350b3e9c7fb068599f9bda0ac96b1acb81e83 Mon Sep 17 00:00:00 2001 From: "D.Horiyama" Date: Thu, 22 Oct 2020 02:02:41 +0900 Subject: [PATCH 02/81] fix @return typehint of Illuminate\Events\Dispatcher@resolveQueue (#34922) fixes #34921 --- src/Illuminate/Events/Dispatcher.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Events/Dispatcher.php b/src/Illuminate/Events/Dispatcher.php index 0d0173e3cbb9..eb25f5c6f5a4 100755 --- a/src/Illuminate/Events/Dispatcher.php +++ b/src/Illuminate/Events/Dispatcher.php @@ -569,7 +569,7 @@ public function forgetPushed() /** * Get the queue implementation from the resolver. * - * @return \Illuminate\Contracts\Queue\Queue + * @return \Illuminate\Contracts\Queue\Factory */ protected function resolveQueue() { From b1555ed43fc102cee156d22d76bd8713b2031346 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 22 Oct 2020 13:58:15 +0200 Subject: [PATCH 03/81] Bump minimum PHP version (#34928) --- composer.json | 2 +- src/Illuminate/Auth/composer.json | 2 +- src/Illuminate/Broadcasting/composer.json | 2 +- src/Illuminate/Bus/composer.json | 2 +- src/Illuminate/Cache/composer.json | 2 +- src/Illuminate/Config/composer.json | 2 +- src/Illuminate/Console/composer.json | 2 +- src/Illuminate/Container/composer.json | 2 +- src/Illuminate/Contracts/composer.json | 2 +- src/Illuminate/Cookie/composer.json | 2 +- src/Illuminate/Database/composer.json | 2 +- src/Illuminate/Encryption/composer.json | 2 +- src/Illuminate/Events/composer.json | 2 +- src/Illuminate/Filesystem/composer.json | 2 +- src/Illuminate/Hashing/composer.json | 2 +- src/Illuminate/Http/composer.json | 2 +- src/Illuminate/Log/composer.json | 2 +- src/Illuminate/Mail/composer.json | 2 +- src/Illuminate/Notifications/composer.json | 2 +- src/Illuminate/Pagination/composer.json | 2 +- src/Illuminate/Pipeline/composer.json | 2 +- src/Illuminate/Queue/composer.json | 2 +- src/Illuminate/Redis/composer.json | 2 +- src/Illuminate/Routing/composer.json | 2 +- src/Illuminate/Session/composer.json | 2 +- src/Illuminate/Support/composer.json | 2 +- src/Illuminate/Translation/composer.json | 2 +- src/Illuminate/Validation/composer.json | 2 +- src/Illuminate/View/composer.json | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) diff --git a/composer.json b/composer.json index c9bcf9357bcb..570b055dca6d 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", diff --git a/src/Illuminate/Auth/composer.json b/src/Illuminate/Auth/composer.json index 21ae73751ce9..1221b8d3c7ce 100644 --- a/src/Illuminate/Auth/composer.json +++ b/src/Illuminate/Auth/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "illuminate/contracts": "^6.0", "illuminate/http": "^6.0", "illuminate/queue": "^6.0", diff --git a/src/Illuminate/Broadcasting/composer.json b/src/Illuminate/Broadcasting/composer.json index cc050e135d73..d0d5f8f2e872 100644 --- a/src/Illuminate/Broadcasting/composer.json +++ b/src/Illuminate/Broadcasting/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "ext-json": "*", "psr/log": "^1.0", "illuminate/bus": "^6.0", diff --git a/src/Illuminate/Bus/composer.json b/src/Illuminate/Bus/composer.json index 63743abab856..6cbbfb076ce7 100644 --- a/src/Illuminate/Bus/composer.json +++ b/src/Illuminate/Bus/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "illuminate/contracts": "^6.0", "illuminate/pipeline": "^6.0", "illuminate/support": "^6.0" diff --git a/src/Illuminate/Cache/composer.json b/src/Illuminate/Cache/composer.json index e69c406246ce..c11e7bf80488 100755 --- a/src/Illuminate/Cache/composer.json +++ b/src/Illuminate/Cache/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0" }, diff --git a/src/Illuminate/Config/composer.json b/src/Illuminate/Config/composer.json index 55e8a4035ad9..ea0196e68172 100755 --- a/src/Illuminate/Config/composer.json +++ b/src/Illuminate/Config/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0" }, diff --git a/src/Illuminate/Console/composer.json b/src/Illuminate/Console/composer.json index b94c8fa75f95..1f4d546c6e88 100755 --- a/src/Illuminate/Console/composer.json +++ b/src/Illuminate/Console/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0", "symfony/console": "^4.3.4", diff --git a/src/Illuminate/Container/composer.json b/src/Illuminate/Container/composer.json index 76da2163481f..2842c33525dc 100755 --- a/src/Illuminate/Container/composer.json +++ b/src/Illuminate/Container/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "illuminate/contracts": "^6.0", "psr/container": "^1.0" }, diff --git a/src/Illuminate/Contracts/composer.json b/src/Illuminate/Contracts/composer.json index fee8ed4d078b..807085275739 100644 --- a/src/Illuminate/Contracts/composer.json +++ b/src/Illuminate/Contracts/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "psr/container": "^1.0", "psr/simple-cache": "^1.0" }, diff --git a/src/Illuminate/Cookie/composer.json b/src/Illuminate/Cookie/composer.json index 1517a2b1938a..f76d145b1243 100755 --- a/src/Illuminate/Cookie/composer.json +++ b/src/Illuminate/Cookie/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0", "symfony/http-foundation": "^4.3.4", diff --git a/src/Illuminate/Database/composer.json b/src/Illuminate/Database/composer.json index f407ca6c22d3..99380b080968 100644 --- a/src/Illuminate/Database/composer.json +++ b/src/Illuminate/Database/composer.json @@ -15,7 +15,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "ext-json": "*", "illuminate/container": "^6.0", "illuminate/contracts": "^6.0", diff --git a/src/Illuminate/Encryption/composer.json b/src/Illuminate/Encryption/composer.json index 5f535b4004b2..7ea4768eac3e 100644 --- a/src/Illuminate/Encryption/composer.json +++ b/src/Illuminate/Encryption/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", diff --git a/src/Illuminate/Events/composer.json b/src/Illuminate/Events/composer.json index 639083026959..aab0b9fbdcca 100755 --- a/src/Illuminate/Events/composer.json +++ b/src/Illuminate/Events/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "illuminate/container": "^6.0", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0" diff --git a/src/Illuminate/Filesystem/composer.json b/src/Illuminate/Filesystem/composer.json index b21e461a946b..b6529e1dd102 100644 --- a/src/Illuminate/Filesystem/composer.json +++ b/src/Illuminate/Filesystem/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0", "symfony/finder": "^4.3.4" diff --git a/src/Illuminate/Hashing/composer.json b/src/Illuminate/Hashing/composer.json index a728b6f7154b..f2f2cea01393 100755 --- a/src/Illuminate/Hashing/composer.json +++ b/src/Illuminate/Hashing/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0" }, diff --git a/src/Illuminate/Http/composer.json b/src/Illuminate/Http/composer.json index 5c17211e9b95..423ffb8a2e13 100755 --- a/src/Illuminate/Http/composer.json +++ b/src/Illuminate/Http/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "ext-json": "*", "illuminate/session": "^6.0", "illuminate/support": "^6.0", diff --git a/src/Illuminate/Log/composer.json b/src/Illuminate/Log/composer.json index 5b2d0c3299f8..63670f05fdfd 100755 --- a/src/Illuminate/Log/composer.json +++ b/src/Illuminate/Log/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0", "monolog/monolog": "^1.12|^2.0" diff --git a/src/Illuminate/Mail/composer.json b/src/Illuminate/Mail/composer.json index cf66edee1aba..8b9dd46bb47e 100755 --- a/src/Illuminate/Mail/composer.json +++ b/src/Illuminate/Mail/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "ext-json": "*", "illuminate/container": "^6.0", "illuminate/contracts": "^6.0", diff --git a/src/Illuminate/Notifications/composer.json b/src/Illuminate/Notifications/composer.json index cbe02a736ba2..1411ec9b50ab 100644 --- a/src/Illuminate/Notifications/composer.json +++ b/src/Illuminate/Notifications/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "illuminate/broadcasting": "^6.0", "illuminate/bus": "^6.0", "illuminate/container": "^6.0", diff --git a/src/Illuminate/Pagination/composer.json b/src/Illuminate/Pagination/composer.json index d54b1d2b9d65..098b7ca1c5cc 100755 --- a/src/Illuminate/Pagination/composer.json +++ b/src/Illuminate/Pagination/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "ext-json": "*", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0" diff --git a/src/Illuminate/Pipeline/composer.json b/src/Illuminate/Pipeline/composer.json index 68d30a44dcdf..c5577e7236da 100644 --- a/src/Illuminate/Pipeline/composer.json +++ b/src/Illuminate/Pipeline/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0", "symfony/debug": "^4.3.4" diff --git a/src/Illuminate/Queue/composer.json b/src/Illuminate/Queue/composer.json index 7ef8dd89070e..e2c166f84eb3 100644 --- a/src/Illuminate/Queue/composer.json +++ b/src/Illuminate/Queue/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "ext-json": "*", "illuminate/console": "^6.0", "illuminate/container": "^6.0", diff --git a/src/Illuminate/Redis/composer.json b/src/Illuminate/Redis/composer.json index 2fdce35b4f49..ec09a66e22e9 100755 --- a/src/Illuminate/Redis/composer.json +++ b/src/Illuminate/Redis/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0" }, diff --git a/src/Illuminate/Routing/composer.json b/src/Illuminate/Routing/composer.json index 9bc8e5f46f22..af7ca941adcb 100644 --- a/src/Illuminate/Routing/composer.json +++ b/src/Illuminate/Routing/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "ext-json": "*", "illuminate/container": "^6.0", "illuminate/contracts": "^6.0", diff --git a/src/Illuminate/Session/composer.json b/src/Illuminate/Session/composer.json index 3c9962cde646..d30397efc661 100755 --- a/src/Illuminate/Session/composer.json +++ b/src/Illuminate/Session/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "ext-json": "*", "illuminate/contracts": "^6.0", "illuminate/filesystem": "^6.0", diff --git a/src/Illuminate/Support/composer.json b/src/Illuminate/Support/composer.json index 1ac5b7447e7e..28831ef4bf10 100644 --- a/src/Illuminate/Support/composer.json +++ b/src/Illuminate/Support/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "ext-json": "*", "ext-mbstring": "*", "doctrine/inflector": "^1.4|^2.0", diff --git a/src/Illuminate/Translation/composer.json b/src/Illuminate/Translation/composer.json index 25d2fd7fbd8a..fdf284eb563d 100755 --- a/src/Illuminate/Translation/composer.json +++ b/src/Illuminate/Translation/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "ext-json": "*", "illuminate/contracts": "^6.0", "illuminate/filesystem": "^6.0", diff --git a/src/Illuminate/Validation/composer.json b/src/Illuminate/Validation/composer.json index e7475a2b5ea7..3eb468a9dc92 100755 --- a/src/Illuminate/Validation/composer.json +++ b/src/Illuminate/Validation/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "ext-json": "*", "egulias/email-validator": "^2.1.10", "illuminate/container": "^6.0", diff --git a/src/Illuminate/View/composer.json b/src/Illuminate/View/composer.json index e170e507d129..04d291b96a2c 100644 --- a/src/Illuminate/View/composer.json +++ b/src/Illuminate/View/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2.5", "ext-json": "*", "illuminate/container": "^6.0", "illuminate/contracts": "^6.0", From 826a90f660016bd66326ae823a077ae10a868b28 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Mon, 26 Oct 2020 16:12:05 +0100 Subject: [PATCH 04/81] Remove throw in BoundMethod (#34970) --- src/Illuminate/Container/BoundMethod.php | 5 ----- tests/Container/ContainerCallTest.php | 7 +++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Illuminate/Container/BoundMethod.php b/src/Illuminate/Container/BoundMethod.php index c617bf79795f..7dd331ae71c8 100644 --- a/src/Illuminate/Container/BoundMethod.php +++ b/src/Illuminate/Container/BoundMethod.php @@ -3,7 +3,6 @@ namespace Illuminate\Container; use Closure; -use Illuminate\Contracts\Container\BindingResolutionException; use InvalidArgumentException; use ReflectionFunction; use ReflectionMethod; @@ -174,10 +173,6 @@ protected static function addDependencyForCallParameter($container, $parameter, } } elseif ($parameter->isDefaultValueAvailable()) { $dependencies[] = $parameter->getDefaultValue(); - } elseif (! $parameter->isOptional() && ! array_key_exists($paramName, $parameters)) { - $message = "Unable to resolve dependency [{$parameter}] in class {$parameter->getDeclaringClass()->getName()}"; - - throw new BindingResolutionException($message); } } diff --git a/tests/Container/ContainerCallTest.php b/tests/Container/ContainerCallTest.php index bd5a4ca826dd..68f0669cb21a 100644 --- a/tests/Container/ContainerCallTest.php +++ b/tests/Container/ContainerCallTest.php @@ -91,6 +91,13 @@ public function testCallWithBoundMethod() $this->assertSame('taylor', $result[1]); } + public function testCallWithUnnamedParameters() + { + $container = new Container; + $result = $container->call([new ContainerTestCallStub, 'unresolvable'], ['foo', 'bar']); + $this->assertEquals(['foo', 'bar'], $result); + } + public function testBindMethodAcceptsAnArray() { $container = new Container; From 897a47136c2da2fdc7e19cee89c2f3a514192dee Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 27 Oct 2020 16:05:51 +0100 Subject: [PATCH 05/81] [6.x] Full PHP 8.0 Support (#33388) * Full PHP 8.0 Support * Update faker suggest * Update testbench Co-authored-by: Graham Campbell --- .github/workflows/tests.yml | 31 +++++++++++++--------- composer.json | 6 ++--- src/Illuminate/Auth/composer.json | 2 +- src/Illuminate/Broadcasting/composer.json | 2 +- src/Illuminate/Bus/composer.json | 2 +- src/Illuminate/Cache/composer.json | 2 +- src/Illuminate/Config/composer.json | 2 +- src/Illuminate/Console/composer.json | 2 +- src/Illuminate/Container/composer.json | 2 +- src/Illuminate/Contracts/composer.json | 2 +- src/Illuminate/Cookie/composer.json | 2 +- src/Illuminate/Database/composer.json | 4 +-- src/Illuminate/Encryption/composer.json | 2 +- src/Illuminate/Events/composer.json | 2 +- src/Illuminate/Filesystem/composer.json | 2 +- src/Illuminate/Hashing/composer.json | 2 +- src/Illuminate/Http/composer.json | 2 +- src/Illuminate/Log/composer.json | 2 +- src/Illuminate/Mail/composer.json | 2 +- src/Illuminate/Notifications/composer.json | 2 +- src/Illuminate/Pagination/composer.json | 2 +- src/Illuminate/Pipeline/composer.json | 2 +- src/Illuminate/Queue/composer.json | 2 +- src/Illuminate/Redis/composer.json | 2 +- src/Illuminate/Routing/composer.json | 2 +- src/Illuminate/Session/composer.json | 2 +- src/Illuminate/Support/composer.json | 2 +- src/Illuminate/Translation/composer.json | 2 +- src/Illuminate/Validation/composer.json | 2 +- src/Illuminate/View/composer.json | 2 +- 30 files changed, 51 insertions(+), 44 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index da9500c98394..4559e4bc8fd7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,7 +27,7 @@ jobs: strategy: fail-fast: true matrix: - php: [7.2, 7.3, 7.4] + php: [7.2, 7.3, 7.4, 8.0] stability: [prefer-lowest, prefer-stable] name: PHP ${{ matrix.php }} - ${{ matrix.stability }} @@ -47,8 +47,15 @@ jobs: - name: Setup Memcached uses: niden/actions-memcached@v7 + - name: Setup problem matchers + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + - name: Install dependencies - run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress + uses: nick-invision/retry@v1 + with: + timeout_minutes: 5 + max_attempts: 5 + command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress - name: Execute tests run: vendor/bin/phpunit --verbose @@ -62,14 +69,8 @@ jobs: strategy: fail-fast: true matrix: - php: [7.2, 7.3, 7.4] - include: - - php: 7.2 - stability: prefer-lowest - - php: 7.3 - stability: prefer-stable - - php: 7.4 - stability: prefer-stable + php: [7.2, 7.3, 7.4, 8.0] + stability: [prefer-lowest, prefer-stable] name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - Windows @@ -89,10 +90,16 @@ jobs: extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, gd, pdo_mysql, fileinfo, ftp tools: composer:v2 coverage: none - ini-values: memory_limit=512M + + - name: Setup problem matchers + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - name: Install dependencies - run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress + uses: nick-invision/retry@v1 + with: + timeout_minutes: 5 + max_attempts: 5 + command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress - name: Execute tests run: vendor/bin/phpunit --verbose diff --git a/composer.json b/composer.json index 570b055dca6d..8a164cf352b1 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", @@ -84,7 +84,7 @@ "league/flysystem-cached-adapter": "^1.0", "mockery/mockery": "~1.3.3|^1.4.2", "moontoast/math": "^1.1", - "orchestra/testbench-core": "^4.0", + "orchestra/testbench-core": "^4.8", "pda/pheanstalk": "^4.0", "phpunit/phpunit": "^7.5.15|^8.4|^9.3.3", "predis/predis": "^1.1.1", @@ -122,7 +122,7 @@ "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).", "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).", "filp/whoops": "Required for friendly error pages in development (^2.8).", - "fzaninotto/faker": "Required to use the eloquent factory builder (^1.9.1).", + "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", "guzzlehttp/guzzle": "Required to use the Mailgun mail driver and the ping methods on schedules (^6.3.1|^7.0.1).", "laravel/tinker": "Required to use the tinker console command (^2.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", diff --git a/src/Illuminate/Auth/composer.json b/src/Illuminate/Auth/composer.json index 1221b8d3c7ce..dacafaaac9ec 100644 --- a/src/Illuminate/Auth/composer.json +++ b/src/Illuminate/Auth/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "illuminate/contracts": "^6.0", "illuminate/http": "^6.0", "illuminate/queue": "^6.0", diff --git a/src/Illuminate/Broadcasting/composer.json b/src/Illuminate/Broadcasting/composer.json index d0d5f8f2e872..9dbf39485991 100644 --- a/src/Illuminate/Broadcasting/composer.json +++ b/src/Illuminate/Broadcasting/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "ext-json": "*", "psr/log": "^1.0", "illuminate/bus": "^6.0", diff --git a/src/Illuminate/Bus/composer.json b/src/Illuminate/Bus/composer.json index 6cbbfb076ce7..e133ae3304c1 100644 --- a/src/Illuminate/Bus/composer.json +++ b/src/Illuminate/Bus/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "illuminate/contracts": "^6.0", "illuminate/pipeline": "^6.0", "illuminate/support": "^6.0" diff --git a/src/Illuminate/Cache/composer.json b/src/Illuminate/Cache/composer.json index c11e7bf80488..01331f1b0f2a 100755 --- a/src/Illuminate/Cache/composer.json +++ b/src/Illuminate/Cache/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0" }, diff --git a/src/Illuminate/Config/composer.json b/src/Illuminate/Config/composer.json index ea0196e68172..3704ba14fd7e 100755 --- a/src/Illuminate/Config/composer.json +++ b/src/Illuminate/Config/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0" }, diff --git a/src/Illuminate/Console/composer.json b/src/Illuminate/Console/composer.json index 1f4d546c6e88..8183ff829ad1 100755 --- a/src/Illuminate/Console/composer.json +++ b/src/Illuminate/Console/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0", "symfony/console": "^4.3.4", diff --git a/src/Illuminate/Container/composer.json b/src/Illuminate/Container/composer.json index 2842c33525dc..bb1a7e397abf 100755 --- a/src/Illuminate/Container/composer.json +++ b/src/Illuminate/Container/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "illuminate/contracts": "^6.0", "psr/container": "^1.0" }, diff --git a/src/Illuminate/Contracts/composer.json b/src/Illuminate/Contracts/composer.json index 807085275739..c62efd954f5d 100644 --- a/src/Illuminate/Contracts/composer.json +++ b/src/Illuminate/Contracts/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "psr/container": "^1.0", "psr/simple-cache": "^1.0" }, diff --git a/src/Illuminate/Cookie/composer.json b/src/Illuminate/Cookie/composer.json index f76d145b1243..920d7fff18fc 100755 --- a/src/Illuminate/Cookie/composer.json +++ b/src/Illuminate/Cookie/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0", "symfony/http-foundation": "^4.3.4", diff --git a/src/Illuminate/Database/composer.json b/src/Illuminate/Database/composer.json index 99380b080968..2d658fb0f5e8 100644 --- a/src/Illuminate/Database/composer.json +++ b/src/Illuminate/Database/composer.json @@ -15,7 +15,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "ext-json": "*", "illuminate/container": "^6.0", "illuminate/contracts": "^6.0", @@ -33,7 +33,7 @@ }, "suggest": { "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).", - "fzaninotto/faker": "Required to use the eloquent factory builder (^1.9.1).", + "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", "illuminate/console": "Required to use the database commands (^6.0).", "illuminate/events": "Required to use the observers with Eloquent (^6.0).", "illuminate/filesystem": "Required to use the migrations (^6.0).", diff --git a/src/Illuminate/Encryption/composer.json b/src/Illuminate/Encryption/composer.json index 7ea4768eac3e..cc0b3e3494f0 100644 --- a/src/Illuminate/Encryption/composer.json +++ b/src/Illuminate/Encryption/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", diff --git a/src/Illuminate/Events/composer.json b/src/Illuminate/Events/composer.json index aab0b9fbdcca..9dd481dc0eb1 100755 --- a/src/Illuminate/Events/composer.json +++ b/src/Illuminate/Events/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "illuminate/container": "^6.0", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0" diff --git a/src/Illuminate/Filesystem/composer.json b/src/Illuminate/Filesystem/composer.json index b6529e1dd102..b9c23cea1f62 100644 --- a/src/Illuminate/Filesystem/composer.json +++ b/src/Illuminate/Filesystem/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0", "symfony/finder": "^4.3.4" diff --git a/src/Illuminate/Hashing/composer.json b/src/Illuminate/Hashing/composer.json index f2f2cea01393..80d47dde6a03 100755 --- a/src/Illuminate/Hashing/composer.json +++ b/src/Illuminate/Hashing/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0" }, diff --git a/src/Illuminate/Http/composer.json b/src/Illuminate/Http/composer.json index 423ffb8a2e13..c53a73b94dfb 100755 --- a/src/Illuminate/Http/composer.json +++ b/src/Illuminate/Http/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "ext-json": "*", "illuminate/session": "^6.0", "illuminate/support": "^6.0", diff --git a/src/Illuminate/Log/composer.json b/src/Illuminate/Log/composer.json index 63670f05fdfd..3bd21d0a91b1 100755 --- a/src/Illuminate/Log/composer.json +++ b/src/Illuminate/Log/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0", "monolog/monolog": "^1.12|^2.0" diff --git a/src/Illuminate/Mail/composer.json b/src/Illuminate/Mail/composer.json index 8b9dd46bb47e..7bff13f3beb9 100755 --- a/src/Illuminate/Mail/composer.json +++ b/src/Illuminate/Mail/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "ext-json": "*", "illuminate/container": "^6.0", "illuminate/contracts": "^6.0", diff --git a/src/Illuminate/Notifications/composer.json b/src/Illuminate/Notifications/composer.json index 1411ec9b50ab..8a96b664690e 100644 --- a/src/Illuminate/Notifications/composer.json +++ b/src/Illuminate/Notifications/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "illuminate/broadcasting": "^6.0", "illuminate/bus": "^6.0", "illuminate/container": "^6.0", diff --git a/src/Illuminate/Pagination/composer.json b/src/Illuminate/Pagination/composer.json index 098b7ca1c5cc..c8f966516656 100755 --- a/src/Illuminate/Pagination/composer.json +++ b/src/Illuminate/Pagination/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "ext-json": "*", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0" diff --git a/src/Illuminate/Pipeline/composer.json b/src/Illuminate/Pipeline/composer.json index c5577e7236da..1d6a6b931d50 100644 --- a/src/Illuminate/Pipeline/composer.json +++ b/src/Illuminate/Pipeline/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0", "symfony/debug": "^4.3.4" diff --git a/src/Illuminate/Queue/composer.json b/src/Illuminate/Queue/composer.json index e2c166f84eb3..b6e9238c3c0a 100644 --- a/src/Illuminate/Queue/composer.json +++ b/src/Illuminate/Queue/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "ext-json": "*", "illuminate/console": "^6.0", "illuminate/container": "^6.0", diff --git a/src/Illuminate/Redis/composer.json b/src/Illuminate/Redis/composer.json index ec09a66e22e9..efb357a093e0 100755 --- a/src/Illuminate/Redis/composer.json +++ b/src/Illuminate/Redis/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "illuminate/contracts": "^6.0", "illuminate/support": "^6.0" }, diff --git a/src/Illuminate/Routing/composer.json b/src/Illuminate/Routing/composer.json index af7ca941adcb..026fc96518cb 100644 --- a/src/Illuminate/Routing/composer.json +++ b/src/Illuminate/Routing/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "ext-json": "*", "illuminate/container": "^6.0", "illuminate/contracts": "^6.0", diff --git a/src/Illuminate/Session/composer.json b/src/Illuminate/Session/composer.json index d30397efc661..5707e43836c2 100755 --- a/src/Illuminate/Session/composer.json +++ b/src/Illuminate/Session/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "ext-json": "*", "illuminate/contracts": "^6.0", "illuminate/filesystem": "^6.0", diff --git a/src/Illuminate/Support/composer.json b/src/Illuminate/Support/composer.json index 28831ef4bf10..850963e52f58 100644 --- a/src/Illuminate/Support/composer.json +++ b/src/Illuminate/Support/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "ext-json": "*", "ext-mbstring": "*", "doctrine/inflector": "^1.4|^2.0", diff --git a/src/Illuminate/Translation/composer.json b/src/Illuminate/Translation/composer.json index fdf284eb563d..598fdde394fa 100755 --- a/src/Illuminate/Translation/composer.json +++ b/src/Illuminate/Translation/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "ext-json": "*", "illuminate/contracts": "^6.0", "illuminate/filesystem": "^6.0", diff --git a/src/Illuminate/Validation/composer.json b/src/Illuminate/Validation/composer.json index 3eb468a9dc92..a879fd6817a5 100755 --- a/src/Illuminate/Validation/composer.json +++ b/src/Illuminate/Validation/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "ext-json": "*", "egulias/email-validator": "^2.1.10", "illuminate/container": "^6.0", diff --git a/src/Illuminate/View/composer.json b/src/Illuminate/View/composer.json index 04d291b96a2c..2ec1e83219b8 100644 --- a/src/Illuminate/View/composer.json +++ b/src/Illuminate/View/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2.5", + "php": "^7.2.5|^8.0", "ext-json": "*", "illuminate/container": "^6.0", "illuminate/contracts": "^6.0", From 8e51029048387e3e82e8d18b690a7d0984032551 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 27 Oct 2020 17:13:38 +0100 Subject: [PATCH 06/81] [6.x] Revert changes to BoundMethod (#34985) * Revert changes to BoundMethod * Update test --- src/Illuminate/Container/BoundMethod.php | 5 ++++ tests/Container/ContainerCallTest.php | 37 +++++++++++++++++++----- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/src/Illuminate/Container/BoundMethod.php b/src/Illuminate/Container/BoundMethod.php index 7dd331ae71c8..c617bf79795f 100644 --- a/src/Illuminate/Container/BoundMethod.php +++ b/src/Illuminate/Container/BoundMethod.php @@ -3,6 +3,7 @@ namespace Illuminate\Container; use Closure; +use Illuminate\Contracts\Container\BindingResolutionException; use InvalidArgumentException; use ReflectionFunction; use ReflectionMethod; @@ -173,6 +174,10 @@ protected static function addDependencyForCallParameter($container, $parameter, } } elseif ($parameter->isDefaultValueAvailable()) { $dependencies[] = $parameter->getDefaultValue(); + } elseif (! $parameter->isOptional() && ! array_key_exists($paramName, $parameters)) { + $message = "Unable to resolve dependency [{$parameter}] in class {$parameter->getDeclaringClass()->getName()}"; + + throw new BindingResolutionException($message); } } diff --git a/tests/Container/ContainerCallTest.php b/tests/Container/ContainerCallTest.php index 68f0669cb21a..ffa2e3b82379 100644 --- a/tests/Container/ContainerCallTest.php +++ b/tests/Container/ContainerCallTest.php @@ -5,6 +5,7 @@ use Closure; use Error; use Illuminate\Container\Container; +use Illuminate\Contracts\Container\BindingResolutionException; use PHPUnit\Framework\TestCase; use stdClass; @@ -91,13 +92,6 @@ public function testCallWithBoundMethod() $this->assertSame('taylor', $result[1]); } - public function testCallWithUnnamedParameters() - { - $container = new Container; - $result = $container->call([new ContainerTestCallStub, 'unresolvable'], ['foo', 'bar']); - $this->assertEquals(['foo', 'bar'], $result); - } - public function testBindMethodAcceptsAnArray() { $container = new Container; @@ -174,6 +168,35 @@ public function testCallWithCallableObject() $this->assertInstanceOf(ContainerCallConcreteStub::class, $result[0]); $this->assertSame('jeffrey', $result[1]); } + + public function testCallWithoutRequiredParamsThrowsException() + { + $this->expectException(BindingResolutionException::class); + $this->expectExceptionMessage('Unable to resolve dependency [Parameter #0 [ $foo ]] in class Illuminate\Tests\Container\ContainerTestCallStub'); + + $container = new Container; + $container->call(ContainerTestCallStub::class.'@unresolvable'); + } + + public function testCallWithUnnamedParametersThrowsException() + { + $this->expectException(BindingResolutionException::class); + $this->expectExceptionMessage('Unable to resolve dependency [Parameter #0 [ $foo ]] in class Illuminate\Tests\Container\ContainerTestCallStub'); + + $container = new Container; + $container->call([new ContainerTestCallStub, 'unresolvable'], ['foo', 'bar']); + } + + public function testCallWithoutRequiredParamsOnClosureThrowsException() + { + $this->expectException(BindingResolutionException::class); + $this->expectExceptionMessage('Unable to resolve dependency [Parameter #0 [ $foo ]] in class Illuminate\Tests\Container\ContainerCallTest'); + + $container = new Container; + $foo = $container->call(function ($foo, $bar = 'default') { + return $foo; + }); + } } class ContainerTestCallStub From 302766f3512af1ed172ea370510839f5efbeb67d Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 27 Oct 2020 11:22:39 -0500 Subject: [PATCH 07/81] version --- src/Illuminate/Foundation/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Application.php b/src/Illuminate/Foundation/Application.php index af303e1d2af9..f4ce285647ee 100755 --- a/src/Illuminate/Foundation/Application.php +++ b/src/Illuminate/Foundation/Application.php @@ -31,7 +31,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn * * @var string */ - const VERSION = '6.19.1'; + const VERSION = '6.20.0'; /** * The base path for the Laravel installation. From dad177a7faa487b6a12314d9d9ad1806a7d11a0a Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Tue, 27 Oct 2020 17:37:00 +0000 Subject: [PATCH 08/81] Fixed instance style callable routes --- src/Illuminate/Routing/RouteAction.php | 20 ++++++++++++++++++-- src/Illuminate/Support/Reflector.php | 25 +++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Routing/RouteAction.php b/src/Illuminate/Routing/RouteAction.php index a1839758cf9e..44a414a93be4 100644 --- a/src/Illuminate/Routing/RouteAction.php +++ b/src/Illuminate/Routing/RouteAction.php @@ -3,6 +3,7 @@ namespace Illuminate\Routing; use Illuminate\Support\Arr; +use Illuminate\Support\Reflector; use Illuminate\Support\Str; use LogicException; use UnexpectedValueException; @@ -28,7 +29,7 @@ public static function parse($uri, $action) // If the action is already a Closure instance, we will just set that instance // as the "uses" property, because there is nothing else we need to do when // it is available. Otherwise we will need to find it in the action list. - if (is_callable($action, true)) { + if (static::isCallable($action)) { return ! is_array($action) ? ['uses' => $action] : [ 'uses' => $action[0].'@'.$action[1], 'controller' => $action[0].'@'.$action[1], @@ -73,10 +74,25 @@ protected static function missingAction($uri) protected static function findCallable(array $action) { return Arr::first($action, function ($value, $key) { - return is_callable($value) && is_numeric($key); + return static::isCallable($value) && is_numeric($key); }); } + /** + * Determine if the given action is callable as a route. + * + * @param mixed $action + * @return bool + */ + public static function isCallable($action) + { + if (! is_array($action)) { + return is_callable($action); + } + + return isset($action[0], $action[1]) && is_string($action[0]) && is_string($action[1]) && Reflector::isMethodCallable($action[0], $action[1]); + } + /** * Make an action for an invokable controller. * diff --git a/src/Illuminate/Support/Reflector.php b/src/Illuminate/Support/Reflector.php index fb597f5141f1..db6a2a75a8fc 100644 --- a/src/Illuminate/Support/Reflector.php +++ b/src/Illuminate/Support/Reflector.php @@ -3,6 +3,7 @@ namespace Illuminate\Support; use ReflectionClass; +use ReflectionMethod; use ReflectionNamedType; class Reflector @@ -51,4 +52,28 @@ public static function isParameterSubclassOf($parameter, $className) ? (new ReflectionClass($paramClassName))->isSubclassOf($className) : false; } + + /** + * Determine if the class method is callable. + * + * @param string $class + * @param string $method + * @return bool + */ + public static function isMethodCallable($class, $method) + { + if (! class_exists($class)) { + return false; + } + + if (method_exists($class, $method)) { + return (new ReflectionMethod($class, $method))->isPublic(); + } + + if (method_exists($class, '__call')) { + return (new ReflectionMethod($class, '__call'))->isPublic(); + } + + return false; + } } From 25a1d76ae7a55636b7a3a1e88427f0d3b0b5ef4a Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 27 Oct 2020 19:12:56 +0100 Subject: [PATCH 09/81] Add test --- tests/Routing/RouteRegistrarTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/Routing/RouteRegistrarTest.php b/tests/Routing/RouteRegistrarTest.php index e48d4a4985e7..78db4bb4c0ee 100644 --- a/tests/Routing/RouteRegistrarTest.php +++ b/tests/Routing/RouteRegistrarTest.php @@ -129,6 +129,15 @@ public function testCanRegisterRouteWithControllerAction() $this->seeMiddleware('controller-middleware'); } + public function testCanRegisterRouteWithControllerActionArray() + { + $this->router->middleware('controller-middleware') + ->get('users', [RouteRegistrarControllerStub::class, 'index']); + + $this->seeResponse('controller', Request::create('users', 'GET')); + $this->seeMiddleware('controller-middleware'); + } + public function testCanRegisterRouteWithArrayAndControllerAction() { $this->router->middleware('controller-middleware')->put('users', [ From 8c16891c6e7a4738d63788f4447614056ab5136e Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 27 Oct 2020 13:50:24 -0500 Subject: [PATCH 10/81] add isCallable helper --- src/Illuminate/Support/Reflector.php | 42 ++++++++++++++++++++++++++ tests/Support/SupportReflectorTest.php | 26 ++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/src/Illuminate/Support/Reflector.php b/src/Illuminate/Support/Reflector.php index fb597f5141f1..5490b0923ff2 100644 --- a/src/Illuminate/Support/Reflector.php +++ b/src/Illuminate/Support/Reflector.php @@ -3,10 +3,52 @@ namespace Illuminate\Support; use ReflectionClass; +use ReflectionMethod; use ReflectionNamedType; class Reflector { + /** + * This is a PHP 7.4 compatible implementation of is_callable. + * + * @param mixed $var + * @param bool $syntaxOnly + * @return bool + */ + public static function isCallable($var, $syntaxOnly = false) + { + if (! is_array($var)) { + return is_callable($var, $syntaxOnly); + } + + if (! isset($var[0]) && ! isset($var[1]) || + ! is_string($var[1])) { + return false; + } + + $class = is_object($var[0]) ? get_class($var[0]) : $var[0]; + + $method = $var[1]; + + if (! class_exists($class)) { + return false; + } + + if (method_exists($class, $method)) { + return (new ReflectionMethod($class, $method))->isPublic(); + } + + if (is_object($var[0]) && method_exists($class, '__call')) { + return (new ReflectionMethod($class, '__call'))->isPublic(); + } + + if (! is_object($var[0]) && method_exists($class, '__callStatic')) { + return (new ReflectionMethod($class, '__callStatic'))->isPublic(); + } + + return false; + } + /** * Get the class name of the given parameter's type, if possible. * diff --git a/tests/Support/SupportReflectorTest.php b/tests/Support/SupportReflectorTest.php index 55c4940f7543..8f5f394ca520 100644 --- a/tests/Support/SupportReflectorTest.php +++ b/tests/Support/SupportReflectorTest.php @@ -57,6 +57,16 @@ public function testUnionTypeName() $this->assertNull(Reflector::getParameterClassName($method->getParameters()[0])); } + + public function testIsCallable() + { + $this->assertTrue(Reflector::isCallable(function () {})); + $this->assertTrue(Reflector::isCallable([B::class, 'f'])); + $this->assertFalse(Reflector::isCallable([TestClassWithCall::class, 'f'])); + $this->assertTrue(Reflector::isCallable([new TestClassWithCall, 'f'])); + $this->assertTrue(Reflector::isCallable([TestClassWithCallStatic::class, 'f'])); + $this->assertFalse(Reflector::isCallable([new TestClassWithCallStatic, 'f'])); + } } class A @@ -82,3 +92,19 @@ public function f(A|Model $x) }' ); } + +class TestClassWithCall +{ + public function __call($method, $parameters) + { + + } +} + +class TestClassWithCallStatic +{ + public static function __callStatic($method, $parameters) + { + + } +} From c7f4143ce826143910883786856c86b3a5cb8e7d Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 27 Oct 2020 13:51:04 -0500 Subject: [PATCH 11/81] Apply fixes from StyleCI (#34995) --- tests/Support/SupportReflectorTest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/Support/SupportReflectorTest.php b/tests/Support/SupportReflectorTest.php index 8f5f394ca520..28d7da18a379 100644 --- a/tests/Support/SupportReflectorTest.php +++ b/tests/Support/SupportReflectorTest.php @@ -60,7 +60,8 @@ public function testUnionTypeName() public function testIsCallable() { - $this->assertTrue(Reflector::isCallable(function () {})); + $this->assertTrue(Reflector::isCallable(function () { + })); $this->assertTrue(Reflector::isCallable([B::class, 'f'])); $this->assertFalse(Reflector::isCallable([TestClassWithCall::class, 'f'])); $this->assertTrue(Reflector::isCallable([new TestClassWithCall, 'f'])); @@ -97,7 +98,6 @@ class TestClassWithCall { public function __call($method, $parameters) { - } } @@ -105,6 +105,5 @@ class TestClassWithCallStatic { public static function __callStatic($method, $parameters) { - } } From 31917abcfa0db6ec6221bb07fc91b6e768ff5ec8 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 27 Oct 2020 13:57:26 -0500 Subject: [PATCH 12/81] fix case --- src/Illuminate/Support/Reflector.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Support/Reflector.php b/src/Illuminate/Support/Reflector.php index 5490b0923ff2..49913796c2f3 100644 --- a/src/Illuminate/Support/Reflector.php +++ b/src/Illuminate/Support/Reflector.php @@ -21,8 +21,8 @@ public static function isCallable($var, $syntaxOnly = false) return is_callable($var, $syntaxOnly); } - if (! isset($var[0]) && ! isset($var[1]) || - ! is_string($var[1])) { + if ((! isset($var[0]) || ! isset($var[1])) || + ! is_string($var[1] ?? null)) { return false; } From 0b8ac561c7d34d5f7f986f28382dba1b24437de8 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 27 Oct 2020 13:57:54 -0500 Subject: [PATCH 13/81] update test --- tests/Support/SupportReflectorTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Support/SupportReflectorTest.php b/tests/Support/SupportReflectorTest.php index 28d7da18a379..95917219829f 100644 --- a/tests/Support/SupportReflectorTest.php +++ b/tests/Support/SupportReflectorTest.php @@ -67,6 +67,7 @@ public function testIsCallable() $this->assertTrue(Reflector::isCallable([new TestClassWithCall, 'f'])); $this->assertTrue(Reflector::isCallable([TestClassWithCallStatic::class, 'f'])); $this->assertFalse(Reflector::isCallable([new TestClassWithCallStatic, 'f'])); + $this->assertFalse(Reflector::isCallable([new TestClassWithCallStatic])); } } From 11cfa4d4c92bf2f023544d58d51b35c5d31dece0 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 27 Oct 2020 14:03:02 -0500 Subject: [PATCH 14/81] fixing --- src/Illuminate/Routing/RouteAction.php | 19 ++----------------- src/Illuminate/Support/Reflector.php | 24 ------------------------ 2 files changed, 2 insertions(+), 41 deletions(-) diff --git a/src/Illuminate/Routing/RouteAction.php b/src/Illuminate/Routing/RouteAction.php index 44a414a93be4..9d7eb76a85d8 100644 --- a/src/Illuminate/Routing/RouteAction.php +++ b/src/Illuminate/Routing/RouteAction.php @@ -29,7 +29,7 @@ public static function parse($uri, $action) // If the action is already a Closure instance, we will just set that instance // as the "uses" property, because there is nothing else we need to do when // it is available. Otherwise we will need to find it in the action list. - if (static::isCallable($action)) { + if (Reflector::isCallable($action, true)) { return ! is_array($action) ? ['uses' => $action] : [ 'uses' => $action[0].'@'.$action[1], 'controller' => $action[0].'@'.$action[1], @@ -74,25 +74,10 @@ protected static function missingAction($uri) protected static function findCallable(array $action) { return Arr::first($action, function ($value, $key) { - return static::isCallable($value) && is_numeric($key); + return Reflector::isCallable($value) && is_numeric($key); }); } - /** - * Determine if the given action is callable as a route. - * - * @param mixed $action - * @return bool - */ - public static function isCallable($action) - { - if (! is_array($action)) { - return is_callable($action); - } - - return isset($action[0], $action[1]) && is_string($action[0]) && is_string($action[1]) && Reflector::isMethodCallable($action[0], $action[1]); - } - /** * Make an action for an invokable controller. * diff --git a/src/Illuminate/Support/Reflector.php b/src/Illuminate/Support/Reflector.php index db6a2a75a8fc..e32cb7d00811 100644 --- a/src/Illuminate/Support/Reflector.php +++ b/src/Illuminate/Support/Reflector.php @@ -52,28 +52,4 @@ public static function isParameterSubclassOf($parameter, $className) ? (new ReflectionClass($paramClassName))->isSubclassOf($className) : false; } - - /** - * Determine if the class method is callable. - * - * @param string $class - * @param string $method - * @return bool - */ - public static function isMethodCallable($class, $method) - { - if (! class_exists($class)) { - return false; - } - - if (method_exists($class, $method)) { - return (new ReflectionMethod($class, $method))->isPublic(); - } - - if (method_exists($class, '__call')) { - return (new ReflectionMethod($class, '__call'))->isPublic(); - } - - return false; - } } From 043768d9489c438711102629101645dc9968baa3 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 27 Oct 2020 14:07:01 -0500 Subject: [PATCH 15/81] fix --- src/Illuminate/Routing/RouteRegistrar.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Illuminate/Routing/RouteRegistrar.php b/src/Illuminate/Routing/RouteRegistrar.php index 8a804a79ea3d..dc28c9f4d493 100644 --- a/src/Illuminate/Routing/RouteRegistrar.php +++ b/src/Illuminate/Routing/RouteRegistrar.php @@ -5,6 +5,7 @@ use BadMethodCallException; use Closure; use Illuminate\Support\Arr; +use Illuminate\Support\Reflector; use InvalidArgumentException; /** @@ -167,6 +168,15 @@ protected function compileAction($action) $action = ['uses' => $action]; } + if (is_array($action) && + ! Arr::isAssoc($action) && + Reflector::isCallable($action)) { + $action = [ + 'uses' => $action[0].'@'.$action[1], + 'controller' => $action[0].'@'.$action[1], + ]; + } + return array_merge($this->attributes, $action); } From 6611265f301c34d07bc81e3fed8b37e11dfc1776 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 27 Oct 2020 14:50:31 -0500 Subject: [PATCH 16/81] [6.x] Adjust is_callable usage where needed for PHP 8 (#34999) * adjust is_callable usage where needed for php8 * Apply fixes from StyleCI (#35000) --- src/Illuminate/Console/Scheduling/CallbackEvent.php | 5 +++-- src/Illuminate/Console/Scheduling/Event.php | 5 +++-- src/Illuminate/Foundation/Exceptions/Handler.php | 3 ++- src/Illuminate/Routing/RouteSignatureParameters.php | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Illuminate/Console/Scheduling/CallbackEvent.php b/src/Illuminate/Console/Scheduling/CallbackEvent.php index 96b1c1e1bfbd..6af680d990c0 100644 --- a/src/Illuminate/Console/Scheduling/CallbackEvent.php +++ b/src/Illuminate/Console/Scheduling/CallbackEvent.php @@ -3,6 +3,7 @@ namespace Illuminate\Console\Scheduling; use Illuminate\Contracts\Container\Container; +use Illuminate\Support\Reflector; use InvalidArgumentException; use LogicException; @@ -35,7 +36,7 @@ class CallbackEvent extends Event */ public function __construct(EventMutex $mutex, $callback, array $parameters = [], $timezone = null) { - if (! is_string($callback) && ! is_callable($callback)) { + if (! is_string($callback) && ! Reflector::isCallable($callback)) { throw new InvalidArgumentException( 'Invalid scheduled callback event. Must be a string or callable.' ); @@ -163,6 +164,6 @@ public function getSummaryForDisplay() return $this->description; } - return is_string($this->callback) ? $this->callback : 'Closure'; + return is_string($this->callback) ? $this->callback : 'Callback'; } } diff --git a/src/Illuminate/Console/Scheduling/Event.php b/src/Illuminate/Console/Scheduling/Event.php index be8b6065c116..49ce518bc337 100644 --- a/src/Illuminate/Console/Scheduling/Event.php +++ b/src/Illuminate/Console/Scheduling/Event.php @@ -12,6 +12,7 @@ use Illuminate\Support\Arr; use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Date; +use Illuminate\Support\Reflector; use Illuminate\Support\Traits\Macroable; use Psr\Http\Client\ClientExceptionInterface; use Symfony\Component\Process\Process; @@ -672,7 +673,7 @@ public function onOneServer() */ public function when($callback) { - $this->filters[] = is_callable($callback) ? $callback : function () use ($callback) { + $this->filters[] = Reflector::isCallable($callback) ? $callback : function () use ($callback) { return $callback; }; @@ -687,7 +688,7 @@ public function when($callback) */ public function skip($callback) { - $this->rejects[] = is_callable($callback) ? $callback : function () use ($callback) { + $this->rejects[] = Reflector::isCallable($callback) ? $callback : function () use ($callback) { return $callback; }; diff --git a/src/Illuminate/Foundation/Exceptions/Handler.php b/src/Illuminate/Foundation/Exceptions/Handler.php index 1102d752679b..903c201d709f 100644 --- a/src/Illuminate/Foundation/Exceptions/Handler.php +++ b/src/Illuminate/Foundation/Exceptions/Handler.php @@ -19,6 +19,7 @@ use Illuminate\Support\Arr; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\View; +use Illuminate\Support\Reflector; use Illuminate\Support\ViewErrorBag; use Illuminate\Validation\ValidationException; use Psr\Log\LoggerInterface; @@ -103,7 +104,7 @@ public function report(Exception $e) return; } - if (is_callable($reportCallable = [$e, 'report'])) { + if (Reflector::isCallable($reportCallable = [$e, 'report'])) { return $this->container->call($reportCallable); } diff --git a/src/Illuminate/Routing/RouteSignatureParameters.php b/src/Illuminate/Routing/RouteSignatureParameters.php index 535d5edcbf32..bd7e932fb316 100644 --- a/src/Illuminate/Routing/RouteSignatureParameters.php +++ b/src/Illuminate/Routing/RouteSignatureParameters.php @@ -37,7 +37,7 @@ protected static function fromClassMethodString($uses) { [$class, $method] = Str::parseCallback($uses); - if (! method_exists($class, $method) && is_callable($class, $method)) { + if (! method_exists($class, $method) && Reflector::isCallable($class, $method)) { return []; } From 500798623d100a9746b2931ae6191cb756521f05 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 28 Oct 2020 16:28:14 -0500 Subject: [PATCH 17/81] fix ambigious column on many to many with select load --- src/Illuminate/Database/Eloquent/Builder.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Illuminate/Database/Eloquent/Builder.php b/src/Illuminate/Database/Eloquent/Builder.php index ef7ac588dbd8..8370fafd6ea4 100755 --- a/src/Illuminate/Database/Eloquent/Builder.php +++ b/src/Illuminate/Database/Eloquent/Builder.php @@ -7,6 +7,7 @@ use Exception; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Database\Concerns\BuildsQueries; +use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\Relations\Relation; use Illuminate\Database\Query\Builder as QueryBuilder; use Illuminate\Pagination\Paginator; @@ -1143,7 +1144,11 @@ protected function parseWithRelations(array $relations) protected function createSelectWithConstraint($name) { return [explode(':', $name)[0], static function ($query) use ($name) { - $query->select(explode(',', explode(':', $name)[1])); + $query->select(array_map(static function ($column) use ($query) { + return $query instanceof BelongsToMany + ? $query->getRelated()->getTable().'.'.$column + : $column; + }, explode(',', explode(':', $name)[1]))); }]; } From 609104806b8b639710268c75c22f43034c2b72db Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 29 Oct 2020 09:50:40 -0500 Subject: [PATCH 18/81] fix alias usage --- src/Illuminate/Database/Eloquent/Builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Database/Eloquent/Builder.php b/src/Illuminate/Database/Eloquent/Builder.php index 8370fafd6ea4..b3e8bede7159 100755 --- a/src/Illuminate/Database/Eloquent/Builder.php +++ b/src/Illuminate/Database/Eloquent/Builder.php @@ -510,7 +510,7 @@ public function firstOr($columns = ['*'], Closure $callback = null) public function value($column) { if ($result = $this->first([$column])) { - return $result->{$column}; + return $result->{Str::afterLast($column, '.')}; } } From a90f344c66f0a5bb1d718f8bbd20c257d4de9e02 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 29 Oct 2020 10:16:10 -0500 Subject: [PATCH 19/81] fix isCallable --- src/Illuminate/Support/Reflector.php | 6 ++++++ tests/Support/SupportReflectorTest.php | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/Illuminate/Support/Reflector.php b/src/Illuminate/Support/Reflector.php index 49913796c2f3..66392ca2f39a 100644 --- a/src/Illuminate/Support/Reflector.php +++ b/src/Illuminate/Support/Reflector.php @@ -26,6 +26,12 @@ public static function isCallable($var, $syntaxOnly = false) return false; } + if ($syntaxOnly && + (is_string($var[0]) || is_object($var[0])) && + is_string($var[1])) { + return true; + } + $class = is_object($var[0]) ? get_class($var[0]) : $var[0]; $method = $var[1]; diff --git a/tests/Support/SupportReflectorTest.php b/tests/Support/SupportReflectorTest.php index 95917219829f..df5b3e414e46 100644 --- a/tests/Support/SupportReflectorTest.php +++ b/tests/Support/SupportReflectorTest.php @@ -68,6 +68,8 @@ public function testIsCallable() $this->assertTrue(Reflector::isCallable([TestClassWithCallStatic::class, 'f'])); $this->assertFalse(Reflector::isCallable([new TestClassWithCallStatic, 'f'])); $this->assertFalse(Reflector::isCallable([new TestClassWithCallStatic])); + $this->assertFalse(Reflector::isCallable(['TotallyMissingClass', 'foo'])); + $this->assertTrue(Reflector::isCallable(['TotallyMissingClass', 'foo'], true)); } } From 2be93171bfd2685f7b127a24d54e389db509c16e Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 29 Oct 2020 10:23:54 -0500 Subject: [PATCH 20/81] version --- src/Illuminate/Foundation/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Application.php b/src/Illuminate/Foundation/Application.php index f4ce285647ee..7c53199cdf63 100755 --- a/src/Illuminate/Foundation/Application.php +++ b/src/Illuminate/Foundation/Application.php @@ -31,7 +31,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn * * @var string */ - const VERSION = '6.20.0'; + const VERSION = '6.20.1'; /** * The base path for the Laravel installation. From 1c29a99559f88cfd6cbfd1c8ba3fd68508f97b9c Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 29 Oct 2020 13:56:34 -0500 Subject: [PATCH 21/81] fix columns that are already prefixed --- src/Illuminate/Database/Eloquent/Builder.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Illuminate/Database/Eloquent/Builder.php b/src/Illuminate/Database/Eloquent/Builder.php index b3e8bede7159..87ae422ef941 100755 --- a/src/Illuminate/Database/Eloquent/Builder.php +++ b/src/Illuminate/Database/Eloquent/Builder.php @@ -1145,6 +1145,10 @@ protected function createSelectWithConstraint($name) { return [explode(':', $name)[0], static function ($query) use ($name) { $query->select(array_map(static function ($column) use ($query) { + if (Str::contains($column, '.')) { + return $column; + } + return $query instanceof BelongsToMany ? $query->getRelated()->getTable().'.'.$column : $column; From 41915424bbd0939048e9b2d3701568dc2bc98790 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 29 Oct 2020 13:56:44 -0500 Subject: [PATCH 22/81] patch --- src/Illuminate/Foundation/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Application.php b/src/Illuminate/Foundation/Application.php index 7c53199cdf63..2809326688c2 100755 --- a/src/Illuminate/Foundation/Application.php +++ b/src/Illuminate/Foundation/Application.php @@ -31,7 +31,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn * * @var string */ - const VERSION = '6.20.1'; + const VERSION = '6.20.2'; /** * The base path for the Laravel installation. From 0b6bdc1ae3b51c43717ff042f70f5283643e3b80 Mon Sep 17 00:00:00 2001 From: Tetiana Blindaruk Date: Wed, 4 Nov 2020 18:39:37 +0200 Subject: [PATCH 23/81] [6.x] update changelog --- CHANGELOG-6.x.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-6.x.md b/CHANGELOG-6.x.md index 06e4a83add64..f289d8e46de6 100644 --- a/CHANGELOG-6.x.md +++ b/CHANGELOG-6.x.md @@ -1,8 +1,21 @@ # Release Notes for 6.x -## [Unreleased](https://github.com/laravel/framework/compare/v6.19.1...6.x) +## [Unreleased](https://github.com/laravel/framework/compare/v6.20.0...6.x) +## [v6.20.0 (2020-10-28)](https://github.com/laravel/framework/compare/v6.19.1...v6.20.0) + +### Added +- Full PHP 8.0 Support ([#33388](https://github.com/laravel/framework/pull/33388)) +- Added `Illuminate\Support\Reflector::isCallable()` ([#34994](https://github.com/laravel/framework/pull/34994), [8c16891](https://github.com/laravel/framework/commit/8c16891c6e7a4738d63788f4447614056ab5136e), [31917ab](https://github.com/laravel/framework/commit/31917abcfa0db6ec6221bb07fc91b6e768ff5ec8), [11cfa4d](https://github.com/laravel/framework/commit/11cfa4d4c92bf2f023544d58d51b35c5d31dece0), [#34999](https://github.com/laravel/framework/pull/34999)) + +### Changed +- Bump minimum PHP version to v7.2.5 ([#34928](https://github.com/laravel/framework/pull/34928)) + +### Fixed +- Fixed ambigious column on many to many with select load ([5007986](https://github.com/laravel/framework/commit/500798623d100a9746b2931ae6191cb756521f05)) + + ## [v6.19.1 (2020-10-20)](https://github.com/laravel/framework/compare/v6.19.0...v6.19.1) ### Fixed From 017fb956da982a9de0b48637cc73c68fc684066d Mon Sep 17 00:00:00 2001 From: Tetiana Blindaruk Date: Wed, 4 Nov 2020 18:46:27 +0200 Subject: [PATCH 24/81] [6.x] update changelog --- CHANGELOG-6.x.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-6.x.md b/CHANGELOG-6.x.md index f289d8e46de6..2fe66d7bfa6a 100644 --- a/CHANGELOG-6.x.md +++ b/CHANGELOG-6.x.md @@ -1,6 +1,13 @@ # Release Notes for 6.x -## [Unreleased](https://github.com/laravel/framework/compare/v6.20.0...6.x) +## [Unreleased](https://github.com/laravel/framework/compare/v6.20.1...6.x) + + +## [v6.20.1 (2020-10-29)](https://github.com/laravel/framework/compare/v6.20.0...v6.20.1) + +### Fixed +- Fixed alias usage in `Eloquent` ([6091048](https://github.com/laravel/framework/commit/609104806b8b639710268c75c22f43034c2b72db)) +- Fixed `Illuminate\Support\Reflector::isCallable()` ([a90f344](https://github.com/laravel/framework/commit/a90f344c66f0a5bb1d718f8bbd20c257d4de9e02)) ## [v6.20.0 (2020-10-28)](https://github.com/laravel/framework/compare/v6.19.1...v6.20.0) From 957232ce3b59a2160e240fdc99bf7a3efce5add7 Mon Sep 17 00:00:00 2001 From: Tetiana Blindaruk Date: Wed, 4 Nov 2020 18:50:28 +0200 Subject: [PATCH 25/81] [6.x] update changelog --- CHANGELOG-6.x.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-6.x.md b/CHANGELOG-6.x.md index 2fe66d7bfa6a..c5471d050835 100644 --- a/CHANGELOG-6.x.md +++ b/CHANGELOG-6.x.md @@ -1,6 +1,12 @@ # Release Notes for 6.x -## [Unreleased](https://github.com/laravel/framework/compare/v6.20.1...6.x) +## [Unreleased](https://github.com/laravel/framework/compare/v6.20.2...6.x) + + +## [v6.20.2 (2020-10-29)](https://github.com/laravel/framework/compare/v6.20.1...v6.20.2) + +### Fixed +- [Add some fixes](https://github.com/laravel/framework/compare/v6.20.1...v6.20.2) ## [v6.20.1 (2020-10-29)](https://github.com/laravel/framework/compare/v6.20.0...v6.20.1) From 4f868535f0c13a2143cff123ab91ebacd8e33a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20N=C3=BCrnberger?= Date: Mon, 9 Nov 2020 15:18:18 +0100 Subject: [PATCH 26/81] Turn the collection into a base collection if mapWithKeys loses models (#35129) --- .../Database/Eloquent/Collection.php | 17 +++++++++++ .../DatabaseEloquentCollectionTest.php | 29 +++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/src/Illuminate/Database/Eloquent/Collection.php b/src/Illuminate/Database/Eloquent/Collection.php index 2bb93f1e1def..3737ed59666f 100755 --- a/src/Illuminate/Database/Eloquent/Collection.php +++ b/src/Illuminate/Database/Eloquent/Collection.php @@ -258,6 +258,23 @@ public function map(callable $callback) }) ? $result->toBase() : $result; } + /** + * Run an associative map over each of the items. + * + * The callback should return an associative array with a single key / value pair. + * + * @param callable $callback + * @return \Illuminate\Support\Collection|static + */ + public function mapWithKeys(callable $callback) + { + $result = parent::mapWithKeys($callback); + + return $result->contains(function ($item) { + return ! $item instanceof Model; + }) ? $result->toBase() : $result; + } + /** * Reload a fresh model instance from the database for all the entities. * diff --git a/tests/Database/DatabaseEloquentCollectionTest.php b/tests/Database/DatabaseEloquentCollectionTest.php index cd3c4e488da0..44669d314688 100755 --- a/tests/Database/DatabaseEloquentCollectionTest.php +++ b/tests/Database/DatabaseEloquentCollectionTest.php @@ -228,6 +228,35 @@ public function testMappingToNonModelsReturnsABaseCollection() $this->assertEquals(BaseCollection::class, get_class($c)); } + public function testMapWithKeys() + { + $one = m::mock(Model::class); + $two = m::mock(Model::class); + + $c = new Collection([$one, $two]); + + $key = 0; + $cAfterMap = $c->mapWithKeys(function ($item) use (&$key) { + return [$key++ => $item]; + }); + + $this->assertEquals($c->all(), $cAfterMap->all()); + $this->assertInstanceOf(Collection::class, $cAfterMap); + } + + public function testMapWithKeysToNonModelsReturnsABaseCollection() + { + $one = m::mock(Model::class); + $two = m::mock(Model::class); + + $key = 0; + $c = (new Collection([$one, $two]))->mapWithKeys(function ($item) use (&$key) { + return [$key++ => 'not-a-model']; + }); + + $this->assertEquals(BaseCollection::class, get_class($c)); + } + public function testCollectionDiffsWithGivenCollection() { $one = m::mock(Model::class); From cd09d4654ff5b9fcae4429254d3572c3b7495bfe Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 10 Nov 2020 08:46:46 -0600 Subject: [PATCH 27/81] version --- src/Illuminate/Foundation/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Application.php b/src/Illuminate/Foundation/Application.php index 2809326688c2..72b13e24e8c7 100755 --- a/src/Illuminate/Foundation/Application.php +++ b/src/Illuminate/Foundation/Application.php @@ -31,7 +31,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn * * @var string */ - const VERSION = '6.20.2'; + const VERSION = '6.20.3'; /** * The base path for the Laravel installation. From ece7ade1150eaaa03904fd1a2b339ce2bd99e26a Mon Sep 17 00:00:00 2001 From: Tetiana Blindaruk Date: Tue, 10 Nov 2020 21:06:55 +0200 Subject: [PATCH 28/81] [6.x] update changelog --- CHANGELOG-6.x.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-6.x.md b/CHANGELOG-6.x.md index c5471d050835..ef75eefd3b95 100644 --- a/CHANGELOG-6.x.md +++ b/CHANGELOG-6.x.md @@ -1,6 +1,12 @@ # Release Notes for 6.x -## [Unreleased](https://github.com/laravel/framework/compare/v6.20.2...6.x) +## [Unreleased](https://github.com/laravel/framework/compare/v6.20.3...6.x) + + +## [v6.20.3 (2020-11-10)](https://github.com/laravel/framework/compare/v6.20.2...v6.20.3) + +### Changed +- Turn the eloquent collection into a base collection if mapWithKeys loses models ([#35129](https://github.com/laravel/framework/pull/35129)) ## [v6.20.2 (2020-10-29)](https://github.com/laravel/framework/compare/v6.20.1...v6.20.2) From 5f692f195f6c0fe679c1fb31aac2ac26df2bb098 Mon Sep 17 00:00:00 2001 From: Tetiana Blindaruk Date: Tue, 10 Nov 2020 21:09:36 +0200 Subject: [PATCH 29/81] [6.x] update changelog --- CHANGELOG-6.x.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG-6.x.md b/CHANGELOG-6.x.md index ef75eefd3b95..0c83b176b52a 100644 --- a/CHANGELOG-6.x.md +++ b/CHANGELOG-6.x.md @@ -5,7 +5,7 @@ ## [v6.20.3 (2020-11-10)](https://github.com/laravel/framework/compare/v6.20.2...v6.20.3) -### Changed +### Fixed - Turn the eloquent collection into a base collection if mapWithKeys loses models ([#35129](https://github.com/laravel/framework/pull/35129)) From a5c47f6872c2c7d1623a6fe5ffee1396de63aa4c Mon Sep 17 00:00:00 2001 From: Daan Raatjes Date: Fri, 13 Nov 2020 15:35:26 +0100 Subject: [PATCH 30/81] Add missing methods to Request facade (#35201) --- src/Illuminate/Support/Facades/Request.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Illuminate/Support/Facades/Request.php b/src/Illuminate/Support/Facades/Request.php index c181f7c8320e..81d0b4be0837 100755 --- a/src/Illuminate/Support/Facades/Request.php +++ b/src/Illuminate/Support/Facades/Request.php @@ -83,6 +83,9 @@ * @method static mixed offsetGet(string $offset) * @method static void offsetSet(string $offset, mixed $value) * @method static void offsetUnset(string $offset) + * @method static array validate(array $rules, ...$params) + * @method static array validateWithBag(string $errorBag, array $rules, ...$params) + * @method static bool hasValidSignature(bool $absolute = true) * * @see \Illuminate\Http\Request */ From 851b6719603437acec47f6c2959f70d11a9be9af Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Fri, 13 Nov 2020 18:54:59 +0100 Subject: [PATCH 31/81] Reset array keys for restoration (#35218) --- src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php | 2 ++ src/Illuminate/Database/Eloquent/Relations/MorphPivot.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php b/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php index c40d2db8e755..de9f07253381 100644 --- a/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php +++ b/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php @@ -284,6 +284,8 @@ public function newQueryForRestoration($ids) */ protected function newQueryForCollectionRestoration(array $ids) { + $ids = array_values($ids); + if (! Str::contains($ids[0], ':')) { return parent::newQueryForRestoration($ids); } diff --git a/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php b/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php index 0db82ba101bc..68489265f838 100644 --- a/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php +++ b/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php @@ -139,6 +139,8 @@ public function newQueryForRestoration($ids) */ protected function newQueryForCollectionRestoration(array $ids) { + $ids = array_values($ids); + if (! Str::contains($ids[0], ':')) { return parent::newQueryForRestoration($ids); } From 53d66bbc17ce040b5c5fa104a3c781aad161cdc3 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 17 Nov 2020 08:52:20 -0600 Subject: [PATCH 32/81] version --- src/Illuminate/Foundation/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Application.php b/src/Illuminate/Foundation/Application.php index 72b13e24e8c7..51e84ad962dd 100755 --- a/src/Illuminate/Foundation/Application.php +++ b/src/Illuminate/Foundation/Application.php @@ -31,7 +31,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn * * @var string */ - const VERSION = '6.20.3'; + const VERSION = '6.20.4'; /** * The base path for the Laravel installation. From e90889d91215bc40b9a60c6dbd14cee3a54d9bed Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Wed, 18 Nov 2020 14:36:08 +0000 Subject: [PATCH 33/81] [6.x] Set minimum Guzzle version for PHP 8 CI (#35267) * Set minimum Guzzle version for PHP 8 CI * Fixed typos * Corrected min supported aws sdk --- .github/workflows/tests.yml | 16 ++++++++++++++++ composer.json | 4 ++-- src/Illuminate/Mail/composer.json | 2 +- src/Illuminate/Queue/composer.json | 2 +- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4559e4bc8fd7..02cdf62a88dd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -50,6 +50,14 @@ jobs: - name: Setup problem matchers run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + - name: Set Minimum Guzzle Version + uses: nick-invision/retry@v1 + with: + timeout_minutes: 5 + max_attempts: 5 + command: composer require guzzlehttp/guzzle:^7.2 --no-interaction --no-update + if: matrix.php >= 8 + - name: Install dependencies uses: nick-invision/retry@v1 with: @@ -94,6 +102,14 @@ jobs: - name: Setup problem matchers run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + - name: Set Minimum Guzzle Version + uses: nick-invision/retry@v1 + with: + timeout_minutes: 5 + max_attempts: 5 + command: composer require guzzlehttp/guzzle:^7.2 --no-interaction --no-update + if: matrix.php >= 8 + - name: Install dependencies uses: nick-invision/retry@v1 with: diff --git a/composer.json b/composer.json index 8a164cf352b1..e32e059170fe 100644 --- a/composer.json +++ b/composer.json @@ -77,7 +77,7 @@ "tightenco/collect": "<5.5.33" }, "require-dev": { - "aws/aws-sdk-php": "^3.0", + "aws/aws-sdk-php": "^3.155", "doctrine/dbal": "^2.6", "filp/whoops": "^2.8", "guzzlehttp/guzzle": "^6.3.1|^7.0.1", @@ -119,7 +119,7 @@ "ext-pcntl": "Required to use all features of the queue worker.", "ext-posix": "Required to use all features of the queue worker.", "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", - "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.155).", "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).", "filp/whoops": "Required for friendly error pages in development (^2.8).", "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", diff --git a/src/Illuminate/Mail/composer.json b/src/Illuminate/Mail/composer.json index 7bff13f3beb9..dfe6100d24c7 100755 --- a/src/Illuminate/Mail/composer.json +++ b/src/Illuminate/Mail/composer.json @@ -35,7 +35,7 @@ } }, "suggest": { - "aws/aws-sdk-php": "Required to use the SES mail driver (^3.0).", + "aws/aws-sdk-php": "Required to use the SES mail driver (^3.155).", "guzzlehttp/guzzle": "Required to use the Mailgun mail driver (^6.3.1|^7.0.1).", "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." }, diff --git a/src/Illuminate/Queue/composer.json b/src/Illuminate/Queue/composer.json index b6e9238c3c0a..8e1616012c48 100644 --- a/src/Illuminate/Queue/composer.json +++ b/src/Illuminate/Queue/composer.json @@ -40,7 +40,7 @@ "suggest": { "ext-pcntl": "Required to use all features of the queue worker.", "ext-posix": "Required to use all features of the queue worker.", - "aws/aws-sdk-php": "Required to use the SQS queue driver and DynamoDb failed job storage (^3.0).", + "aws/aws-sdk-php": "Required to use the SQS queue driver and DynamoDb failed job storage (^3.155).", "illuminate/redis": "Required to use the Redis queue driver (^6.0).", "pda/pheanstalk": "Required to use the Beanstalk queue driver (^4.0)." }, From 23ba4ed7d7f793e1d2013ecdfbd6e100e863f5c1 Mon Sep 17 00:00:00 2001 From: Lennart Carstens-Behrens Date: Thu, 19 Nov 2020 15:10:44 +0100 Subject: [PATCH 34/81] Fixed BroadcastException in PusherBroadcaster (#35290) --- src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php b/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php index 68daf9da4b26..c39abbd6f61b 100644 --- a/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php +++ b/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php @@ -120,7 +120,7 @@ public function broadcast(array $channels, $event, array $payload = []) throw new BroadcastException( ! empty($response['body']) - ? sprintf('Pusher error: %s.', $response['status']) + ? sprintf('Pusher error: %s.', $response['body']) : 'Failed to connect to Pusher.' ); } From 15b951421fee1d03d35f538b20fc25bb69edef5b Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Sat, 21 Nov 2020 16:20:14 +0000 Subject: [PATCH 35/81] Avoid deprecated response create method (#35310) --- src/Illuminate/Foundation/Exceptions/Handler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Exceptions/Handler.php b/src/Illuminate/Foundation/Exceptions/Handler.php index 903c201d709f..98d888c56cf5 100644 --- a/src/Illuminate/Foundation/Exceptions/Handler.php +++ b/src/Illuminate/Foundation/Exceptions/Handler.php @@ -322,7 +322,7 @@ protected function prepareResponse($request, Exception $e) */ protected function convertExceptionToResponse(Exception $e) { - return SymfonyResponse::create( + return new SymfonyResponse( $this->renderExceptionContent($e), $this->isHttpException($e) ? $e->getStatusCode() : 500, $this->isHttpException($e) ? $e->getHeaders() : [] From 699a23f82c057cb9b2039ffb167dcd016fb7a857 Mon Sep 17 00:00:00 2001 From: Tetiana Blindaruk Date: Sun, 22 Nov 2020 13:05:47 +0200 Subject: [PATCH 36/81] [6.x] update changelog --- CHANGELOG-6.x.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-6.x.md b/CHANGELOG-6.x.md index 0c83b176b52a..9c8471465064 100644 --- a/CHANGELOG-6.x.md +++ b/CHANGELOG-6.x.md @@ -1,6 +1,12 @@ # Release Notes for 6.x -## [Unreleased](https://github.com/laravel/framework/compare/v6.20.3...6.x) +## [Unreleased](https://github.com/laravel/framework/compare/v6.20.4...6.x) + + +## [v6.20.4 (2020-11-17)](https://github.com/laravel/framework/compare/v6.20.3...v6.20.4) + +### Fixed +- Fixed pivot restoration ([#35218](https://github.com/laravel/framework/pull/35218)) ## [v6.20.3 (2020-11-10)](https://github.com/laravel/framework/compare/v6.20.2...v6.20.3) From 935dc474c47b52bc4bd7b2e1445d0d71df029ed0 Mon Sep 17 00:00:00 2001 From: Paras Malhotra Date: Mon, 23 Nov 2020 06:47:39 +0530 Subject: [PATCH 37/81] [8.x] Fix generic DetectsLostConnection string (#35323) --- src/Illuminate/Database/DetectsLostConnections.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Database/DetectsLostConnections.php b/src/Illuminate/Database/DetectsLostConnections.php index 72132c164df7..36b46099983f 100644 --- a/src/Illuminate/Database/DetectsLostConnections.php +++ b/src/Illuminate/Database/DetectsLostConnections.php @@ -40,7 +40,7 @@ protected function causedByLostConnection(Throwable $e) 'Communication link failure', 'connection is no longer usable', 'Login timeout expired', - 'Connection refused', + 'SQLSTATE[HY000] [2002] Connection refused', 'running with the --read-only option so it cannot execute this statement', 'The connection is broken and recovery is not possible. The connection is marked by the client driver as unrecoverable. No attempt was made to restore the connection.', 'SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Try again', From 1ba4354b0263a7f97d1de1323aab21f73b38dc4d Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 24 Nov 2020 10:12:27 -0600 Subject: [PATCH 38/81] patch --- src/Illuminate/Foundation/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Application.php b/src/Illuminate/Foundation/Application.php index 51e84ad962dd..a0c436f2d2e3 100755 --- a/src/Illuminate/Foundation/Application.php +++ b/src/Illuminate/Foundation/Application.php @@ -31,7 +31,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn * * @var string */ - const VERSION = '6.20.4'; + const VERSION = '6.20.5'; /** * The base path for the Laravel installation. From 885937b49a44efec4da0d054400357da3066ac9e Mon Sep 17 00:00:00 2001 From: Tetiana Blindaruk Date: Tue, 24 Nov 2020 19:29:12 +0200 Subject: [PATCH 39/81] [6.x] update changelog --- CHANGELOG-6.x.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-6.x.md b/CHANGELOG-6.x.md index 9c8471465064..ae564658b926 100644 --- a/CHANGELOG-6.x.md +++ b/CHANGELOG-6.x.md @@ -1,6 +1,16 @@ # Release Notes for 6.x -## [Unreleased](https://github.com/laravel/framework/compare/v6.20.4...6.x) +## [Unreleased](https://github.com/laravel/framework/compare/v6.20.5...6.x) + + +## [v6.20.5 (2020-11-24)](https://github.com/laravel/framework/compare/v6.20.4...v6.20.5) + +### Fixed +- Fixing BroadcastException message in PusherBroadcaster@broadcast ([#35290](https://github.com/laravel/framework/pull/35290)) +- Fixed generic DetectsLostConnection string ([#35323](https://github.com/laravel/framework/pull/35323)) + +### Changed +- Updated `aws/aws-sdk-php` suggest to `^3.155` ([#35267](https://github.com/laravel/framework/pull/35267)) ## [v6.20.4 (2020-11-17)](https://github.com/laravel/framework/compare/v6.20.3...v6.20.4) From b5064d731a47dca3d7bd31f7a4eff5617aa5c2b9 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 26 Nov 2020 15:21:02 +0100 Subject: [PATCH 40/81] Backport Redis context option (#35370) --- src/Illuminate/Redis/Connectors/PhpRedisConnector.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Illuminate/Redis/Connectors/PhpRedisConnector.php b/src/Illuminate/Redis/Connectors/PhpRedisConnector.php index b01f114205d8..5a1ef9117bf3 100644 --- a/src/Illuminate/Redis/Connectors/PhpRedisConnector.php +++ b/src/Illuminate/Redis/Connectors/PhpRedisConnector.php @@ -128,6 +128,10 @@ protected function establishConnection($client, array $config) $parameters[] = Arr::get($config, 'read_timeout', 0.0); } + if (version_compare(phpversion('redis'), '5.3.0', '>=')) { + $parameters[] = Arr::get($config, 'context'); + } + $client->{($persistent ? 'pconnect' : 'connect')}(...$parameters); } @@ -152,6 +156,10 @@ protected function createRedisClusterInstance(array $servers, array $options) $parameters[] = $options['password'] ?? null; } + if (version_compare(phpversion('redis'), '5.3.2', '>=')) { + $parameters[] = Arr::get($options, 'context'); + } + return tap(new RedisCluster(...$parameters), function ($client) use ($options) { if (! empty($options['prefix'])) { $client->setOption(RedisCluster::OPT_PREFIX, $options['prefix']); From a93d6a5d31f57a352c10d78b8b7625e49de25187 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Fri, 27 Nov 2020 16:37:52 +0100 Subject: [PATCH 41/81] [6.x] Enable Redis in CI (#35390) * Add extensions * Do not add null for Redis connect --- .github/workflows/tests.yml | 8 ++++---- src/Illuminate/Redis/Connectors/PhpRedisConnector.php | 8 ++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 02cdf62a88dd..f64afb62a99a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,8 +8,8 @@ on: jobs: linux_tests: - runs-on: ubuntu-latest + services: mysql: image: mysql:5.7 @@ -40,7 +40,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, redis, memcached tools: composer:v2 coverage: none @@ -72,8 +72,8 @@ jobs: DB_USERNAME: root windows_tests: - runs-on: windows-latest + strategy: fail-fast: true matrix: @@ -95,7 +95,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, gd, pdo_mysql, fileinfo, ftp + extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, gd, pdo_mysql, fileinfo, ftp, redis, memcached tools: composer:v2 coverage: none diff --git a/src/Illuminate/Redis/Connectors/PhpRedisConnector.php b/src/Illuminate/Redis/Connectors/PhpRedisConnector.php index 5a1ef9117bf3..684737b135fe 100644 --- a/src/Illuminate/Redis/Connectors/PhpRedisConnector.php +++ b/src/Illuminate/Redis/Connectors/PhpRedisConnector.php @@ -129,7 +129,9 @@ protected function establishConnection($client, array $config) } if (version_compare(phpversion('redis'), '5.3.0', '>=')) { - $parameters[] = Arr::get($config, 'context'); + if (! is_null($context = Arr::get($config, 'context'))) { + $parameters[] = $context; + } } $client->{($persistent ? 'pconnect' : 'connect')}(...$parameters); @@ -157,7 +159,9 @@ protected function createRedisClusterInstance(array $servers, array $options) } if (version_compare(phpversion('redis'), '5.3.2', '>=')) { - $parameters[] = Arr::get($options, 'context'); + if (! is_null($context = Arr::get($options, 'context'))) { + $parameters[] = $context; + } } return tap(new RedisCluster(...$parameters), function ($client) use ($options) { From fff077c1f84169302b31fe812d132b62666ade07 Mon Sep 17 00:00:00 2001 From: NEGits <33746490+NEGits@users.noreply.github.com> Date: Mon, 30 Nov 2020 15:14:20 +0100 Subject: [PATCH 42/81] [6.x] Fix validating image/jpeg images after Symfony/Mime update (#35419) * [6.x] Fix validating image/jpeg images after Symfony/Mime update Symfony/Mime v5.20 changed the returned extension for an image with image/jpeg mime type: symfony/mime@aa1d922. This commit adds `.jpg`, which fixes the validation. * [6.x] Add test for image validation with jpg extension --- src/Illuminate/Validation/Concerns/ValidatesAttributes.php | 2 +- tests/Validation/ValidationValidatorTest.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php b/src/Illuminate/Validation/Concerns/ValidatesAttributes.php index bc340ddebf72..6f566ce09f37 100644 --- a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php +++ b/src/Illuminate/Validation/Concerns/ValidatesAttributes.php @@ -1054,7 +1054,7 @@ public function validateLte($attribute, $value, $parameters) */ public function validateImage($attribute, $value) { - return $this->validateMimes($attribute, $value, ['jpeg', 'png', 'gif', 'bmp', 'svg', 'webp']); + return $this->validateMimes($attribute, $value, ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'svg', 'webp']); } /** diff --git a/tests/Validation/ValidationValidatorTest.php b/tests/Validation/ValidationValidatorTest.php index d9a02a78389e..3a968b894c02 100755 --- a/tests/Validation/ValidationValidatorTest.php +++ b/tests/Validation/ValidationValidatorTest.php @@ -2703,6 +2703,12 @@ public function testValidateImage() $file7->expects($this->any())->method('getClientOriginalExtension')->willReturn('webp'); $v = new Validator($trans, ['x' => $file7], ['x' => 'Image']); $this->assertTrue($v->passes()); + + $file2 = $this->getMockBuilder(UploadedFile::class)->setMethods(['guessExtension', 'getClientOriginalExtension'])->setConstructorArgs($uploadedFile)->getMock(); + $file2->expects($this->any())->method('guessExtension')->willReturn('jpg'); + $file2->expects($this->any())->method('getClientOriginalExtension')->willReturn('jpg'); + $v = new Validator($trans, ['x' => $file2], ['x' => 'Image']); + $this->assertTrue($v->passes()); } public function testValidateImageDoesNotAllowPhpExtensionsOnImageMime() From e0b93cf3ef527fca52e3f83fee50c629feab4da3 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 1 Dec 2020 09:01:00 -0600 Subject: [PATCH 43/81] version --- src/Illuminate/Foundation/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Application.php b/src/Illuminate/Foundation/Application.php index a0c436f2d2e3..9632e9b31b64 100755 --- a/src/Illuminate/Foundation/Application.php +++ b/src/Illuminate/Foundation/Application.php @@ -31,7 +31,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn * * @var string */ - const VERSION = '6.20.5'; + const VERSION = '6.20.6'; /** * The base path for the Laravel installation. From 6c5c6b2faa2641de577c0381ef56c4a774efbf20 Mon Sep 17 00:00:00 2001 From: Tetiana Blindaruk Date: Tue, 1 Dec 2020 22:14:33 +0200 Subject: [PATCH 44/81] [6.x] update changelog --- CHANGELOG-6.x.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-6.x.md b/CHANGELOG-6.x.md index ae564658b926..7586408424bb 100644 --- a/CHANGELOG-6.x.md +++ b/CHANGELOG-6.x.md @@ -1,6 +1,13 @@ # Release Notes for 6.x -## [Unreleased](https://github.com/laravel/framework/compare/v6.20.5...6.x) +## [Unreleased](https://github.com/laravel/framework/compare/v6.20.6...6.x) + + +## [v6.20.6 (2020-12-01)](https://github.com/laravel/framework/compare/v6.20.5...v6.20.6) + +### Fixed +- Backport Redis context option ([#35370](https://github.com/laravel/framework/pull/35370)) +- Fixed validating image/jpeg images after Symfony/Mime update ([#35419](https://github.com/laravel/framework/pull/35419)) ## [v6.20.5 (2020-11-24)](https://github.com/laravel/framework/compare/v6.20.4...v6.20.5) From 4822b4fc6a0c1ff429f29c5b8f9e575225e79008 Mon Sep 17 00:00:00 2001 From: Hee Date: Fri, 4 Dec 2020 23:14:57 +0900 Subject: [PATCH 45/81] Remove calls to TestCase::at (#35474) --- tests/Database/DatabaseConnectionTest.php | 5 ++--- tests/Validation/ValidationValidatorTest.php | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/Database/DatabaseConnectionTest.php b/tests/Database/DatabaseConnectionTest.php index 7baf935716dc..31273656e56a 100755 --- a/tests/Database/DatabaseConnectionTest.php +++ b/tests/Database/DatabaseConnectionTest.php @@ -153,9 +153,8 @@ public function testTransactionLevelNotIncrementedOnTransactionException() public function testBeginTransactionMethodRetriesOnFailure() { $pdo = $this->createMock(DatabaseConnectionTestMockPDO::class); - $pdo->expects($this->at(0)) - ->method('beginTransaction') - ->will($this->throwException(new ErrorException('server has gone away'))); + $pdo->method('beginTransaction') + ->willReturnOnConsecutiveCalls($this->throwException(new ErrorException('server has gone away'))); $connection = $this->getMockConnection(['reconnect'], $pdo); $connection->expects($this->once())->method('reconnect'); $connection->beginTransaction(); diff --git a/tests/Validation/ValidationValidatorTest.php b/tests/Validation/ValidationValidatorTest.php index 3a968b894c02..92757d9027ba 100755 --- a/tests/Validation/ValidationValidatorTest.php +++ b/tests/Validation/ValidationValidatorTest.php @@ -1787,14 +1787,14 @@ public function testValidateMax() $this->assertFalse($v->passes()); $file = $this->getMockBuilder(UploadedFile::class)->setMethods(['isValid', 'getSize'])->setConstructorArgs([__FILE__, basename(__FILE__)])->getMock(); - $file->expects($this->any())->method('isValid')->willReturn(true); - $file->expects($this->at(1))->method('getSize')->willReturn(3072); + $file->method('isValid')->willReturn(true); + $file->method('getSize')->willReturn(3072); $v = new Validator($trans, ['photo' => $file], ['photo' => 'Max:10']); $this->assertTrue($v->passes()); $file = $this->getMockBuilder(UploadedFile::class)->setMethods(['isValid', 'getSize'])->setConstructorArgs([__FILE__, basename(__FILE__)])->getMock(); - $file->expects($this->at(0))->method('isValid')->willReturn(true); - $file->expects($this->at(1))->method('getSize')->willReturn(4072); + $file->method('isValid')->willReturn(true); + $file->method('getSize')->willReturn(4072); $v = new Validator($trans, ['photo' => $file], ['photo' => 'Max:2']); $this->assertFalse($v->passes()); From 57797fa67b8ad438636321777ca2efe6fabc2b71 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Fri, 4 Dec 2020 15:27:18 +0100 Subject: [PATCH 46/81] [6.x] Backport for fix issue with polymorphic morphMaps with literal 0 (#35364) (#35487) * [8.x] Fix issue with polymorphic morphMaps with literal 0 (#35364) * fix: use strict null check on morphTo type * test: assert 0 relation_type is handled correctly * Use setMethods for 6.x * Update HasRelationships.php Co-authored-by: Connor Tumbleson --- .../Database/Eloquent/Concerns/HasRelationships.php | 2 +- tests/Database/DatabaseEloquentMorphToTest.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php b/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php index 92c3758e15f9..c48bd22a54f4 100644 --- a/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php +++ b/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php @@ -233,7 +233,7 @@ public function morphTo($name = null, $type = null, $id = null, $ownerKey = null // If the type value is null it is probably safe to assume we're eager loading // the relationship. In this case we'll just pass in a dummy query where we // need to remove any eager loads that may already be defined on a model. - return empty($class = $this->{$type}) + return is_null($class = $this->{$type}) || $class === '' ? $this->morphEagerTo($name, $type, $id, $ownerKey) : $this->morphInstanceTo($class, $name, $type, $id, $ownerKey); } diff --git a/tests/Database/DatabaseEloquentMorphToTest.php b/tests/Database/DatabaseEloquentMorphToTest.php index 5f9049b4a4a5..c01dfd8b924f 100644 --- a/tests/Database/DatabaseEloquentMorphToTest.php +++ b/tests/Database/DatabaseEloquentMorphToTest.php @@ -90,6 +90,16 @@ public function testMorphToWithArrayDefault() $this->assertSame('taylor', $result->username); } + public function testMorphToWithZeroMorphType() + { + $parent = $this->getMockBuilder(EloquentMorphToModelStub::class)->setMethods(['getAttribute', 'morphEagerTo', 'morphInstanceTo'])->getMock(); + $parent->method('getAttribute')->with('relation_type')->willReturn(0); + $parent->expects($this->once())->method('morphInstanceTo'); + $parent->expects($this->never())->method('morphEagerTo'); + + $parent->relation(); + } + public function testMorphToWithSpecifiedClassDefault() { $parent = new EloquentMorphToModelStub; From 5c438cb44dd0a383be2a6115b676763bea8b9a65 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Sun, 6 Dec 2020 15:04:13 +0000 Subject: [PATCH 47/81] Avoid using niden/actions-memcached (#35499) --- .github/workflows/tests.yml | 7 ++++--- docker-compose.yml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f64afb62a99a..d2a186904407 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,6 +11,10 @@ jobs: runs-on: ubuntu-latest services: + memcached: + image: memcached:1.6-alpine + ports: + - 11211:11211 mysql: image: mysql:5.7 env: @@ -44,9 +48,6 @@ jobs: tools: composer:v2 coverage: none - - name: Setup Memcached - uses: niden/actions-memcached@v7 - - name: Setup problem matchers run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" diff --git a/docker-compose.yml b/docker-compose.yml index dc02296a48b4..4b129f911cfc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3' services: memcached: - image: memcached:1.5-alpine + image: memcached:1.6-alpine ports: - "11211:11211" restart: always From 9685c1b6b113d34340858895e2b1d60c44ea0c5a Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Mon, 7 Dec 2020 15:24:29 +0100 Subject: [PATCH 48/81] [6.x] Fix mime validation for jpeg files (#35518) * Fix mime validation for jpeg files * Update ValidatesAttributes.php Co-authored-by: Taylor Otwell --- .../Concerns/ValidatesAttributes.php | 4 ++ tests/Validation/ValidationValidatorTest.php | 65 ++++++++++++------- 2 files changed, 45 insertions(+), 24 deletions(-) diff --git a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php b/src/Illuminate/Validation/Concerns/ValidatesAttributes.php index 6f566ce09f37..a7a6071ab5b5 100644 --- a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php +++ b/src/Illuminate/Validation/Concerns/ValidatesAttributes.php @@ -1206,6 +1206,10 @@ public function validateMimes($attribute, $value, $parameters) return false; } + if (in_array('jpg', $parameters) || in_array('jpeg', $parameters)) { + $parameters = array_unique(array_merge($parameters, ['jpg', 'jpeg'])); + } + return $value->getPath() !== '' && in_array($value->guessExtension(), $parameters); } diff --git a/tests/Validation/ValidationValidatorTest.php b/tests/Validation/ValidationValidatorTest.php index 92757d9027ba..b6c6ab2281ae 100755 --- a/tests/Validation/ValidationValidatorTest.php +++ b/tests/Validation/ValidationValidatorTest.php @@ -2665,49 +2665,49 @@ public function testValidateImage() $file = $this->getMockBuilder(UploadedFile::class)->setMethods(['guessExtension', 'getClientOriginalExtension'])->setConstructorArgs($uploadedFile)->getMock(); $file->expects($this->any())->method('guessExtension')->willReturn('php'); $file->expects($this->any())->method('getClientOriginalExtension')->willReturn('php'); - $v = new Validator($trans, ['x' => $file], ['x' => 'Image']); + $v = new Validator($trans, ['x' => $file], ['x' => 'image']); $this->assertFalse($v->passes()); $file2 = $this->getMockBuilder(UploadedFile::class)->setMethods(['guessExtension', 'getClientOriginalExtension'])->setConstructorArgs($uploadedFile)->getMock(); - $file2->expects($this->any())->method('guessExtension')->willReturn('jpeg'); + $file2->expects($this->any())->method('guessExtension')->willReturn('jpg'); $file2->expects($this->any())->method('getClientOriginalExtension')->willReturn('jpeg'); - $v = new Validator($trans, ['x' => $file2], ['x' => 'Image']); + $v = new Validator($trans, ['x' => $file2], ['x' => 'image']); + $this->assertTrue($v->passes()); + + $file2 = $this->getMockBuilder(UploadedFile::class)->setMethods(['guessExtension', 'getClientOriginalExtension'])->setConstructorArgs($uploadedFile)->getMock(); + $file2->expects($this->any())->method('guessExtension')->willReturn('jpg'); + $file2->expects($this->any())->method('getClientOriginalExtension')->willReturn('jpg'); + $v = new Validator($trans, ['x' => $file2], ['x' => 'image']); $this->assertTrue($v->passes()); $file3 = $this->getMockBuilder(UploadedFile::class)->setMethods(['guessExtension', 'getClientOriginalExtension'])->setConstructorArgs($uploadedFile)->getMock(); $file3->expects($this->any())->method('guessExtension')->willReturn('gif'); $file3->expects($this->any())->method('getClientOriginalExtension')->willReturn('gif'); - $v = new Validator($trans, ['x' => $file3], ['x' => 'Image']); + $v = new Validator($trans, ['x' => $file3], ['x' => 'image']); $this->assertTrue($v->passes()); $file4 = $this->getMockBuilder(UploadedFile::class)->setMethods(['guessExtension', 'getClientOriginalExtension'])->setConstructorArgs($uploadedFile)->getMock(); $file4->expects($this->any())->method('guessExtension')->willReturn('bmp'); $file4->expects($this->any())->method('getClientOriginalExtension')->willReturn('bmp'); - $v = new Validator($trans, ['x' => $file4], ['x' => 'Image']); + $v = new Validator($trans, ['x' => $file4], ['x' => 'image']); $this->assertTrue($v->passes()); $file5 = $this->getMockBuilder(UploadedFile::class)->setMethods(['guessExtension', 'getClientOriginalExtension'])->setConstructorArgs($uploadedFile)->getMock(); $file5->expects($this->any())->method('guessExtension')->willReturn('png'); $file5->expects($this->any())->method('getClientOriginalExtension')->willReturn('png'); - $v = new Validator($trans, ['x' => $file5], ['x' => 'Image']); + $v = new Validator($trans, ['x' => $file5], ['x' => 'image']); $this->assertTrue($v->passes()); $file6 = $this->getMockBuilder(UploadedFile::class)->setMethods(['guessExtension', 'getClientOriginalExtension'])->setConstructorArgs($uploadedFile)->getMock(); $file6->expects($this->any())->method('guessExtension')->willReturn('svg'); $file6->expects($this->any())->method('getClientOriginalExtension')->willReturn('svg'); - $v = new Validator($trans, ['x' => $file6], ['x' => 'Image']); + $v = new Validator($trans, ['x' => $file6], ['x' => 'image']); $this->assertTrue($v->passes()); $file7 = $this->getMockBuilder(UploadedFile::class)->setMethods(['guessExtension', 'getClientOriginalExtension'])->setConstructorArgs($uploadedFile)->getMock(); $file7->expects($this->any())->method('guessExtension')->willReturn('webp'); $file7->expects($this->any())->method('getClientOriginalExtension')->willReturn('webp'); - $v = new Validator($trans, ['x' => $file7], ['x' => 'Image']); - $this->assertTrue($v->passes()); - - $file2 = $this->getMockBuilder(UploadedFile::class)->setMethods(['guessExtension', 'getClientOriginalExtension'])->setConstructorArgs($uploadedFile)->getMock(); - $file2->expects($this->any())->method('guessExtension')->willReturn('jpg'); - $file2->expects($this->any())->method('getClientOriginalExtension')->willReturn('jpg'); - $v = new Validator($trans, ['x' => $file2], ['x' => 'Image']); + $v = new Validator($trans, ['x' => $file7], ['x' => 'image']); $this->assertTrue($v->passes()); } @@ -2719,7 +2719,7 @@ public function testValidateImageDoesNotAllowPhpExtensionsOnImageMime() $file = $this->getMockBuilder(UploadedFile::class)->setMethods(['guessExtension', 'getClientOriginalExtension'])->setConstructorArgs($uploadedFile)->getMock(); $file->expects($this->any())->method('guessExtension')->willReturn('jpeg'); $file->expects($this->any())->method('getClientOriginalExtension')->willReturn('php'); - $v = new Validator($trans, ['x' => $file], ['x' => 'Image']); + $v = new Validator($trans, ['x' => $file], ['x' => 'image']); $this->assertFalse($v->passes()); } @@ -2832,20 +2832,25 @@ public function testValidateImageDimensions() $this->assertFalse($v->passes()); } - /** - * @requires extension fileinfo - */ - public function testValidatePhpMimetypes() + public function testValidateMimetypes() { $trans = $this->getIlluminateArrayTranslator(); - $uploadedFile = [__DIR__.'/ValidationRuleTest.php', '', null, null, null, true]; - - $file = $this->getMockBuilder(UploadedFile::class)->setMethods(['guessExtension', 'getClientOriginalExtension'])->setConstructorArgs($uploadedFile)->getMock(); - $file->expects($this->any())->method('guessExtension')->willReturn('rtf'); - $file->expects($this->any())->method('getClientOriginalExtension')->willReturn('rtf'); + $uploadedFile = [__FILE__, '', null, null, null, true]; + $file = $this->getMockBuilder(UploadedFile::class)->setMethods(['getMimeType'])->setConstructorArgs($uploadedFile)->getMock(); + $file->expects($this->any())->method('getMimeType')->willReturn('text/rtf'); $v = new Validator($trans, ['x' => $file], ['x' => 'mimetypes:text/*']); $this->assertTrue($v->passes()); + + $file = $this->getMockBuilder(UploadedFile::class)->setMethods(['getMimeType'])->setConstructorArgs($uploadedFile)->getMock(); + $file->expects($this->any())->method('getMimeType')->willReturn('application/pdf'); + $v = new Validator($trans, ['x' => $file], ['x' => 'mimetypes:text/rtf']); + $this->assertFalse($v->passes()); + + $file = $this->getMockBuilder(UploadedFile::class)->setMethods(['getMimeType'])->setConstructorArgs($uploadedFile)->getMock(); + $file->expects($this->any())->method('getMimeType')->willReturn('image/jpeg'); + $v = new Validator($trans, ['x' => $file], ['x' => 'mimetypes:image/jpeg']); + $this->assertTrue($v->passes()); } public function testValidateMime() @@ -2864,6 +2869,18 @@ public function testValidateMime() $file2->expects($this->any())->method('isValid')->willReturn(false); $v = new Validator($trans, ['x' => $file2], ['x' => 'mimes:pdf']); $this->assertFalse($v->passes()); + + $file = $this->getMockBuilder(UploadedFile::class)->setMethods(['guessExtension', 'getClientOriginalExtension'])->setConstructorArgs($uploadedFile)->getMock(); + $file->expects($this->any())->method('guessExtension')->willReturn('jpg'); + $file->expects($this->any())->method('getClientOriginalExtension')->willReturn('jpg'); + $v = new Validator($trans, ['x' => $file], ['x' => 'mimes:jpeg']); + $this->assertTrue($v->passes()); + + $file = $this->getMockBuilder(UploadedFile::class)->setMethods(['guessExtension', 'getClientOriginalExtension'])->setConstructorArgs($uploadedFile)->getMock(); + $file->expects($this->any())->method('guessExtension')->willReturn('jpg'); + $file->expects($this->any())->method('getClientOriginalExtension')->willReturn('jpeg'); + $v = new Validator($trans, ['x' => $file], ['x' => 'mimes:jpg']); + $this->assertTrue($v->passes()); } public function testValidateMimeEnforcesPhpCheck() From bdc79701b567c5f8ed44d212dd4a261b8300b9c3 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 8 Dec 2020 09:31:27 -0600 Subject: [PATCH 49/81] version --- src/Illuminate/Foundation/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Application.php b/src/Illuminate/Foundation/Application.php index 9632e9b31b64..451a0120b177 100755 --- a/src/Illuminate/Foundation/Application.php +++ b/src/Illuminate/Foundation/Application.php @@ -31,7 +31,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn * * @var string */ - const VERSION = '6.20.6'; + const VERSION = '6.20.7'; /** * The base path for the Laravel installation. From 4d5159f161fe271c322abdb21d9c3fff59678117 Mon Sep 17 00:00:00 2001 From: Tetiana Blindaruk Date: Tue, 8 Dec 2020 20:57:38 +0200 Subject: [PATCH 50/81] [6.x] update changelog --- CHANGELOG-6.x.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-6.x.md b/CHANGELOG-6.x.md index 7586408424bb..8ec4a08e9afe 100644 --- a/CHANGELOG-6.x.md +++ b/CHANGELOG-6.x.md @@ -1,6 +1,13 @@ # Release Notes for 6.x -## [Unreleased](https://github.com/laravel/framework/compare/v6.20.6...6.x) +## [Unreleased](https://github.com/laravel/framework/compare/v6.20.7...6.x) + + +## [v6.20.7 (2020-12-08)](https://github.com/laravel/framework/compare/v6.20.6...v6.20.7) + +### Fixed +- Backport for fix issue with polymorphic morphMaps with literal 0 ([#35487](https://github.com/laravel/framework/pull/35487)) +- Fixed mime validation for jpeg files ([#35518](https://github.com/laravel/framework/pull/35518)) ## [v6.20.6 (2020-12-01)](https://github.com/laravel/framework/compare/v6.20.5...v6.20.6) From 94171f04f1aaa79bdcf1f0f9e076f276cd46608d Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 15 Dec 2020 00:33:42 +0100 Subject: [PATCH 51/81] Update phpunit.xml.dist (#35605) --- phpunit.xml.dist | 8 -------- 1 file changed, 8 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 3cb5a6c6ba63..bb20f5f6ded1 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -17,14 +17,6 @@ ./tests - - - ./src - - - ./src/ - -