Download the PHP package teracrafts/flagkit without Composer
On this page you can find all versions of the php package teracrafts/flagkit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download teracrafts/flagkit
More information about teracrafts/flagkit
Files in teracrafts/flagkit
Download teracrafts/flagkit
More information about teracrafts/flagkit
Files in teracrafts/flagkit
Vendor teracrafts
Package flagkit
Short Description Official PHP SDK for FlagKit feature flag management
License MIT
Package flagkit
Short Description Official PHP SDK for FlagKit feature flag management
License MIT
Please rate this library. Is it a good library?
Informations about the package flagkit
FlagKit PHP SDK
Official PHP SDK for FlagKit feature flag service.
Requirements
- PHP 8.1 or later
- Composer
Installation
Features
- Type-safe evaluation - Boolean, string, number, and JSON flag types
- Local caching - Fast evaluations with configurable TTL and optional encryption
- Background polling - Automatic flag updates
- Event tracking - Analytics with batching and crash-resilient persistence
- Resilient - Circuit breaker, retry with exponential backoff, offline support
- Security - PII detection, request signing, bootstrap verification, timing attack protection
Quick Start
Configuration
Or using direct construction:
The SDK also supports security-related configuration options such as PII detection, request signing, cache encryption, bootstrap signature verification, evaluation jitter, and error sanitization. These can be enabled through their respective builder methods or constructor parameters.
Evaluation Context
Provide context for targeting rules:
Flag Evaluation
Basic Evaluation
Detailed Evaluation
User Identification
Analytics
Bootstrap Data
Initialize with local flag data for instant evaluation:
Error Handling
API Reference
FlagKit (Static Factory)
| Method | Description |
|---|---|
initialize($options) |
Initialize SDK with options |
initializeAndStart($options) |
Initialize and start SDK |
close() |
Close SDK and release resources |
identify($userId, $attributes) |
Set user context |
setContext($context) |
Set evaluation context |
clearContext() |
Clear evaluation context |
evaluate($flagKey, $context) |
Evaluate a flag |
getBooleanValue(...) |
Get boolean flag value |
getStringValue(...) |
Get string flag value |
getNumberValue(...) |
Get number flag value |
getIntValue(...) |
Get integer flag value |
getJsonValue(...) |
Get JSON flag value |
getAllFlags() |
Get all cached flags |
track($eventType, $data) |
Track custom event |
flush() |
Flush pending events |
FlagKitOptions
| Property | Default | Description |
|---|---|---|
apiKey |
(required) | API key for authentication |
pollingInterval |
30 | Polling interval (seconds) |
cacheTtl |
300 | Cache time-to-live (seconds) |
maxCacheSize |
1000 | Maximum cache entries |
cacheEnabled |
true | Enable caching |
eventBatchSize |
10 | Events per batch |
eventFlushInterval |
30 | Event flush interval (seconds) |
eventsEnabled |
true | Enable event tracking |
timeout |
10 | HTTP timeout (seconds) |
retryAttempts |
3 | Max retry attempts |
bootstrap |
null | Initial flag data |
Local Development
License
MIT License - see LICENSE file for details.
All versions of flagkit with dependencies
PHP Build Version
Package Version
The package teracrafts/flagkit contains the following files
Loading the files please wait ...