ylsideas/feature-flags
Composer 安装命令:
composer require ylsideas/feature-flags
包简介
A Laravel package for handling feature flags
关键字:
README 文档
README
A Feature flag is at times referred to as a feature toggle or feature switch. Ultimately it's a coding strategy to be used along with source control to make it easier to continuously integrate and deploy. The idea of the flags works by essentially safeguarding sections of code from executing if a feature flag isn't in a switched on state.
This package aims to make implementing such flags across your application a great deal easier by providing solutions that work with not only your code but your routes, blade files, task scheduling and validations.
The Feature flagging dashboard for Laravel
In late 2022 we decided to start work on a dashboard that will work on top of all the awesomeness that Feature flags for Laravel gives you. Right now you can join the waiting list.
How adding feature flags looks with this package
It's pretty simple, you can start of with just simple calls to check if a flag's state is on or off.
Features::accessible('my-feature') // returns true or false
One of the unique features of this package is that it integrates heavily into Laravel by allowing you to configure different things such as access to route, schedule tasks or modifying the query builder.
To get a full understanding, it's best to read the docs.
Upgrading
Version 3 and 2 are mostly the same. Some additonal type hinting was adding but not no major upgrade work should be required.
Version 2 and is somewhat different to version 1. If you are using Laravel 9 and PHP8 you should aim to use version 2. Version 1 is no longer supported. There is an upgrade guide for moving from version 1 to version 2.
Installation
You can install the package via composer:
composer require ylsideas/feature-flags:^3.0
Once installed you should publish the config with the following command.
php artisan vendor:publish --provider="YlsIdeas\FeatureFlags\FeatureFlagsServiceProvider" --tag=config
You can customise the features.php config in a number of ways.
Documentation
For the complete documentation, visit https://feature-flags.docs.ylsideas.co/.
Package Development
If you wish to develop new features for this package you may run the tests using the following command.
composer test
Make sure any code you work on is linted as well.
composer lint
and that the code doesn't introduce errors with PHPStan.
composer analyse
Please make sure you follow the Pull Request template for all proposed changes. Ignoring it will mean the PR will be ignored.
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email peter.fox@ylsideas.co instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
ylsideas/feature-flags 适用场景与选型建议
ylsideas/feature-flags 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.45M 次下载、GitHub Stars 达 621, 最近一次更新时间为 2019 年 07 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「feature-flags」 「ylsideas」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ylsideas/feature-flags 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ylsideas/feature-flags 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ylsideas/feature-flags 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Laravel package for adding unsubscribe links to notifications
This is my package cockroachdb-laravel
Pheature flags Doctrine DBAL toggle implementation library.
Pheature flags toggle CRUD library.
This is my package cockroachdb-laravel
This is my package cockroachdb-laravel
统计信息
- 总下载量: 1.45M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 622
- 点击次数: 28
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-07-14
