-
Couldn't load subscription status.
- Fork 3
Remove Guzzle specific config and methods from Graph request classes #4
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
Remove Guzzle specific config and methods from Graph request classes #4
Conversation
| if (stripos($this->endpoint, "http") === 0) { | ||
| return $this->endpoint; | ||
| $coreSdkVersion = "graph-php-core/".GraphConstants::SDK_VERSION; | ||
| $serviceLibSdkVersion = "Graph-php-".$this->graphClient->getSdkVersion(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we change the service library SDK version header to match https://github.com/microsoftgraph/msgraph-sdk-design/blob/master/middleware/TelemetryHandler.md#requirements?
Might need some changes to our PowerBI usage charts
| * of class $returnType | ||
| */ | ||
| public function execute($client = null) | ||
| public function execute(?ClientInterface $client = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MIchaelMainer please clarify whether we should always return a GraphResponse object or return the serialised response body payload if a $returnType is not set?
| * @return string | ||
| * @param ClientInterface|null $client (optional) When null, uses $graphClient's http client | ||
| * @return array|GraphResponse|StreamInterface|object Graph Response object or response body cast to $returnType | ||
| * @throws ClientExceptionInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made no sense to me to throw a GraphClientException here since we were only wrapping an existing standard exception interface and providing no further info.
This PR:
GraphRequestandGraphCollectionRequestconstructors to accept the Graph client as an encapsulation of api version, sdk version, access token and custom hosts/middleware etc in futureCloses https://github.com/microsoftgraph/msgraph-sdk-php/issues/438
Closes microsoftgraph/msgraph-sdk-php#531