PHPackages                             useflagly/sdk-php - 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. useflagly/sdk-php

ActiveLibrary

useflagly/sdk-php
=================

PHP SDK for the Flagly feature-flag API

00PHP

Since Apr 8Pushed 2w agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

useflagly/sdk-php — Flagly SDK para PHP
=======================================

[](#useflaglysdk-php--flagly-sdk-para-php)

SDK PHP para a API de feature flags da Flagly.

Instalação
----------

[](#instalação)

```
composer require useflagly/sdk-php
```

Uso
---

[](#uso)

```
use UseFlagly\UseFlaglyClient;
use UseFlagly\Models;

$client = new UseFlaglyClient(token: 'seu-api-token');
// A URL padrão é https://api.useflagly.com.br — pode ser sobrescrita no primeiro parâmetro

// Validar flag
$result = $client->validateFlag('minha-flag', new Models\ValidateBody(identifier: '00000000000'), 'PRD');

// Ler cache de flag
$cache = $client->getFlagCache('minha-flag', '00000000000');

// Validar flow
$result = $client->validateFlow('meu-flow', new Models\ValidateBody(identifier: '00000000000'), 'PRD');

// Validar flow-part
$result = $client->validateFlowPart('meu-flow-part', new Models\ValidateBody(identifier: '00000000000'), 'PRD');

// Validar scenario
$result = $client->validateScenario('meu-scenario', new Models\ValidateBody(identifier: '00000000000'), 'PRD');

// Inicializar (producer)
$client->initialize(new Models\ReceiveMessage(identifier: '...', slug: '...', companyId: 1), 'PRD');

// Buscar resultado
$result = $client->getResult('00000000000');
```

Métodos
-------

[](#métodos)

MétodoDescrição`healthCheck()`Verifica saúde da API`validateFlag(slug, body, environment?)`Valida uma feature flag`getFlagCache(slug, identifier?)`Lê o cache de uma flag`validateFlow(slug, body, environment?)`Valida um flow`getFlowCache(slug, identifier?)`Lê o cache de um flow`validateFlowPart(slug, body, environment?)`Valida um flow-part`getFlowPartCache(slug, identifier?)`Lê o cache de um flow-part`validateScenario(slug, body, environment?)`Valida um scenario`getScenarioCache(slug, identifier?)`Lê o cache de um scenario`initialize(payload, environment?)`Inicializa flags (producer)`getResult(identifier)`Busca resultado por identifier

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance63

Regular maintenance activity

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 66.7% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/24b043dd2e5201992dd9697eceba70d2c2bced296f6daea4bd9b3e88c3722feb?d=identicon)[thiagoozeias](/maintainers/thiagoozeias)

---

Top Contributors

[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (4 commits)")[![thiagoozeias](https://avatars.githubusercontent.com/u/13159385?v=4)](https://github.com/thiagoozeias "thiagoozeias (2 commits)")

### Embed Badge

![Health badge](/badges/useflagly-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/useflagly-sdk-php/health.svg)](https://phpackages.com/packages/useflagly-sdk-php)
```

PHPackages © 2026

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