Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #59

Merged
merged 2 commits into from Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 15 additions & 15 deletions README.md
Expand Up @@ -27,21 +27,21 @@ Requires php 7.3 or newer.
First configure the basic parameters, either using a DSN or as separate parameters:

```yaml
unleash_symfony_client:
unleash_client:
dsn: http://localhost:4242/api&instance_id=myCoolApp-Server1&app_name=myCoolApp
```

or

```yaml
unleash_symfony_client:
unleash_client:
app_url: http://localhost:4242/api
instance_id: myCoolApp-Server1
app_name: myCoolApp
```

> Tip: Generate the default config by running
> `php bin/console config:dump unleash_symfony_client > config/packages/unleash_symfony_client.yaml`
> `php bin/console config:dump unleash_client > config/packages/unleash_client.yaml`
> which will create the default config file which you can then tweak

```php
Expand Down Expand Up @@ -196,7 +196,7 @@ field to use for the user id, by default it uses either the
or `Symfony\Component\Security\Core\User\UserInterface::getUsername()`.

```yaml
unleash_symfony_client:
unleash_client:
context:
user_id_field: id
```
Expand All @@ -216,7 +216,7 @@ your value to start with `>` and not be an expression, escape it using `\`. All
variable which is either the user object or null.

```yaml
unleash_symfony_client:
unleash_client:
context:
custom_properties:
myCustomProperty: someValue # just a good old string
Expand Down Expand Up @@ -284,7 +284,7 @@ disable any of them in case they would clash with your own functions/filters/tes
The default is that everything is enabled if twig is installed.

```yaml
unleash_symfony_client:
unleash_client:
twig:
functions: true
filters: true
Expand Down Expand Up @@ -392,7 +392,7 @@ If you want to make use of one of the default strategies, you can, all of them s
If for some reason you want to disable any of the built-in strategies, you can do so in config.

```yaml
unleash_symfony_client:
unleash_client:
disabled_strategies:
- default
- remoteAddress
Expand All @@ -405,7 +405,7 @@ By default the services are set to make use of `symfony/http-client`, `nyholm/ps
You can overwrite the default values in config:

```yaml
unleash_symfony_client:
unleash_client:
http_client_service: my_custom_http_client_service
request_factory_service: my_custom_request_factory_service
cache_service: my_custom_cache_service
Expand Down Expand Up @@ -440,7 +440,7 @@ final class MyBootstrap implements BootstrapProvider
}
```
```yaml
unleash_symfony_client:
unleash_client:
bootstrap: '@MyBootstrap'
```

Expand All @@ -453,7 +453,7 @@ Let's say you create a file called `bootstrap.json` in your config directory, th
bootstrap:

```yaml
unleash_symfony_client:
unleash_client:
bootstrap: 'file://%kernel.project_dir%/config/bootstrap.json'
```

Expand All @@ -470,7 +470,7 @@ Note that when you disable communication with Unleash and don't provide a bootst
> The usually required parameters (app name, instance id, app url) are not required when communication is disabled.

```yaml
unleash_symfony_client:
unleash_client:
bootstrap: '@MyBootstrap'
cache_ttl: 0
fetching_enabled: false
Expand Down Expand Up @@ -515,12 +515,12 @@ Options:

## Configuration reference

This is the autogenerated config dump (by running `php bin/console config:dump unleash_symfony_client`):
This is the autogenerated config dump (by running `php bin/console config:dump unleash_client`):

```yaml
# Default configuration for extension with alias: "unleash_symfony_client"
# Default configuration for extension with alias: "unleash_symfony_client"
unleash_symfony_client:
# Default configuration for extension with alias: "unleash_client"
# Default configuration for extension with alias: "unleash_client"
unleash_client:

# You can provide the connection details as a DSN instead of app_url, instance_id and app_name. DSN takes precedence over individual parameters.
dsn: null # Example: 'https://localhost:4242/api?instance_id=myCoolApp-Server1&app_name=myCoolApp'
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Expand Up @@ -27,7 +27,7 @@ public function __construct(

public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('unleash_symfony_client');
$treeBuilder = new TreeBuilder('unleash_client');
$rootNode = $treeBuilder->getRootNode();

$rootNode
Expand Down