Download the PHP package champs-libres/wopi-bundle without Composer

On this page you can find all versions of the php package champs-libres/wopi-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wopi-bundle

Latest Stable Version GitHub stars Total Downloads GitHub Workflow Status Scrutinizer code quality Type Coverage Code Coverage License

WOPI Bundle

A Symfony bundle to facilitate the implementation of the WOPI endpoints and protocol.

Description

The Web Application Open Platform Interface (WOPI) protocol let you integrate Office for the web with your application, but also other software like Collabora Online

This bundle targets the integration with Collabora Online, for now.

In the future, this bundle may achieve a validation for an usage with Office For The Web.

Integration of Collabora Online

Overview for WOPI protocol

Office for the web platforms:

Installation

Usage

This bundle provides the basic implementation of the protocol into Symfony. But there are many ways to:

Therefore, this bundle does not provide a specific implementation of the WOPI protocol described through a basic interface from the champs-libres/wopi-lib bundle.

So, this bundle provides:

Some vocabulary:

These are steps to integrate the wopi bundle in your application:

Start an editor / your wopi client for development

You will find a free collabora online with the CODE project: CODE.

:warning: the editor must have access to your app, with the same domain name as the browser will open your app.

If you use docker and docker-compose, you can achieve this by manipulating your /etc/hosts file:

With this config, you should be able to reach collabora using http://collabora:9980, and your app through http://app:8001. You must use the latter to access your app during debugging collabora features.

Configure this bundle

Create your document entity

Each document edited should be an entity which implements Document.

Create your document manager

Your manager will implements DocumentManagerInterface.

This DocumentManager will handle the document logic into your application. It provides methods for writing the document, and extract some information from it.

You can read an implementation here.

Create your logic for access token

access_token are created by your app, when it will open the editor page (spoiler: the editor page will be an iframe). The wopi host (your application) will receive this access token on every request made by the client. Each token should have a duration of 10 hours.

You can choose your own logic. But JWT can ease your life.

Some working configuration using LexikJWT

An easy way to authenticate your request is to use JWT (Json Web Token). This can be achieved easily with LexikJWTAuthenticationBundle.

Create a firewall and configure access control for url starting by /wopi:

Configure lexik:

See a working implementation: https://gitea.champs-libres.be/Chill-project/chill-skeleton-basic

Provide information about your user

Implements UserManagerInterface to provide information about your users.

This information should be extracted through access token.

Some working implementation

Provide information about the permissions / authorization

Implements AuthorizationManagerInterface to provide information about the permissions on the given Document.

Some working implementation

Bind all the services

This bundle will require the implementation to be name according to the interface.

Some example:

Create an editor page

The editor page will be the page which will load the editor, through an iframe.

Here is a controller:

Troubleshooting

Documentation

Code quality, tests, benchmarks

Every time changes are introduced into the library, Github runs the tests.

The library has tests written with PHPUNIT.

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.


All versions of wopi-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >= 8.3
ext-json Version *
ext-mbstring Version *
champs-libres/wopi-lib Version ^1 || ^2
loophp/psr-http-message-bridge-bundle Version ^1
symfony/expression-language Version ^6.4 || ^7.3
symfony/framework-bundle Version ^6.4 || ^7.3
symfony/http-client Version ^6.4 || ^7.3
symfony/security-core Version ^6.4 || ^7.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package champs-libres/wopi-bundle contains the following files

Loading the files please wait ...