{"id":18463946,"url":"https://github.com/unleash/unleash-client-symfony","last_synced_at":"2025-09-22T03:24:52.848Z","repository":{"id":38008521,"uuid":"383886260","full_name":"Unleash/unleash-client-symfony","owner":"Unleash","description":"Symfony bundle implementing the Unleash server protocol","archived":false,"fork":false,"pushed_at":"2024-06-06T10:06:44.000Z","size":182,"stargazers_count":33,"open_issues_count":2,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-12-18T10:04:24.282Z","etag":null,"topics":["feature-flags","gitlab","php","symfony","symfony-bundle","unleash"],"latest_commit_sha":null,"homepage":"","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/Unleash.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}},"created_at":"2021-07-07T18:08:08.000Z","updated_at":"2024-09-17T12:38:54.000Z","dependencies_parsed_at":"2023-11-28T12:31:06.111Z","dependency_job_id":"c54b825b-19c8-4e8c-9cfb-693154d37c91","html_url":"https://github.com/Unleash/unleash-client-symfony","commit_stats":{"total_commits":48,"total_committers":5,"mean_commits":9.6,"dds":0.125,"last_synced_commit":"49ff1c653982e3e9474cc582b4fd14b921449525"},"previous_names":[],"tags_count":85,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Unleash%2Funleash-client-symfony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Unleash%2Funleash-client-symfony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Unleash%2Funleash-client-symfony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Unleash%2Funleash-client-symfony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Unleash","download_url":"https://codeload.github.com/Unleash/unleash-client-symfony/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230423563,"owners_count":18223435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-flags","gitlab","php","symfony","symfony-bundle","unleash"],"created_at":"2024-11-06T09:08:26.136Z","updated_at":"2025-09-22T03:24:47.785Z","avatar_url":"https://github.com/Unleash.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Download](https://img.shields.io/packagist/dt/unleash/symfony-client-bundle.svg)](https://packagist.org/packages/unleash/symfony-client-bundle)\r\n\r\nA Symfony bundle for PHP implementation of the [Unleash protocol](https://www.getunleash.io/)\r\naka [Feature Flags](https://docs.gitlab.com/ee/operations/feature_flags.html) in GitLab.\r\n\r\nView the standalone PHP version at [Packagist](https://packagist.org/packages/unleash/client)\r\nor [GitHub](https://github.com/Unleash/unleash-client-php).\r\n\r\n\u003e Unleash allows you to gradually release your app's feature before doing a full release based on multiple strategies \r\n\u003e like releasing to only specific users or releasing to a percentage of your user base. \r\n\u003e Read more in the above linked documentations.\r\n\r\nRequires php 7.3 or newer.\r\n\r\n\u003e For generic description of the methods read the [standalone package](https://github.com/Unleash/unleash-client-php)\r\n\u003e documentation, this README will focus on Symfony specific things\r\n\r\n## Installation\r\n\r\n`composer require unleash/symfony-client-bundle`\r\n\r\n\u003e If you use [flex](https://packagist.org/packages/symfony/flex) the bundle should be enabled automatically, otherwise\r\n\u003e add `Unleash\\Client\\Bundle\\UnleashSymfonyClientBundle` to your `config/bundles.php`\r\n\r\n## Basic usage\r\n\r\nFirst configure the basic parameters, either using a DSN or as separate parameters:\r\n\r\n```yaml\r\nunleash_client:\r\n  dsn: http://localhost:4242/api?instance_id=myCoolApp-Server1\u0026app_name=myCoolApp\r\n```\r\n\r\nor\r\n\r\n```yaml\r\nunleash_client:\r\n  app_url: http://localhost:4242/api\r\n  instance_id: myCoolApp-Server1\r\n  app_name: myCoolApp\r\n```\r\n\r\n\u003e Tip: Generate the default config by running\r\n\u003e `php bin/console config:dump unleash_client \u003e config/packages/unleash_client.yaml`\r\n\u003e which will create the default config file which you can then tweak\r\n\r\n```php\r\n\u003c?php\r\n\r\nuse Unleash\\Client\\Unleash;\r\n\r\nclass MyService\r\n{\r\n    public function __construct(Unleash $unleash)\r\n    {\r\n        if ($unleash-\u003eisEnabled('someFeatureName')) {\r\n            // todo\r\n        }\r\n    }\r\n}\r\n```\r\n\r\n## Controller attribute\r\n\r\nYou can also check for feature flag using `#[IsEnabled]` and `#[IsNotEnabled]` attributes on a controller. You can use\r\nit on the whole controller class as well as on a concrete method.\r\n\r\n```php\r\n\u003c?php\r\n\r\nuse Unleash\\Client\\Bundle\\Attribute\\IsEnabled;\r\nuse Symfony\\Component\\HttpFoundation\\Response;\r\nuse Symfony\\Component\\Routing\\Annotation\\Route;\r\n\r\n#[IsEnabled('my_awesome_feature')]\r\nfinal class MyController\r\n{\r\n    #[IsEnabled('another_awesome_feature', Response::HTTP_BAD_REQUEST)]\r\n    #[Route('/my-route')]\r\n    public function myRoute(): Response\r\n    {\r\n        // todo\r\n    }\r\n    \r\n    #[Route('/other-route')]\r\n    public function otherRoute(): Response\r\n    {\r\n        // todo\r\n    }\r\n}\r\n```\r\n\r\nIn the example above the user on `/my-route` needs both `my_awesome_feature` and `another_awesome_feature` enabled\r\n(because of one attribute on the class and another attribute on the method) while the `/other-route` needs only\r\n`my_awesome_feature` enabled (because of class attribute).\r\n\r\n```php\r\n\u003c?php\r\n\r\nuse Unleash\\Client\\Bundle\\Attribute\\IsNotEnabled;\r\nuse Symfony\\Component\\HttpFoundation\\Response;\r\nuse Symfony\\Component\\Routing\\Annotation\\Route;\r\n\r\n#[IsNotEnabled('kill_switch')]\r\nfinal class MyHeavyController\r\n{\r\n    #[Route('/my-route')]\r\n    public function myRoute(): Response\r\n    {\r\n        // todo\r\n    }\r\n}\r\n```\r\n\r\nIn the second example, `/my-route` route is only enabled if `kill_switch` is **not** enabled.\r\n\r\nYou can also notice that one of the attributes specifies a second optional parameter with status code. The supported\r\nstatus codes are:\r\n- `404` - `NotFoundHttpException`\r\n- `403` - `AccessDeniedHttpException`\r\n- `400` - `BadRequestHttpException`\r\n- `401` - `UnauthorizedHttpException` with message \"Unauthorized\".\r\n- `503` - `ServiceUnavailableHttpException`\r\n\r\nThe default status code is `404`. If you use an unsupported status code `InvalidValueException` will be thrown.\r\n\r\n### Setting custom exception for attribute\r\n\r\nIf you want custom exception for situations when user is denied access based on the attribute, you can listen to an event:\r\n\r\n```php\r\n\u003c?php\r\n\r\nuse Symfony\\Component\\EventDispatcher\\EventSubscriberInterface;\r\nuse Unleash\\Client\\Bundle\\Event\\UnleashEvents;\r\nuse Unleash\\Client\\Bundle\\Event\\BeforeExceptionThrownForAttributeEvent;\r\nuse Symfony\\Component\\HttpFoundation\\Response;\r\n\r\nfinal class MySubscriber implements EventSubscriberInterface\r\n{\r\n    public static function getSubscribedEvents(): array\r\n    {\r\n        return [\r\n            UnleashEvents::BEFORE_EXCEPTION_THROWN_FOR_ATTRIBUTE =\u003e 'handleException',\r\n        ];\r\n    }\r\n    \r\n    public function handleException(BeforeExceptionThrownForAttributeEvent $event): void\r\n    {\r\n        $statusCode = $event-\u003egetErrorCode();\r\n        switch ($statusCode) {\r\n            case Response::HTTP_NOT_FOUND:\r\n                $exception = new CustomException('Custom message');\r\n                break;\r\n            default:\r\n                $exception = null;\r\n        }\r\n        \r\n        // the exception can be a Throwable or null, null means that this bundle reverts \r\n        // to its own default exceptions\r\n        $event-\u003esetException($exception);\r\n    }\r\n}\r\n\r\n```\r\n\r\n## Context\r\n\r\nThe context object supplies additional parameters to Unleash and supports Symfony features out of the box.\r\nThis context is also being injected to the `Unleash` service instead of the generic one.\r\n\r\n```php\r\n\u003c?php\r\n\r\nuse Unleash\\Client\\Configuration\\Context;\r\nuse Unleash\\Client\\Enum\\ContextField;\r\n\r\nclass MyService\r\n{\r\n    public function __construct(Context $context)\r\n    {\r\n        $context-\u003egetCurrentUserId();\r\n        $context-\u003egetSessionId();\r\n        $context-\u003egetIpAddress();\r\n        $context-\u003ehasCustomProperty('someProperty');\r\n        $context-\u003egetCustomProperty('someProperty');\r\n        $context-\u003ehasMatchingFieldValue('someProperty', ['someValue1', 'someValue2']);\r\n        $context-\u003efindContextValue(ContextField::USER_ID);\r\n    }\r\n}\r\n```\r\n\r\nThe current user id is assigned automatically if the `Symfony Security` component is installed. You can configure which\r\nfield to use for the user id, by default it uses either the \r\n`Symfony\\Component\\Security\\Core\\User\\UserInterface::getUserIdentifier()` \r\nor `Symfony\\Component\\Security\\Core\\User\\UserInterface::getUsername()`.\r\n\r\n```yaml\r\nunleash_client:\r\n  context:\r\n    user_id_field: id \r\n```\r\n\r\nWith this configuration this bundle will use the `id` property to assign user id. The property doesn't have to be public.\r\n\r\nThe bundle also automatically integrates with Symfony's request stack getting the IP address and session id from it,\r\nwhich may be particularly useful if you're behind proxy and have it in your trusted proxies list.\r\n\r\nThe context environment defaults to the value of `kernel.environment` parameter.\r\n\r\n### Custom Properties\r\n\r\nYou can also define your own properties that will be present in the context. If you use the `Symfony Expression Language`\r\nyou can also use expressions in them. If the value is an expression it must start with the `\u003e` character. If you want\r\nyour value to start with `\u003e` and not be an expression, escape it using `\\`. All expressions have access to `user`\r\nvariable which is either the user object or null.\r\n\r\n```yaml\r\nunleash_client:\r\n  context:\r\n    custom_properties:\r\n      myCustomProperty: someValue # just a good old string\r\n      myOtherProperty: '\u003e 1+1' # starts with \u003e, it will be turned into expression, meaning the value will be 2\r\n      myEscapedProperty: '\\\u003e someValue' # will be turned into '\u003e someValue'\r\n      someUserField: '\u003e user.getCustomField()' # will be the result of the getCustomField() method call\r\n      safeUserField: '\u003e user ? user.getCustomField() : null'\r\n```\r\n\r\nIf you don't want to embed your logic in config, you can also listen to an event:\r\n\r\n```php\r\n\u003c?php\r\n\r\nuse Unleash\\Client\\Bundle\\Event\\UnleashEvents;\r\nuse Symfony\\Component\\EventDispatcher\\EventSubscriberInterface;\r\nuse Unleash\\Client\\Bundle\\Event\\ContextValueNotFoundEvent;\r\n\r\nclass MyListener implements EventSubscriberInterface\r\n{\r\n    public static function getSubscribedEvents(): array\r\n    {\r\n        return [\r\n            UnleashEvents::CONTEXT_VALUE_NOT_FOUND =\u003e 'handleNotFoundContextValue',\r\n        ];\r\n    }\r\n    \r\n    public function handleNotFoundContextValue(ContextValueNotFoundEvent $event)\r\n    {\r\n        switch ($event-\u003egetContextName()) {\r\n            case 'myProperty':\r\n                $value = '...'; // dynamically create the value\r\n                $event-\u003esetValue($value);\r\n                break;\r\n        }\r\n    }\r\n}\r\n```\r\n\r\n## Events\r\n\r\nThere are two kinds of events, events from the base Unleash php sdk and from this Symfony bundle.\r\n\r\n### Base SDK events\r\n\r\n- `\\Unleash\\Client\\Event\\UnleashEvents::FEATURE_TOGGLE_NOT_FOUND`\r\n- `\\Unleash\\Client\\Event\\UnleashEvents::FEATURE_TOGGLE_DISABLED`\r\n- `\\Unleash\\Client\\Event\\UnleashEvents::FEATURE_TOGGLE_MISSING_STRATEGY_HANDLER`\r\n\r\n\u003e For more information read the [documentation](https://github.com/Unleash/unleash-client-php/blob/main/doc/events.md) \r\n\u003e in the base SDK.\r\n\r\n### Symfony bundle events\r\n\r\n- `\\Unleash\\Client\\Bundle\\Event\\UnleashEvents::CONTEXT_VALUE_NOT_FOUND`\r\n- `\\Unleash\\Client\\Bundle\\Event\\UnleashEvents::BEFORE_EXCEPTION_THROWN_FOR_ATTRIBUTE`\r\n\r\n\u003e The events are documented in relevant parts of this README.\r\n\r\n## Twig\r\n\r\nIf you use twig you can make use of functions, filters, test and a custom tag. The names are generic, that's why you can\r\ndisable any of them in case they would clash with your own functions/filters/tests/tags.\r\n\r\nThe default is that everything is enabled if twig is installed.\r\n\r\n```yaml\r\nunleash_client:\r\n  twig:\r\n    functions: true\r\n    filters: true\r\n    tests: true\r\n    tags: true\r\n```\r\n\r\n### Twig functions\r\n\r\nThere are two functions: `feature_is_enabled()` and `feature_variant()`.\r\n\r\nThe first returns a boolean and the second one returns an instance of `Unleash\\Client\\DTO\\Variant`.\r\n\r\n```twig\r\n{% if feature_is_enabled('featureName') %}\r\n    {% set variant = feature_variant('featureName') %}\r\n    {% if variant.enabled %}\r\n        {{ variant.name }}\r\n    {% endif %}\r\n{% endif %}\r\n```\r\n\r\n### Twig filter\r\n\r\nInstead of function you can use a filter with the same name.\r\n\r\n```twig\r\n{% if 'featureName'|feature_is_enabled %}\r\n    {% set variant = 'featureName' | feature_variant %}\r\n    {# Do something #}\r\n{% endif %}\r\n```\r\n\r\n### Twig test\r\n\r\nYou can also use a test with the name `enabled`.\r\n\r\n```twig\r\n{% if 'featureName' is enabled %}\r\n    {# Do something #}\r\n{% endif %}\r\n```\r\n\r\n### Twig tag\r\n\r\n\u003e This tag is experimental and may be removed in future version\r\n\r\nYou can use a custom `feature` tag. Anything in the body will get processed only if the feature is enabled. You also\r\nhave access to implicit `variant` variable.\r\n\r\n```twig\r\n{% feature 'featureName' %}\r\n    {{ variant.name }} {# Implicit variant variable that only exists in the scope of feature block #}\r\n{% endfeature %}\r\n```\r\n\r\n## Custom strategies\r\n\r\nDefining custom strategies is very easy because they get automatically injected, you just need to create a class\r\nimplementing `Unleash\\Client\\Strategy\\StrategyHandler` (or extending `Unleash\\Client\\Strategy\\AbstractStrategyHandler`).\r\n\r\n```php\r\n\u003c?php\r\n\r\nuse Unleash\\Client\\Strategy\\AbstractStrategyHandler;\r\nuse Unleash\\Client\\DTO\\Strategy;\r\nuse Unleash\\Client\\Configuration\\Context;\r\n\r\nclass MyCustomStrategy extends AbstractStrategyHandler\r\n{\r\n    public function getStrategyName() : string\r\n    {\r\n        return 'my_custom_strategy';\r\n    }\r\n\r\n    public function isEnabled(Strategy $strategy, Context $context) : bool\r\n    {\r\n        $someCustomProperty = $this-\u003efindParameter('customProperty', $strategy);\r\n        if ($someCustomProperty === false) {\r\n            return false;\r\n        }\r\n        \r\n        // assume it's a list\r\n        $someCustomProperty = array_map('trim', explode(',', $someCustomProperty));\r\n        \r\n        $enabled = $context-\u003ehasMatchingFieldValue('customProperty', $someCustomProperty);\r\n        \r\n        // check if the constraints are valid using the abstract class' method\r\n        if (!$enabled || !$this-\u003evalidateConstraints($strategy, $context)) {\r\n            return false;\r\n        }\r\n        \r\n        return true;\r\n    }\r\n}\r\n```\r\n\r\nAnd that's it, due to implementing the interface (by extending the abstract class) your class is automatically\r\nregistered as a strategy handler and the `Unleash` service can handle it.\r\n\r\nIf you want to make use of one of the default strategies, you can, all of them support autowiring.\r\n\r\n## Disabling built-in strategies\r\n\r\nIf for some reason you want to disable any of the built-in strategies, you can do so in config.\r\n\r\n```yaml\r\nunleash_client:\r\n  disabled_strategies:\r\n    - default\r\n    - remoteAddress\r\n```\r\n\r\n## Cache and http\r\n\r\nBy default the services are set to make use of `symfony/http-client`, `nyholm/psr7` and `symfony/cache`.\r\n\r\nYou can overwrite the default values in config:\r\n\r\n```yaml\r\nunleash_client:\r\n  http_client_service: my_custom_http_client_service\r\n  request_factory_service: my_custom_request_factory_service\r\n  cache_service: my_custom_cache_service\r\n```\r\n\r\nThe http client service must implement `Psr\\Http\\Client\\ClientInterface`\r\nor `Symfony\\Contracts\\HttpClient\\HttpClientInterface`.\r\n\r\nThe request factory service must implement `Psr\\Http\\Message\\RequestFactoryInterface`.\r\n\r\nThe cache service must implement `Psr\\SimpleCache\\CacheInterface` or `Psr\\Cache\\CacheItemPoolInterface` (which by\r\nextension means it can implement the standard `Symfony\\Component\\Cache\\Adapter\\AdapterInterface` which extends it).\r\n\r\n## Bootstrapping\r\n\r\nYou can set a default response from the SDK in cases when for some reason contacting Unleash server fails.\r\n\r\nYou can bootstrap using a file or a service implementing `\\Unleash\\Client\\Bootstrap\\BootstrapProvider`.\r\n\r\n### Service\r\n\r\n```php\r\n\u003c?php\r\n\r\nuse Unleash\\Client\\Bootstrap\\BootstrapProvider;\r\n\r\nfinal class MyBootstrap implements BootstrapProvider\r\n{\r\n    public function getBootstrap() : array|JsonSerializable|Traversable|null{\r\n        // TODO: Implement getBootstrap() method.\r\n    }\r\n}\r\n```\r\n```yaml\r\nunleash_client:\r\n  bootstrap: '@MyBootstrap'\r\n```\r\n\r\n\u003e Tip: If you create only one service that implements `BootstrapProvider` it will be injected automatically.\r\n\u003e If you create more than one you need to manually choose a bootstrap as in example above.\r\n\r\n### File\r\n\r\nLet's say you create a file called `bootstrap.json` in your config directory, this is how you can inject it as Unleash\r\nbootstrap:\r\n\r\n```yaml\r\nunleash_client:\r\n  bootstrap: 'file://%kernel.project_dir%/config/bootstrap.json'\r\n```\r\n\r\n\u003e Note: All files must start with the `file://` prefix.\r\n\r\n### Disabling communication with Unleash server\r\n\r\nIt may be useful to disable communication with the Unleash server for local development and using a bootstrap instead.\r\n\r\nNote that when you disable communication with Unleash and don't provide a bootstrap, an exception will be thrown.\r\n\r\n\u003e Tip: Set the cache interval to 0 to always have a fresh bootstrap content.\r\n\r\n\u003e The usually required parameters (app name, instance id, app url) are not required when communication is disabled.\r\n\r\n```yaml\r\nunleash_client:\r\n  bootstrap: '@MyBootstrap'\r\n  cache_ttl: 0\r\n  fetching_enabled: false\r\n```\r\n\r\n## Test command\r\n\r\nIf you need to quickly test what will your flags evaluate to, you can use the built-in command `unleash:test-flag`.\r\n\r\nThe command is documented and here's the output of `./bin/console unleash:test-flag --help`:\r\n\r\n```\r\nDescription:\r\n  Check the status of an Unleash feature\r\n\r\nUsage:\r\n  unleash:test-flag [options] [--] \u003cflag\u003e\r\n\r\nArguments:\r\n  flag                                 The name of the feature flag to check the result for\r\n\r\nOptions:\r\n  -f, --force                          When this flag is present, fresh results without cache will be forced\r\n      --user-id=USER-ID                [Context] Provide the current user's ID\r\n      --ip-address=IP-ADDRESS          [Context] Provide the current IP address\r\n      --session-id=SESSION-ID          [Context] Provide the current session ID\r\n      --hostname=HOSTNAME              [Context] Provide the current hostname\r\n      --environment=ENVIRONMENT        [Context] Provide the current environment\r\n      --current-time=CURRENT-TIME      [Context] Provide the current date and time\r\n      --custom-context=CUSTOM-CONTEXT  [Context] Custom context values in the format [contextName]=[contextValue], for example: myCustomContextField=someValue (multiple values allowed)\r\n      --expected=EXPECTED              For use in testing, if this option is present, the exit code will be either 0 or 1 depending on whether the expectation matches the result\r\n  -h, --help                           Display help for the given command. When no command is given display help for the list command\r\n  -q, --quiet                          Do not output any message\r\n  -V, --version                        Display this application version\r\n      --ansi|--no-ansi                 Force (or disable --no-ansi) ANSI output\r\n  -n, --no-interaction                 Do not ask any interactive question\r\n  -e, --env=ENV                        The Environment name. [default: \"dev\"]\r\n      --no-debug                       Switch off debug mode.\r\n      --profile                        Enables profiling (requires debug).\r\n  -v|vv|vvv, --verbose                 Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\r\n```\r\n\r\n## Gitlab Support\r\n\r\nWhilst Gitlab is not explicitly supported, it is reported to work well as long as the following configuration settings are defined:\r\n\r\n```yaml\r\nmetrics_enabled:      false\r\nauto_registration:    false\r\n```\r\n\r\n## Configuration reference\r\n\r\nThis is the autogenerated config dump (by running `php bin/console config:dump unleash_client`):\r\n\r\n```yaml\r\n# Default configuration for extension with alias: \"unleash_client\"\r\n# Default configuration for extension with alias: \"unleash_client\"\r\nunleash_client:\r\n\r\n  # You can provide the connection details as a DSN instead of app_url, instance_id and app_name. DSN takes precedence over individual parameters.\r\n  dsn:                  null # Example: 'https://localhost:4242/api?instance_id=myCoolApp-Server1\u0026app_name=myCoolApp'\r\n\r\n  # The application api URL\r\n  app_url:              null\r\n\r\n  # The instance ID, for Unleash it can be anything, for GitLab it must be the generated value\r\n  instance_id:          null\r\n\r\n  # Application name, for Unleash it can be anything, for GitLab it should be a GitLab environment name\r\n  app_name:             null\r\n  context:\r\n\r\n    # The field name to use as user id, if set to null getUserIdentifier() or getUsername() method will be called\r\n    user_id_field:        null\r\n\r\n    # Any additional context properties\r\n    custom_properties:    []\r\n\r\n  # Whether to enable communication with Unleash server or not. If you set it to false you must also provide a bootstrap.\r\n  fetching_enabled:     true\r\n\r\n  # The http client service, must implement the Psr\\Http\\Client\\ClientInterface or Symfony\\Contracts\\HttpClient\\HttpClientInterface interface\r\n  http_client_service:  psr18.http_client\r\n\r\n  # The request factory service, must implement the Psr\\Http\\Message\\RequestFactoryInterface interface. Providing null means autodetect between supported default services.\r\n  request_factory_service: null\r\n\r\n  # The cache service, must implement the Psr\\SimpleCache\\CacheInterface or Psr\\Cache\\CacheItemPoolInterface interface\r\n  cache_service:        cache.app\r\n\r\n  # Default bootstrap in case contacting Unleash servers fails. Can be a path to file (prefixed with file://) or a service implementing Unleash\\Client\\Bootstrap\\BootstrapProvider (prefixed with @)\r\n  bootstrap:            null\r\n\r\n  # Disabled default strategies, must be one of: default, flexibleRollout, gradualRolloutRandom, gradualRolloutSessionId, gradualRolloutUserId, remoteAddress, userWithId, applicationHostname\r\n  disabled_strategies:  []\r\n\r\n  # The interval at which to send metrics to the server in milliseconds\r\n  metrics_send_interval: 30000\r\n\r\n  # Whether to allow sending feature usage metrics to your instance of Unleash, set this to false for GitLab\r\n  metrics_enabled:      true\r\n\r\n  # Whether to allow automatic client registration on client initialization, set this to false for GitLab\r\n  auto_registration:    true\r\n\r\n  # The time in seconds the features will stay valid in cache\r\n  cache_ttl:            30\r\n\r\n  # The maximum age (in seconds) old features will be served from cache if http request fails for some reason\r\n  stale_ttl:            1800\r\n\r\n  # Additional headers to use in http client, for Unleash \"Authorization\" is required\r\n  custom_headers:       []\r\n\r\n  # Enable or disable twig function/filter/tests\r\n  twig:\r\n\r\n    # Enables the \"feature_is_enabled\" and \"feature_variant\" twig functions\r\n    functions:            false\r\n\r\n    # Enables the \"feature_is_enabled\" and \"feature_variant\" filters\r\n    filters:              false\r\n\r\n    # Enables the \"enabled\" test, allowing you to write {% if \"featureName\" is enabled %}\r\n    tests:                false\r\n\r\n    # Enables the \"feature\" twig tag\r\n    tags:                 false\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funleash%2Funleash-client-symfony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funleash%2Funleash-client-symfony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funleash%2Funleash-client-symfony/lists"}