Skip to content

Commit

Permalink
Add example configuration for ProblemDetailsResponseFactoryFactory
Browse files Browse the repository at this point in the history
…in response.md

Signed-off-by: pascal.heidmann <[email protected]>
  • Loading branch information
pascalheidmann-check24 committed Feb 23, 2024
1 parent a40ff3b commit ed67880
Showing 1 changed file with 26 additions and 15 deletions.
41 changes: 26 additions & 15 deletions docs/book/response.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,21 +141,32 @@ This package also provides a factory for generating the
- Pulls the `Psr\Http\Message\ResponseInterface` service to provide as the
`$responseFactory` parameter.
- If a `config` service is present:
- If the service contains a `debug` key with a boolean value, that value is
provided as the `$isDebug` parameter.
- If the service contains a `problem-details` key with an array value
containing a `json_flags` key, and that value is an integer, that value is
provided as the `$jsonFlags` parameter.
- If the service contains a `problem-details` key with an array value
containing a `default_types_map` key, and that value is an array, that
value is provided as the `$defaultTypesMap` parameter; see the
[default types documentation](default-types.md) for details on defining
this map. (Since 1.1.0.)
- If the service contains a `problem-details` key with an array value
containing a `include-throwable-details` key,
and that value is a boolean,
that value is used instead of global `debug` value for the `$includeThrowableDetail` parameter.
(Since 1.14.0.)
- If the service contains a `debug` key with a boolean value, that value is

Check failure on line 144 in docs/book/response.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integra...

Unordered list indentation [Expected: 2; Actual: 4]
provided as the `$isDebug` parameter.
- If the service contains a `problem-details` key with an array value

Check failure on line 146 in docs/book/response.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integra...

Unordered list indentation [Expected: 2; Actual: 4]
containing a `json_flags` key, and that value is an integer, that value is
provided as the `$jsonFlags` parameter.
- If the service contains a `problem-details` key with an array value

Check failure on line 149 in docs/book/response.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integra...

Unordered list indentation [Expected: 2; Actual: 4]
containing a `default_types_map` key, and that value is an array, that
value is provided as the `$defaultTypesMap` parameter; see the
[default types documentation](default-types.md) for details on defining
this map. (Since 1.1.0.)
- If the service contains a `problem-details` key with an array value

Check failure on line 154 in docs/book/response.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integra...

Unordered list indentation [Expected: 2; Actual: 4]
containing a `include-throwable-details` key,
and that value is a boolean,
that value is used instead of global `debug` value for the `$includeThrowableDetail` parameter.
(Since 1.14.0.)

### Example configuration

Check failure on line 160 in docs/book/response.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integra...

Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "### Example configuration"]
```php

Check failure on line 161 in docs/book/response.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integra...

Fenced code blocks should be surrounded by blank lines [Context: "```php"]
[
'debug' => true,
'problem-details' => [
'json_flags' => JSON_PRETTY_PRINT,
'include-throwable-details' => true,
]
]
```

If any of the above config values are not present, a `null` value will be
passed, allowing the default value to be used.
Expand Down

0 comments on commit ed67880

Please sign in to comment.