-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Testing v9-rc1 on Laravel Passport #1398
Comments
Thanks so much for this @hafezdivandari. This is super useful. I suspected the change of IDs might cause issues downstream so great to have something concrete to work with. Really appreciate you doing this |
Thank you @Sephster for your hard work in maintaining this package and the new major release. I'll keep an eye on this issue until it is resolved. Please let me know when we are able to move the PR forward. Thanks. |
I think I've fixed all the issues raised here now @hafezdivandari - thanks again for creating the PR for Passport. Would you be able to check if this has resolved all issues now? Once we have a working, v9 compatible version of Passport, I will look to tag v9 proper. Thanks again for progressing this. Much appreciated. |
@Sephster I applied the latest changes. I'm checking failed test... |
@Sephster all tests are passing. We may close this issue as completed now, Thank you. |
Hi, @Sephster The introduction of an integer identifier is a step back in the implementation of typing. |
I can see the case for this argument. Part of the reason I originally had the identifiers as strings initially was to avoid casting when things come in from http requests. @hafezdivandari what are your thoughts on this? Would a simple case of casting fix most compatibility issues with Passport? You still raised some excellent points so I won't revert all changes but I'm leaning towards treating identifiers as strings only as @eugene-borovov suggests |
No problem @Sephster, let's make the types more strict and see what happens on Laravel Passport tests. I'll try to cast the arguments. |
Changes made now @hafezdivandari - if you can see how you get on with the PR, I can merge this into main assuming all is ok. Apologies for the delay with this as well, I was travelling with my family. |
Thank you @Sephster, have a nice trip. Just commented a little issue on the PR: #1402 (comment) |
It was great thank you. Thanks for spotting that. I've fixed the issue reported now. |
@Sephster 6 tests are failing on Laravel Passport rn, I added a comment on the PR: #1402 (comment) I hope this is the last one. |
Trying to add support and test v9-rc1 before stable release on Laravel Passport, PR laravel/passport#1734, there are 2 issues:
You may check the failed tests here: https://github.com/laravel/passport/actions/runs/8482967241/job/23243211337?pr=1734
Both
User
andClient
classes of Laravel Passport are usingLeague\OAuth2\Server\Entities\Traits\EntityTrait
.This trait accepts
mixed
id on set but returnstring
on get:oauth2-server/src/Entities/Traits/EntityTrait.php
Lines 22 to 33 in ca511c1
Also on the
TokenInterface
class,$userIdentifier
type doesn't match on set / get :oauth2-server/src/Entities/TokenInterface.php
Lines 39 to 49 in ca511c1
On
AccessTokenRepositoryInterface
the$userIdentifier
property acceptsmixed
:oauth2-server/src/Repositories/AccessTokenRepositoryInterface.php
Line 33 in ca511c1
On
AbstractGrant
class,getClientEntityOrFail
method accepts only string$clientId
and not int:oauth2-server/src/Grant/AbstractGrant.php
Line 187 in ca511c1
On
ClientRepositoryInterface
class,getClientEntity
andvalidateClient
methods,$clientIdentifier
argument doesn't accept int:oauth2-server/src/Repositories/ClientRepositoryInterface.php
Lines 25 to 30 in ca511c1
The text was updated successfully, but these errors were encountered: