Skip to content

Version 2.4.0

Compare
Choose a tag to compare
@vgrem vgrem released this 24 Apr 15:50
· 202 commits to master since this release
  • model has been updated from 16.0.20008.12009 API version
  • refactorings and root namespace changed from Office365\PHP\Client\SharePoint into Office365\SharePoint
  • introduced a simplified way to initialize SharePoint client

a simplified way to initialize SharePoint client

from now on instead of

$authCtx = new AuthenticationContext($url); $authCtx->acquireTokenForUser($username,$password); $ctx = new ClientContext($url,$authCtx);

an authenticated client could be instantiated like this:

$ctx = ClientContext::connectWithUserCredentials($url, $username,$password);

and

$authCtx = new AuthenticationContext($url); $authCtx->acquireAppOnlyAccessToken($clientId,$clientSecret); $ctx = new ClientContext($url,$authCtx);

like this:

$ctx = ClientContext::connectWithClientCredentials($url, $clientId,$clientSecret);