Skip to content

Commit 44db01c

Browse files
committed
docs: add user guide
1 parent 6bf2c09 commit 44db01c

File tree

4 files changed

+41
-1
lines changed

4 files changed

+41
-1
lines changed

user_guide_src/source/changelogs/v4.6.0.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ The following breaking changes have been made accordingly:
4343
- ``TestException`` now extends ``CodeIgniter\Exceptions\LogicException``
4444
instead of ``CodeIgniter\Exceptions\CriticalError``.
4545

46+
Filters Changes
47+
---------------
48+
49+
The ``Filters`` class has been changed to allow multiple runs of the same filter
50+
with different arguments in before or after. See
51+
:ref:`Upgrading Guide <upgrade-460-filters-changes>` for details.
52+
4653
.. _v460-interface-changes:
4754

4855
Interface Changes
@@ -106,6 +113,9 @@ The following new Exception interfaces have been added:
106113
Commands
107114
========
108115

116+
- The ``spark routes`` and ``spark filter:check`` commands now display filter
117+
arguments.
118+
109119
Testing
110120
=======
111121

@@ -138,6 +148,9 @@ Helpers and Functions
138148
Others
139149
======
140150

151+
- **Filters:** Now you can execute a filter more than once with the different
152+
arguments in before or after.
153+
141154
***************
142155
Message Changes
143156
***************
@@ -176,6 +189,11 @@ The following changes have been made accordingly:
176189
Deprecations
177190
************
178191

192+
- **Filters:**
193+
- The properties ``$arguments`` and ``$argumentsClass`` of ``Filters`` have
194+
been deprecated. No longer used.
195+
- The ``Filters::getArguments()`` method has been deprecated. No longer used.
196+
179197
**********
180198
Bugs Fixed
181199
**********

user_guide_src/source/incoming/filters.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ will be passed in ``$arguments`` to the ``group`` filter's ``before()`` methods.
226226
When the URI matches ``admin/users/*'``, the array ``['users.manage']``
227227
will be passed in ``$arguments`` to the ``permission`` filter's ``before()`` methods.
228228

229+
.. note:: Prior to v4.6.0, the same filter cannot be run multiple times with
230+
different arguments.
231+
229232
.. _filter-execution-order:
230233

231234
Filter Execution Order

user_guide_src/source/incoming/routing.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,8 @@ The ``filter`` option passed to the outer ``group()`` are merged with the inner
589589
The above code runs ``myfilter1:config`` for the route ``admin``, and ``myfilter1:config``
590590
and ``myfilter2:region`` for the route ``admin/users/list``.
591591

592-
.. note:: The same filter cannot be run multiple times with different arguments.
592+
.. note:: Prior to v4.6.0, the same filter cannot be run multiple times with
593+
different arguments.
593594

594595
Any other overlapping options passed to the inner ``group()`` will overwrite their values.
595596

user_guide_src/source/installation/upgrade_460.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,24 @@ See :ref:`ChangeLog <v460-removed-deprecated-items>` for details.
5454
Breaking Enhancements
5555
*********************
5656

57+
.. _upgrade-460-filters-changes:
58+
59+
Filters Changes
60+
===============
61+
62+
The ``Filters`` class has been changed to allow multiple runs of the same filter
63+
with different arguments in before or after.
64+
65+
If you are extending ``Filters``, you will need to modify it to conform to the
66+
following changes:
67+
68+
- The structure of the array properties ``$filters`` and ``$filtersClasses`` have
69+
been changed.
70+
- The properties ``$arguments`` and ``$argumentsClass`` are no longer used.
71+
- ``Filters`` has been changed so that the same filter class is not instantiated
72+
multiple times. If a filter class is used both before and after, the same instance
73+
is used.
74+
5775
*************
5876
Project Files
5977
*************

0 commit comments

Comments
 (0)