-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
bugVerified issues on the current code behavior or pull requests that will fix themVerified issues on the current code behavior or pull requests that will fix them
Description
PHP Version
8.5
CodeIgniter4 Version
4.7.0
CodeIgniter4 Installation Method
Composer (using codeigniter4/appstarter)
Which operating systems have you tested for this bug?
Linux
Which server did you use?
fpm-fcgi
Environment
development
Database
No response
What happened?
Try to apply multi filters using array and php attributes on controller, like exist in the docs:
// Multiple filters can be applied
#[Filter(by: ['auth', 'csrf'])]
public function admin()
{
}this does not work and it is not listed / show using php spark routes
in my example i try this ways:
// All of two define as follow individual
// #[Filter(by: 'module')]
// #[Filter(by: 'auth')]
#[Filter(by: AuthDummyFilter::class)]
#[Filter(by: ModuleDummyFilter::class)]
// no working and no documented
// #[Filter(by: [AuthDummyFilter::class, ModuleDummyFilter::class])]
// no working and documented
// #[Filter(by: ['auth', 'module'])]
class Secret extends BaseController
{
public function index()
{
return view('secret-area');
}
}Steps to Reproduce
you can see and try this repo:
Expected Output
i expected on of this to work, like on the docs:
// Multiple filters can be applied
#[Filter(by: ['auth', 'csrf'])]
public function admin()
{
}not even appear when using the command:
php spark routes
Anything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugVerified issues on the current code behavior or pull requests that will fix themVerified issues on the current code behavior or pull requests that will fix them