From d906a046063c04e300fa1aa1ea599ee16a19a9b7 Mon Sep 17 00:00:00 2001 From: Raj Mohan Date: Tue, 15 Oct 2024 12:43:47 +0530 Subject: [PATCH 01/14] PHP 8.4 support added Signed-off-by: Raj Mohan --- composer.json | 2 +- composer.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 300f6674..8490488d 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ } }, "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "laminas/laminas-eventmanager": "^3.4", "laminas/laminas-servicemanager": "^4.1", "laminas/laminas-stdlib": "^3.6", diff --git a/composer.lock b/composer.lock index 2e643055..335dd6f3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2e5a0cf0f8f672b8f99d278b13b742cc", + "content-hash": "78b1de2e3e43b8a987f5c08c448a5563", "packages": [ { "name": "brick/varexporter", @@ -5129,13 +5129,13 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, - "platform-dev": {}, + "platform-dev": [], "platform-overrides": { "php": "8.1.99" }, From 5690791bfb97ea9f4f4cd62c84fc866a925624a9 Mon Sep 17 00:00:00 2001 From: Raj Mohan Date: Thu, 24 Oct 2024 20:31:55 +0530 Subject: [PATCH 02/14] Ignore PHP 8.4 Platform Requirements Signed-off-by: Raj Mohan --- .laminas-ci.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.laminas-ci.json b/.laminas-ci.json index 2a9baaad..a44cf210 100644 --- a/.laminas-ci.json +++ b/.laminas-ci.json @@ -18,5 +18,8 @@ "command": "composer require psr/simple-cache:^2.0 && vendor/bin/phpunit" } } - ] + ], + "ignore_php_platform_requirements": { + "8.4": true + } } From ad86d80b10df0fa7bfe1e474d753df683221ef1b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 00:07:53 +0000 Subject: [PATCH 03/14] Lock file maintenance Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- composer.lock | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/composer.lock b/composer.lock index 335dd6f3..7b22e3fe 100644 --- a/composer.lock +++ b/composer.lock @@ -1644,33 +1644,33 @@ }, { "name": "laminas/laminas-serializer", - "version": "3.0.0", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-serializer.git", - "reference": "ff2079773ba3e0f23c7806a1811f3b97876adc21" + "reference": "1322e7bee6c08ebeb31ebbad6028216a25aa0ba5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-serializer/zipball/ff2079773ba3e0f23c7806a1811f3b97876adc21", - "reference": "ff2079773ba3e0f23c7806a1811f3b97876adc21", + "url": "https://api.github.com/repos/laminas/laminas-serializer/zipball/1322e7bee6c08ebeb31ebbad6028216a25aa0ba5", + "reference": "1322e7bee6c08ebeb31ebbad6028216a25aa0ba5", "shasum": "" }, "require": { "laminas/laminas-json": "^3.1", "laminas/laminas-servicemanager": "^4.1", "laminas/laminas-stdlib": "^3.19", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "conflict": { "zendframework/zend-serializer": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.5.0", - "lctrs/psalm-psr-container-plugin": "^1.9", - "phpunit/phpunit": "^10.2.6", + "laminas/laminas-coding-standard": "~3.0.0", + "lctrs/psalm-psr-container-plugin": "^1.10", + "phpunit/phpunit": "^10.5.36", "psalm/plugin-phpunit": "^0.19.0", - "vimeo/psalm": "^5.21" + "vimeo/psalm": "^5.26.1" }, "type": "library", "extra": { @@ -1708,7 +1708,7 @@ "type": "community_bridge" } ], - "time": "2024-04-23T22:42:07+00:00" + "time": "2024-10-15T11:24:57+00:00" }, { "name": "myclabs/deep-copy", @@ -5014,21 +5014,21 @@ }, { "name": "webimpress/coding-standard", - "version": "1.3.2", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/webimpress/coding-standard.git", - "reference": "710f71ac95d36d931e76b47132b599c39abfab11" + "reference": "6f6a1a90bd9e18fc8bee0660dd1d1ce68cf9fc53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/710f71ac95d36d931e76b47132b599c39abfab11", - "reference": "710f71ac95d36d931e76b47132b599c39abfab11", + "url": "https://api.github.com/repos/webimpress/coding-standard/zipball/6f6a1a90bd9e18fc8bee0660dd1d1ce68cf9fc53", + "reference": "6f6a1a90bd9e18fc8bee0660dd1d1ce68cf9fc53", "shasum": "" }, "require": { "php": "^7.3 || ^8.0", - "squizlabs/php_codesniffer": "^3.7.2" + "squizlabs/php_codesniffer": "^3.10.3" }, "require-dev": { "phpunit/phpunit": "^9.6.15" @@ -5057,7 +5057,7 @@ ], "support": { "issues": "https://github.com/webimpress/coding-standard/issues", - "source": "https://github.com/webimpress/coding-standard/tree/1.3.2" + "source": "https://github.com/webimpress/coding-standard/tree/1.4.0" }, "funding": [ { @@ -5065,7 +5065,7 @@ "type": "github" } ], - "time": "2023-12-18T07:25:41+00:00" + "time": "2024-10-16T06:55:17+00:00" }, { "name": "webimpress/safe-writer", From 537547e7f877f583bd8d8f3c0a8eb9756d4b3e38 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 00:26:50 +0000 Subject: [PATCH 04/14] Lock file maintenance Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- composer.lock | 74 +++++++++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/composer.lock b/composer.lock index 7b22e3fe..fd2a2a49 100644 --- a/composer.lock +++ b/composer.lock @@ -125,16 +125,16 @@ }, { "name": "laminas/laminas-servicemanager", - "version": "4.2.0", + "version": "4.2.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-servicemanager.git", - "reference": "a8489e352de3ce3f1eaf34a354b1e5f2ad2db85c" + "reference": "e18a45410d6f4ecb6253ade3ba42131ef2d4a883" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/a8489e352de3ce3f1eaf34a354b1e5f2ad2db85c", - "reference": "a8489e352de3ce3f1eaf34a354b1e5f2ad2db85c", + "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/e18a45410d6f4ecb6253ade3ba42131ef2d4a883", + "reference": "e18a45410d6f4ecb6253ade3ba42131ef2d4a883", "shasum": "" }, "require": { @@ -200,7 +200,7 @@ "chat": "https://laminas.dev/chat", "forum": "https://discourse.laminas.dev", "issues": "https://github.com/laminas/laminas-servicemanager/issues", - "source": "https://github.com/laminas/laminas-servicemanager/tree/4.2.0" + "source": "https://github.com/laminas/laminas-servicemanager/tree/4.2.1" }, "funding": [ { @@ -208,7 +208,7 @@ "type": "community_bridge" } ], - "time": "2024-07-04T09:40:44+00:00" + "time": "2024-10-22T13:30:53+00:00" }, { "name": "laminas/laminas-stdlib", @@ -1583,27 +1583,27 @@ }, { "name": "laminas/laminas-json", - "version": "3.6.0", + "version": "3.7.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-json.git", - "reference": "53ff787b20b77197f38680c737e8dfffa846b85b" + "reference": "1931b26ac677f418f39cd0af6d0740e8f4a67d18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-json/zipball/53ff787b20b77197f38680c737e8dfffa846b85b", - "reference": "53ff787b20b77197f38680c737e8dfffa846b85b", + "url": "https://api.github.com/repos/laminas/laminas-json/zipball/1931b26ac677f418f39cd0af6d0740e8f4a67d18", + "reference": "1931b26ac677f418f39cd0af6d0740e8f4a67d18", "shasum": "" }, "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "conflict": { "zendframework/zend-json": "*" }, "require-dev": { "laminas/laminas-coding-standard": "~2.4.0", - "laminas/laminas-stdlib": "^2.7.7 || ^3.8", + "laminas/laminas-stdlib": "^2.7.7 || ^3.19", "phpunit/phpunit": "^9.5.25" }, "suggest": { @@ -1640,7 +1640,7 @@ "type": "community_bridge" } ], - "time": "2023-10-18T09:54:55+00:00" + "time": "2024-10-25T09:02:25+00:00" }, { "name": "laminas/laminas-serializer", @@ -3904,16 +3904,16 @@ }, { "name": "symfony/console", - "version": "v6.4.12", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "72d080eb9edf80e36c19be61f72c98ed8273b765" + "reference": "f793dd5a7d9ae9923e35d0503d08ba734cec1d79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/72d080eb9edf80e36c19be61f72c98ed8273b765", - "reference": "72d080eb9edf80e36c19be61f72c98ed8273b765", + "url": "https://api.github.com/repos/symfony/console/zipball/f793dd5a7d9ae9923e35d0503d08ba734cec1d79", + "reference": "f793dd5a7d9ae9923e35d0503d08ba734cec1d79", "shasum": "" }, "require": { @@ -3978,7 +3978,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.12" + "source": "https://github.com/symfony/console/tree/v6.4.13" }, "funding": [ { @@ -3994,7 +3994,7 @@ "type": "tidelift" } ], - "time": "2024-09-20T08:15:52+00:00" + "time": "2024-10-09T08:40:40+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4065,16 +4065,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v6.4.8", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "8d7507f02b06e06815e56bb39aa0128e3806208b" + "reference": "0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8d7507f02b06e06815e56bb39aa0128e3806208b", - "reference": "8d7507f02b06e06815e56bb39aa0128e3806208b", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e", + "reference": "0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e", "shasum": "" }, "require": { @@ -4125,7 +4125,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.8" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.13" }, "funding": [ { @@ -4141,7 +4141,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-09-25T14:18:03+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -4221,16 +4221,16 @@ }, { "name": "symfony/filesystem", - "version": "v6.4.12", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "f810e3cbdf7fdc35983968523d09f349fa9ada12" + "reference": "4856c9cf585d5a0313d8d35afd681a526f038dd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/f810e3cbdf7fdc35983968523d09f349fa9ada12", - "reference": "f810e3cbdf7fdc35983968523d09f349fa9ada12", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/4856c9cf585d5a0313d8d35afd681a526f038dd3", + "reference": "4856c9cf585d5a0313d8d35afd681a526f038dd3", "shasum": "" }, "require": { @@ -4267,7 +4267,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.4.12" + "source": "https://github.com/symfony/filesystem/tree/v6.4.13" }, "funding": [ { @@ -4283,7 +4283,7 @@ "type": "tidelift" } ], - "time": "2024-09-16T16:01:33+00:00" + "time": "2024-10-25T15:07:50+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4768,16 +4768,16 @@ }, { "name": "symfony/string", - "version": "v6.4.12", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "f8a1ccebd0997e16112dfecfd74220b78e5b284b" + "reference": "38371c60c71c72b3d64d8d76f6b1bb81a2cc3627" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/f8a1ccebd0997e16112dfecfd74220b78e5b284b", - "reference": "f8a1ccebd0997e16112dfecfd74220b78e5b284b", + "url": "https://api.github.com/repos/symfony/string/zipball/38371c60c71c72b3d64d8d76f6b1bb81a2cc3627", + "reference": "38371c60c71c72b3d64d8d76f6b1bb81a2cc3627", "shasum": "" }, "require": { @@ -4834,7 +4834,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.12" + "source": "https://github.com/symfony/string/tree/v6.4.13" }, "funding": [ { @@ -4850,7 +4850,7 @@ "type": "tidelift" } ], - "time": "2024-09-20T08:15:52+00:00" + "time": "2024-09-25T14:18:03+00:00" }, { "name": "theseer/tokenizer", From e207f237bab9fa4e14b30f741b9ff8fe09e6fc5e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 02:21:18 +0000 Subject: [PATCH 05/14] Lock file maintenance Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- composer.lock | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/composer.lock b/composer.lock index fd2a2a49..8b448d26 100644 --- a/composer.lock +++ b/composer.lock @@ -212,30 +212,30 @@ }, { "name": "laminas/laminas-stdlib", - "version": "3.19.0", + "version": "3.20.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "6a192dd0882b514e45506f533b833b623b78fff3" + "reference": "8974a1213be42c3e2f70b2c27b17f910291ab2f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/6a192dd0882b514e45506f533b833b623b78fff3", - "reference": "6a192dd0882b514e45506f533b833b623b78fff3", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/8974a1213be42c3e2f70b2c27b17f910291ab2f4", + "reference": "8974a1213be42c3e2f70b2c27b17f910291ab2f4", "shasum": "" }, "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "conflict": { "zendframework/zend-stdlib": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "^2.5", - "phpbench/phpbench": "^1.2.15", - "phpunit/phpunit": "^10.5.8", - "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.20.0" + "laminas/laminas-coding-standard": "^3.0", + "phpbench/phpbench": "^1.3.1", + "phpunit/phpunit": "^10.5.38", + "psalm/plugin-phpunit": "^0.19.0", + "vimeo/psalm": "^5.26.1" }, "type": "library", "autoload": { @@ -267,7 +267,7 @@ "type": "community_bridge" } ], - "time": "2024-01-19T12:39:49+00:00" + "time": "2024-10-29T13:46:07+00:00" }, { "name": "nikic/php-parser", From 4c965b32a24e56b2a30eae884c211c85ddabd250 Mon Sep 17 00:00:00 2001 From: Raj Mohan Date: Fri, 8 Nov 2024 13:25:26 +0530 Subject: [PATCH 06/14] Doc Lint Issue Fixes Signed-off-by: Raj Mohan --- docs/book/index.md | 4 +- docs/book/v2/storage/adapter.md | 50 ++++++------- docs/book/v2/storage/plugin.md | 16 ++-- .../usage-in-a-laminas-mvc-application.md | 11 ++- docs/book/v3/storage/adapter.md | 74 +++++++++---------- docs/book/v3/storage/plugin.md | 16 ++-- .../usage-in-a-laminas-mvc-application.md | 9 +++ docs/book/v4/migration/to-version-4.md | 4 +- docs/book/v4/storage/adapter.md | 2 - docs/book/v4/storage/capabilities.md | 2 +- docs/book/v4/storage/plugin.md | 8 +- 11 files changed, 107 insertions(+), 89 deletions(-) diff --git a/docs/book/index.md b/docs/book/index.md index 7c45daeb..63ef94b3 100644 --- a/docs/book/index.md +++ b/docs/book/index.md @@ -1,4 +1,4 @@ -## Installation +# Installation ### Using Composer @@ -8,8 +8,10 @@ $ composer require laminas/laminas-cache ## Learn +```html +``` diff --git a/docs/book/v2/storage/adapter.md b/docs/book/v2/storage/adapter.md index c609aa0a..56f29ffe 100644 --- a/docs/book/v2/storage/adapter.md +++ b/docs/book/v2/storage/adapter.md @@ -95,13 +95,13 @@ The following configuration options are defined by `Laminas\Cache\Storage\Adapte are available for every supported adapter. Adapter-specific configuration options are described on adapter level below. -Option | Data Type | Default Value | Description ------- | --------- | ------------- | ----------- -`ttl` | `integer` | `0` | Time to live -`namespace` | `string` | “laminascache” | The “namespace” in which cache items will live -`key_pattern` | `null|string` | `null` | Pattern against which to validate cache keys -`readable` | `boolean` | `true` | Enable/Disable reading data from cache -`writable` | `boolean` | `true` | Enable/Disable writing data to cache +Option | Data Type | Default Value | Description +------ |----------------| ------------- | ----------- +`ttl` | `integer` | `0` | Time to live +`namespace` | `string` | “laminascache” | The “namespace” in which cache items will live +`key_pattern` | `null\|string` | `null` | Pattern against which to validate cache keys +`readable` | `boolean` | `true` | Enable/Disable reading data from cache +`writable` | `boolean` | `true` | Enable/Disable writing data to cache ## StorageInterface @@ -708,21 +708,21 @@ Capability | Value ### Adapter Specific Options -Name | Data Type | Default Value | Description ----- | --------- | ------------- | ----------- -`namespace_separator` | `string` | ":" | A separator for the namespace and prefix -`cache_dir` | `string` | "" | Directory to store cache files. -`clear_stat_cache` | `boolean` | `true` | Call `clearstatcache()` enabled? -`dir_level` | `integer` | `1` | Defines how much sub-directories should be created. -`dir_permission` | `integer` | `false` | 0700 Set explicit permission on creating new directories. -`file_locking` | `boolean` | `true` | Lock files on writing. -`file_permission` | `integer` | `false` | 0600 Set explicit permission on creating new files. -`key_pattern` | `string` | `/^[a-z0-9_\+\-]*$/Di` | Validate key against pattern. -`no_atime` | `boolean` | `true` | Don’t get ‘fileatime’ as ‘atime’ on metadata. -`no_ctime` | `boolean` | `true` | Don’t get ‘filectime’ as ‘ctime’ on metadata. -`umask` | `integer|false` | `false` | Use [umask](http://wikipedia.org/wiki/Umask) to set file and directory permissions. -`suffix` | `string` | `dat` | Suffix for cache files -`tag_suffix` | `string` | `tag` | Suffix for tag files +Name | Data Type | Default Value | Description +---- |------------------| ------------- | ----------- +`namespace_separator` | `string` | ":" | A separator for the namespace and prefix +`cache_dir` | `string` | "" | Directory to store cache files. +`clear_stat_cache` | `boolean` | `true` | Call `clearstatcache()` enabled? +`dir_level` | `integer` | `1` | Defines how much sub-directories should be created. +`dir_permission` | `integer` | `false` | 0700 Set explicit permission on creating new directories. +`file_locking` | `boolean` | `true` | Lock files on writing. +`file_permission` | `integer` | `false` | 0600 Set explicit permission on creating new files. +`key_pattern` | `string` | `/^[a-z0-9_\+\-]*$/Di` | Validate key against pattern. +`no_atime` | `boolean` | `true` | Don’t get ‘fileatime’ as ‘atime’ on metadata. +`no_ctime` | `boolean` | `true` | Don’t get ‘filectime’ as ‘ctime’ on metadata. +`umask` | `integer\|false` | `false` | Use [umask](http://wikipedia.org/wiki/Umask) to set file and directory permissions. +`suffix` | `string` | `dat` | Suffix for cache files +`tag_suffix` | `string` | `tag` | Suffix for tag files Note: the `suffix` and `tag_suffix` options will be escaped in order to be safe for glob operations. @@ -883,9 +883,9 @@ Capability | Value ### Adapter Specific Options -Name | Data Type | Default Value | Description ----- | --------- | ------------- | ----------- -`memory_limit` | `string|integer` | 50% of `memory_limit` INI value | Limit of how much memory can PHP allocate to allow store items. +Name | Data Type | Default Value | Description +---- |-------------------| ------------- | ----------- +`memory_limit` | `string\|integer` | 50% of `memory_limit` INI value | Limit of how much memory can PHP allocate to allow store items. > #### Memory Limit > diff --git a/docs/book/v2/storage/plugin.md b/docs/book/v2/storage/plugin.md index d2a4f5a7..bf54520b 100644 --- a/docs/book/v2/storage/plugin.md +++ b/docs/book/v2/storage/plugin.md @@ -76,10 +76,10 @@ You may also configure the plugin to re-throw exceptions. ### Plugin specific Options -Name | Data Type | Default Value | Description ----- | --------- | ------------- | ----------- -`exception_callback` | `callable|null` | null | Callback to invoke on exception; receives the exception as the sole argument. -`throw_exceptions` | `boolean` | `true` | Re-throw caught exceptions. +Name | Data Type | Default Value | Description +---- |------------------| ------------- | ----------- +`exception_callback` | `callable\|null` | null | Callback to invoke on exception; receives the exception as the sole argument. +`throw_exceptions` | `boolean` | `true` | Re-throw caught exceptions. ## The IgnoreUserAbort Plugin @@ -116,10 +116,10 @@ by the underlying storage adapter. ### Plugin specific Options -Name | Data Type | Default Value | Description ----- | --------- | ------------- | ----------- -`serializer` | `null|string|Laminas\Serializer\Adapter\AdapterInterface` | `null` | The serializer to use; see below. -`serializer_options` | `array` | `[]` | Array of options to use when instantiating the specified serializer. +Name | Data Type | Default Value | Description +---- |--------------------------------------------------------------| ------------- | ----------- +`serializer` | `null\|string \|Laminas\Serializer\Adapter\AdapterInterface` | `null` | The serializer to use; see below. +`serializer_options` | `array` | `[]` | Array of options to use when instantiating the specified serializer. The `serializer` value has two special cases: diff --git a/docs/book/v3/application-integration/usage-in-a-laminas-mvc-application.md b/docs/book/v3/application-integration/usage-in-a-laminas-mvc-application.md index 0652f774..2bd6b1ca 100644 --- a/docs/book/v3/application-integration/usage-in-a-laminas-mvc-application.md +++ b/docs/book/v3/application-integration/usage-in-a-laminas-mvc-application.md @@ -37,7 +37,7 @@ return [ ]; ``` -The factory `Laminas\Cache\Service\StorageCacheAbstractServiceFactory` uses the configuration, searches for the configuration key `caches` and creates the storage adapters using the discovered configuration. +The factory `Laminas\Cache\Service\StorageCacheAbstractServiceFactory` uses the configuration, searches for the configuration key `caches` and creates the storage adapters using the discovered configuration. WARNING: **Cache Named `config` Is Not Possible** A cache named `config` is not possible due to internal service conflicts with MVC configuration. @@ -79,6 +79,7 @@ final class IndexController extends AbstractActionController To [register the controller](https://docs.laminas.dev/laminas-mvc/quick-start/#create-a-route) for the application, extend the configuration of the module. Add the following lines to the module configuration file, e.g. `module/Application/config/module.config.php`: +```php

 namespace Application;
 
@@ -93,6 +94,7 @@ return [
     // …
 ];
 
+``` The example uses the [config factory from laminas-servicemanager](https://docs.laminas.dev/laminas-servicemanager/config-abstract-factory/) which allows any string to be used to fetch a service from the application service container, like the name of the configured cache: `default-cache`. @@ -103,6 +105,7 @@ This means that the factory [searches for an appropriate configuration](https:// Extend the module configuration file to add the configuration for the controller. Use the name of the cache (`default-cache`), which was previously defined in the configuration of the caches, to retrieve the related cache storage instance: +```php

 namespace Application;
 
@@ -122,6 +125,7 @@ return [
     // …
 ];
 
+``` ## Using Multiple Caches @@ -129,6 +133,7 @@ The use more than one cache backend, the factory `Laminas\Cache\Service\StorageC Extend the cache configuration in `config/autoload/cache.global.php` and add more cache adapters: +```php

 return [
     'caches' => [
@@ -147,9 +152,11 @@ return [
     ],
 ];
 
+``` MISSING: **Installation Requirements** Make sure that the [used storage adapters are installed](#preparation): + ```bash $ composer require laminas/laminas-cache-storage-adapter-memory laminas/laminas-cache-storage-adapter-blackhole ``` @@ -158,6 +165,7 @@ $ composer require laminas/laminas-cache-storage-adapter-memory laminas/laminas- To use a different cache adapter for the controller, change the related module configuration and use one of the previously defined names: +```php

 namespace Application;
 
@@ -177,6 +185,7 @@ return [
     // …
 ];
 
+``` ## Learn More diff --git a/docs/book/v3/storage/adapter.md b/docs/book/v3/storage/adapter.md index 20ea40f6..ab928061 100644 --- a/docs/book/v3/storage/adapter.md +++ b/docs/book/v3/storage/adapter.md @@ -95,13 +95,13 @@ The following configuration options are defined by `Laminas\Cache\Storage\Adapte are available for every supported adapter. Adapter-specific configuration options are described on adapter level below. -Option | Data Type | Default Value | Description ------- | --------- | ------------- | ----------- -`ttl` | `integer` | `0` | Time to live -`namespace` | `string` | “laminascache” | The “namespace” in which cache items will live -`key_pattern` | `null|string` | `null` | Pattern against which to validate cache keys -`readable` | `boolean` | `true` | Enable/Disable reading data from cache -`writable` | `boolean` | `true` | Enable/Disable writing data to cache +Option | Data Type | Default Value | Description +------ |----------------| ------------- | ----------- +`ttl` | `integer` | `0` | Time to live +`namespace` | `string` | “laminascache” | The “namespace” in which cache items will live +`key_pattern` | `null\|string` | `null` | Pattern against which to validate cache keys +`readable` | `boolean` | `true` | Enable/Disable reading data from cache +`writable` | `boolean` | `true` | Enable/Disable writing data to cache ## StorageInterface @@ -666,21 +666,21 @@ Capability | Value ### Adapter Specific Options -Name | Data Type | Default Value | Description ----- | --------- | ------------- | ----------- -`namespace_separator` | `string` | ":" | A separator for the namespace and prefix -`cache_dir` | `string` | "" | Directory to store cache files. -`clear_stat_cache` | `boolean` | `true` | Call `clearstatcache()` enabled? -`dir_level` | `integer` | `1` | Defines how much sub-directories should be created. -`dir_permission` | `integer` | `false` | 0700 Set explicit permission on creating new directories. -`file_locking` | `boolean` | `true` | Lock files on writing. -`file_permission` | `integer` | `false` | 0600 Set explicit permission on creating new files. -`key_pattern` | `string` | `/^[a-z0-9_\+\-]*$/Di` | Validate key against pattern. -`no_atime` | `boolean` | `true` | Don’t get ‘fileatime’ as ‘atime’ on metadata. -`no_ctime` | `boolean` | `true` | Don’t get ‘filectime’ as ‘ctime’ on metadata. -`umask` | `integer|false` | `false` | Use [umask](http://wikipedia.org/wiki/Umask) to set file and directory permissions. -`suffix` | `string` | `dat` | Suffix for cache files -`tag_suffix` | `string` | `tag` | Suffix for tag files +Name | Data Type | Default Value | Description +---- |------------------| ------------- | ----------- +`namespace_separator` | `string` | ":" | A separator for the namespace and prefix +`cache_dir` | `string` | "" | Directory to store cache files. +`clear_stat_cache` | `boolean` | `true` | Call `clearstatcache()` enabled? +`dir_level` | `integer` | `1` | Defines how much sub-directories should be created. +`dir_permission` | `integer` | `false` | 0700 Set explicit permission on creating new directories. +`file_locking` | `boolean` | `true` | Lock files on writing. +`file_permission` | `integer` | `false` | 0600 Set explicit permission on creating new files. +`key_pattern` | `string` | `/^[a-z0-9_\+\-]*$/Di` | Validate key against pattern. +`no_atime` | `boolean` | `true` | Don’t get ‘fileatime’ as ‘atime’ on metadata. +`no_ctime` | `boolean` | `true` | Don’t get ‘filectime’ as ‘ctime’ on metadata. +`umask` | `integer\|false` | `false` | Use [umask](http://wikipedia.org/wiki/Umask) to set file and directory permissions. +`suffix` | `string` | `dat` | Suffix for cache files +`tag_suffix` | `string` | `tag` | Suffix for tag files Note: the `suffix` and `tag_suffix` options will be escaped in order to be safe for glob operations. @@ -796,18 +796,18 @@ Capability | Value ### Adapter Specific Options -| Name | Data Type | Default Value | Description | -|-----------------------|---------------------------|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `lib_options` | `array` | `[]` | Associative array of Redis options where the array key is the options constant value (see `RedisCluster::OPT_*` [constants](https://github.com/JetBrains/phpstorm-stubs/blob/master/redis/RedisCluster.php) for details). | -| `namespace_separator` | `string` | ":" | A separator for the namespace and prefix. | -| `password` | `string` | "" | Password to authenticate with Redis server | -| `name` | `string` | "" | Name to determine configuration from [php.ini](https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#loading-a-cluster-configuration-by-name) (**MUST NOT** be combined with `seeds`) | -| `seeds` | `array` | `[]` | List of strings containing `:` (**MUST NOT** be combined with `name`) | -| `timeout` | `float` | `1.0` | Timeout for commands, see [PhpRedis](https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#timeouts) timeouts documentation for more background. | -| `read_timeout` | `float` | `2.0` | Read timeout for commands, see [PhpRedis](https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#timeouts) timeouts documentation for more background. | -| `persistent` | `bool` | `false` | Flag to specify whether to create a persistent connection or not | -| `version` | `string` | "" | The Redis server version. **MUST** be specified in a [Semantic Versioning 2.0.0](https://semver.org/#semantic-versioning-200) format. This information is used to determine some features/capabilities without opening a connection to the server. | -| `ssl_context` | `array\|SslContext\|null` | `null` | Associative array with [SSL context](https://www.php.net/manual/en/context.ssl.php) options. Can be also an instance of `SslContext` (class available from within the `redis` adapter). Available since adapter version v2.8.0. | +Name | Data Type | Default Value | Description +----------------------|---------------------------|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + `lib_options` | `array` | `[]` | Associative array of Redis options where the array key is the options constant value (see `RedisCluster::OPT_*` [constants](https://github.com/JetBrains/phpstorm-stubs/blob/master/redis/RedisCluster.php) for details). + `namespace_separator` | `string` | ":" | A separator for the namespace and prefix. + `password` | `string` | "" | Password to authenticate with Redis server + `name` | `string` | "" | Name to determine configuration from [php.ini](https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#loading-a-cluster-configuration-by-name) (**MUST NOT** be combined with `seeds`) + `seeds` | `array` | `[]` | List of strings containing `:` (**MUST NOT** be combined with `name`) + `timeout` | `float` | `1.0` | Timeout for commands, see [PhpRedis](https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#timeouts) timeouts documentation for more background. + `read_timeout` | `float` | `2.0` | Read timeout for commands, see [PhpRedis](https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#timeouts) timeouts documentation for more background. + `persistent` | `bool` | `false` | Flag to specify whether to create a persistent connection or not + `version` | `string` | "" | The Redis server version. **MUST** be specified in a [Semantic Versioning 2.0.0](https://semver.org/#semantic-versioning-200) format. This information is used to determine some features/capabilities without opening a connection to the server. + `ssl_context` | `array\|SslContext\|null` | `null` | Associative array with [SSL context](https://www.php.net/manual/en/context.ssl.php) options. Can be also an instance of `SslContext` (class available from within the `redis` adapter). Available since adapter version v2.8.0. ## Memory Adapter @@ -842,9 +842,9 @@ Capability | Value ### Adapter Specific Options -Name | Data Type | Default Value | Description ----- | --------- | ------------- | ----------- -`memory_limit` | `string|integer` | 50% of `memory_limit` INI value | Limit of how much memory can PHP allocate to allow store items. +Name | Data Type | Default Value | Description +---- |-------------------| ------------- | ----------- +`memory_limit` | `string\|integer` | 50% of `memory_limit` INI value | Limit of how much memory can PHP allocate to allow store items. > #### Memory Limit > diff --git a/docs/book/v3/storage/plugin.md b/docs/book/v3/storage/plugin.md index d2a4f5a7..bf54520b 100644 --- a/docs/book/v3/storage/plugin.md +++ b/docs/book/v3/storage/plugin.md @@ -76,10 +76,10 @@ You may also configure the plugin to re-throw exceptions. ### Plugin specific Options -Name | Data Type | Default Value | Description ----- | --------- | ------------- | ----------- -`exception_callback` | `callable|null` | null | Callback to invoke on exception; receives the exception as the sole argument. -`throw_exceptions` | `boolean` | `true` | Re-throw caught exceptions. +Name | Data Type | Default Value | Description +---- |------------------| ------------- | ----------- +`exception_callback` | `callable\|null` | null | Callback to invoke on exception; receives the exception as the sole argument. +`throw_exceptions` | `boolean` | `true` | Re-throw caught exceptions. ## The IgnoreUserAbort Plugin @@ -116,10 +116,10 @@ by the underlying storage adapter. ### Plugin specific Options -Name | Data Type | Default Value | Description ----- | --------- | ------------- | ----------- -`serializer` | `null|string|Laminas\Serializer\Adapter\AdapterInterface` | `null` | The serializer to use; see below. -`serializer_options` | `array` | `[]` | Array of options to use when instantiating the specified serializer. +Name | Data Type | Default Value | Description +---- |--------------------------------------------------------------| ------------- | ----------- +`serializer` | `null\|string \|Laminas\Serializer\Adapter\AdapterInterface` | `null` | The serializer to use; see below. +`serializer_options` | `array` | `[]` | Array of options to use when instantiating the specified serializer. The `serializer` value has two special cases: diff --git a/docs/book/v4/application-integration/usage-in-a-laminas-mvc-application.md b/docs/book/v4/application-integration/usage-in-a-laminas-mvc-application.md index 68712387..c0ce7133 100644 --- a/docs/book/v4/application-integration/usage-in-a-laminas-mvc-application.md +++ b/docs/book/v4/application-integration/usage-in-a-laminas-mvc-application.md @@ -75,6 +75,7 @@ final class IndexController extends AbstractActionController To [register the controller](https://docs.laminas.dev/laminas-mvc/quick-start/#create-a-route) for the application, extend the configuration of the module. Add the following lines to the module configuration file, e.g. `module/Application/config/module.config.php`: +```php

 namespace Application;
 
@@ -89,6 +90,7 @@ return [
     // …
 ];
 
+``` The example uses the [config factory from laminas-servicemanager](https://docs.laminas.dev/laminas-servicemanager/config-abstract-factory/) which allows any string to be used to fetch a service from the application service container, like the name of the configured cache: `default-cache`. @@ -99,6 +101,7 @@ This means that the factory [searches for an appropriate configuration](https:// Extend the module configuration file to add the configuration for the controller. Use the name of the cache (`default-cache`), which was previously defined in the configuration of the caches, to retrieve the related cache storage instance: +```php

 namespace Application;
 
@@ -118,6 +121,7 @@ return [
     // …
 ];
 
+``` ## Using Multiple Caches @@ -125,6 +129,7 @@ The use more than one cache backend, the factory `Laminas\Cache\Service\StorageC Extend the cache configuration in `config/autoload/cache.global.php` and add more cache adapters: +```php

 return [
     'caches' => [
@@ -143,9 +148,11 @@ return [
     ],
 ];
 
+``` MISSING: **Installation Requirements** Make sure that the [used storage adapters are installed](#preparation): + ```bash $ composer require laminas/laminas-cache-storage-adapter-memory laminas/laminas-cache-storage-adapter-blackhole ``` @@ -154,6 +161,7 @@ $ composer require laminas/laminas-cache-storage-adapter-memory laminas/laminas- To use a different cache adapter for the controller, change the related module configuration and use one of the previously defined names: +```php

 namespace Application;
 
@@ -173,6 +181,7 @@ return [
     // …
 ];
 
+``` ## Learn More diff --git a/docs/book/v4/migration/to-version-4.md b/docs/book/v4/migration/to-version-4.md index ad0646f4..daac8f6b 100644 --- a/docs/book/v4/migration/to-version-4.md +++ b/docs/book/v4/migration/to-version-4.md @@ -35,10 +35,10 @@ This allows per-storage Metadata which can differ depending on the storage being - `AbstractAdapter` and `StorageInterface` are not aware of the methods `getMetadata` anymore. These were moved to the new `MetadataCapableInterface` - `Capabilities` do not provide `supportedMetadata` anymore. The supported metadata is tied to the used storage adapter and thus, was already requiring projects to explicitly know the exact implementation of the cache backend in case of using these metadatas anyway -- `KeyListIterator` and the corresponding `IteratorInterface` does not provide the `mode` `CURRENT_AS_METADATA` anymore +- `KeyListIterator` and the corresponding `IteratorInterface` does not provide the `mode` `CURRENT_AS_METADATA` anymore - `PluginOptions#getSerializer` does not create a serializer anymore if a `string` option was passed, instead, the `string` is returned - Increment and decrement feature was removed from `StorageInterface`, so there is no more `StorageInterface#incrementItem`, `StorageInterface#decrementItem`, `StorageInterface#decrementItems` and `StorageInterface#incrementItems` - - this also removes `incrementItem`, `incrementItems`, `decrementItem`, `derementItems` events (`pre`, `post` and `exception`) +- this also removes `incrementItem`, `incrementItems`, `decrementItem`, `derementItems` events (`pre`, `post` and `exception`) - Every method now has native return types - Every property now has native types - Every method argument now has native types diff --git a/docs/book/v4/storage/adapter.md b/docs/book/v4/storage/adapter.md index 3505b24f..5c062d4f 100644 --- a/docs/book/v4/storage/adapter.md +++ b/docs/book/v4/storage/adapter.md @@ -480,7 +480,6 @@ It will return an object with the following properties (or null): | `hits` | `int` | The amount of times the item was requested and returned from the backend | | `timeToLive` | `int` | The overall time to live (in seconds) the cache item was persisted for | - ### Adapter Specific Options | Name | Data Type | Default Value | Description | @@ -771,7 +770,6 @@ This adapter implements the following interfaces: |------------|----------|:---------------------------------------------| | `objectId` | `string` | The primary key within the mongo collection. | - ### Adapter Specific Options | Name | Data Type | Default Value | Description | diff --git a/docs/book/v4/storage/capabilities.md b/docs/book/v4/storage/capabilities.md index 0db2a237..f4398923 100644 --- a/docs/book/v4/storage/capabilities.md +++ b/docs/book/v4/storage/capabilities.md @@ -76,4 +76,4 @@ if ($supportedDataTypes['object']) { } else { $cache->set($key, serialize($object)); } -``` \ No newline at end of file +``` diff --git a/docs/book/v4/storage/plugin.md b/docs/book/v4/storage/plugin.md index cf66fa89..0c92bf0e 100644 --- a/docs/book/v4/storage/plugin.md +++ b/docs/book/v4/storage/plugin.md @@ -76,10 +76,10 @@ You may also configure the plugin to re-throw exceptions. ### Plugin specific Options -| Name | Data Type | Default Value | Description | -|----------------------|-----------|---------------|-----------------------------| -| `exception_callback` | `callable | null` | null | Callback to invoke on exception; receives the exception as the sole argument. -| `throw_exceptions` | `boolean` | `true` | Re-throw caught exceptions. | +| Name | Data Type | Default Value | Description | +|----------------------|--------------------|---------------|-----------------------------| +| `exception_callback` | `callable \| null` | null | Callback to invoke on exception; receives the exception as the sole argument.| +| `throw_exceptions` | `boolean` | `true` | Re-throw caught exceptions. | ## The IgnoreUserAbort Plugin From 5553656da9473ea711835e09f34a9cfa41fc511e Mon Sep 17 00:00:00 2001 From: Raj Mohan Date: Fri, 8 Nov 2024 14:14:38 +0530 Subject: [PATCH 07/14] Doc Lint Issue Fixes in Index and Adapter files Signed-off-by: Raj Mohan --- docs/book/index.md | 4 ++-- docs/book/v3/storage/adapter.md | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/book/index.md b/docs/book/index.md index 63ef94b3..543892fc 100644 --- a/docs/book/index.md +++ b/docs/book/index.md @@ -1,6 +1,6 @@ # Installation -### Using Composer +## Using Composer ```bash $ composer require laminas/laminas-cache @@ -8,7 +8,7 @@ $ composer require laminas/laminas-cache ## Learn -```html +```php
  • Usage in a laminas-mvc application diff --git a/docs/book/v3/storage/adapter.md b/docs/book/v3/storage/adapter.md index ab928061..ddb0a1a7 100644 --- a/docs/book/v3/storage/adapter.md +++ b/docs/book/v3/storage/adapter.md @@ -796,18 +796,18 @@ Capability | Value ### Adapter Specific Options -Name | Data Type | Default Value | Description +Name | Data Type | Default Value | Description ----------------------|---------------------------|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - `lib_options` | `array` | `[]` | Associative array of Redis options where the array key is the options constant value (see `RedisCluster::OPT_*` [constants](https://github.com/JetBrains/phpstorm-stubs/blob/master/redis/RedisCluster.php) for details). - `namespace_separator` | `string` | ":" | A separator for the namespace and prefix. - `password` | `string` | "" | Password to authenticate with Redis server - `name` | `string` | "" | Name to determine configuration from [php.ini](https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#loading-a-cluster-configuration-by-name) (**MUST NOT** be combined with `seeds`) - `seeds` | `array` | `[]` | List of strings containing `:` (**MUST NOT** be combined with `name`) - `timeout` | `float` | `1.0` | Timeout for commands, see [PhpRedis](https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#timeouts) timeouts documentation for more background. - `read_timeout` | `float` | `2.0` | Read timeout for commands, see [PhpRedis](https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#timeouts) timeouts documentation for more background. - `persistent` | `bool` | `false` | Flag to specify whether to create a persistent connection or not - `version` | `string` | "" | The Redis server version. **MUST** be specified in a [Semantic Versioning 2.0.0](https://semver.org/#semantic-versioning-200) format. This information is used to determine some features/capabilities without opening a connection to the server. - `ssl_context` | `array\|SslContext\|null` | `null` | Associative array with [SSL context](https://www.php.net/manual/en/context.ssl.php) options. Can be also an instance of `SslContext` (class available from within the `redis` adapter). Available since adapter version v2.8.0. + `lib_options` | `array` | `[]` | Associative array of Redis options where the array key is the options constant value (see `RedisCluster::OPT_*` [constants](https://github.com/JetBrains/phpstorm-stubs/blob/master/redis/RedisCluster.php) for details). + `namespace_separator` | `string` | ":" | A separator for the namespace and prefix. + `password` | `string` | "" | Password to authenticate with Redis server + `name` | `string` | "" | Name to determine configuration from [php.ini](https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#loading-a-cluster-configuration-by-name) (**MUST NOT** be combined with `seeds`) + `seeds` | `array` | `[]` | List of strings containing `:` (**MUST NOT** be combined with `name`) + `timeout` | `float` | `1.0` | Timeout for commands, see [PhpRedis](https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#timeouts) timeouts documentation for more background. + `read_timeout` | `float` | `2.0` | Read timeout for commands, see [PhpRedis](https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#timeouts) timeouts documentation for more background. + `persistent` | `bool` | `false` | Flag to specify whether to create a persistent connection or not + `version` | `string` | "" | The Redis server version. **MUST** be specified in a [Semantic Versioning 2.0.0](https://semver.org/#semantic-versioning-200) format. This information is used to determine some features/capabilities without opening a connection to the server. + `ssl_context` | `array\|SslContext\|null` | `null` | Associative array with [SSL context](https://www.php.net/manual/en/context.ssl.php) options. Can be also an instance of `SslContext` (class available from within the `redis` adapter). Available since adapter version v2.8.0. ## Memory Adapter From 74cb6fa9a272c7757d6b141ea16095fccec7827b Mon Sep 17 00:00:00 2001 From: Raj Mohan Date: Fri, 8 Nov 2024 18:39:48 +0530 Subject: [PATCH 08/14] Docs Lint Review Fixes Signed-off-by: Raj Mohan --- docs/book/index.md | 9 +++++---- .../usage-in-a-laminas-mvc-application.md | 12 ++++-------- .../usage-in-a-laminas-mvc-application.md | 12 ++++-------- 3 files changed, 13 insertions(+), 20 deletions(-) diff --git a/docs/book/index.md b/docs/book/index.md index 543892fc..bb1d10b8 100644 --- a/docs/book/index.md +++ b/docs/book/index.md @@ -1,6 +1,7 @@ -# Installation + +## Installation -## Using Composer +### Using Composer ```bash $ composer require laminas/laminas-cache @@ -8,10 +9,10 @@ $ composer require laminas/laminas-cache ## Learn -```php + -``` + diff --git a/docs/book/v3/application-integration/usage-in-a-laminas-mvc-application.md b/docs/book/v3/application-integration/usage-in-a-laminas-mvc-application.md index 2bd6b1ca..dec2aded 100644 --- a/docs/book/v3/application-integration/usage-in-a-laminas-mvc-application.md +++ b/docs/book/v3/application-integration/usage-in-a-laminas-mvc-application.md @@ -79,7 +79,7 @@ final class IndexController extends AbstractActionController To [register the controller](https://docs.laminas.dev/laminas-mvc/quick-start/#create-a-route) for the application, extend the configuration of the module. Add the following lines to the module configuration file, e.g. `module/Application/config/module.config.php`: -```php +
    
     namespace Application;
     
    @@ -94,7 +94,6 @@ return [
         // …
     ];
     
    -``` The example uses the [config factory from laminas-servicemanager](https://docs.laminas.dev/laminas-servicemanager/config-abstract-factory/) which allows any string to be used to fetch a service from the application service container, like the name of the configured cache: `default-cache`. @@ -105,7 +104,7 @@ This means that the factory [searches for an appropriate configuration](https:// Extend the module configuration file to add the configuration for the controller. Use the name of the cache (`default-cache`), which was previously defined in the configuration of the caches, to retrieve the related cache storage instance: -```php +
    
     namespace Application;
     
    @@ -125,7 +124,6 @@ return [
         // …
     ];
     
    -``` ## Using Multiple Caches @@ -133,7 +131,7 @@ The use more than one cache backend, the factory `Laminas\Cache\Service\StorageC Extend the cache configuration in `config/autoload/cache.global.php` and add more cache adapters: -```php +
    
     return [
         'caches' => [
    @@ -152,7 +150,6 @@ return [
         ],
     ];
     
    -``` MISSING: **Installation Requirements** Make sure that the [used storage adapters are installed](#preparation): @@ -165,7 +162,7 @@ $ composer require laminas/laminas-cache-storage-adapter-memory laminas/laminas- To use a different cache adapter for the controller, change the related module configuration and use one of the previously defined names: -```php +
    
     namespace Application;
     
    @@ -185,7 +182,6 @@ return [
         // …
     ];
     
    -``` ## Learn More diff --git a/docs/book/v4/application-integration/usage-in-a-laminas-mvc-application.md b/docs/book/v4/application-integration/usage-in-a-laminas-mvc-application.md index c0ce7133..c7583457 100644 --- a/docs/book/v4/application-integration/usage-in-a-laminas-mvc-application.md +++ b/docs/book/v4/application-integration/usage-in-a-laminas-mvc-application.md @@ -75,7 +75,7 @@ final class IndexController extends AbstractActionController To [register the controller](https://docs.laminas.dev/laminas-mvc/quick-start/#create-a-route) for the application, extend the configuration of the module. Add the following lines to the module configuration file, e.g. `module/Application/config/module.config.php`: -```php +
    
     namespace Application;
     
    @@ -90,7 +90,6 @@ return [
         // …
     ];
     
    -``` The example uses the [config factory from laminas-servicemanager](https://docs.laminas.dev/laminas-servicemanager/config-abstract-factory/) which allows any string to be used to fetch a service from the application service container, like the name of the configured cache: `default-cache`. @@ -101,7 +100,7 @@ This means that the factory [searches for an appropriate configuration](https:// Extend the module configuration file to add the configuration for the controller. Use the name of the cache (`default-cache`), which was previously defined in the configuration of the caches, to retrieve the related cache storage instance: -```php +
    
     namespace Application;
     
    @@ -121,7 +120,6 @@ return [
         // …
     ];
     
    -``` ## Using Multiple Caches @@ -129,7 +127,7 @@ The use more than one cache backend, the factory `Laminas\Cache\Service\StorageC Extend the cache configuration in `config/autoload/cache.global.php` and add more cache adapters: -```php +
    
     return [
         'caches' => [
    @@ -148,7 +146,6 @@ return [
         ],
     ];
     
    -``` MISSING: **Installation Requirements** Make sure that the [used storage adapters are installed](#preparation): @@ -161,7 +158,7 @@ $ composer require laminas/laminas-cache-storage-adapter-memory laminas/laminas- To use a different cache adapter for the controller, change the related module configuration and use one of the previously defined names: -```php +
    
     namespace Application;
     
    @@ -181,7 +178,6 @@ return [
         // …
     ];
     
    -``` ## Learn More From 089bd59029c607563c0d383c8a90fd139003eee0 Mon Sep 17 00:00:00 2001 From: Raj Mohan Date: Fri, 8 Nov 2024 20:54:14 +0530 Subject: [PATCH 09/14] Doc Lint Issue: Heading Increment Signed-off-by: Raj Mohan --- docs/book/index.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/book/index.md b/docs/book/index.md index bb1d10b8..699cd00b 100644 --- a/docs/book/index.md +++ b/docs/book/index.md @@ -1,6 +1,5 @@ - ## Installation - + ### Using Composer ```bash From 41c0dfaa5e341708d2437ef19e174ce4f17f103d Mon Sep 17 00:00:00 2001 From: Raj Mohan Date: Fri, 8 Nov 2024 20:58:28 +0530 Subject: [PATCH 10/14] Doc Lint Issue: Heading Increment Issue Signed-off-by: Raj Mohan --- docs/book/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/book/index.md b/docs/book/index.md index 699cd00b..f30de678 100644 --- a/docs/book/index.md +++ b/docs/book/index.md @@ -1,11 +1,12 @@ ## Installation - + ### Using Composer ```bash $ composer require laminas/laminas-cache ``` + ## Learn From 474ba1718aed1cab0ee9f10096067df454036abe Mon Sep 17 00:00:00 2001 From: Raj Mohan Date: Fri, 8 Nov 2024 21:05:52 +0530 Subject: [PATCH 11/14] Doc Lint Issue: Heading Increment Signed-off-by: Raj Mohan --- docs/book/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/book/index.md b/docs/book/index.md index f30de678..bb1d10b8 100644 --- a/docs/book/index.md +++ b/docs/book/index.md @@ -1,3 +1,4 @@ + ## Installation ### Using Composer @@ -6,7 +7,6 @@ $ composer require laminas/laminas-cache ``` - ## Learn From 6941eab7af267e049b19cfd5e9cda8d661507f92 Mon Sep 17 00:00:00 2001 From: Raj Mohan Date: Mon, 11 Nov 2024 12:19:55 +0530 Subject: [PATCH 12/14] Doc Lint Issue: First Line Heading Fix Signed-off-by: Raj Mohan --- docs/book/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/book/index.md b/docs/book/index.md index bb1d10b8..cc29e9c8 100644 --- a/docs/book/index.md +++ b/docs/book/index.md @@ -1,4 +1,4 @@ - + ## Installation ### Using Composer From 2cda72095f9a4c793c2985a6bf831d803babeddd Mon Sep 17 00:00:00 2001 From: Raj Mohan Date: Tue, 12 Nov 2024 18:02:39 +0530 Subject: [PATCH 13/14] Docs Lint Issue Fix Signed-off-by: Raj Mohan --- docs/book/v4/migration/to-version-4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/book/v4/migration/to-version-4.md b/docs/book/v4/migration/to-version-4.md index daac8f6b..456959f0 100644 --- a/docs/book/v4/migration/to-version-4.md +++ b/docs/book/v4/migration/to-version-4.md @@ -38,7 +38,7 @@ This allows per-storage Metadata which can differ depending on the storage being - `KeyListIterator` and the corresponding `IteratorInterface` does not provide the `mode` `CURRENT_AS_METADATA` anymore - `PluginOptions#getSerializer` does not create a serializer anymore if a `string` option was passed, instead, the `string` is returned - Increment and decrement feature was removed from `StorageInterface`, so there is no more `StorageInterface#incrementItem`, `StorageInterface#decrementItem`, `StorageInterface#decrementItems` and `StorageInterface#incrementItems` -- this also removes `incrementItem`, `incrementItems`, `decrementItem`, `derementItems` events (`pre`, `post` and `exception`) + - this also removes `incrementItem`, `incrementItems`, `decrementItem`, `derementItems` events (`pre`, `post` and `exception`) - Every method now has native return types - Every property now has native types - Every method argument now has native types From 04af6739cc4c0974c2c4a2f322eb5c5fb0f18930 Mon Sep 17 00:00:00 2001 From: Raj Mohan Date: Mon, 25 Nov 2024 20:39:28 +0530 Subject: [PATCH 14/14] DocsLint Issue Fixes Signed-off-by: Raj Mohan --- docs/book/v2/storage/adapter.md | 547 ++++++++++++++++---------------- docs/book/v3/storage/adapter.md | 320 +++++++++---------- 2 files changed, 433 insertions(+), 434 deletions(-) diff --git a/docs/book/v2/storage/adapter.md b/docs/book/v2/storage/adapter.md index 998e68da..e3360170 100644 --- a/docs/book/v2/storage/adapter.md +++ b/docs/book/v2/storage/adapter.md @@ -45,7 +45,7 @@ $cache = $storageFactory->create( 'name' => 'exception_handler', 'options' => [ 'throw_exceptions' => false, - ], + ], ], ] ); @@ -59,7 +59,7 @@ $cache = $storageFactory->createFromArrayConfiguration([ 'name' => 'exception_handler', 'options' => [ 'throw_exceptions' => false, - ], + ], ], ], ]); @@ -95,13 +95,13 @@ The following configuration options are defined by `Laminas\Cache\Storage\Adapte are available for every supported adapter. Adapter-specific configuration options are described on adapter level below. -| Option | Data Type | Default Value | Description | -|---------------|-----------|----------------|------------------------------------------------| -| `ttl` | `integer` | `0` | Time to live | -| `namespace` | `string` | “laminascache” | The “namespace” in which cache items will live | -| `key_pattern` | `null | `string\|null` | Pattern against which to validate cache keys | -| `readable` | `boolean` | `true` | Enable/Disable reading data from cache | -| `writable` | `boolean` | `true` | Enable/Disable writing data to cache | +Option | Data Type | Default Value | Description +------ |----------------| ------------- | ----------- +`ttl` | `integer` | `0` | Time to live +`namespace` | `string` | “laminascache” | The “namespace” in which cache items will live +`key_pattern` | `null\|string` | `null` | Pattern against which to validate cache keys +`readable` | `boolean` | `true` | Enable/Disable reading data from cache +`writable` | `boolean` | `true` | Enable/Disable writing data to cache ## StorageInterface @@ -568,25 +568,25 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|---------------------------------------------------------------------------------------| -| `supportedDatatypes` | `null`, `bool`, `int`, `float`, `string`, `array` (serialized), `object` (serialized) | -| `supportedMetadata` | internal_key, atime, ctime, mtime, rtime, size, hits, ttl | -| `minTtl` | 1 | -| `maxTtl` | 0 | -| `staticTtl` | `true` | -| `ttlPrecision` | 1 | -| `useRequestTime` | value of `apc.use_request_time` from `php.ini` | -| `lockOnExpire` | 0 | -| `maxKeyLength` | 5182 | -| `namespaceIsPrefix` | `true` | -| `namespaceSeparator` | Option value of `namespace_separator` | +Capability | Value +---------- | ----- +`supportedDatatypes` | `null`, `bool`, `int`, `float`, `string`, `array` (serialized), `object` (serialized) +`supportedMetadata` | internal_key, atime, ctime, mtime, rtime, size, hits, ttl +`minTtl` | 1 +`maxTtl` | 0 +`staticTtl` | `true` +`ttlPrecision` | 1 +`useRequestTime` | value of `apc.use_request_time` from `php.ini` +`lockOnExpire` | 0 +`maxKeyLength` | 5182 +`namespaceIsPrefix` | `true` +`namespaceSeparator` | Option value of `namespace_separator` ### Adapter Specific Options -| Name | Data Type | Default Value | Description | -|-----------------------|-----------|---------------|-------------------------------------------| -| `namespace_separator` | `string` | ":" | A separator for the namespace and prefix. | +Name | Data Type | Default Value | Description +---- | --------- | ------------- | ----------- +`namespace_separator` | `string` | ":" | A separator for the namespace and prefix. ## BlackHole Adapter @@ -607,25 +607,25 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|-------------------------------------------------------------| -| `supportedDatatypes` | `null`, `bool`, `int`, `float`, `string`, `array`, `object` | -| `supportedMetadata` | none | -| `minTtl` | 0 or 1, depending on `psr` option. | -| `maxTtl` | 0 | -| `staticTtl` | `false` or `true`, depending on `psr` option | -| `ttlPrecision` | 1 | -| `useRequestTime` | false | -| `lockOnExpire` | 0 | -| `maxKeyLength` | -1 | -| `namespaceIsPrefix` | `true` | -| `namespaceSeparator` | none | +Capability | Value +---------- | ----- +`supportedDatatypes` | `null`, `bool`, `int`, `float`, `string`, `array`, `object` +`supportedMetadata` | none +`minTtl` | 0 or 1, depending on `psr` option. +`maxTtl` | 0 +`staticTtl` | `false` or `true`, depending on `psr` option +`ttlPrecision` | 1 +`useRequestTime` | false +`lockOnExpire` | 0 +`maxKeyLength` | -1 +`namespaceIsPrefix` | `true` +`namespaceSeparator` | none ### Adapter Specific Options -| Name | Data Type | Default Value | Description | -|-------|-----------|---------------|------------------------------------------------------------------------------------------------------------------| -| `psr` | `bool` | `false` | Flag to specify whether the adapter should be compatible with `CacheItemPoolDecorator` or `SimpleCacheDecorator` | +Name | Data Type | Default Value | Description +---- | --------- | ------------- | ----------- +`psr` | `bool` | `false` | Flag to specify whether the adapter should be compatible with `CacheItemPoolDecorator` or `SimpleCacheDecorator` >### Deprecation Notice > @@ -650,23 +650,23 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|--------------------------------------------------------------------------------------------------| -| `supportedDatatypes` | `string`, `null` => `string`, `boolean` => `string`, `integer` => `string`, `double` => `string` | -| `supportedMetadata` | none | -| `minTtl` | 0 | -| `maxKeyLength` | 0 | -| `namespaceIsPrefix` | `true` | -| `namespaceSeparator` | Option value of `namespace_separator` | +Capability | Value +---------- | ----- +`supportedDatatypes` | `string`, `null` => `string`, `boolean` => `string`, `integer` => `string`, `double` => `string` +`supportedMetadata` | none +`minTtl` | 0 +`maxKeyLength` | 0 +`namespaceIsPrefix` | `true` +`namespaceSeparator` | Option value of `namespace_separator` ### Adapter Specific Options -| Name | Data Type | Default Value | Description | -|-----------------------|-----------|---------------|-------------------------------------------------------------------------------------------------------------------------------------| -| `namespace_separator` | `string` | ":" | A separator for the namespace and prefix. | -| `pathname` | `string` | "" | Pathname to the database file. | -| `mode` | `string` | "c" | The mode with which to open the database; please read [dba_open](http://php.net/manual/function.dba-open.php) for more information. | -| `handler` | `string` | "flatfile" | The name of the handler which shall be used for accessing the database. | +Name | Data Type | Default Value | Description +---- | --------- | ------------- | ----------- +`namespace_separator` | `string` | ":" | A separator for the namespace and prefix. +`pathname` | `string` | "" | Pathname to the database file. +`mode` | `string` | "c" | The mode with which to open the database; please read [dba_open](http://php.net/manual/function.dba-open.php) for more information. +`handler` | `string` | "flatfile" | The name of the handler which shall be used for accessing the database. > ### This adapter doesn't support automatic expiry > @@ -692,38 +692,37 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|--------------------------------------------------------------------------------------------------| -| `supportedDatatypes` | `string`, `null` => `string`, `boolean` => `string`, `integer` => `string`, `double` => `string` | -| `supportedMetadata` | mtime, filespec, atime, ctime | -| `minTtl` | 1 | -| `maxTtl` | 0 | -| `staticTtl` | `false` | -| `ttlPrecision` | 1 | -| `useRequestTime` | `false` | -| `lockOnExpire` | 0 | -| `maxKeyLength` | 251 | -| `namespaceIsPrefix` | `true` | -| `namespaceSeparator` | Option value of `namespace_separator` | +Capability | Value +---------- | ----- +`supportedDatatypes` | `string`, `null` => `string`, `boolean` => `string`, `integer` => `string`, `double` => `string` +`supportedMetadata` | mtime, filespec, atime, ctime +`minTtl` | 1 +`maxTtl` | 0 +`staticTtl` | `false` +`ttlPrecision` | 1 +`useRequestTime` | `false` +`lockOnExpire` | 0 +`maxKeyLength` | 251 +`namespaceIsPrefix` | `true` +`namespaceSeparator` | Option value of `namespace_separator` ### Adapter Specific Options - -| Name | Data Type | Default Value | Description | -|-----------------------|------------------|------------------------|-------------------------------------------------------------------------------------| -| `namespace_separator` | `string` | ":" | A separator for the namespace and prefix | -| `cache_dir` | `string` | "" | Directory to store cache files. | -| `clear_stat_cache` | `boolean` | `true` | Call `clearstatcache()` enabled? | -| `dir_level` | `integer` | `1` | Defines how much sub-directories should be created. | -| `dir_permission` | `integer` | `false` | 0700 Set explicit permission on creating new directories. | -| `file_locking` | `boolean` | `true` | Lock files on writing. | -| `file_permission` | `integer` | `false` | 0600 Set explicit permission on creating new files. | -| `key_pattern` | `string` | `/^[a-z0-9_\+\-]*$/Di` | Validate key against pattern. | -| `no_atime` | `boolean` | `true` | Don’t get ‘fileatime’ as ‘atime’ on metadata. | -| `no_ctime` | `boolean` | `true` | Don’t get ‘filectime’ as ‘ctime’ on metadata. | -| `umask` | `integer\|false` | `false` | Use [umask](http://wikipedia.org/wiki/Umask) to set file and directory permissions. | -| `suffix` | `string` | `dat` | Suffix for cache files | -| `tag_suffix` | `string` | `tag` | Suffix for tag files | +Name | Data Type | Default Value | Description +---- |------------------| ------------- | ----------- +`namespace_separator` | `string` | ":" | A separator for the namespace and prefix +`cache_dir` | `string` | "" | Directory to store cache files. +`clear_stat_cache` | `boolean` | `true` | Call `clearstatcache()` enabled? +`dir_level` | `integer` | `1` | Defines how much sub-directories should be created. +`dir_permission` | `integer` | `false` | 0700 Set explicit permission on creating new directories. +`file_locking` | `boolean` | `true` | Lock files on writing. +`file_permission` | `integer` | `false` | 0600 Set explicit permission on creating new files. +`key_pattern` | `string` | `/^[a-z0-9_\+\-]*$/Di` | Validate key against pattern. +`no_atime` | `boolean` | `true` | Don’t get ‘fileatime’ as ‘atime’ on metadata. +`no_ctime` | `boolean` | `true` | Don’t get ‘filectime’ as ‘ctime’ on metadata. +`umask` | `integer\|false` | `false` | Use [umask](http://wikipedia.org/wiki/Umask) to set file and directory permissions. +`suffix` | `string` | `dat` | Suffix for cache files +`tag_suffix` | `string` | `tag` | Suffix for tag files Note: the `suffix` and `tag_suffix` options will be escaped in order to be safe for glob operations. @@ -743,26 +742,26 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|-----------------------------------------------------------------------------------------------| -| `supportedDatatypes` | `null`, `boolean`, `integer`, `double`, `string`, `array` (serialized), `object` (serialized) | -| `supportedMetadata` | none | -| `minTtl` | 1 | -| `maxTtl` | 0 | -| `staticTtl` | `true` | -| `ttlPrecision` | 1 | -| `useRequestTime` | `false` | -| `lockOnExpire` | 0 | -| `maxKeyLength` | 255 | -| `namespaceIsPrefix` | `true` | -| `namespaceSeparator` | none | +Capability | Value +---------- | ----- +`supportedDatatypes` | `null`, `boolean`, `integer`, `double`, `string`, `array` (serialized), `object` (serialized) +`supportedMetadata` | none +`minTtl` | 1 +`maxTtl` | 0 +`staticTtl` | `true` +`ttlPrecision` | 1 +`useRequestTime` | `false` +`lockOnExpire` | 0 +`maxKeyLength` | 255 +`namespaceIsPrefix` | `true` +`namespaceSeparator` | none ### Adapter Specific Options -| Name | Data Type | Default Value | Description | -|---------------|-----------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `servers` | `array` | `[]` | List of servers in the format `[] = [string host, integer port]` | -| `lib_options` | `array` | `[]` | Associative array of Libmemcached options where the array key is the option name (without the prefix `OPT_`) or the constant value. The array value is the option value. Please read [the memcached setOption() page](http://php.net/manual/memcached.setoption.php) for more information | +Name | Data Type | Default Value | Description +---- | --------- | ------------- | ----------- +`servers` | `array` | `[]` | List of servers in the format `[] = [string host, integer port]` +`lib_options` | `array` | `[]` | Associative array of Libmemcached options where the array key is the option name (without the prefix `OPT_`) or the constant value. The array value is the option value. Please read [the memcached setOption() page](http://php.net/manual/memcached.setoption.php) for more information ## Redis Adapter @@ -778,31 +777,31 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|-------------------------------------------------------| -| `supportedDatatypes` | `string`, `array` (serialized), `object` (serialized) | -| `supportedMetadata` | ttl (Redis v2+) | -| `minTtl` | 1 | -| `maxTtl` | 0 | -| `staticTtl` | `true` | -| `ttlPrecision` | 1 | -| `useRequestTime` | `false` | -| `lockOnExpire` | 0 | -| `maxKeyLength` | 512000000 (in Redis v3+, 255 otherwise) | -| `namespaceIsPrefix` | `true` | -| `namespaceSeparator` | none | +Capability | Value +---------- | ----- +`supportedDatatypes` | `string`, `array` (serialized), `object` (serialized) +`supportedMetadata` | ttl (Redis v2+) +`minTtl` | 1 +`maxTtl` | 0 +`staticTtl` | `true` +`ttlPrecision` | 1 +`useRequestTime` | `false` +`lockOnExpire` | 0 +`maxKeyLength` | 512000000 (in Redis v3+, 255 otherwise) +`namespaceIsPrefix` | `true` +`namespaceSeparator` | none ### Adapter Specific Options -| Name | Data Type | Default Value | Description | -|-----------------------|-----------------|---------------|---------------------------------------------------------------------------------------------| -| `database` | `integer` | 0 | Set database identifier. | -| `lib_options` | `array` | `[]` | Associative array of Redis options where the array key is the option name. | -| `namespace_separator` | `string` | ":" | A separator for the namespace and prefix. | -| `password` | `string` | "" | Set password. | -| `persistent_id` | `string` | | Set persistent id (name of the connection, leave blank to not use a persistent connection). | -| `resource_manager` | `string` | "" | Set the Redis resource manager to use | -| `server` | `string\|array` | "" | See below. | +Name | Data Type | Default Value | Description +---- | --------- | ------------- | ----------- +`database` | `integer` | 0 | Set database identifier. +`lib_options` | `array` | `[]` | Associative array of Redis options where the array key is the option name. +`namespace_separator` | `string` | ":" | A separator for the namespace and prefix. +`password` | `string` | "" | Set password. +`persistent_id` | `string` | | Set persistent id (name of the connection, leave blank to not use a persistent connection). +`resource_manager` | `string` | "" | Set the Redis resource manager to use +`server` | `string\|array` | "" | See below. `server` can be described as any of the following: @@ -823,33 +822,33 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|-------------------------------------------------------| -| `supportedDatatypes` | `string`, `array` (serialized), `object` (serialized) | -| `supportedMetadata` | ttl (Redis v2+) | -| `minTtl` | 1 | -| `maxTtl` | 0 | -| `staticTtl` | `true` | -| `ttlPrecision` | 1 | -| `useRequestTime` | `false` | -| `lockOnExpire` | 0 | -| `maxKeyLength` | 512000000 (in Redis v3+, 255 otherwise) | -| `namespaceIsPrefix` | `true` | -| `namespaceSeparator` | none | +Capability | Value +---------- | ----- +`supportedDatatypes` | `string`, `array` (serialized), `object` (serialized) +`supportedMetadata` | ttl (Redis v2+) +`minTtl` | 1 +`maxTtl` | 0 +`staticTtl` | `true` +`ttlPrecision` | 1 +`useRequestTime` | `false` +`lockOnExpire` | 0 +`maxKeyLength` | 512000000 (in Redis v3+, 255 otherwise) +`namespaceIsPrefix` | `true` +`namespaceSeparator` | none ### Adapter Specific Options -| Name | Data Type | Default Value | Description | -|-----------------------|-----------|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `lib_options` | `array` | `[]` | Associative array of Redis options where the array key is the options constant value (see `RedisCluster::OPT_*` [constants](https://github.com/JetBrains/phpstorm-stubs/blob/master/redis/RedisCluster.php) for details). | -| `namespace_separator` | `string` | ":" | A separator for the namespace and prefix. | -| `password` | `string` | "" | Password to authenticate with Redis server | -| `name` | `string` | "" | Name to determine configuration from [php.ini](https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#loading-a-cluster-configuration-by-name) (**MUST NOT** be combined with `seeds`) | -| `seeds` | `array` | `[]` | List of strings containing `:` (**MUST NOT** be combined with `name`) | -| `timeout` | `float` | `1.0` | Timeout for commands, see [PhpRedis](https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#timeouts) timeouts documentation for more background. | -| `read_timeout` | `float` | `2.0` | Read timeout for commands, see [PhpRedis](https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#timeouts) timeouts documentation for more background. | -| `persistent` | `bool` | `false` | Flag to specify whether to create a persistent connection or not | -| `version` | `string` | "" | The Redis server version. **MUST** be specified in a [Semantic Versioning 2.0.0](https://semver.org/#semantic-versioning-200) format. This information is used to determine some features/capabilities without opening a connection to the server. | +Name | Data Type | Default Value | Description +---- | --------- | ------------- | ----------- +`lib_options` | `array` | `[]` | Associative array of Redis options where the array key is the options constant value (see `RedisCluster::OPT_*` [constants](https://github.com/JetBrains/phpstorm-stubs/blob/master/redis/RedisCluster.php) for details). +`namespace_separator` | `string` | ":" | A separator for the namespace and prefix. +`password` | `string` | "" | Password to authenticate with Redis server +`name` | `string` | "" | Name to determine configuration from [php.ini](https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#loading-a-cluster-configuration-by-name) (**MUST NOT** be combined with `seeds`) +`seeds` | `array` | `[]` | List of strings containing `:` (**MUST NOT** be combined with `name`) +`timeout` | `float` | `1.0` | Timeout for commands, see [PhpRedis](https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#timeouts) timeouts documentation for more background. +`read_timeout` | `float` | `2.0` | Read timeout for commands, see [PhpRedis](https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#timeouts) timeouts documentation for more background. +`persistent` | `bool` | `false` | Flag to specify whether to create a persistent connection or not +`version` | `string` | "" | The Redis server version. **MUST** be specified in a [Semantic Versioning 2.0.0](https://semver.org/#semantic-versioning-200) format. This information is used to determine some features/capabilities without opening a connection to the server. ## Memory Adapter @@ -869,34 +868,34 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|---------------------------------------------------------------------------------| -| `supportedDatatypes` | `string`, `null`, `boolean`, `integer`, `double`, `array`, `object`, `resource` | -| `supportedMetadata` | mtime | -| `minTtl` | 1 | -| `maxTtl` | Value of `PHP_INT_MAX` | -| `staticTtl` | `false` | -| `ttlPrecision` | 0.05 | -| `useRequestTime` | `false` | -| `lockOnExpire` | 0 | -| `maxKeyLength` | 0 | -| `namespaceIsPrefix` | `false` | +Capability | Value +---------- | ----- +`supportedDatatypes` | `string`, `null`, `boolean`, `integer`, `double`, `array`, `object`, `resource` +`supportedMetadata` | mtime +`minTtl` | 1 +`maxTtl` | Value of `PHP_INT_MAX` +`staticTtl` | `false` +`ttlPrecision` | 0.05 +`useRequestTime` | `false` +`lockOnExpire` | 0 +`maxKeyLength` | 0 +`namespaceIsPrefix` | `false` ### Adapter Specific Options -| Name | Data Type | Default Value | Description | -|----------------|-------------------|---------------------------------|-----------------------------------------------------------------| -| `memory_limit` | `string\|integer` | 50% of `memory_limit` INI value | Limit of how much memory can PHP allocate to allow store items. | +Name | Data Type | Default Value | Description +---- |-------------------| ------------- | ----------- +`memory_limit` | `string\|integer` | 50% of `memory_limit` INI value | Limit of how much memory can PHP allocate to allow store items. > #### Memory Limit > > The adapter has the following behavior with regards to the memory limit: > > - If the consumed memory exceeds the limit provided, an `OutOfSpaceException` -> is thrown. + > is thrown. > - A number less the or equal to zero disables the memory limit. > - When a value is provided for the memory limit, the value is measured in -> bytes. Shorthand notation may also be provided. + > bytes. Shorthand notation may also be provided. > ### Current process only > @@ -920,36 +919,36 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|-----------------------------------------------------------| -| `supportedDatatypes` | `string`, `null`, `boolean`, `integer`, `double`, `array` | -| `supportedMetadata` | _id | -| `minTtl` | 0 | -| `maxTtl` | 0 | -| `staticTtl` | `true` | -| `ttlPrecision` | 1 | -| `useRequestTime` | `false` | -| `lockOnExpire` | 0 | -| `maxKeyLength` | 255 | -| `namespaceIsPrefix` | `true` | -| `namespaceSeparator` | *Option value of `namespace_separator`* | +Capability | Value +---------- | ----- +`supportedDatatypes` | `string`, `null`, `boolean`, `integer`, `double`, `array` +`supportedMetadata` | _id +`minTtl` | 0 +`maxTtl` | 0 +`staticTtl` | `true` +`ttlPrecision` | 1 +`useRequestTime` | `false` +`lockOnExpire` | 0 +`maxKeyLength` | 255 +`namespaceIsPrefix` | `true` +`namespaceSeparator` | *Option value of `namespace_separator`* ### Adapter Specific Options -| Name | Data Type | Default Value | Description | -|-----------------------|-----------|---------------|----------------------------------------------------------------------| -| `lib_option` | `array` | | Associative array of options where the array key is the option name. | -| `namespace_separator` | `string` | ":" | A separator for the namespace and prefix. | +Name | Data Type | Default Value | Description +---- | --------- | ------------- | ----------- +`lib_option` | `array` | | Associative array of options where the array key is the option name. +`namespace_separator` | `string` | ":" | A separator for the namespace and prefix. Available keys for `lib_option` include: -| Key | Default | Description | -|---------------------|-----------------------------------------|------------------------------------------------------------------------------------------------------------------------| -| `server` | `mongodb://localhost:27017` | The MongoDB server connection string (see the [MongoClient docs](http://php.net/MongoClient)). | -| `database` | `laminas` | Name of the database to use; MongoDB will create this database if it does not exist. | -| `collection` | `cache` | Name of the collection to use; MongoDB will create this collection if it does not exist. | -| `connectionOptions` | `['fsync' => false, 'journal' => true]` | Associative array of options to pass to `MongoClient` (see the [MongoClient docs](http://php.net/MongoClient)). | -| `driverOptions` | `[]` | Associative array of driver options to pass to `MongoClient` (see the [MongoClient docs](http://php.net/MongoClient)). | +Key | Default | Description +--- | ------- | ----------- +`server` | `mongodb://localhost:27017` | The MongoDB server connection string (see the [MongoClient docs](http://php.net/MongoClient)). +`database` | `laminas` | Name of the database to use; MongoDB will create this database if it does not exist. +`collection` | `cache` | Name of the collection to use; MongoDB will create this collection if it does not exist. +`connectionOptions` | `['fsync' => false, 'journal' => true]` | Associative array of options to pass to `MongoClient` (see the [MongoClient docs](http://php.net/MongoClient)). +`driverOptions` | `[]` | Associative array of driver options to pass to `MongoClient` (see the [MongoClient docs](http://php.net/MongoClient)). ## ExtMongoDB Adapter @@ -974,36 +973,36 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|-----------------------------------------------------------| -| `supportedDatatypes` | `string`, `null`, `boolean`, `integer`, `double`, `array` | -| `supportedMetadata` | _id | -| `minTtl` | 0 | -| `maxTtl` | 0 | -| `staticTtl` | `true` | -| `ttlPrecision` | 1 | -| `useRequestTime` | `false` | -| `lockOnExpire` | 0 | -| `maxKeyLength` | 255 | -| `namespaceIsPrefix` | `true` | -| `namespaceSeparator` | *Option value of `namespace_separator`* | +Capability | Value +---------- | ----- +`supportedDatatypes` | `string`, `null`, `boolean`, `integer`, `double`, `array` +`supportedMetadata` | _id +`minTtl` | 0 +`maxTtl` | 0 +`staticTtl` | `true` +`ttlPrecision` | 1 +`useRequestTime` | `false` +`lockOnExpire` | 0 +`maxKeyLength` | 255 +`namespaceIsPrefix` | `true` +`namespaceSeparator` | *Option value of `namespace_separator`* ### Adapter Specific Options -| Name | Data Type | Default Value | Description | -|-----------------------|-----------|---------------|----------------------------------------------------------------------| -| `lib_option` | `array` | | Associative array of options where the array key is the option name. | -| `namespace_separator` | `string` | ":" | A separator for the namespace and prefix. | +Name | Data Type | Default Value | Description +---- | --------- | ------------- | ----------- +`lib_option` | `array` | | Associative array of options where the array key is the option name. +`namespace_separator` | `string` | ":" | A separator for the namespace and prefix. Available keys for `lib_option` include: -| Key | Default | Description | -|---------------------|-----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `server` | `mongodb://localhost:27017` | The MongoDB server connection string (see the [MongoDB\\Client docs](https://docs.mongodb.com/php-library/current/reference/method/MongoDBClient__construct/)). | -| `database` | `laminas` | Name of the database to use; MongoDB will create this database if it does not exist. | -| `collection` | `cache` | Name of the collection to use; MongoDB will create this collection if it does not exist. | -| `connectionOptions` | `['fsync' => false, 'journal' => true]` | Associative array of URI options (such as authentication credentials or query string parameters) to pass to `MongoDB\\Client` (see the [MongoDB\\Client docs](https://docs.mongodb.com/php-library/current/reference/method/MongoDBClient__construct/)). | -| `driverOptions` | `[]` | Associative array of driver options to pass to `MongoDB\\Client` (see the [MongoDB\\Client docs](https://docs.mongodb.com/php-library/current/reference/method/MongoDBClient__construct/)). | +Key | Default | Description +--- | ------- | ----------- +`server` | `mongodb://localhost:27017` | The MongoDB server connection string (see the [MongoDB\\Client docs](https://docs.mongodb.com/php-library/current/reference/method/MongoDBClient__construct/)). +`database` | `laminas` | Name of the database to use; MongoDB will create this database if it does not exist. +`collection` | `cache` | Name of the collection to use; MongoDB will create this collection if it does not exist. +`connectionOptions` | `['fsync' => false, 'journal' => true]` | Associative array of URI options (such as authentication credentials or query string parameters) to pass to `MongoDB\\Client` (see the [MongoDB\\Client docs](https://docs.mongodb.com/php-library/current/reference/method/MongoDBClient__construct/)). +`driverOptions` | `[]` | Associative array of driver options to pass to `MongoDB\\Client` (see the [MongoDB\\Client docs](https://docs.mongodb.com/php-library/current/reference/method/MongoDBClient__construct/)). ## WinCache Adapter @@ -1019,24 +1018,24 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|-----------------------------------------------------------------------------------------------| -| `supportedDatatypes` | `null`, `boolean`, `integer`, `double`, `string`, `array` (serialized), `object` (serialized) | -| `supportedMetadata` | internal_key, ttl, hits, size | -| `minTtl` | 1 | -| `maxTtl` | 0 | -| `staticTtl` | `true` | -| `ttlPrecision` | 1 | -| `useRequestTime` | `apc.use_request_time` `php.ini` value. | -| `lockOnExpire` | 0 | -| `namespaceIsPrefix` | `true` | -| `namespaceSeparator` | Option value of `namespace_separator` | +Capability | Value +---------- | ----- +`supportedDatatypes` | `null`, `boolean`, `integer`, `double`, `string`, `array` (serialized), `object` (serialized) +`supportedMetadata` | internal_key, ttl, hits, size +`minTtl` | 1 +`maxTtl` | 0 +`staticTtl` | `true` +`ttlPrecision` | 1 +`useRequestTime` | `apc.use_request_time` `php.ini` value. +`lockOnExpire` | 0 +`namespaceIsPrefix` | `true` +`namespaceSeparator` | Option value of `namespace_separator` ### Adapter Specific Options -| Name | Data Type | Default Value | Description | -|-----------------------|-----------|---------------|-------------------------------------------| -| `namespace_separator` | `string` | ":" | A separator for the namespace and prefix. | +Name | Data Type | Default Value | Description +---- | --------- | ------------- | ----------- +`namespace_separator` | `string` | ":" | A separator for the namespace and prefix. ## XCache Adapter @@ -1055,28 +1054,28 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|---------------------------------------------------------------------------------------| -| `supportedDatatypes` | `boolean`, `integer`, `double`, `string`, `array` (serialized), `object` (serialized) | -| `supportedMetadata` | internal_key, size, refcount, hits, ctime, atime, hvalue | -| `minTtl` | 1 | -| `maxTtl` | `xcache.var_maxttl` `php.ini` value | -| `staticTtl` | `true` | -| `ttlPrecision` | 1 | -| `useRequestTime` | `true` | -| `lockOnExpire` | 0 | -| `maxKeyLength` | 5182 | -| `namespaceIsPrefix` | `true` | -| `namespaceSeparator` | Option value of `namespace_separator` | +Capability | Value +---------- | ----- +`supportedDatatypes` | `boolean`, `integer`, `double`, `string`, `array` (serialized), `object` (serialized) +`supportedMetadata` | internal_key, size, refcount, hits, ctime, atime, hvalue +`minTtl` | 1 +`maxTtl` | `xcache.var_maxttl` `php.ini` value +`staticTtl` | `true` +`ttlPrecision` | 1 +`useRequestTime` | `true` +`lockOnExpire` | 0 +`maxKeyLength` | 5182 +`namespaceIsPrefix` | `true` +`namespaceSeparator` | Option value of `namespace_separator` ### Adapter Specific Options -| Name | Data Type | Default Value | Description | -|-----------------------|-----------|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `namespace_separator` | `string` | ":" | A separator for the namespace and prefix. | -| `admin_auth` | `boolean` | `false` | Enable admin authentication by configuration options `admin_user` and `admin_pass`. This makes XCache administration functions accessible without the need of HTTP-Authentication if `xcache.admin.enable_auth` is enabled. | -| `admin_user` | `string` | "" | The username of `xcache.admin.user`. | -| `admin_pass` | `string` | "" | The password of `xcache.admin.pass` in plain text. | +Name | Data Type | Default Value | Description +---- | --------- | ------------- | ----------- +`namespace_separator` | `string` | ":" | A separator for the namespace and prefix. +`admin_auth` | `boolean` | `false` | Enable admin authentication by configuration options `admin_user` and `admin_pass`. This makes XCache administration functions accessible without the need of HTTP-Authentication if `xcache.admin.enable_auth` is enabled. +`admin_user` | `string` | "" | The username of `xcache.admin.user`. +`admin_pass` | `string` | "" | The password of `xcache.admin.pass` in plain text. ## ZendServerDisk Adapter @@ -1093,19 +1092,19 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|-----------------------------------------------------------------------------------------------| -| `supportedDatatypes` | `null`, `boolean`, `integer`, `double`, `string`, `array` (serialized), `object` (serialized) | -| `supportedMetadata` | none | -| `minTtl` | 1 | -| `maxTtl` | 0 | -| `maxKeyLength` | 0 | -| `staticTtl` | `true` | -| `ttlPrecision` | 1 | -| `useRequestTime` | `false` | -| `lockOnExpire` | if 'zend_datacache.lock_on_expire' is enabled 120 else 0 | -| `namespaceIsPrefix` | `true` | -| `namespaceSeparator` | `::` | +Capability | Value +---------- | ----- +`supportedDatatypes` | `null`, `boolean`, `integer`, `double`, `string`, `array` (serialized), `object` (serialized) +`supportedMetadata` | none +`minTtl` | 1 +`maxTtl` | 0 +`maxKeyLength` | 0 +`staticTtl` | `true` +`ttlPrecision` | 1 +`useRequestTime` | `false` +`lockOnExpire` | if 'zend_datacache.lock_on_expire' is enabled 120 else 0 +`namespaceIsPrefix` | `true` +`namespaceSeparator` | `::` ## ZendServerShm Adapter @@ -1121,19 +1120,19 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|-----------------------------------------------------------------------------------------------| -| `supportedDatatypes` | `null`, `boolean`, `integer`, `double`, `string`, `array` (serialized), `object` (serialized) | -| `supportedMetadata` | none | -| `minTtl` | 1 | -| `maxTtl` | 0 | -| `maxKeyLength` | 0 | -| `staticTtl` | `true` | -| `ttlPrecision` | 1 | -| `useRequestTime` | `false` | -| `lockOnExpire` | if 'zend_datacache.lock_on_expire' is enabled 120 else 0 | -| `namespaceIsPrefix` | `true` | -| `namespaceSeparator` | `::` | +Capability | Value +---------- | ----- +`supportedDatatypes` | `null`, `boolean`, `integer`, `double`, `string`, `array` (serialized), `object` (serialized) +`supportedMetadata` | none +`minTtl` | 1 +`maxTtl` | 0 +`maxKeyLength` | 0 +`staticTtl` | `true` +`ttlPrecision` | 1 +`useRequestTime` | `false` +`lockOnExpire` | if 'zend_datacache.lock_on_expire' is enabled 120 else 0 +`namespaceIsPrefix` | `true` +`namespaceSeparator` | `::` ## Examples @@ -1150,8 +1149,8 @@ $container = null; // can be any configured PSR-11 container $storageFactory = $container->get(StorageAdapterFactoryInterface::class); $cache = $storageFactory->create( - 'filesystem', - [], + 'filesystem', + [], [ // Don't throw exceptions on cache errors [ diff --git a/docs/book/v3/storage/adapter.md b/docs/book/v3/storage/adapter.md index da08b221..dcc2399b 100644 --- a/docs/book/v3/storage/adapter.md +++ b/docs/book/v3/storage/adapter.md @@ -95,13 +95,13 @@ The following configuration options are defined by `Laminas\Cache\Storage\Adapte are available for every supported adapter. Adapter-specific configuration options are described on adapter level below. -| Option | Data Type | Default Value | Description | -|---------------|----------------|----------------|------------------------------------------------| -| `ttl` | `integer` | `0` | Time to live | -| `namespace` | `string` | “laminascache” | The “namespace” in which cache items will live | -| `key_pattern` | `null\|string` | `null` | Pattern against which to validate cache keys | -| `readable` | `boolean` | `true` | Enable/Disable reading data from cache | -| `writable` | `boolean` | `true` | Enable/Disable writing data to cache | +Option | Data Type | Default Value | Description +------ |----------------| ------------- | ----------- +`ttl` | `integer` | `0` | Time to live +`namespace` | `string` | “laminascache” | The “namespace” in which cache items will live +`key_pattern` | `null\|string` | `null` | Pattern against which to validate cache keys +`readable` | `boolean` | `true` | Enable/Disable reading data from cache +`writable` | `boolean` | `true` | Enable/Disable writing data to cache ## StorageInterface @@ -568,25 +568,25 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|---------------------------------------------------------------------------------------| -| `supportedDatatypes` | `null`, `bool`, `int`, `float`, `string`, `array` (serialized), `object` (serialized) | -| `supportedMetadata` | internal_key, atime, ctime, mtime, rtime, size, hits, ttl | -| `minTtl` | 1 | -| `maxTtl` | 0 | -| `staticTtl` | `true` | -| `ttlPrecision` | 1 | -| `useRequestTime` | value of `apc.use_request_time` from `php.ini` | -| `lockOnExpire` | 0 | -| `maxKeyLength` | 5182 | -| `namespaceIsPrefix` | `true` | -| `namespaceSeparator` | Option value of `namespace_separator` | +Capability | Value +---------- | ----- +`supportedDatatypes` | `null`, `bool`, `int`, `float`, `string`, `array` (serialized), `object` (serialized) +`supportedMetadata` | internal_key, atime, ctime, mtime, rtime, size, hits, ttl +`minTtl` | 1 +`maxTtl` | 0 +`staticTtl` | `true` +`ttlPrecision` | 1 +`useRequestTime` | value of `apc.use_request_time` from `php.ini` +`lockOnExpire` | 0 +`maxKeyLength` | 5182 +`namespaceIsPrefix` | `true` +`namespaceSeparator` | Option value of `namespace_separator` ### Adapter Specific Options -| Name | Data Type | Default Value | Description | -|-----------------------|-----------|---------------|-------------------------------------------| -| `namespace_separator` | `string` | ":" | A separator for the namespace and prefix. | +Name | Data Type | Default Value | Description +---- | --------- | ------------- | ----------- +`namespace_separator` | `string` | ":" | A separator for the namespace and prefix. ## BlackHole Adapter @@ -607,25 +607,25 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|-------------------------------------------------------------| -| `supportedDatatypes` | `null`, `bool`, `int`, `float`, `string`, `array`, `object` | -| `supportedMetadata` | none | -| `minTtl` | 0 or 1, depending on `psr` option. | -| `maxTtl` | 0 | -| `staticTtl` | `false` or `true`, depending on `psr` option | -| `ttlPrecision` | 1 | -| `useRequestTime` | false | -| `lockOnExpire` | 0 | -| `maxKeyLength` | -1 | -| `namespaceIsPrefix` | `true` | -| `namespaceSeparator` | none | +Capability | Value +---------- | ----- +`supportedDatatypes` | `null`, `bool`, `int`, `float`, `string`, `array`, `object` +`supportedMetadata` | none +`minTtl` | 0 or 1, depending on `psr` option. +`maxTtl` | 0 +`staticTtl` | `false` or `true`, depending on `psr` option +`ttlPrecision` | 1 +`useRequestTime` | false +`lockOnExpire` | 0 +`maxKeyLength` | -1 +`namespaceIsPrefix` | `true` +`namespaceSeparator` | none ### Adapter Specific Options -| Name | Data Type | Default Value | Description | -|-------|-----------|---------------|------------------------------------------------------------------------------------------------------------------| -| `psr` | `bool` | `false` | Flag to specify whether the adapter should be compatible with `CacheItemPoolDecorator` or `SimpleCacheDecorator` | +Name | Data Type | Default Value | Description +---- | --------- | ------------- | ----------- +`psr` | `bool` | `false` | Flag to specify whether the adapter should be compatible with `CacheItemPoolDecorator` or `SimpleCacheDecorator` >### Deprecation Notice > @@ -650,37 +650,37 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|--------------------------------------------------------------------------------------------------| -| `supportedDatatypes` | `string`, `null` => `string`, `boolean` => `string`, `integer` => `string`, `double` => `string` | -| `supportedMetadata` | mtime, filespec, atime, ctime | -| `minTtl` | 1 | -| `maxTtl` | 0 | -| `staticTtl` | `false` | -| `ttlPrecision` | 1 | -| `useRequestTime` | `false` | -| `lockOnExpire` | 0 | -| `maxKeyLength` | 251 | -| `namespaceIsPrefix` | `true` | -| `namespaceSeparator` | Option value of `namespace_separator` | +Capability | Value +---------- | ----- +`supportedDatatypes` | `string`, `null` => `string`, `boolean` => `string`, `integer` => `string`, `double` => `string` +`supportedMetadata` | mtime, filespec, atime, ctime +`minTtl` | 1 +`maxTtl` | 0 +`staticTtl` | `false` +`ttlPrecision` | 1 +`useRequestTime` | `false` +`lockOnExpire` | 0 +`maxKeyLength` | 251 +`namespaceIsPrefix` | `true` +`namespaceSeparator` | Option value of `namespace_separator` ### Adapter Specific Options -| Name | Data Type | Default Value | Description | -|-----------------------|------------------|------------------------|-------------------------------------------------------------------------------------| -| `namespace_separator` | `string` | ":" | A separator for the namespace and prefix | -| `cache_dir` | `string` | "" | Directory to store cache files. | -| `clear_stat_cache` | `boolean` | `true` | Call `clearstatcache()` enabled? | -| `dir_level` | `integer` | `1` | Defines how much sub-directories should be created. | -| `dir_permission` | `integer` | `false` | 0700 Set explicit permission on creating new directories. | -| `file_locking` | `boolean` | `true` | Lock files on writing. | -| `file_permission` | `integer` | `false` | 0600 Set explicit permission on creating new files. | -| `key_pattern` | `string` | `/^[a-z0-9_\+\-]*$/Di` | Validate key against pattern. | -| `no_atime` | `boolean` | `true` | Don’t get ‘fileatime’ as ‘atime’ on metadata. | -| `no_ctime` | `boolean` | `true` | Don’t get ‘filectime’ as ‘ctime’ on metadata. | -| `umask` | `integer\|false` | `false` | Use [umask](http://wikipedia.org/wiki/Umask) to set file and directory permissions. | -| `suffix` | `string` | `dat` | Suffix for cache files | -| `tag_suffix` | `string` | `tag` | Suffix for tag files | +Name | Data Type | Default Value | Description +---- |------------------| ------------- | ----------- +`namespace_separator` | `string` | ":" | A separator for the namespace and prefix +`cache_dir` | `string` | "" | Directory to store cache files. +`clear_stat_cache` | `boolean` | `true` | Call `clearstatcache()` enabled? +`dir_level` | `integer` | `1` | Defines how much sub-directories should be created. +`dir_permission` | `integer` | `false` | 0700 Set explicit permission on creating new directories. +`file_locking` | `boolean` | `true` | Lock files on writing. +`file_permission` | `integer` | `false` | 0600 Set explicit permission on creating new files. +`key_pattern` | `string` | `/^[a-z0-9_\+\-]*$/Di` | Validate key against pattern. +`no_atime` | `boolean` | `true` | Don’t get ‘fileatime’ as ‘atime’ on metadata. +`no_ctime` | `boolean` | `true` | Don’t get ‘filectime’ as ‘ctime’ on metadata. +`umask` | `integer\|false` | `false` | Use [umask](http://wikipedia.org/wiki/Umask) to set file and directory permissions. +`suffix` | `string` | `dat` | Suffix for cache files +`tag_suffix` | `string` | `tag` | Suffix for tag files Note: the `suffix` and `tag_suffix` options will be escaped in order to be safe for glob operations. @@ -700,26 +700,26 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|-----------------------------------------------------------------------------------------------| -| `supportedDatatypes` | `null`, `boolean`, `integer`, `double`, `string`, `array` (serialized), `object` (serialized) | -| `supportedMetadata` | none | -| `minTtl` | 1 | -| `maxTtl` | 0 | -| `staticTtl` | `true` | -| `ttlPrecision` | 1 | -| `useRequestTime` | `false` | -| `lockOnExpire` | 0 | -| `maxKeyLength` | 255 | -| `namespaceIsPrefix` | `true` | -| `namespaceSeparator` | none | +Capability | Value +---------- | ----- +`supportedDatatypes` | `null`, `boolean`, `integer`, `double`, `string`, `array` (serialized), `object` (serialized) +`supportedMetadata` | none +`minTtl` | 1 +`maxTtl` | 0 +`staticTtl` | `true` +`ttlPrecision` | 1 +`useRequestTime` | `false` +`lockOnExpire` | 0 +`maxKeyLength` | 255 +`namespaceIsPrefix` | `true` +`namespaceSeparator` | none ### Adapter Specific Options -| Name | Data Type | Default Value | Description | -|---------------|-----------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `servers` | `array` | `[]` | List of servers in the format `[] = [string host, integer port]` | -| `lib_options` | `array` | `[]` | Associative array of Libmemcached options where the array key is the option name (without the prefix `OPT_`) or the constant value. The array value is the option value. Please read [the memcached setOption() page](http://php.net/manual/memcached.setoption.php) for more information | +Name | Data Type | Default Value | Description +---- | --------- | ------------- | ----------- +`servers` | `array` | `[]` | List of servers in the format `[] = [string host, integer port]` +`lib_options` | `array` | `[]` | Associative array of Libmemcached options where the array key is the option name (without the prefix `OPT_`) or the constant value. The array value is the option value. Please read [the memcached setOption() page](http://php.net/manual/memcached.setoption.php) for more information ## Redis Adapter @@ -735,31 +735,31 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|-------------------------------------------------------| -| `supportedDatatypes` | `string`, `array` (serialized), `object` (serialized) | -| `supportedMetadata` | ttl (Redis v2+) | -| `minTtl` | 1 | -| `maxTtl` | 0 | -| `staticTtl` | `true` | -| `ttlPrecision` | 1 | -| `useRequestTime` | `false` | -| `lockOnExpire` | 0 | -| `maxKeyLength` | 512000000 (in Redis v3+, 255 otherwise) | -| `namespaceIsPrefix` | `true` | -| `namespaceSeparator` | none | +Capability | Value +---------- | ----- +`supportedDatatypes` | `string`, `array` (serialized), `object` (serialized) +`supportedMetadata` | ttl (Redis v2+) +`minTtl` | 1 +`maxTtl` | 0 +`staticTtl` | `true` +`ttlPrecision` | 1 +`useRequestTime` | `false` +`lockOnExpire` | 0 +`maxKeyLength` | 512000000 (in Redis v3+, 255 otherwise) +`namespaceIsPrefix` | `true` +`namespaceSeparator` | none ### Adapter Specific Options -| Name | Data Type | Default Value | Description | -|-----------------------|-----------------|---------------|---------------------------------------------------------------------------------------------| -| `database` | `integer` | 0 | Set database identifier. | -| `lib_options` | `array` | `[]` | Associative array of Redis options where the array key is the option name. | -| `namespace_separator` | `string` | ":" | A separator for the namespace and prefix. | -| `password` | `string` | "" | Set password. | -| `persistent_id` | `string` | | Set persistent id (name of the connection, leave blank to not use a persistent connection). | -| `resource_manager` | `string` | "" | Set the Redis resource manager to use | -| `server` | `string\|array` | "" | See below. | +Name | Data Type | Default Value | Description +---- | --------- | ------------- | ----------- +`database` | `integer` | 0 | Set database identifier. +`lib_options` | `array` | `[]` | Associative array of Redis options where the array key is the option name. +`namespace_separator` | `string` | ":" | A separator for the namespace and prefix. +`password` | `string` | "" | Set password. +`persistent_id` | `string` | | Set persistent id (name of the connection, leave blank to not use a persistent connection). +`resource_manager` | `string` | "" | Set the Redis resource manager to use +`server` | `string\|array` | "" | See below. `server` can be described as any of the following: @@ -780,19 +780,19 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|-------------------------------------------------------| -| `supportedDatatypes` | `string`, `array` (serialized), `object` (serialized) | -| `supportedMetadata` | ttl (Redis v2+) | -| `minTtl` | 1 | -| `maxTtl` | 0 | -| `staticTtl` | `true` | -| `ttlPrecision` | 1 | -| `useRequestTime` | `false` | -| `lockOnExpire` | 0 | -| `maxKeyLength` | 512000000 (in Redis v3+, 255 otherwise) | -| `namespaceIsPrefix` | `true` | -| `namespaceSeparator` | none | +Capability | Value +---------- | ----- +`supportedDatatypes` | `string`, `array` (serialized), `object` (serialized) +`supportedMetadata` | ttl (Redis v2+) +`minTtl` | 1 +`maxTtl` | 0 +`staticTtl` | `true` +`ttlPrecision` | 1 +`useRequestTime` | `false` +`lockOnExpire` | 0 +`maxKeyLength` | 512000000 (in Redis v3+, 255 otherwise) +`namespaceIsPrefix` | `true` +`namespaceSeparator` | none ### Adapter Specific Options @@ -827,34 +827,34 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|---------------------------------------------------------------------------------| -| `supportedDatatypes` | `string`, `null`, `boolean`, `integer`, `double`, `array`, `object`, `resource` | -| `supportedMetadata` | mtime | -| `minTtl` | 1 | -| `maxTtl` | Value of `PHP_INT_MAX` | -| `staticTtl` | `false` | -| `ttlPrecision` | 0.05 | -| `useRequestTime` | `false` | -| `lockOnExpire` | 0 | -| `maxKeyLength` | 0 | -| `namespaceIsPrefix` | `false` | +Capability | Value +---------- | ----- +`supportedDatatypes` | `string`, `null`, `boolean`, `integer`, `double`, `array`, `object`, `resource` +`supportedMetadata` | mtime +`minTtl` | 1 +`maxTtl` | Value of `PHP_INT_MAX` +`staticTtl` | `false` +`ttlPrecision` | 0.05 +`useRequestTime` | `false` +`lockOnExpire` | 0 +`maxKeyLength` | 0 +`namespaceIsPrefix` | `false` ### Adapter Specific Options -| Name | Data Type | Default Value | Description | -|----------------|-------------------|---------------------------------|-----------------------------------------------------------------| -| `memory_limit` | `string\|integer` | 50% of `memory_limit` INI value | Limit of how much memory can PHP allocate to allow store items. | +Name | Data Type | Default Value | Description +---- |-------------------| ------------- | ----------- +`memory_limit` | `string\|integer` | 50% of `memory_limit` INI value | Limit of how much memory can PHP allocate to allow store items. > #### Memory Limit > > The adapter has the following behavior with regards to the memory limit: > > - If the consumed memory exceeds the limit provided, an `OutOfSpaceException` -> is thrown. + > is thrown. > - A number less the or equal to zero disables the memory limit. > - When a value is provided for the memory limit, the value is measured in -> bytes. Shorthand notation may also be provided. + > bytes. Shorthand notation may also be provided. > ### Current process only > @@ -879,36 +879,36 @@ This adapter implements the following interfaces: ### Capabilities -| Capability | Value | -|----------------------|-----------------------------------------------------------| -| `supportedDatatypes` | `string`, `null`, `boolean`, `integer`, `double`, `array` | -| `supportedMetadata` | _id | -| `minTtl` | 0 | -| `maxTtl` | 0 | -| `staticTtl` | `true` | -| `ttlPrecision` | 1 | -| `useRequestTime` | `false` | -| `lockOnExpire` | 0 | -| `maxKeyLength` | 255 | -| `namespaceIsPrefix` | `true` | -| `namespaceSeparator` | *Option value of `namespace_separator`* | +Capability | Value +---------- | ----- +`supportedDatatypes` | `string`, `null`, `boolean`, `integer`, `double`, `array` +`supportedMetadata` | _id +`minTtl` | 0 +`maxTtl` | 0 +`staticTtl` | `true` +`ttlPrecision` | 1 +`useRequestTime` | `false` +`lockOnExpire` | 0 +`maxKeyLength` | 255 +`namespaceIsPrefix` | `true` +`namespaceSeparator` | *Option value of `namespace_separator`* ### Adapter Specific Options -| Name | Data Type | Default Value | Description | -|-----------------------|-----------|---------------|----------------------------------------------------------------------| -| `lib_option` | `array` | | Associative array of options where the array key is the option name. | -| `namespace_separator` | `string` | ":" | A separator for the namespace and prefix. | +Name | Data Type | Default Value | Description +---- | --------- | ------------- | ----------- +`lib_option` | `array` | | Associative array of options where the array key is the option name. +`namespace_separator` | `string` | ":" | A separator for the namespace and prefix. Available keys for `lib_option` include: -| Key | Default | Description | -|---------------------|-----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `server` | `mongodb://localhost:27017` | The MongoDB server connection string (see the [MongoDB\\Client docs](https://docs.mongodb.com/php-library/current/reference/method/MongoDBClient__construct/)). | -| `database` | `laminas` | Name of the database to use; MongoDB will create this database if it does not exist. | -| `collection` | `cache` | Name of the collection to use; MongoDB will create this collection if it does not exist. | -| `connectionOptions` | `['fsync' => false, 'journal' => true]` | Associative array of URI options (such as authentication credentials or query string parameters) to pass to `MongoDB\\Client` (see the [MongoDB\\Client docs](https://docs.mongodb.com/php-library/current/reference/method/MongoDBClient__construct/)). | -| `driverOptions` | `[]` | Associative array of driver options to pass to `MongoDB\\Client` (see the [MongoDB\\Client docs](https://docs.mongodb.com/php-library/current/reference/method/MongoDBClient__construct/)). | +Key | Default | Description +--- | ------- | ----------- +`server` | `mongodb://localhost:27017` | The MongoDB server connection string (see the [MongoDB\\Client docs](https://docs.mongodb.com/php-library/current/reference/method/MongoDBClient__construct/)). +`database` | `laminas` | Name of the database to use; MongoDB will create this database if it does not exist. +`collection` | `cache` | Name of the collection to use; MongoDB will create this collection if it does not exist. +`connectionOptions` | `['fsync' => false, 'journal' => true]` | Associative array of URI options (such as authentication credentials or query string parameters) to pass to `MongoDB\\Client` (see the [MongoDB\\Client docs](https://docs.mongodb.com/php-library/current/reference/method/MongoDBClient__construct/)). +`driverOptions` | `[]` | Associative array of driver options to pass to `MongoDB\\Client` (see the [MongoDB\\Client docs](https://docs.mongodb.com/php-library/current/reference/method/MongoDBClient__construct/)). ## Examples