Skip to content

Add support for Laravel 11 #1117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^9.0 isn't available yet, hence we also add ^9.x-dev, ought to be removed once 9 is out

"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