Skip to content

Commit

Permalink
Merge pull request #47 from froschdesign/hotfix/docs/missing-installa…
Browse files Browse the repository at this point in the history
…tion-page

Adds missing installation page and updates introduction
  • Loading branch information
froschdesign authored Jan 18, 2024
2 parents 83b3a09 + ec549e9 commit 28509a5
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 18 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: docs-build
on:
release:
types: [published]
repository_dispatch:
types: docs-build
workflow_dispatch:

jobs:
build-deploy:
Expand All @@ -13,5 +12,5 @@ jobs:
- name: Build Docs
uses: laminas/documentation-theme/github-actions/docs@master
env:
"DOCS_DEPLOY_KEY": ${{ secrets.DOCS_DEPLOY_KEY }}
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
DEPLOY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 changes: 30 additions & 0 deletions docs/book/v1/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
show_file_content: true
---

<!-- markdownlint-disable MD001 MD041 -->
## Cache Implementation Required
<!-- markdownlint-restore -->

To use this component, a PSR-6 `CacheItemPoolInterface` implementation is required.
[laminas-cache](https://docs.laminas.dev/laminas-cache/) provides the PSR-6 implementations, install it and choose one of the cache adapters.

### Install laminas-cache and a Cache Adapter

Install laminas-cache via [Composer](https://getcomposer.org/):

```bash
$ composer require laminas/laminas-cache
```

laminas-cache is shipped without a specific cache adapter to allow free choice of storage backends and their dependencies.
For example, install the [laminas-cache `Filesystem` adapter](https://docs.laminas.dev/laminas-cache/v3/storage/adapter/#filesystem-adapter):

```bash
$ composer require laminas/laminas-cache-storage-adapter-filesystem
```

### Read More in the laminas-cache Documentation

- [PSR-6](https://docs.laminas.dev/laminas-cache/v3/psr6/)
- [Cache Adapters](https://docs.laminas.dev/laminas-cache/v3/storage/adapter/)
14 changes: 0 additions & 14 deletions docs/book/v1/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,6 @@ pool in which to store and retrieve sessions. PSR-6 was chosen over the simpler
[PSR-16](https://www.php-fig.org/psr/psr-16/) as it specifically provides
functionality around _expiry_, which allows us to expire sessions.

## Installation

Install mezzio-session-cache via [Composer](https://getcomposer.org/):

```bash
$ composer require mezzio/mezzio-session-cache
```

You will also need to install a package that provides a PSR-6
`CacheItemPoolInterface` implementation. You can [search for PSR-6 providers on
Packagist](https://packagist.org/providers/psr/cache-implementation). We have
had excellent luck with the various implementations provided by the [PHP-Cache
project](http://www.php-cache.com/en/latest/).

## Usage

Generally, you will only provide configuration for this service, including
Expand Down
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ site_dir: docs/html
nav:
- Home: index.md
- Introduction: v1/intro.md
- Installation: v1/installation.md
- Configuration: v1/config.md
- "Manual Usage": v1/manual.md
site_name: mezzio-session-cache
site_description: 'PSR-6 session persistence adapter for mezzio-session.'
repo_url: 'https://github.com/mezzio/mezzio-session-cache'
extra:
project: Mezzio
installation:
config_provider_class: 'Mezzio\Session\Cache\ConfigProvider'

0 comments on commit 28509a5

Please sign in to comment.