Skip to content

Version 2.4.2

Compare
Choose a tag to compare
@vgrem vgrem released this 19 Aug 19:44
· 178 commits to master since this release

Changelog

  • API support for Fluent interface which offers a more compact way of calling operations, for example, file could be downloaded like this:
$file = (new ClientContext($settings['Url']))->withCredentials($credentials)
    ->getWeb()->getFileByServerRelativePath(new SPResourcePath($fileUrl))->get()->executeQuery();
  • SharePoint API model has been updated to 16.0.20405.12008 version and introduced a new types and methods:

    • Web.getFileByServerRelativePath($resourcePath)
    • Web.getFolderByServerRelativePath($resourcePath)
  • Support for addressing Web and File resources by absolute Url

    $fileAbsUrl = "https://contoso.sharepoint.com/sites/team/Shared Documents/sample.docx"
    $credentials = UserCredential(username, password)
    
    $fh = fopen($fileName, 'w+');
    File::fromUrl($fileAbsUrl)->withCredentials($credentials)->download($fh)->executeQuery();
    fclose($fh);
    
  • Support for simplified ways of authenticating against SharePoint

    $credentials = new ClientCredential($clientId, $clientSecret);
    $ctx = (new ClientContext($url))->withCredentials($credentials);