Download the PHP package convertim/variantretriever without Composer

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

VariantRetriever

VariantRetriever is a minimalist package for feature flagging. It's fast, database free and idempotent library to choose over a set of variants.

Getting Started

First of all, you need to define an Experiment with a name and it variants. Variant requires 2 arguments, a name and a rollout percentage (50% by default). Then create a variant retriever with this experiment and variants, and ask it to retrieve a variant for a resource (in the following code, it's for a user uuid).

Running the Test Suite

VariantRetriever uses Pest PHP as testing framework. Once you have all dependencies installed via composer install, you can run the test suite with:

To obtain the code coverage report, you'll need to have xdebug installed. Then, you can run:

And this will give you detailed information about code coverage.

What about speed

VariantRetriever is fast. In our test, we ensure that the retriever is able to get 50 000 variants to randomly generate different identifiables in less than 1 second. Local dev machine can run 500 000 runs in less than a second.

What about randomness

Rows Rollout Rollout Max Rollout difference
1k 50/50 46.5/46.5 3.5%
500k 50/50 49.87/49.87 0.13%
500k 10*10 9.88 0.12%
500k 10/10/80 9.88/9.88/79.92 0.12%

All versions of variantretriever with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
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 convertim/variantretriever contains the following files

Loading the files please wait ....