Download the PHP package zenmanage/zenmanage-php without Composer

On this page you can find all versions of the php package zenmanage/zenmanage-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package zenmanage-php

Zenmanage PHP SDK

Build Status Codacy Badge

Add feature flags to your PHP application in minutes. Control feature rollouts, A/B test, and manage configurations without deploying code.

Why Zenmanage?

Installation

Upgrading

See UPGRADING.md for details on breaking changes and migration steps.

Requirements: PHP 8.0+

Key Compatibility

Get Started in 60 Seconds

  1. Get your server key (srv_...) from zenmanage.com
  2. Initialize the SDK:

  3. Check a feature flag:

That's it! ๐ŸŽ‰

Common Use Cases

Roll Out a New Feature Gradually

Note: Call withContext() on the flag manager to ensure context is sent to the API when loading rules.

A/B Testing

Percentage Rollouts

Gradually roll out features to a percentage of your users. The SDK handles bucketing automatically using a deterministic CRC32B hash โ€” no manual bucket logic needed.

How it works:

Note: A context identifier is required for bucketing. Without one, the user always receives the fallback value.

Feature Toggles by Organization

Configuration Values

Kill Switch for Problem Features

Setup for Your Application

Laravel Integration

[!TIP] There is an official Laravel integration on GitHub: zenmanage/zenmanage-laravel. Use it to plug Zenmanage directly into your Laravel app with minimal setup.

Create a service provider to make Zenmanage available throughout your app:

Then use dependency injection anywhere:

Symfony Integration

Standalone PHP Application

Working with Contexts

Contexts let you target flags to specific users, organizations, or any custom attributes. This is how you do gradual rollouts, A/B tests, and targeted features.

Simple Context (One Attribute)

Rich Context (Multiple Attributes)

What you get:

When to use contexts:

How Rule Evaluation Works

The SDK supports three types of rule selectors for targeting:

1. Segment Selector

Matches against a list of specific context identifiers:

If a rule value omits type (or sets it to null), only the identifier is compared.

2. Context Selector

Same as segment - matches against context type and identifier:

If a rule value omits type (or sets it to null), only the identifier is compared.

3. Attribute Selector

Matches against additional context attributes (plan, country, role, etc.):

Supported operators for all selectors:

Safe Defaults - Never Break Your App

Always provide defaults for critical features. The SDK will use them if:

Inline Defaults (Recommended)

Default Collections (For Multiple Flags)

Priority Order

When retrieving a flag, the SDK checks in this order:

  1. API Value - If flag exists in Zenmanage
  2. Inline Default - Value passed to single('flag', default)
  3. Collection Default - From DefaultsCollection
  4. Exception - If none of the above

Performance - Caching Rules

The SDK caches flag rules to minimize API calls. Rules are fetched once, then served from cache.

Default Setup (In-Memory)

Out of the box, flags are cached in memory for the request duration. Zero configuration needed:

Good for: Most web applications, simple scripts

File System Cache (Persist Between Requests)

Cache rules to disk for faster performance across multiple requests:

Good for: High-traffic sites, long-running processes, CLI applications

When to use:

Cache Duration

Control how long rules are cached:

Recommendation: Start with 5-10 minutes in production. Increase once flags are stable.

Disable Cache (Testing Only)

Manually Refresh Rules

Force a fresh fetch from the API:

Logging & Debugging

Get visibility into what the SDK is doing by providing a PSR-3 logger:

What gets logged:

Example with Monolog:

Error Handling in Production

The SDK is designed for graceful degradation. Your app should never break because of feature flags.

Always Use Defaults for Critical Features

Handle API Failures

If the API is unreachable, the SDK will:

  1. Use cached rules (if available)
  2. Fall back to default values (if provided)
  3. Throw exception (if no defaults)

Recommended pattern:

Retry Logic

The SDK automatically retries failed API calls (3 attempts with exponential backoff). You don't need to handle this.

Testing Your Feature Flags

Test your feature-flagged code without hitting the Zenmanage API.

Use Defaults in Tests

Mock the Flag Manager

Test Different Flag States

Requirements

Installation

Development

Run tests:

Run static analysis:

License

MIT

Support


All versions of zenmanage-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
guzzlehttp/guzzle Version ^7.0
psr/log Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zenmanage/zenmanage-php contains the following files

Loading the files please wait ...