Download the PHP package jonathanbird/feature-switch without Composer

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

Feature Switching (made easy) for Laravel

Need to wrap new features for dev and production? Use a directive in the view or alias in the controller

There's great libraries in Java and other languages, but I found a real lack of good libraries to do this in PHP, so I've created my own.

Installation

Add the following line to the require section of composer.json:

or composer require jonathanbird/feature-switch

Setup

  1. Add 'JonathanBird\FeatureSwitch\FeatureSwitchServiceProvider', to the service provider list in app/config/app.php.
  2. Run php artisan vendor:publish to publish the features config file to config/feature-switch/features.php

Usage

  1. In the view, you can use the directive (note @else also works for when a feature is not enabled)
  2. In your controller or anywhere, simply add use Feature; to the top of your file and use the alias which returns a boolean value
  3. To add features, add your feature name and boolean value to config/feature-switch/features.php

Why would I use this over git merging?

If you have multiple environments (e.g. three test environments, staging and production) and you want to have the code base in a state of continuous deployment, then you may wish to branch your feature, wrap it within feature switch, merge it in to master branch, and when it gets to staging or production and you realise there's a bug, you can simply switch the feature off without it causing an issue rather than having to remove code from a merge. This is also works well for launching a feature as it's a simple on/off switch - simply git ignore the features.php file to have a different one in each environment.

Issues

If you find an issue, please report it. If it's something you can fix, fork the project and use a pull request as it'll be much quicker.


All versions of feature-switch with dependencies

PHP Build Version
Package Version
No informations.
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 jonathanbird/feature-switch contains the following files

Loading the files please wait ....