Skip to content

Commit

Permalink
Merge pull request #1 from BBS-Lab/laravel-9
Browse files Browse the repository at this point in the history
Add Laravel 9 support.
  • Loading branch information
mikaelpopowicz authored Feb 21, 2022
2 parents cb12c9e + 5d9628b commit 3e4df1f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,26 @@ jobs:
lighthouse: [4.*, 5.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 9.*
testbench: ^7.0
lighthouse: 5.*
php: 8.0
stability: prefer-lowest
- laravel: 9.*
testbench: ^7.0
lighthouse: 5.*
php: 8.0
stability: prefer-stable
- laravel: 9.*
testbench: ^7.0
lighthouse: 5.*
php: 8.1
stability: prefer-lowest
- laravel: 9.*
testbench: ^7.0
lighthouse: 5.*
php: 8.1
stability: prefer-stable
- laravel: 8.*
testbench: ^6.6
lighthouse: 4.*
Expand Down Expand Up @@ -50,8 +70,8 @@ jobs:
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nuwave/lighthouse:${{ matrix.lighthouse }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nuwave/lighthouse:${{ matrix.lighthouse }}" --no-interaction --no-update --dev
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --dev
- name: Execute tests
run: vendor/bin/phpunit
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"laravel",
"lighthouse-persisted-queries"
],
"homepage": "https://github.com//lighthouse-persisted-queries",
"homepage": "https://github.com/bbs-lab/lighthouse-persisted-queries",
"license": "MIT",
"authors": [
{
Expand All @@ -22,13 +22,13 @@
"require": {
"php": "^7.4|^8.0",
"spatie/laravel-package-tools": "^1.4.3",
"illuminate/contracts": "^7.0|^8.0",
"illuminate/contracts": "^7.0|^8.0|^9.0",
"nuwave/lighthouse": "^4.0|^5.0"
},
"require-dev": {
"brianium/paratest": "^6.2",
"nunomaduro/collision": "^5.3",
"orchestra/testbench": "^v5.18|^6.6",
"nunomaduro/collision": "^5.3|^6.0",
"orchestra/testbench": "^v5.18|^6.6|^7.0",
"phpunit/phpunit": "^9.3",
"spatie/laravel-ray": "^1.9",
"vimeo/psalm": "^4.4"
Expand Down
7 changes: 5 additions & 2 deletions src/PersistsQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,11 @@ protected function createRequestFrom(Request $from, string $content): Request

$request->setJson($from->json());

if ($session = $from->getSession()) {
$request->setLaravelSession($session);
try {
if ($session = $from->getSession()) {
$request->setLaravelSession($session);
}
} catch (\Exception $e) {
}

$request->setUserResolver($from->getUserResolver());
Expand Down

0 comments on commit 3e4df1f

Please sign in to comment.