-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
Supports Laravel 12 #1164
Supports Laravel 12 #1164
Conversation
Note: I'm already working on it, but as you saw, laragraph/utils#20 is blocking and so is larastan |
Ah, I thought you might be. I can close this PR if you've already got a branch in the works? |
No, it's fine :) We've to wait for the dependencies anyway, so let's wait 💤 |
FTR The PR was closed larastan/larastan#2198 (comment)
I can't disagree here, I'm a maintainer myself 😅 So I guess it will be only larastan/larastan#2195 |
Yeah, it makes sense! It looks like we may need to require both Larastan 2 and 3. I don't have any experience with Larastan (or PHPStan), but I assume it's okay to use two versions alongside each other? I can take a look tomorrow when I'm back in the office. |
I'm fine only keeping one, it's just a dev dependency after all |
This reverts commit 6431c2f.
1b8f36a
to
3889351
Compare
Apologies for the commit spam! 😄 I've been trying to figure out why I don't suppose you have any ideas? |
I supposed it's related to Although it may be possible to work this around before L12 is stable, I think it will be much easier once all the deps transitioned to stable, I believe then things will "just work". With making more (not commit-table) manually changes I got L12/testbench-core 10 locally. Test suite runs but one test:
I suggest: we wait until official release (should be next week or so?), then it won't be that of a hassle. |
No problem! I think Laravel 12 is being released on Monday, so I'll loop back to this after it's been tagged. |
Unfortunatley, I'm still running into this issue now that everything has been tagged... the Is there any reason you're requiring The Swapping them seemed to have fixed the issues I was seeing with the |
Testbench 8.0 is the minimum version at the moment, so this check is unncessary. (It also seems to be broken - returning true for Testbench 10)
Laravel 12 automatically registers routes for any local filesystems, essentially doing away with the `storage:link` command. These tests needed to be updated to account for that. See https://github.com/laravel/framework/blob/12.x/src/Illuminate/Filesystem/FilesystemServiceProvider.php#L80-L107
This pull request is ready to be reviewed now! I've opened #1168 to address the PHPStan analysis issues, and #1167 to prevent deprecatication warnings from PHPUnit when using Testbench 10 (which requires PHPUnit 11). As per my previous comment, I had to switch back to requiring Let me know if there's anything you need me to change. Thanks for maintaining this package! 🙂 |
If you ask me now, I guess the answer is "premature optimization" 🤦🏼 |
@@ -14,6 +14,10 @@ class NoRoutesRegisteredTest extends TestCase | |||
{ | |||
protected function getEnvironmentSetUp($app): void | |||
{ | |||
// Laravel registers routes for local filesystems by default. | |||
// However, for the purpose of this test, we don't want it to register any routes. | |||
$app['config']->set('filesystems.disks.local.serve', false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When is this required? The tests work also without this line for me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ->assertCount()
here was asserting that 0 was 1, because of the filesystem route that Laravel 12 is registering.
https://github.com/rebing/graphql-laravel/blob/master/tests/Unit/NoRoutesRegisteredTest.php#L54
Looks like it only happens on the prefer-lowest
tests. Testbench 10.0.1 includes the serve
parameter in its stubs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks for your work!
And thanks for getting this tagged so quickly! 🙂 |
Thanks you too, such a great contribution, separate PR for separate concerns, really helped me to keep the velocity, thanks 👍🏼 |
Summary
This pull request adds Laravel 12 support to
graphql-laravel
, which will be released on 24th February.Depends on:
Type of change:
Checklist:
composer fix-style