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. [API Development](/categories/api)
4. /
5. useflagly/sdk-php

ActiveLibrary[API Development](/categories/api)

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

PHP SDK for the UseFlagly feature-flag API

02PHP

Since May 22Pushed 1mo 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 3w 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 13% of packages

Maintenance61

Regular maintenance activity

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 57.1% 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://avatars.githubusercontent.com/u/13159385?v=4)[Thiago Machado](/maintainers/thiagoozeias)[@thiagoozeias](https://github.com/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 (3 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)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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