Download the PHP package okdewit/optimizely-php-sdk without Composer

On this page you can find all versions of the php package okdewit/optimizely-php-sdk. 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 optimizely-php-sdk

Note about this Fork

This is a forked repository, published separately from the mainstream Optimizely SDK on packagist. It is tagged as a new Major Release v4.0.0, and depends on Monolog v2.0.0 to resolve a conflict with Laravel 7 and 8 which can not use Monolog v1.0.0.

Optimizely PHP SDK

Build Status Coverage Status Total Downloads Apache 2.0

This repository houses the PHP SDK for use with Optimizely Full Stack and Optimizely Rollouts.

Optimizely Full Stack is A/B testing and feature flag management for product development teams. Experiment in any application. Make every feature on your roadmap an opportunity to learn. Learn more at https://www.optimizely.com/platform/full-stack/, or see the documentation.

Optimizely Rollouts is free feature flags for development teams. Easily roll out and roll back features in any application without code deploys. Mitigate risk for every feature on your roadmap. Learn more at https://www.optimizely.com/rollouts/, or see the documentation.

Getting Started

Installing the SDK

The Optimizely PHP SDK can be installed through Composer. Please use the following command:

Feature Management Access

To access the Feature Management configuration in the Optimizely dashboard, please contact your Optimizely account executive.

Using the SDK

Initialization

Create the Optimizely client, for example:

Or you may also use OptimizelyFactory method to create an optimizely client using your SDK key, an optional fallback datafile and an optional datafile access token. Using this method internally creates an HTTPProjectConfigManager. See HTTPProjectConfigManager for further detail.

To access your HTTPProjectConfigManager:

Or you can also provide an implementation of the ProjectConfigManagerInterface in the constructor:

ProjectConfigManagerInterface

ProjectConfigManagerInterface exposes getConfig method for retrieving ProjectConfig instance.

HTTPProjectConfigManager

HTTPProjectConfigManager is an implementation of ProjectConfigManagerInterface interface.

The fetch method makes a blocking HTTP GET request to the configured URL to download the project datafile and initialize an instance of the ProjectConfig.

Calling fetch will update the internal ProjectConfig instance that will be returned by getConfig.

Use HTTPProjectConfigManager
SDK key

Optimizely project SDK key; required unless source URL is overridden.

A notification will be triggered whenever a new datafile is fetched and ProjectConfig is updated. To subscribe to these notifications, use the $notificationCenter->addNotificationListener(NotificationType::OPTIMIZELY_CONFIG_UPDATE, $updateCallback).

Documentation

See the Optimizely Full Stack developer documentation to learn how to set up your first Full Stack project and use the SDK.

Development

Unit tests

Running all tests

You can run all unit tests with:

Contributing

Please see CONTRIBUTING.


All versions of optimizely-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
justinrainbow/json-schema Version ^1.6 || ^2.0 || ^4.0 || ^5.0
lastguest/murmurhash Version 1.3.0
guzzlehttp/guzzle Version ~6.2|~7.0
monolog/monolog Version ^1.21|^2.0.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 okdewit/optimizely-php-sdk contains the following files

Loading the files please wait ....