Skip to content

Bug: no Filter arguments passed #3216

Description

@tangix

Describe the bug
When running Filters, before() and after() doesn't get arguments passed to them. This is contrary to the information in the docs:
https://codeigniter.com/user_guide/incoming/routing.html#applying-filters
Changing the method signature is not possible since this would break FilterInterface validation.

CodeIgniter 4 version
4.0.3

Affected module(s)
\CodeIgniter\Filters\Filter
\CodeIgniter\Filters\FilterInterface

Expected behavior, and steps to reproduce if appropriate
I should be able to get the arguments from the route into my Filter. With a route specified as:
$routes->add('users/delete/(:segment)', 'AdminController::index', ['filter' => 'admin-auth:dual,noreturn']);
I'd expect to get access to ['dual', 'noreturn'] in my Filter implementation.

Context

  • PHP 7.3.19

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix them

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions