-
Notifications
You must be signed in to change notification settings - Fork 4.8k
[8.x] Change User to UserResource #6714
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
[8.x] Change User to UserResource #6714
Conversation
|
If we do this there may be a few other spots in this piece of documentation that need to be updated. Are you able to check for those? Thanks. |
|
Yes, I'll go over the whole section and update the PR. |
|
Reading over this section gave me a bit of pause: I think we will need to make a slight change to the framework if we make this documentation change since people will use the I think I'll need to update this method in the framework to also look for FooResource: |
|
Isn't the more simpler solution to alias the User resource import in the controller? |
|
I didn't realise it would mean making more extensive changes, sorry, Taylor. If you don't make the change and continue to alias the User resource import in the controller, it might be good to mention in the docs that this is what we are doing and why. I didn't notice the alias when I first started working with API resources. Also, when I started creating resources by giving them more descriptive names, e.g. |
|
Personally I think it would be nice to add the $collects property to the resource collection stub class and make that connection a bit more explicit and de-emphasize this magical convention. I may look into that today. |
|
Awesome, thank you, Taylor! |



I would like to propose to change
Userin the Generating Resources section example toUserResourceto avoid conflict with theUsermodel namespace when importing theUserresource in theUserController.