microsoftgraph / microsoftgraph/msgraph-sdk-php
Support nested expansion deserialization - ex Read SharePoint List
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 669
- Forks
- 150
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 3
Description
Hi team,
I am a bit of a rookie but keen to see if this is an issue or if I am doing something wrong. I have searched everywhere but can't seem to find a solution so sorry if this is the wrong place to log this.
I am trying to read the data from a SharePoint list. It is working within the API explorer but not when I move it into PHP. In the API explorer I am hitting the below endpoint:
When I do the below code in PHP it brings back the columns but the items are coming back in an empty array:
$list = $graph->createRequest("GET", "/sites/{site-id}/lists/{list-id}/?expand=columns,items(expand=columns)")
->setReturnType(Model\Site::class)
->execute();
Any help would be really appreciated!
Thanks
Sam
AB#7976
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the PHP createRequest call for /sites/{site-id}/lists/{list-id}/?expand=columns,items(expand=columns), using Model\Site::class as the return type, and compare it with the API Explorer response. Trace how nested items and their columns are deserialized, then verify that the returned items contain the expanded data rather than an empty array.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100