PHPackages                             orangeopensource/flarum-connection - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. orangeopensource/flarum-connection

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

orangeopensource/flarum-connection
==================================

Connection library for Flarum

0241PHP

Since Feb 12Pushed 7y ago3 watchersCompare

[ Source](https://github.com/samuel4x4/flarum-connection)[ Packagist](https://packagist.org/packages/orangeopensource/flarum-connection)[ RSS](/packages/orangeopensource-flarum-connection/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Flarum Connection Library
=========================

[](#flarum-connection-library)

Status
------

[](#status)

Refactoring required on config &amp; sso

Installation
------------

[](#installation)

Do the composer install in order to install all the libraries

Configuration
-------------

[](#configuration)

In order to work properly, the following tasks needs to be acheived :

- The portal and the forum needs to share the same root domain (for example : laborange.fr for the portal &amp; forums.laborange.fr for flarum)
- An access token must be created on Flarum in order to allow the library to access to the Flarum API, it should be added in the api\_keys table of Flarum
- Forum must be configured in https with a valid SSL certificate (not all the API will work in http only)
- An admin user should be created and it's id retrieved, it will be the user that will be used by the library to perform admin only task.

Once all these tasks are achieved the library could be initialized with a FlarumConnectorConfig object with the following parameters:

- Address of the forum instance
- Root domain to be used to set the cookie
- The access token defined in Flarum database
- The if of the admin user to use for admin request
- The number of days the session will be kept alive

```
$config = new \FlarumConnection\Models\FlarumConnectorConfig (
                'https://my_forum_adress.mydomain.com',
                'mydomain.com',
                'AnAccessToken',
                1,
                3000);
```

The library also requires a logger object that needs to be a PSR-2 logger.

```
$Connector = new FlarumConnector($config,$logger);
```

Configuration for test
======================

[](#configuration-for-test)

In order to use unit testing through phpunit, a configuration (in tests/Config directory) needs to be set with the following parameters :

- The login of the test admin user
- The password of the admin test user
- The id of a primary tag that could be used for posting (on a fresh flarum instance, you could use 1)
- The name of a primary tag that could be used for posting (on a fresh flarum instance, you could use general)
- Activate testing on SSL
- The root url of the flarum forum
- The root domain that include both portal &amp; forum
- The API Key
- The default admin user (on a fresh Flarum instance, you could use 1)
- The lifetime in days of the Flarum cookie

```
return [
    'testUser' => 'admin',
    'testPassword' => 'password',
    'testTagId' => 376,
    'testTagName' => 'TAG15b586f22a4472',
    'testonSSL' => false,
    'flarumUrl' => 'http://flarum.lab.net',
    'flarumRootDomain' => 'lab.net',
    'flarumApiKey' =>'NotSecureToken',
    'flarumDefaultUser' => 1,
    'flarumLifeTime' =>3000

];
```

Features
--------

[](#features)

### HTTP SSO

[](#http-sso)

- Login (and get a cookie)
- Logout (and remove cookie)
- Is connected
- [Documentation of HTTP SSO](/docs/httpsso.md)

### SSO

[](#sso)

- Login
- Creation of an account
- [Documentation of SSO](/docs/sso.md)

### Users

[](#users)

- Update the password of a user
- Update the email of the password
- Associate a user to a group
- Delete of a user
- Get a user by id
- Search for a user
- [Documentation of user](/docs/user.md)

### Tags

[](#tags)

- Create a tag
- Delete a tag
- Define specific rights for tag
- Get all the tags
- [Documentation of tags](/docs/tags.md)

### Groups

[](#groups)

- Create a group
- Update a group
- Delete a group
- [Documentation of groups](/docs/groups.md)

### Discussions

[](#discussions)

- Create a discussion
- Update a discussion
- Delete a discussion
- [Documentation of discussions](/docs/discussions.md)

### Posts

[](#posts)

- Create a post
- Update a post
- Delete a post
- [Documentation of posts](/docs/post.md)

Integration hooks
-----------------

[](#integration-hooks)

The integration hooks to be done are detailed there [Documentation of integration](/docs/integration.md)\]

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9eb39ec7050814cc24a6657a65e805b676abe8cfed7330f10f7c921093173215?d=identicon)[samuel4x4](/maintainers/samuel4x4)

---

Top Contributors

[![geodro](https://avatars.githubusercontent.com/u/289809?v=4)](https://github.com/geodro "geodro (14 commits)")[![rdarcel](https://avatars.githubusercontent.com/u/1849420?v=4)](https://github.com/rdarcel "rdarcel (13 commits)")[![samuel4x4](https://avatars.githubusercontent.com/u/3427855?v=4)](https://github.com/samuel4x4 "samuel4x4 (4 commits)")

### Embed Badge

![Health badge](/badges/orangeopensource-flarum-connection/health.svg)

```
[![Health](https://phpackages.com/badges/orangeopensource-flarum-connection/health.svg)](https://phpackages.com/packages/orangeopensource-flarum-connection)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
