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/changelogs/v4.4.2.rst b/user_guide_src/source/changelogs/v4.4.2.rst index 68cba760c549..86e543e5d205 100644 --- a/user_guide_src/source/changelogs/v4.4.2.rst +++ b/user_guide_src/source/changelogs/v4.4.2.rst @@ -29,6 +29,10 @@ Changes Deprecations ************ +- **Filters:** The Auto-Discovery for Filters and ``Filters::discoverFilters()`` + is deprecated. Use :ref:`registrars` instead. See :ref:`modules-filters` for + details. + Bugs Fixed ********** diff --git a/user_guide_src/source/general/modules.rst b/user_guide_src/source/general/modules.rst index b15e3c47bdf6..2a6df4aa7b2e 100644 --- a/user_guide_src/source/general/modules.rst +++ b/user_guide_src/source/general/modules.rst @@ -160,9 +160,18 @@ the **Modules** config file, described above. When working with modules, it can be a problem if the routes in the application contain wildcards. In that case, see :ref:`routing-priority`. +.. _modules-filters: + 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, + ], + ]; + } +}