msgraph-sdk-php icon indicating copy to clipboard operation
msgraph-sdk-php copied to clipboard

2.0.0-RC5 Announcement | Known Issues

Open Ndiritu opened this issue 1 year ago • 3 comments

This release contains model bug fixes and the following improvements:

  • Authentication Provider that handles token fetching and refresh behind the scenes for you:

use Microsoft\Kiota\Authentication\Oauth\AuthorizationCodeContext;
use Microsoft\Kiota\Authentication\PhpLeagueAuthenticationProvider;

$tokenRequestContext = new AuthorizationCodeContext(
    'tenantId',
    'clientId',
    'clientSecret',
    'authCode',
    'redirectUri'
);
$scopes = ['User.Read', 'Mail.Read'];
$authProvider = new PhpLeagueAuthenticationProvider($tokenRequestContext, $scopes);
  • A fluent API design:
$messages = $graphServiceClient->usersById(USER_ID)->messages()->get()->wait();

More details in the Upgrade Guide and README

Please try out this version and let us know what you think:

{
    "require": {
        "microsoft/microsoft-graph": "^2.0.0-RC5",
        "microsoft/microsoft-graph-core": "@RC"
    }
}

This version was generated using a new OpenAPI-based SDK generator called Kiota.

Known Issues

@MIchaelMainer,@Zombaya,@tdondich,@baywet,@SilasKenneth,@nokafor,@Dillonsmart,@anvanza,@dan-silver,@noahheck,@curry684,@guilliamxavier,@landall,@andrii-boiko,@Levure,@tolbon,@Jelle-S,@osalabs,@zengin,@ronnyjss, @fabianderijk, @alex-code, @craigpaul, @minhvn, @katalin2003, @basementmedia2, @ianef, @Deadpikle, @N-M, @Dakoni4400, @isvargasmsft

Ndiritu avatar Jul 08 '22 08:07 Ndiritu

You might want to re-do https://github.com/microsoftgraph/MSGraph-SDK-Code-Generator/pull/759 (i.e. revert https://github.com/microsoftgraph/MSGraph-SDK-Code-Generator/pull/772) in the 2.0 dev branch (before the 2.0.0 release) and add it to the breaking changes (like https://github.com/microsoftgraph/msgraph-sdk-php/pull/658 which BTW should also mention that parameter/return type declarations have been added to all methods)

guilliamxavier avatar Jul 08 '22 09:07 guilliamxavier

Moving forward, 2.0 will not be using jsonSerialize() and thanks, added the parameter/return type declarations changes to the Upgrade guide

Ndiritu avatar Jul 08 '22 10:07 Ndiritu

As of 2.0.0-RC9, PATCH requests return the deserialized response body

Ndiritu avatar Sep 28 '22 06:09 Ndiritu

2.0.0 is out now. https://devblogs.microsoft.com/microsoft365dev/write-high-quality-code-with-the-microsoft-graph-php-sdk-v2/

Ndiritu avatar Nov 20 '23 09:11 Ndiritu