You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 17549d7
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/general/modules.md
+19-36Lines changed: 19 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,7 +96,6 @@ class Autoload extends AutoloadConfig
96
96
Many times, you will need to specify the full namespace to files you want to include, but CodeIgniter can be configured to make integrating modules into your applications simpler by automatically discovering many different file types, including:
97
97
98
98
-[Events](../extending/events.md)
99
-
-[Filters](../incoming/filters.md)
100
99
-[Registrars](configuration.md#registrars)
101
100
-[Route files](../incoming/routing.md)
102
101
-[Services](../concepts/services.md)
@@ -205,47 +204,31 @@ When working with modules, it can be a problem if the routes in the application
205
204
206
205
### Filters
207
206
208
-
!!! danger "Deprecated since version 4.4.2"
207
+
Modules register their [filters](../incoming/filters.md) through a [Registrar](configuration.md#registrars), like the following:
209
208
210
-
!!! note "Note"
211
-
This feature is deprecated. Use [Registrars](configuration.md#registrars) instead, like the following:
212
-
213
-
```php
214
-
<?php
209
+
```php
210
+
<?php
215
211
216
-
namespace CodeIgniter\Shield\Config;
212
+
namespace CodeIgniter\Shield\Config;
217
213
218
-
use CodeIgniter\Shield\Filters\SessionAuth;
219
-
use CodeIgniter\Shield\Filters\TokenAuth;
214
+
use CodeIgniter\Shield\Filters\SessionAuth;
215
+
use CodeIgniter\Shield\Filters\TokenAuth;
220
216
221
-
class Registrar
217
+
class Registrar
218
+
{
219
+
/**
220
+
* Registers the Shield filters.
221
+
*/
222
+
public static function Filters(): array
222
223
{
223
-
/**
224
-
* Registers the Shield filters.
225
-
*/
226
-
public static function Filters(): array
227
-
{
228
-
return [
229
-
'aliases' => [
230
-
'session' => SessionAuth::class,
231
-
'tokens' => TokenAuth::class,
232
-
],
233
-
];
234
-
}
224
+
return [
225
+
'aliases' => [
226
+
'session' => SessionAuth::class,
227
+
'tokens' => TokenAuth::class,
228
+
],
229
+
];
235
230
}
236
-
```
237
-
238
-
By default, [filters](../incoming/filters.md) are automatically scanned for within modules. This can be turned off in the **Modules** config file, described above.
239
-
240
-
!!! note "Note"
241
-
Since the files are being included into the current scope, the `$filters` instance is already defined for you. It will cause errors if you attempt to redefine that class.
242
-
243
-
In the module's **Config/Filters.php** file, you need to define the aliases of the filters you use:
Copy file name to clipboardExpand all lines: docs/installation/upgrade_480.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,6 +169,9 @@ The following files received significant changes (including deprecations or visu
169
169
-**app/Config/Mimes.php**
170
170
-`Config\Mimes::$mimes` added a new key `md` for Markdown files.
171
171
172
+
-**app/Config/Modules.php**
173
+
-`Config\Modules::$aliases` no longer lists `filters`, since the auto-discovery of Filters was removed.
174
+
172
175
-**app/Config/Routing.php**
173
176
-`Config\Routing::$placeholderSamples` was added to provide sample values for custom route placeholders so the `spark routes` command can resolve their filters.
0 commit comments