{"id":20862383,"url":"https://github.com/sonsofphp/feature-toggle-bundle","last_synced_at":"2026-02-17T21:01:13.434Z","repository":{"id":263034673,"uuid":"847204381","full_name":"SonsOfPHP/feature-toggle-bundle","owner":"SonsOfPHP","description":"[read-only] Symfony Feature Toggle Bundle","archived":false,"fork":false,"pushed_at":"2025-08-22T03:12:38.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-23T14:35:17.992Z","etag":null,"topics":["feature-toggle","php","sons-of-php","sonsofphp","symfony","symfony-bundle"],"latest_commit_sha":null,"homepage":"https://docs.sonsofphp.com/components/feature-toggle","language":"PHP","has_issues":false,"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/SonsOfPHP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"JoshuaEstes","tidelift":"packagist/sonsofphp/sonsofphp","custom":"https://discord.gg/sdVxNhFqND"}},"created_at":"2024-08-25T06:33:09.000Z","updated_at":"2025-08-22T03:12:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"6c5c6aa8-44e2-47c8-8213-3f7db4400d66","html_url":"https://github.com/SonsOfPHP/feature-toggle-bundle","commit_stats":null,"previous_names":["sonsofphp/feature-toggle-bundle"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SonsOfPHP/feature-toggle-bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SonsOfPHP%2Ffeature-toggle-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SonsOfPHP%2Ffeature-toggle-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SonsOfPHP%2Ffeature-toggle-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SonsOfPHP%2Ffeature-toggle-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SonsOfPHP","download_url":"https://codeload.github.com/SonsOfPHP/feature-toggle-bundle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SonsOfPHP%2Ffeature-toggle-bundle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29558100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T20:52:40.164Z","status":"ssl_error","status_checked_at":"2026-02-17T20:48:10.325Z","response_time":100,"last_error":"SSL_read: 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":["feature-toggle","php","sons-of-php","sonsofphp","symfony","symfony-bundle"],"created_at":"2024-11-18T05:21:16.700Z","updated_at":"2026-02-17T21:01:13.428Z","avatar_url":"https://github.com/SonsOfPHP.png","language":"PHP","readme":"Sons of PHP - Feature Toggle Bundle\n===================================\n\n## Installation\n\nMake sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md) of the Composer documentation.\n\n### Applications that use Symfony Flex\n\nOpen a command console, enter your project directory and execute:\n\n```sh\ncomposer require sonsofphp/feature-toggle-bundle\n```\n\n### Applications that don't use Symfony Flex\n\n#### Step 1: Download the Bundle\n\nOpen a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:\n\n```sh\ncomposer require sonsofphp/feature-toggle-bundle\n```\n\n#### Step 2: Enable the Bundle\n\nThen, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:\n\n```php\n// config/bundles.php\n\nreturn [\n    // ...\n    SonsOfPHP\\Bundle\\FeatureToggleBundle\\SonsOfPHPFeatureToggleBundle::class =\u003e ['all' =\u003e true],\n];\n```\n\n## Configuration\n\n```yaml\n# config/packages/sons_of_php_feature_toggle.yaml\nsons_of_php_feature_toggle:\n  features:\n    # You can create as many features as you want\n    enabled_key:\n      # Features can be enabled, disabled, or use a custom toggle\n      toggle: enabled\n    disabled_key:\n      toggle: disabled\n    custom_toggle_key:\n      toggle: app.toggle.admin_users\n```\n\n## Debug Command\n\nYou can debug your features by running the `debug:features` command.\n\n```sh\nphp bin/console debug:features\n```\n\nThis will give you a list of features and the toggles they are using.\n\n## Twig Templates\n\nYou can check to see if the feature is enabled in twig templates by using the `is_feature_enabled` function.\n\n```twig\n{% raw %}\n{% if is_feature_enabled('enabled_key') %}\n    Feature \"enabled_key\" is enabled\n{% else %}\n    Feature \"enabled_key\" is disabled\n{% endif %}\n{% endraw %}\n```\n\n## Services\n\n```php\n\u003c?php\n\nuse SonsOfPHP\\Contract\\FeatureToggle\\FeatureToggleProviderInterface;\n\nclass ExampleService\n{\n    public function __construct(\n        private FeatureToggleProviderInterface $featureToggleProvider,\n    ) {}\n\n    public function doSomething()\n    {\n        if ($featureToggleProvider-\u003eget('enabled_key')-\u003eisEnabled()) {\n            // \"enabled_key\" is enabled\n        }\n    }\n}\n```\n\n## Learn More\n\n* [Documentation][docs]\n* [Contributing][contributing]\n* [Report Issues][issues] and [Submit Pull Requests][pull-requests] in the [Mother Repository][mother-repo]\n* Get Help \u0026 Support using [Discussions][discussions]\n\n[discussions]: https://github.com/orgs/SonsOfPHP/discussions\n[mother-repo]: https://github.com/SonsOfPHP/sonsofphp\n[contributing]: https://docs.sonsofphp.com/contributing/\n[docs]: https://docs.sonsofphp.com/\n[issues]: https://github.com/SonsOfPHP/sonsofphp/issues?q=is%3Aopen+is%3Aissue+label%3AFeatureToggle\n[pull-requests]: https://github.com/SonsOfPHP/sonsofphp/pulls?q=is%3Aopen+is%3Apr+label%3AFeatureToggle\n","funding_links":["https://github.com/sponsors/JoshuaEstes","https://tidelift.com/funding/github/packagist/sonsofphp/sonsofphp","https://discord.gg/sdVxNhFqND"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonsofphp%2Ffeature-toggle-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonsofphp%2Ffeature-toggle-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonsofphp%2Ffeature-toggle-bundle/lists"}