From f8acd58fc30f5aa45579494091d7879b9cba7c7e Mon Sep 17 00:00:00 2001 From: kenjis Date: Fri, 6 Oct 2023 14:15:54 +0900 Subject: [PATCH] docs: make discoverFilters() deprecated --- system/Filters/Filters.php | 2 ++ user_guide_src/source/general/modules.rst | 7 ++++++ user_guide_src/source/general/modules/015.php | 22 +++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 user_guide_src/source/general/modules/015.php diff --git a/system/Filters/Filters.php b/system/Filters/Filters.php index d0c67845466f..df27e3f6cee3 100644 --- a/system/Filters/Filters.php +++ b/system/Filters/Filters.php @@ -125,6 +125,8 @@ public function __construct($config, RequestInterface $request, ResponseInterfac * * Sample : * $filters->aliases['custom-auth'] = \Acme\Blob\Filters\BlobAuth::class; + * + * @deprecated 4.4.2 Use Registrar instead. */ private function discoverFilters(): void { diff --git a/user_guide_src/source/general/modules.rst b/user_guide_src/source/general/modules.rst index b15e3c47bdf6..aa251c8a087d 100644 --- a/user_guide_src/source/general/modules.rst +++ b/user_guide_src/source/general/modules.rst @@ -163,6 +163,13 @@ In that case, see :ref:`routing-priority`. Filters ======= +.. deprecated:: 4.4.2 + +.. note:: This feature is deprecated. Use :ref:`registrars` instead like the + following: + + .. literalinclude:: modules/015.php + By default, :doc:`filters <../incoming/filters>` are automatically scanned for within modules. It can be turned off in the **Modules** config file, described above. diff --git a/user_guide_src/source/general/modules/015.php b/user_guide_src/source/general/modules/015.php new file mode 100644 index 000000000000..0b1f17508607 --- /dev/null +++ b/user_guide_src/source/general/modules/015.php @@ -0,0 +1,22 @@ + [ + 'session' => SessionAuth::class, + 'tokens' => TokenAuth::class, + ], + ]; + } +}