Bug: Shield controllers are using default App namespace when extending BaseController - when namespace is changed, class can't be found #1292
Unanswered
simun-ivanac
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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
app/Config/Constants.phpGymApp\Controllersnamespace.app/Config/Routes.phpapp/Config/Filters.phpExpected 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.
Beta Was this translation helpful? Give feedback.
All reactions