From b7852d3a55d1256504dd432eb42c0ba6479e090b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Br=C3=BCckner?= Date: Sat, 13 Jan 2024 14:20:39 +0100 Subject: [PATCH 1/3] Adds missing installation page and updates introduction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- docs/book/v1/installation.md | 30 ++++++++++++++++++++++++++++++ docs/book/v1/intro.md | 14 -------------- mkdocs.yml | 3 +++ 3 files changed, 33 insertions(+), 14 deletions(-) create mode 100644 docs/book/v1/installation.md diff --git a/docs/book/v1/installation.md b/docs/book/v1/installation.md new file mode 100644 index 0000000..a0b083a --- /dev/null +++ b/docs/book/v1/installation.md @@ -0,0 +1,30 @@ +--- +show_file_content: true +--- + + +## Cache Implementation Required + + +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/) diff --git a/docs/book/v1/intro.md b/docs/book/v1/intro.md index 2b00cd4..baff2b1 100644 --- a/docs/book/v1/intro.md +++ b/docs/book/v1/intro.md @@ -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 diff --git a/mkdocs.yml b/mkdocs.yml index f06f4da..e1371ad 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -3,6 +3,7 @@ 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 @@ -10,3 +11,5 @@ 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' From 95c575e1aac95a99aacecd663573feee8af18786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Br=C3=BCckner?= Date: Sat, 13 Jan 2024 14:21:05 +0100 Subject: [PATCH 2/3] Updates GitHub workflow for documentation build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- .github/workflows/docs-build.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs-build.yml b/.github/workflows/docs-build.yml index 2444742..d1100ff 100644 --- a/.github/workflows/docs-build.yml +++ b/.github/workflows/docs-build.yml @@ -3,8 +3,7 @@ name: docs-build on: release: types: [published] - repository_dispatch: - types: docs-build + workflow_dispatch: jobs: build-deploy: @@ -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 }} From ec549e9ac896df3243c5f1d9147f5d97436fcfea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Br=C3=BCckner?= Date: Sat, 13 Jan 2024 14:29:27 +0100 Subject: [PATCH 3/3] Use restore for Markdown Linter in installation.md instead of enable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- docs/book/v1/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/book/v1/installation.md b/docs/book/v1/installation.md index a0b083a..97203be 100644 --- a/docs/book/v1/installation.md +++ b/docs/book/v1/installation.md @@ -4,7 +4,7 @@ show_file_content: true ## Cache Implementation Required - + 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.