PHP Version
8.2.24
CodeIgniter4 Version
4.6.3
Shield Version
1.2.0
Which operating systems have you tested for this bug?
Windows
Which server did you use?
apache
Database
MySQL 8.0.33
Did you customize Shield?
No.
What happened?
ERROR: Class "App\Controllers\BaseController" not found.
Steps to Reproduce
- change default namespace in
app/Config/Constants.php
- move controllers under
GymApp\Controllers namespace.
- install shield
- add service in
app/Config/Routes.php
- set controller filters in
app/Config/Filters.php
Expected Output
All pages should be protected by login, except ignored routes. It should work out of the box.
Anything else?
I know that it makes completely sense that I get an error. I'd like to know if there is any other way to make it to work except reverting namespace to default or copy/pasting controllers from vendor to app (which is not recommended at all...). If I'm missing something, feel free to correct me.