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

Add support for Laravel 11 #16

Merged
merged 6 commits into from
Feb 18, 2024
Merged

Add support for Laravel 11 #16

merged 6 commits into from
Feb 18, 2024

Conversation

mfn
Copy link
Collaborator

@mfn mfn commented Feb 17, 2024

While trying to add Laravel 11 to graphql-laravel, I ran into this package missing support for it as a first.

Summary

  • Added automated tests
  • Documented for all relevant versions
  • Updated the changelog

Changes

  • Laravel 11 requires phpunit 10
    • phpunit 10 throws a warning for non-static dataproviders
      Fixing them wasn't as straightforward, as they're calling non-static methods also into the framework; therefore I left this for now as it's only warning (needs to be fixed for phpunit 11)
    • phpstan complained for the same reason, that's why I added them to ignore for now
  • orchestra/testbench has no 9.x release yet, so I left in for the final release and added 9.x-dev, to be removed once its out
  • Also run tests against PHP 8.3

php-cs-fixer

This one deserves special mention.

I didn't touch anything when it pushed this change onto the PR at first:

-public function __construct(string $message, \Throwable $previous = null, int $code = 0, array $headers = [])
+public function __construct(string $message, ?\Throwable $previous = null, int $code = 0, array $headers = [])

That's when I realized it applies code changes based on the PHP version it runs; but this package supports PHP 7.2+, that's why after that I changed it's runtime.

It still pushed a change, but one which is not an issue with PHP version or compat problems.

Breaking changes

none

@mfn mfn self-assigned this Feb 17, 2024
@mfn mfn requested a review from spawnia February 17, 2024 21:12
@spawnia spawnia merged commit b076276 into laragraph:master Feb 18, 2024
36 checks passed
@spawnia
Copy link
Member

spawnia commented Feb 18, 2024

Thank you, nicely done.

@mfn mfn deleted the mfn-laravel-11 branch February 18, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants