diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 761e3604..aafb2117 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,8 +7,11 @@ jobs: strategy: matrix: php: [7.2, 7.3, 7.4] - laravel: [^6.0, ^7.0] + laravel: [^6.0, ^7.0, ^8.0] lazy_types: ['false', 'true'] + exclude: + - php: 7.2 + laravel: ^8.0 name: P=${{ matrix.php }} L=${{ matrix.laravel }} Lazy types=${{ matrix.lazy_types }} runs-on: ubuntu-18.04 env: @@ -27,6 +30,8 @@ jobs: - run: composer remove --dev matt-allan/laravel-code-style --no-update - run: composer require illuminate/contracts:${{ matrix.laravel }} --no-update - run: composer remove --dev nunomaduro/larastan --no-update + - run: composer remove --dev laravel/legacy-factories --no-update + if: (matrix.laravel == '^6.0' || matrix.laravel == '^7.0') - name: Get composer cache directory id: composercache diff --git a/CHANGELOG.md b/CHANGELOG.md index 1149bee1..2a57f790 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ CHANGELOG - Upgrade to webonxy/graphql-php 14.0.0 [\#645 / mfn](https://github.com/rebing/graphql-laravel/pull/645) - Remove support for Laravel < 6.0 [\#651 / mfn](https://github.com/rebing/graphql-laravel/pull/651) This also bumps the minimum required version to PHP 7.2 + +### Added +- Support for Laravel 8 [\#672 / mfn](https://github.com/rebing/graphql-laravel/pull/672) 2020-07-02, 5.1.2 ----------------- diff --git a/composer.json b/composer.json index 3ff27794..33445589 100644 --- a/composer.json +++ b/composer.json @@ -35,19 +35,20 @@ "type": "library", "require": { "php": ">= 7.2", - "illuminate/contracts": "^6.0|^7.0", - "illuminate/support": "^6.0|^7.0", + "illuminate/contracts": "^6.0|^7.0|^8.0", + "illuminate/support": "^6.0|^7.0|^8.0", "webonyx/graphql-php": "^14.0", "ext-json": "*" }, "require-dev": { - "orchestra/testbench": "4.0.*|5.0.*", + "orchestra/testbench": "4.0.*|5.0.*|^6.0", "phpunit/phpunit": "~7.0|~8.0", - "nunomaduro/larastan": "0.6.1", + "nunomaduro/larastan": "0.6.4", "mockery/mockery": "^1.2", "friendsofphp/php-cs-fixer": "^2.15", "matt-allan/laravel-code-style": "0.5.1", - "ext-pdo_sqlite": "*" + "ext-pdo_sqlite": "*", + "laravel/legacy-factories": "^1.0" }, "autoload": { "psr-4": { diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 69233102..178b6289 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -13,7 +13,6 @@ parameters: - '/Parameter #3 \$subject of function str_replace expects array\|string, string\|false given/' - '/Method Rebing\\GraphQL\\GraphQL::routeNameTransformer\(\) should return string but returns string\|null/' - '/Cannot access property \$parameters on mixed/' - - '/Parameter #1 \$haystack of function mb_stripos expects string, \(array\)\|string given/' - '/Strict comparison using === between null and array will always evaluate to false/' # \Rebing\GraphQL\Support\SelectFields::handleFields - '/Binary operation "." between string and array\|string\|null results in an error/' diff --git a/src/GraphQLUploadMiddleware.php b/src/GraphQLUploadMiddleware.php index cb81dd59..6572b12d 100644 --- a/src/GraphQLUploadMiddleware.php +++ b/src/GraphQLUploadMiddleware.php @@ -36,7 +36,7 @@ public function handle(Request $request, Closure $next) */ public function processRequest(Request $request): Request { - $contentType = $request->header('content-type') ?: ''; + $contentType = $request->headers->get('content-type') ?: ''; if (mb_stripos($contentType, 'multipart/form-data') !== false) { $this->validateParsedBody($request);