homedesignshops / flysystem-sharepoint
Flysystem v2 SharePoint adapter for the Microsoft Graph API
Requires
- php: ^8.1
- ext-json: *
- league/flysystem: ^3.0
- microsoft/microsoft-graph: ^1.39
- phpspec/prophecy-phpunit: ^2.0
- psr/log: ^2.0|^3.0
Requires (Dev)
- phpunit/phpunit: ^9.0
README
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.