PHPackages                             andersundsehr/unleash - 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. andersundsehr/unleash

AbandonedArchivedTypo3-cms-extension[Utility &amp; Helpers](/categories/utility)

andersundsehr/unleash
=====================

TYPO3 extension to integrate the getunleash.io feature toggle service.

1.0.1(1y ago)18[1 PRs](https://github.com/andersundsehr/unleash/pulls)GPL-2.0-or-laterPHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0CI failing

Since Aug 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/andersundsehr/unleash)[ Packagist](https://packagist.org/packages/andersundsehr/unleash)[ RSS](/packages/andersundsehr-unleash/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (4)Used By (0)

EXT:unleash
===========

[](#extunleash)

TYPO3 extension to integrate the [Unleash](https://www.getunleash.io/) feature toggle service.

installation
------------

[](#installation)

`composer require andersundsehr/unleash`

Set configuration in the extension settings:

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

[](#configuration)

Required are the `appUrl` and in most cases `authorization` (if you use the hosted unleash service)

[![Settings Panel](Documentation/settings.png "Settings Panel")](Documentation/settings.png)

Usage
-----

[](#usage)

### TypoScript Condition

[](#typoscript-condition)

you can use the custom TypoScript condition `unleash` to check if a feature is enabled.

```
page.19 = TEXT
page.19.value = Feature 0 is disabled
[unleash('feature0', false)]
    page.19.value = Feature 0 is enabled
[end]

page.20 = TEXT
page.20.value = Feature 1 is disabled
[unleash('feature1')]
    page.20.value = Feature 1 is enabled
[end]

page.21 = TEXT
page.21.value = Feature 2 is disabled
[unleash('feature2', true)]
    page.21.value = Feature 2 is enabled
[end]
```

if you want to check A/B/n flags, you can use the `unleashVariant` condition.

```
page.22 = TEXT
[unleashVariant('feature3') === 'A']
    page.22.value = Feature 3 is set to A enabled
[end]
[unleashVariant('feature3') === 'B']
    page.22.value = Feature 3 is set to B enabled
[end]
[!unleashVariant('feature3')]
    page.22.value = Feature 3 is disabled
[end]
```

### Fluid ViewHelper

[](#fluid-viewhelper)

if you want to check if a feature is enabled in your Fluid templates, you can use the `unleash:isEnabled` ViewHelper.

```
{namespace unleash=Andersundsehr\Unleash\ViewHelpers}

        Feature is enabled

        Feature is disabled

{unleash:isEnabled(feature: 'my-feature', default: false, then: 'Feature is enabled', else: 'Feature is disabled')}
```

if you want to check A/B/n flags, you can use the `unleash:getVariant` ViewHelper.

```
{namespace unleash=Andersundsehr\Unleash\ViewHelpers}

    If is disabled

```

### PHP

[](#php)

you can inject the `Unleash` service into your classes and use it like this:

The configuration and Context will already be set up for you.

for more detailed usage information, please refer to the [Unleash PHP SDK Documentation](https://docs.getunleash.io/reference/sdks/php)

```
use Unleash\Client\Unleash;

class Controller
{
    public function __construct(private Unleash $unleash) {}

    public function index()
    {
        if ($this->unleash->isEnabled('my-feature')) {
            // do something
        }
    }
}
```

or you can use GeneralUtility to get the Unleash instance

```
use TYPO3\CMS\Core\Utility\GeneralUtility;
use Unleash\Client\Unleash;

GeneralUtility::makeInstance(Unleash::class)->isEnabled('my-feature');
```

CustomContext
-------------

[](#customcontext)

with this extension you have the possiblity to constrain the feature toggles to specific users, or admins, or logged in users.
backend and frontend:

- `backendUser.isLoggedIn`
- `backendUser.id`
- `backendUser.username`
- `backendUser.isAdmin`
- `frontendUser.isLoggedIn`
- `frontendUser.id`
- `frontendUser.username`
- `frontendUser.isAdmin`

Extending with Events
---------------------

[](#extending-with-events)

you can extend the functionality of the Extension by using the following events.

### UnleashBuilderBeforeBuildEvent

[](#unleashbuilderbeforebuildevent)

Event that is dispatched right before the UnleashBuilder is built (`->build()`).

```
use Andersundsehr\Unleash\Event\UnleashBuilderBeforeBuildEvent;

class UnleashBuilderBeforeBuildEventListener
{
    public function __invoke(UnleashBuilderBeforeBuildEvent $event)
    {
        $event->builder = $event->builder
            ->withAppName('my-custom-app-name');
    }
}
```

### UnleashCustomContextEvent

[](#unleashcustomcontextevent)

This event is dispatched when the Unleash context is created.
use this if you only want to overwrite or add customContext data
if you want to change anything else, use the `UnleashContextCreatedEvent`

```
use Andersundsehr\Unleash\Event\UnleashCustomContextEvent;

class UnleashCustomContextEventListener
{
    public function __invoke(UnleashCustomContextEvent $event)
    {
        $event->customContext['fair'] = 'value';
    }
}
```

### UnleashContextCreatedEvent

[](#unleashcontextcreatedevent)

Event that is dispatched right after the UnleashContext is created with all the default values.
Will be called multiple times, once per `->isEnabled` or `->getVariant` call.

```
use Andersundsehr\Unleash\Event\UnleashContextCreatedEvent;

class UnleashContextCreatedEventListener
{
    public function __invoke(UnleashContextCreatedEvent $event)
    {
        $event->context->setHostname('my-custom-hostname');
    }
}
```

with ♥️ from anders und sehr GmbH
=================================

[](#with-️-from-anders-und-sehr-gmbh)

> If something did not work 😮
> or you appreciate this Extension 🥰 let us know.

> We are hiring

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~85 days

Total

2

Last Release

565d ago

PHP version history (2 changes)1.0.0PHP ~8.2.0 || ~8.3.0

1.0.1PHP ~8.2.0 || ~8.3.0 || ~8.4.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/471387?v=4)[Matthias Vogel](/maintainers/Kanti)[@Kanti](https://github.com/Kanti)

![](https://www.gravatar.com/avatar/ce27306c234536251754f00414959671d4a775e9cf57cce2f5ea1dca158183d6?d=identicon)[andersundsehr](/maintainers/andersundsehr)

---

Top Contributors

[![Kanti](https://avatars.githubusercontent.com/u/471387?v=4)](https://github.com/Kanti "Kanti (4 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

### Embed Badge

![Health badge](/badges/andersundsehr-unleash/health.svg)

```
[![Health](https://phpackages.com/badges/andersundsehr-unleash/health.svg)](https://phpackages.com/packages/andersundsehr-unleash)
```

###  Alternatives

[eliashaeussler/typo3-form-consent

Extension for TYPO3 CMS that adds double opt-in functionality to EXT:form

1481.0k](/packages/eliashaeussler-typo3-form-consent)[b13/assetcollector

Add CSS and SVG files and strings as inline style tag/inline svg to the html code.

10118.4k](/packages/b13-assetcollector)[mfd/ai-filemetadata

Automatically generates FAL metadata for files by means of public LLMs

1142.1k](/packages/mfd-ai-filemetadata)[mautic/mautic-typo3

Add-on TYPO3 extension that enhances the "EXT:marketing\_automation" TYPO3 extension by connecting it to the Mautic Marketing Automation platform: Determine "Persona" from Mautic segments. Also provides additional services e.g. language synchronisation between Mautic and TYPO3.

236.3k](/packages/mautic-mautic-typo3)

PHPackages © 2026

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