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

Wrong return types? #83

Open
SuryaWebfox opened this issue Sep 13, 2024 · 0 comments
Open

Wrong return types? #83

SuryaWebfox opened this issue Sep 13, 2024 · 0 comments

Comments

@SuryaWebfox
Copy link

In 0f407d0#diff-9f3a205ebdd03435644801c898d52c2a2f08dc7e707f3f2511f56f8dc1744b38 return types of MsGraph were added to many (all?) of the resources

So I get an error when doing

MsGraph::tasklists()->get()

Dcblogdev\MsGraph\Resources\Tasks\TaskLists::get(): Return value must be of type Dcblogdev\MsGraph\Facades\MsGraph, array returned

I checked the code and in many cases the get() function of a resource will return either the content of the Guzzle call or a json_decoded version if the Guzzle call returned JSON. Neither of which will be an MsGraph instance, so I can't see how this return type is correct?

I see that version 3.2.4 didn't have the return types yet, they were added in version 3.2.5, which is the first version to support Laravel 11. Since I am using Laravel 11, I can not use a version that doesn't use these return types.

Please confirm if I am correct that these return types are in fact not correct?

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

No branches or pull requests

1 participant