{"id":40079430,"url":"https://github.com/humweb/features","last_synced_at":"2026-01-19T09:04:55.135Z","repository":{"id":56987092,"uuid":"37969365","full_name":"humweb/features","owner":"humweb","description":"Feature Toggle/Flag component","archived":false,"fork":false,"pushed_at":"2015-07-17T02:57:49.000Z","size":212,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-01T11:02:29.438Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://humboldtweb.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/humweb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-24T07:28:52.000Z","updated_at":"2015-10-17T19:39:29.000Z","dependencies_parsed_at":"2022-08-21T13:20:23.279Z","dependency_job_id":null,"html_url":"https://github.com/humweb/features","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/humweb/features","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humweb%2Ffeatures","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humweb%2Ffeatures/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humweb%2Ffeatures/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humweb%2Ffeatures/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/humweb","download_url":"https://codeload.github.com/humweb/features/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humweb%2Ffeatures/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28565001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T08:53:44.001Z","status":"ssl_error","status_checked_at":"2026-01-19T08:52:40.245Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-19T09:04:52.496Z","updated_at":"2026-01-19T09:04:55.130Z","avatar_url":"https://github.com/humweb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# Features Toggle\n\n[![Build Status](https://img.shields.io/travis/humweb/features/master.svg?style=flat-square)](https://travis-ci.org/humweb/features)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/humweb/features/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/humweb/features/?branch=master)\n[![Code Coverage](https://scrutinizer-ci.com/g/humweb/features/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/humweb/features/?branch=master)\n[![SensioLabsInsight](https://insight.sensiolabs.com/projects/726e2642-6553-40e1-8b4f-71f8d905d7f9/mini.png)](https://insight.sensiolabs.com/projects/726e2642-6553-40e1-8b4f-71f8d905d7f9)\n[![Total Downloads](https://img.shields.io/packagist/dt/humweb/features.svg?style=flat-square)](https://packagist.org/packages/humweb/features)\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/humweb/features.svg?style=flat-square)](https://packagist.org/packages/humweb/features)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)\n\n\nFeature Toggle allows developers to toggle on/off features in the system using one or multiple Strategies.\n\n## Install\n\nVia Composer\n\n``` bash\n$ composer require humweb/features\n```\n\n## Usage\n\n#### DateTime Strategy\n\n``` php\n$features = new Features();\n\n$features-\u003ecreate('test.feature', 'Example feature description')\n    -\u003eadd('StrategyKeyString', 'DataTime', [\n        'date'     =\u003e '2015-11-10',\n        'operator' =\u003e '\u003e'\n    ])\n    -\u003esetThreshold(1);\n\nif ($features-\u003eisEnabled('test.feature')) {\n    // Do something special\n}\n```\n\n#### DateTimeRange Strategy\n\n``` php\n$features = new Features();\n\n$features-\u003ecreate('test.feature', 'Example feature description')\n    -\u003eadd('StrategyKeyString', 'DataTimeRange', [\n            'start'  =\u003e'2100-11-10',\n            'end'    =\u003e '2100-12-10',\n            'strict' =\u003e false\n    ])\n    -\u003esetThreshold(1);\n\nif ($features-\u003eisEnabled('test.feature')) {\n    // Do something special\n}\n\n```\n\n#### DaysOfWeek mixed with DateTimeRange Strategy\n\n``` php\n$features = new Features();\n\n$features-\u003ecreate('business.hours', 'Match days of week')\n     -\u003eadd('DaysOpen', 'DaysOfWeek', [\n         'days' =\u003e ['sat']\n     ])\n     -\u003eadd('StoreHours', 'DateTimeRange', [\n         'start'  =\u003e'9am',\n         'end'    =\u003e '11pm',\n         'strict' =\u003e true\n     ])\n     -\u003esetThreshold(2);\n    \nif ($features-\u003eisEnabled('business.hours')) {\n    // Do something special\n}\n\n```\n\n## Change log\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Testing\n\n``` bash\n$ composer test\n```\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security\n\nIf you discover any security related issues, please email ryun@humboldtweb.com instead of using the issue tracker.\n\n## Credits\n\n- [Ryan Shofner (Maintainer)](https://github.com/ryun)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumweb%2Ffeatures","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhumweb%2Ffeatures","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumweb%2Ffeatures/lists"}