定制 worksome/feature-flags 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

worksome/feature-flags

最新稳定版本:v5.0.0

Composer 安装命令:

composer require worksome/feature-flags

包简介

A package to manage feature flags in your application

README 文档

README

PHPStan Run Tests

A package to manage feature flags in your application. Currently supporting these providers:

Installation

You can install the package via composer:

composer require worksome/feature-flags

You can publish the config file with:

php artisan vendor:publish --tag="feature-flags-config"

See the config file for more information.

Creating Feature Flags

Feature flags should be registered using one or more enums containing your feature flags.

All feature flag enums must implement the Worksome\FeatureFlags\Contracts\FeatureFlagEnum contract.

For example, if you had a feature flag called flag-one, you could create an enum with the following:

namespace App\Enums;

enum FeatureFlag: string implements \Worksome\FeatureFlags\Contracts\FeatureFlagEnum
{
    case FlagOne = 'flag-one';
}

Usage in Blade

@feature(\App\Enums\FeatureFlag::FlagOne)
    This is content under a feature flag.
@endfeature

Changelog

Please see the Releases for more information on what has changed recently.

Testing

We pride ourselves on a thorough test suite and strict static analysis. You can run all of our checks via a composer script:

composer test

To make it incredibly easy to contribute, we also provide a docker-compose file that will spin up a container with all the necessary dependencies installed. Assuming you have docker installed, just run:

docker-compose run --rm composer install # Only needed the first time
docker-compose run --rm composer test # Run tests and static analysis 

Support for XDebug is baked into the Docker image, you just need to configure the XDEBUG_MODE environment variable:

docker-compose run --rm -e XDEBUG_MODE=debug php

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 488.45k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 12
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-12-10