Skip to content
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

Allow Laravel 12 #2665

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
20 changes: 16 additions & 4 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
- "^9"
- "^10"
- "^11"
- "^12"
composer:
- name: lowest
arg: "--prefer-lowest --prefer-stable"
Expand All @@ -44,6 +45,10 @@ jobs:
laravel-version: "^11"
- php-version: "8.1"
laravel-version: "^11"
- php-version: "8.0"
laravel-version: "^12"
- php-version: "8.1"
laravel-version: "^12"

steps:
- uses: actions/checkout@v4
Expand All @@ -63,7 +68,8 @@ jobs:
- name: "Remove conflicting dependencies that are not needed here"
run: composer remove --dev --no-update phpbench/phpbench rector/rector

- if: matrix.laravel-version != '^10'
- name: "Remove Pennant for Laravel 9 because it is not compatible"
if: matrix.laravel-version == '^9'
run: composer remove --dev --no-update laravel/pennant

- run: >
Expand Down Expand Up @@ -94,6 +100,7 @@ jobs:
- "^9"
- "^10"
- "^11"
- "^12"
os:
- ubuntu-latest
composer:
Expand All @@ -108,6 +115,10 @@ jobs:
laravel-version: "^11"
- php-version: "8.1"
laravel-version: "^11"
- php-version: "8.0"
laravel-version: "^12"
- php-version: "8.1"
laravel-version: "^12"

services:
mysql:
Expand Down Expand Up @@ -142,7 +153,8 @@ jobs:
- name: "Remove conflicting dependencies that are not needed here"
run: composer remove --dev --no-update larastan/larastan phpstan/phpstan-mockery phpbench/phpbench rector/rector

- if: matrix.laravel-version != '^10' && matrix.laravel-version != '^11'
- name: "Remove Pennant for Laravel 9 because it is not compatible"
if: matrix.laravel-version == '^9'
run: composer remove --dev --no-update laravel/pennant

- run: >
Expand All @@ -162,7 +174,7 @@ jobs:
strategy:
matrix:
php-version: ["8.4"]
laravel-version: ["^11"]
laravel-version: ["^12"]

services:
mysql:
Expand Down Expand Up @@ -209,7 +221,7 @@ jobs:
strategy:
matrix:
php-version: ["8.4"]
laravel-version: ["^11"]
laravel-version: ["^12"]

steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ You can find and compare releases at the [GitHub release page](https://github.co

## Unreleased

### Added

- Support Laravel 12 https://github.com/nuwave/lighthouse/pull/2665

## v6.50.0

### Added
Expand Down
34 changes: 20 additions & 14 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,37 @@
"php": "^8",
"ext-json": "*",
"haydenpierce/class-finder": "^0.4 || ^0.5",
"illuminate/auth": "^9 || ^10 || ^11",
"illuminate/bus": "^9 || ^10 || ^11",
"illuminate/contracts": "^9 || ^10 || ^11",
"illuminate/http": "^9 || ^10 || ^11",
"illuminate/pagination": "^9 || ^10 || ^11",
"illuminate/queue": "^9 || ^10 || ^11",
"illuminate/routing": "^9 || ^10 || ^11",
"illuminate/support": "^9 || ^10 || ^11",
"illuminate/validation": "^9 || ^10 || ^11",
"illuminate/auth": "^9 || ^10 || ^11 || ^12",
"illuminate/bus": "^9 || ^10 || ^11 || ^12",
"illuminate/contracts": "^9 || ^10 || ^11 || ^12",
"illuminate/http": "^9 || ^10 || ^11 || ^12",
"illuminate/pagination": "^9 || ^10 || ^11 || ^12",
"illuminate/queue": "^9 || ^10 || ^11 || ^12",
"illuminate/routing": "^9 || ^10 || ^11 || ^12",
"illuminate/support": "^9 || ^10 || ^11 || ^12",
"illuminate/validation": "^9 || ^10 || ^11 || ^12",
"laragraph/utils": "^1.5 || ^2",
"thecodingmachine/safe": "^1 || ^2 || ^3",
"webonyx/graphql-php": "^15"
},
"require-dev": {
"algolia/algoliasearch-client-php": "^3",
"bensampo/laravel-enum": "^5 || ^6",
"dms/phpunit-arraysubset-asserts": "^0.4 || ^0.5",
"dms/phpunit-arraysubset-asserts": "^0.4 || ^0.5 || dev-add-phpunit-11-support",
"ergebnis/composer-normalize": "^2.2.2",
"fakerphp/faker": "^1.21",
"google/protobuf": "^3.21",
"larastan/larastan": "^2.9.14 || ^3.0.4",
"laravel/framework": "^9 || ^10 || ^11",
"laravel/framework": "^9 || ^10 || ^11 || ^12",
"laravel/legacy-factories": "^1.1.1",
"laravel/pennant": "^1",
"laravel/scout": "^8 || ^9 || ^10 || ^11",
"laravel/scout": "^8 || ^9 || ^10",
"mattiasgeniar/phpunit-query-count-assertions": "^1.1",
"mll-lab/graphql-php-scalars": "^6",
"mll-lab/php-cs-fixer-config": "^5",
"mockery/mockery": "^1.5",
"nesbot/carbon": "^2.62.1",
"orchestra/testbench": "^7.50 || ^8.32 || ^9.10",
"nesbot/carbon": "^2.62.1 || ^3.8.4",
"orchestra/testbench": "^7.50 || ^8.32 || ^9.10 || ^10.1",
"phpbench/phpbench": "^1.2.6",
"phpstan/extension-installer": "^1",
"phpstan/phpstan": "^1.12.18 || ^2",
Expand All @@ -80,6 +80,12 @@
"mll-lab/laravel-graphiql": "A graphical interactive in-browser GraphQL IDE - integrated with Laravel",
"pusher/pusher-php-server": "Required when using the Pusher Subscriptions driver"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/pieterocp/phpunit-arraysubset-asserts"
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion src/Console/FieldCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
/** @return array{string, string} */
protected function nameParts(): array
{
$name = $this->argument('name');
$name = (string) $this->argument('name');

Check failure on line 39 in src/Console/FieldCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.2 with Laravel ^11 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 39 in src/Console/FieldCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.3 with Laravel ^12 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 39 in src/Console/FieldCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.3 with Laravel ^11 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 39 in src/Console/FieldCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.1 with Laravel ^9 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 39 in src/Console/FieldCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.0 with Laravel ^9 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 39 in src/Console/FieldCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.4 with Laravel ^11 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 39 in src/Console/FieldCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.1 with Laravel ^10 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 39 in src/Console/FieldCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.2 with Laravel ^10 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 39 in src/Console/FieldCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.4 with Laravel ^12 and lowest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 39 in src/Console/FieldCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.4 with Laravel ^9 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 39 in src/Console/FieldCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.4 with Laravel ^10 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 39 in src/Console/FieldCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.4 with Laravel ^12 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 39 in src/Console/FieldCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.2 with Laravel ^9 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 39 in src/Console/FieldCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.3 with Laravel ^10 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 39 in src/Console/FieldCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.2 with Laravel ^12 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 39 in src/Console/FieldCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.2 with Laravel ^12 and lowest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 39 in src/Console/FieldCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.3 with Laravel ^12 and lowest dependencies

Cannot cast array|bool|string|null to string.

Check warning on line 39 in src/Console/FieldCommand.php

View check run for this annotation

Codecov / codecov/patch

src/Console/FieldCommand.php#L39

Added line #L39 was not covered by tests

Check failure on line 39 in src/Console/FieldCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.3 with Laravel ^9 and highest dependencies

Cannot cast array|bool|string|null to string.

$parts = explode('.', $name);
if (count($parts) !== 2) {
Expand Down
2 changes: 1 addition & 1 deletion src/Console/LighthouseGeneratorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
protected function getNameInput(): string
{
$name = $this->argument('name');
$name = (string) $this->argument('name');

Check failure on line 18 in src/Console/LighthouseGeneratorCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.2 with Laravel ^11 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 18 in src/Console/LighthouseGeneratorCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.3 with Laravel ^12 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 18 in src/Console/LighthouseGeneratorCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.3 with Laravel ^11 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 18 in src/Console/LighthouseGeneratorCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.1 with Laravel ^9 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 18 in src/Console/LighthouseGeneratorCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.0 with Laravel ^9 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 18 in src/Console/LighthouseGeneratorCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.4 with Laravel ^11 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 18 in src/Console/LighthouseGeneratorCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.1 with Laravel ^10 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 18 in src/Console/LighthouseGeneratorCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.2 with Laravel ^10 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 18 in src/Console/LighthouseGeneratorCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.4 with Laravel ^12 and lowest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 18 in src/Console/LighthouseGeneratorCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.4 with Laravel ^9 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 18 in src/Console/LighthouseGeneratorCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.4 with Laravel ^10 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 18 in src/Console/LighthouseGeneratorCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.4 with Laravel ^12 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 18 in src/Console/LighthouseGeneratorCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.2 with Laravel ^9 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 18 in src/Console/LighthouseGeneratorCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.3 with Laravel ^10 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 18 in src/Console/LighthouseGeneratorCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.2 with Laravel ^12 and highest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 18 in src/Console/LighthouseGeneratorCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.2 with Laravel ^12 and lowest dependencies

Cannot cast array|bool|string|null to string.

Check failure on line 18 in src/Console/LighthouseGeneratorCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.3 with Laravel ^12 and lowest dependencies

Cannot cast array|bool|string|null to string.

Check warning on line 18 in src/Console/LighthouseGeneratorCommand.php

View check run for this annotation

Codecov / codecov/patch

src/Console/LighthouseGeneratorCommand.php#L18

Added line #L18 was not covered by tests

Check failure on line 18 in src/Console/LighthouseGeneratorCommand.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.3 with Laravel ^9 and highest dependencies

Cannot cast array|bool|string|null to string.

return ucfirst(trim($name));
}
Expand Down
2 changes: 1 addition & 1 deletion src/Schema/Types/Scalars/DateTimeUtc.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ protected function format(Carbon $carbon): string
protected function parse(mixed $value): Carbon
{
// @phpstan-ignore-next-line We know the format to be good, so this can never return `false`
return Carbon::createFromIsoFormat('YYYY-MM-DDTHH:mm:ss.SSSSSSZ', $value);
return Carbon::createFromIsoFormat('YYYY-MM-DDTHH:mm:ss.SSSSSSZ', (string) $value);
}
}
Loading