Skip to content

Commit b8b75be

Browse files
authored
Merge pull request #48 from froschdesign/hotfix/docs/missing-installation-page
Adds missing installation page and updates quick start
2 parents 7871fdf + c4362ec commit b8b75be

File tree

4 files changed

+15
-19
lines changed

4 files changed

+15
-19
lines changed

.github/workflows/docs-build.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: docs-build
33
on:
44
release:
55
types: [published]
6-
repository_dispatch:
7-
types: docs-build
6+
workflow_dispatch:
87

98
jobs:
109
build-deploy:
@@ -13,5 +12,5 @@ jobs:
1312
- name: Build Docs
1413
uses: laminas/documentation-theme/github-actions/docs@master
1514
env:
16-
DOCS_DEPLOY_KEY: ${{ secrets.DOCS_DEPLOY_KEY }}
17-
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
15+
DEPLOY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docs/book/installation.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This Is Only a Placeholder
2+
3+
The content of this page can be found under:
4+
5+
https://github.com/laminas/documentation-theme/blob/master/theme/pages/installation.html

docs/book/quick-start.md

+4-15
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
# Quick Start
22

3-
## Installation
4-
5-
To install this package in your application, use
6-
[Composer](https://getcomposer.org):
7-
8-
```bash
9-
$ composer require mezzio/mezzio-problem-details
10-
```
11-
12-
## Usage
13-
143
This package provides three primary mechanisms for creating and returning
154
Problem Details responses:
165

@@ -23,7 +12,7 @@ Problem Details responses:
2312
exceptions as problem details responses using the
2413
`ProblemDetailsResponseFactory`.
2514

26-
### ProblemDetailsResponseFactory
15+
## ProblemDetailsResponseFactory
2716

2817
If you are using [Mezzio](https://docs.mezzio.dev/mezzio/)
2918
and have installed [laminas-component-installer](https://docs.laminas.dev/laminas-component-installer)
@@ -148,7 +137,7 @@ The above modifies the original example to add validation and, on failed
148137
validation, return a custom response that includes the validation failure
149138
messages.
150139

151-
### Custom Exceptions
140+
## Custom Exceptions
152141

153142
In the above examples, we have a `DomainException` that is used to create a
154143
Problem Details response. By default, in production mode, the factory will use
@@ -236,7 +225,7 @@ class DomainException extends PhpDomainException implements ProblemDetailsExcept
236225
The data present in the generated exception will then be used by the
237226
`ProblemDetailsResponseFactory` to generate full Problem Details.
238227

239-
### Error handling
228+
## Error handling
240229

241230
When writing APIs, you may not want to handle every error or exception manually,
242231
or may not be aware of problems in your code that might lead to them. In such
@@ -281,7 +270,7 @@ $app->post('/api/domain/transaction', [
281270
]);
282271
```
283272

284-
### Not Found handling
273+
## Not Found handling
285274

286275
When writing APIs you may also want 404 responses be in the accepted content-type.
287276
This package provides `ProblemDetailsNotFoundHandler` which will return a

mkdocs.yml

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ site_dir: docs/html
33
nav:
44
- Home: index.md
55
- Introduction: intro.md
6+
- Installation: installation.md
67
- "Quick Start": quick-start.md
78
- Reference:
89
- "Generating Responses": response.md
@@ -15,3 +16,5 @@ site_description: 'Problem Details for PSR-7 HTTP APIs addressing the RFC 7807 s
1516
repo_url: 'https://github.com/mezzio/mezzio-problem-details'
1617
extra:
1718
project: Mezzio
19+
installation:
20+
config_provider_class: 'Mezzio\ProblemDetails\ConfigProvider'

0 commit comments

Comments
 (0)