Download the PHP package antfroger/progressive-bundle without Composer

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

Progressive Bundle

Symfony integration for the feature-flag library Progressive

Build Status Latest stable version

Installation

Install this bundle using Composer:

Configuration

1. Enable the Bundle

First, enable the bundle by adding it to the list of registered bundles in the config/bundles.php file of your project:

2. Configure the Bundle

Create the configuration file config/packages/af_progressive.yaml.

The only required key is config. The key needs the path of the yaml file where you will configure the features of your application.
The minimal configuration looks like this:

But, you can also define under the context key, variables that will be stored in the Contex object.

Then, you need to create the file that will contain your features.
It must contain at least the features key:

But quickly, you can start adding many more features:
(every time you change this file, you may need to clear the cache og your application: php bin/console cache:clear)

Look at Progressive documentation to know more about the features' configuration.

Usage

You can use Progressive in a controller using Symfony's autowiring:

Or in a template:

Rules

Built-in rules

Progressive comes with several built-in rules:

Symfony specific rules

This bundle provides Symfony specific rules:

env: []

env enables (or disables) the feature depending on the app environment.
The value is meant to be an array of environment' names.

roles: []

roles only enables (or disables) the feature for specific roles.
The value is meant to be an array of roles' names.

This example configuration enables the feature new-amazing-homepage only for admins and dev.

users: []

users is more fine-grained than roles because, it allows you to enable a feature at a user level.
The value is meant to be an array of usernames.

This example configuration enables the feature secret-feature only for the users antoine and ted.

Create your own rules

I'm sure that soon you will want to create your own rules to progressively enable features dependning on your application logic.
That's where custom rules come into play! (More information about custom rules on the Progressive doc)

To create your own rules and use them in your feature. yaml file, you only need to create a class extending Progressive\Rule\RuleInterface.
That's it!
Symfony autowiring takes care of the rest.

Let's say you want to display a chat in your contact page, but only in working hours (for instance between 9am and 7pm).

  1. First, create the rule:

  2. Now, you can use this new rule, in the feature. yaml file

  3. You now have a feature using this new rule.
    Let's use it in a controller or in a template:

Strategies

Thanks to strategies, you can combine the power of rules.
Let's say you want to enable your new feature one-click-payment:

This configuration will do the job:

Progressive comes with two built-in rules:
(but as they simply are nested rules, you can create your own strategies!)

Commands

progressive:features

The command progressive:features lists all the features configured in Progressive:

If you specify the name of the feature, its configuration will be displayed:

progressive:rules

The command progressive:rules lists the rules provided by Progressive:

Web toolbar & profiler

In order to have an quick and easy access to the available features of your application - and see which ones are enabled for you - Symfony's web toolbar includes a tab with your defined features.

Symfony's profiler also includes a tab listing all the features of the application and their respective configuration.


All versions of progressive-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3 || ^8.0
antfroger/progressive Version ^1.2
symfony/config Version ^5.4|^6.0
symfony/console Version ^5.4|^6.0
symfony/dependency-injection Version ^5.4|^6.0
symfony/http-kernel Version ^5.4|^6.0
symfony/security-core Version ^5.4|^6.0
symfony/var-dumper Version ^5.4|^6.0
symfony/yaml Version ^5.4|^6.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 antfroger/progressive-bundle contains the following files

Loading the files please wait ....