-
Notifications
You must be signed in to change notification settings - Fork 261
Closed
Description
At the moment request executors: get(), post() etc return a Promise
but we don't have a way to specify what object the Promise
will resolve to. The developer experience is impacted when working with returned objects where IDE's do not provide autocompletion e.g.
$user = $graphServiceClient->users()->byUserId('x')->get()->wait();
// IDE's will not provide autocompletion here
$user->...
This is due to a limitation with the PHP Promises implementation. However, there's an already approved PR, pending merging to address this.
Solution:
- Promises library gets PR merged.
- Add return type to Promise PHPDoc for request executor methods e.g.
/**
* @return Promise<User>
* /
public function get(): Promise {}
- Update Kiota core libs to use Promises with Generics
- Update all Kiota samples & tutorials new changes
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done ✔️