PHPackages                             medigo/laika - 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. [Caching](/categories/caching)
4. /
5. medigo/laika

ActiveLibrary[Caching](/categories/caching)

medigo/laika
============

2.1.0(8y ago)22.7k2[1 issues](https://github.com/MEDIGO/laika-php/issues)MITPHP

Since May 30Pushed 8y ago13 watchersCompare

[ Source](https://github.com/MEDIGO/laika-php)[ Packagist](https://packagist.org/packages/medigo/laika)[ Docs](https://github.com/MEDIGO/laika-php)[ RSS](/packages/medigo-laika/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

laika-php
=========

[](#laika-php)

laika-php is a PHP library that connects applications with the Laika feature flag service (). It is used for applications to know which flags are activated in the current environment and adapt to it.

Setup
-----

[](#setup)

Add

```
"medigo/laika": "dev-master"

```

to composer.json and run

```
php composer.phar update

```

How to use
----------

[](#how-to-use)

When using Laika you need to configure in your environment:

- environment name - environment in which the code is being executed (e.g. "test" or "dev").
- url - url for the API server.
- username (optional) - username for the basic authentication.
- password (optional) - password for the basic authentication.

Initialize the library and get all the features from the database

```
public function __construct($environment, $host, $username, $password)
{
    $this->client = new Laika($environment, $host, $username, $password);
    $this->client->fetchAllFeatures();
    return $this->client;
}

```

Use the `isEnabled()` function to know whether the flag is activated or not in the current environment.

```
$myVar = 'the flag is disabled';
if ($laika->isEnabled('FLAG_NAME')) {
  $myVar = 'the flag is enabled';
}

```

Test the library
----------------

[](#test-the-library)

Run

```
phpunit tests/LaikaTest.php

```

Copyright and license
---------------------

[](#copyright-and-license)

Copyright © 2017 MEDIGO GmbH.

Laika is licensed under the MIT License. See [LICENSE](LICENSE) for the full license text.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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 ~233 days

Total

2

Last Release

3085d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4000156?v=4)[Miguel Bernardes](/maintainers/mbernardes)[@mbernardes](https://github.com/mbernardes)

---

Top Contributors

[![mbernardes](https://avatars.githubusercontent.com/u/4000156?v=4)](https://github.com/mbernardes "mbernardes (16 commits)")[![dbrabera](https://avatars.githubusercontent.com/u/1458018?v=4)](https://github.com/dbrabera "dbrabera (3 commits)")[![005f](https://avatars.githubusercontent.com/u/8728205?v=4)](https://github.com/005f "005f (1 commits)")

### Embed Badge

![Health badge](/badges/medigo-laika/health.svg)

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

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[svix/svix

Svix PHP Library

3.3k877.5k7](/packages/svix-svix)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k34](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[eliashaeussler/cache-warmup

Composer package to warm up website caches, based on a given XML sitemap

75419.2k9](/packages/eliashaeussler-cache-warmup)

PHPackages © 2026

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