Download the PHP package rasuvaeff/yii3-feature-flags-ui without Composer

On this page you can find all versions of the php package rasuvaeff/yii3-feature-flags-ui. 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 yii3-feature-flags-ui

rasuvaeff/yii3-feature-flags-ui

Latest Stable Version Total Downloads Build Static analysis Psalm level PHP

Admin UI panel for managing Yii3 feature flags.

Using an AI coding assistant? llms.txt contains a compact API reference you can share with the model.

A drop-in admin panel for rasuvaeff/yii3-feature-flags: list flags in a sortable grid (with kill switch and disabled badges), create and edit them (name, enabled, rollout, salt, kill switch, environments), delete them, and emit FlagChanged events for audit trail / cache invalidation. Read-only providers automatically get disabled controls.

Requirements

The list grid is rendered server-side from the application DI container (FlagsGridFactory), so the host does not need to bootstrap WidgetFactory.

Installation

Usage

The package ships Yii3 config-plugin wiring (di, params). Add your params to the merge chain:

layout controls the shared wrapper. views.list and views.edit override only the corresponding templates; they do not replace the layout.

Bind the flag contracts to your provider. With rasuvaeff/yii3-feature-flags-db ^1.0 this is automatic — its config-plugin binds WritableFlagProvider and FlagProvider to the same DbFlagProvider. For a custom backend, bind them yourself:

Routes

Method Path Action Default name
GET {prefix} Yii\List\Action flags/list
GET {prefix}/new Yii\Edit\Action::new() flags/create
GET {prefix}/{name}/edit Yii\Edit\Action flags/edit
POST {prefix}/new Yii\Update\Action::new() flags/store
POST {prefix}/{name} Yii\Update\Action flags/update
POST {prefix}/{name}/delete Yii\Delete\Action flags/delete

middlewares.{all,list,edit,create,store,update,delete} — add middlewares per slot without forking the routes. RequestBodyParser is added automatically to the POST routes (store, update, delete); set 'body_parser' => false in params to opt out.

URLs and redirects are generated through the router (UrlGeneratorInterface) by route name; links stay correct under any prefix or subdomain. Override route_names in params when your app uses a different naming convention.

Flat-route wiring

Wire the bundled config/routes.php explicitly in configuration.php:

The route prefix, names and middlewares are read from params (FlagRoutes::PARAM_KEY).

Group-based admin panel

Inside a Group (the typical approach for a shared-prefix admin area):

fromParams() reads prefix, names, middlewares and body-parser opt-out from $params[FlagRoutes::PARAM_KEY], so route registration and FlagUrls URL generation are always in sync.

For full control over names, use create() directly and add matching route_names to params:

Authorization

The package does not enforce access control internally. Protect routes via middlewares.all (or per-route keys). The package provides CurrentUser injection for audit events only.

Public API

Class Description
FlagRoutes Builds the 6 routes; fromParams($params) for group-based panels, create() for full control
Yii\List\Action GET grid of all flags, with KILLED/OFF badges
Yii\Edit\Action GET edit form for existing flag; ::new() for create form
Yii\Update\Action POST validate + save; ::new() for create; re-render on invalid
Yii\Delete\Action POST remove flag -> redirect to list
Form\FlagForm Submitted edit input (name, enabled, rollout, salt, killSwitch, environments)
Validation\FlagFormNormalizer Casts validated form to a Flag
Renderer\TemplateRendererInterface Rendering seam (testable actions)
Renderer\ViewTemplateRenderer Default renderer over WebViewRenderer
Event\FlagChanged PSR-14 event after save/delete (name, operation, actor)

Read-only providers

If your FlagProvider does not implement WritableFlagProvider:

This lets ConfigFlagProvider (config-only flags) be browsed in the UI without write support.

Security

Concern Behaviour
Read-only providers Update/Delete rejected with HTTP 403
Unknown flag name Edit returns 404, Update/Delete return 404
Invalid input Re-renders the edit page with HTTP 200, no write
Flag name injection On edit existing, the submitted name is ignored; the route name is pinned
Kill switch warning The edit form always renders the warning; users cannot disable the warning
CSRF Enforced by your application middleware; the form emits a hidden _csrf field when a csrf_token request attribute is present
Output All values pass through Yiisoft\Html\Html::encode() / Html widgets / GridView encoding

Customising views

Override views.list and/or views.edit in params with absolute paths to your own templates. The templates receive the same variables as the bundled ones — see resources/views/.

The edit form uses input names scoped under Flag[...] (e.g. Flag[name], Flag[enabled]). Custom edit templates must preserve this scope for FlagForm::fromParsedBody() to work.

Flash messages are not built in — the package does not know about the host app's session. Subscribe to FlagChanged in your app to add flash notifications, cache invalidation, or audit trail entries.

Why FlagChanged Exists

The package emits FlagChanged after save/delete so the host app can react without coupling itself to the UI actions. Typical uses are cache invalidation, audit logging, metrics counters, and dependent reconfiguration. The actor field carries the current user ID; null for guests.


All versions of yii3-feature-flags-ui with dependencies

PHP Build Version
Package Version
Requires php Version 8.3 - 8.5
ext-ctype Version *
ext-json Version *
psr/container Version ^2.0
psr/event-dispatcher Version ^1.0
psr/http-factory Version ^1.1
psr/http-message Version ^2.0
psr/http-server-handler Version ^1.0
rasuvaeff/yii3-feature-flags Version ^1.0
yiisoft/data Version ^2.0
yiisoft/form-model Version ^1.1
yiisoft/html Version ^3.13 || ^4.0
yiisoft/request-body-parser Version ^1.2
yiisoft/router Version ^3.1 || ^4.0
yiisoft/user Version ^2.0
yiisoft/validator Version ^2.5
yiisoft/yii-dataview Version ^1.1
yiisoft/yii-view-renderer Version ^7.4
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 rasuvaeff/yii3-feature-flags-ui contains the following files

Loading the files please wait ...