homedesignshops/flysystem-sharepoint

Flysystem v2 SharePoint adapter for the Microsoft Graph API

v1.4 2023-10-05 06:29 UTC

This package is auto-updated.

Last update: 2024-04-24 13:17:53 UTC


README

Latest Version on Packagist Total Downloads GitHub Actions

This package contains a Flysystem adapter for Sharepoint. Under the hood, the Microsoft Graph API v1 is used. You need an Azure App to use this package.

Installation

You can install the package via composer:

composer require homedesignshops/flysystem-sharepoint

Usage

The first thing you need to do is creating a new Azure Application. Make sure you set the Microsoft Graph API Permissions inside your created application:

  • Files.ReadWrite.All
  • Group.ReadWrite.All

After that, you can use the adapter as follows:

use Homedesignshops\FlysystemSharepoint\SharepointClient;
use Homedesignshops\FlysystemSharepoint\SharepointAdapter;
use League\Flysystem\Filesystem;

$client = new SharepointClient($tenantId, $clientId, $clientSecret, $sharepointGroupName)
$adapter = new SharepointAdapter($client, $pathPrefix);

$filesystem = new Filesystem($adapter);

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email kevin@homedesignshops.nl instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.