Skip to content

Commit

Permalink
Merge pull request #1117 from mfn/mfn-laravel-11
Browse files Browse the repository at this point in the history
Add support for Laravel 11
  • Loading branch information
mfn authored Feb 18, 2024
2 parents cd37cca + 668d201 commit b181329
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 29 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:
- cron: 0 3 * * 1
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
static-analysis:
name: Static Analysis
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,24 @@ on:
- cron: 0 3 * * 1
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
integration:
strategy:
fail-fast: false
matrix:
php: [8.0, 8.1, 8.2, 8.3]
laravel: [^9.0, ^10.0]
laravel: [^9.0, ^10.0, ^11.x-dev]
exclude:
- php: 8.0
laravel: ^10.0
- php: 8.0
laravel: ^11.x-dev
- php: 8.1
laravel: ^11.x-dev
name: P=${{ matrix.php }} L=${{ matrix.laravel }}
runs-on: ubuntu-latest
env:
Expand All @@ -42,6 +50,7 @@ jobs:
# Due to version incompatibility with older Laravels we test, we remove it
- run: composer remove --dev larastan/larastan --no-update
- run: composer remove --dev friendsofphp/php-cs-fixer --no-update
- run: composer remove --dev phpstan/phpstan --no-update
- run: composer require illuminate/contracts:${{ matrix.laravel }} --no-update

- name: Get composer cache directory
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,25 @@ on:
- cron: 0 3 * * 1
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
tests:
strategy:
fail-fast: false
matrix:
php: [8.0, 8.1, 8.2, 8.3]
laravel: [^9.0, ^10.0]
laravel: [^9.0, ^10.0, ^11.0]
stability: [prefer-lowest, prefer-stable]
exclude:
- php: 8.0
laravel: ^10.0
- php: 8.0
laravel: ^11.0
- php: 8.1
laravel: ^11.0
name: P=${{ matrix.php }} L=${{ matrix.laravel }} ${{ matrix.stability }}
runs-on: ubuntu-latest
env:
Expand All @@ -44,6 +52,7 @@ jobs:
# Due to version incompatibility with older Laravels we test, we remove it
- run: composer remove --dev larastan/larastan --no-update
- run: composer remove --dev friendsofphp/php-cs-fixer --no-update
- run: composer remove --dev phpstan/phpstan --no-update
- run: composer require illuminate/contracts:${{ matrix.laravel }} --no-update
- run: composer require illuminate/contracts:9.33 --no-update
if: matrix.laravel == '^9.0' && matrix.stability == 'prefer-lowest'
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ CHANGELOG
[Next release](https://github.com/rebing/graphql-laravel/compare/9.1.0...master)
--------------

## Added
- Support Laravel for 11 [\#1117 / mfn](https://github.com/rebing/graphql-laravel/pull/1117)

2023-08-06, 9.1.0
-----------------
## Fixed
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
"require": {
"php": "^8.0",
"ext-json": "*",
"illuminate/contracts": "^9.0|^10.0",
"illuminate/support": "^9.0|^10.0",
"illuminate/contracts": "^9.0|^10.0|^11.0",
"illuminate/support": "^9.0|^10.0|^11.0",
"laragraph/utils": "^2.0.1",
"thecodingmachine/safe": "^2.4",
"webonyx/graphql-php": "^15.0.3"
Expand All @@ -50,8 +50,8 @@
"mockery/mockery": "^1.2",
"phpstan/phpstan": "1.10.40",
"larastan/larastan": "2.6.4",
"orchestra/testbench": "^7.0|^8.0",
"phpunit/phpunit": "^9",
"orchestra/testbench": "^7.0|^8.0|^9.0|^9.x-dev",
"phpunit/phpunit": "^9|^10",
"thecodingmachine/phpstan-safe-rule": "^1"
},
"autoload": {
Expand Down
39 changes: 17 additions & 22 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
cacheDirectory=".phpunit.result.cache"
>
<testsuites>
<testsuite name="Unit">
<directory suffix=".php">./tests/Unit</directory>
</testsuite>
<testsuite name="Database">
<directory suffix=".php">./tests/Database</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
<testsuite name="Database">
<directory suffix="Test.php">./tests/Database</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use Rebing\GraphQL\Tests\TestCase;

class WithTypeTests extends TestCase
class WithTypeTest extends TestCase
{
protected function getEnvironmentSetUp($app): void
{
Expand Down

0 comments on commit b181329

Please sign in to comment.