champs-libres / wopi-lib
A standard and framework agnostic PHP library to facilitate the implementation of the WOPI protocol.
Requires
- php: >= 7.4
- ext-json: *
- ext-openssl: *
- ext-simplexml: *
- loophp/psr17: ^1.0
- phpseclib/phpseclib: ^3.0
- psr/cache: ^1.0 || ^2.0 || ^3.0
- psr/http-client: ^1.0
- psr/http-client-implementation: ^1
- psr/http-factory: ^1.0.1
- psr/http-factory-implementation: ^1
- psr/http-message: ^1.0
- psr/http-message-implementation: ^1
Requires (Dev)
- drupol/php-conventions: ^5.0
- friends-of-phpspec/phpspec-code-coverage: ^6.1
- nyholm/psr7: ^1.4
- phpspec/phpspec: ^7.1
- symfony/http-client: ^5.3
This package is auto-updated.
Last update: 2024-12-16 12:19:39 UTC
README
WOPI Lib
A standard and framework agnostic PHP library to facilitate the implementation of the WOPI protocol.
Description
The Web Application Open Platform Interface (WOPI) protocol let you integrate Office for the web with your application. The WOPI protocol enables Office for the web to access and change files that are stored in your service.
Office for the web platforms:
Installation
composer require champs-libres/wopi-lib
Usage
There are many different ways to store documents in an application. Therefore, this library does not provide a specific implementation of the WOPI protocol described through the WOPI interface.
Thus, this library mostly provides abstractions and few service implementations.
It provides:
- A Wopi interface describing the WOPI protocol
- A Discovery interface and its implementation
- A DocumentManager interface describing a document manager
- A DocumentLockManager interface describing a document lock manager
- A ProofValidator interface its implementation
- A DotNetTimeConverter interface and its implementation
In order to be foster interoperability and be used across many different frameworks, this library uses PSR7, PSR17, PSR18 and PSR12 conventions from the PHP-FIG.
Symfony integration
There is already an implementation of the library in Symfony through the champs-libres/wopi-bundle package.
Documentation
Code quality, tests, benchmarks
Every time changes are introduced into the library, Github runs the tests.
The library has tests written with PHPSpec.
Feel free to check them out in the spec
directory. Run composer phpspec
to
trigger the tests.
Before each commit, some inspections are executed with GrumPHP; run
composer grumphp
to check manually.
The quality of the tests is tested with Infection a PHP Mutation testing
framework, run composer infection
to try it.
Static analyzers are also controlling the code. PHPStan and PSalm are enabled to their maximum level.
Contributing
Feel free to contribute to this project by submitting pull requests on Github.
Changelog
See CHANGELOG.md for a changelog based on git commits.
For more detailed changelogs, please check the release changelogs.