![]() |
Hello,
It seems Auto-Routing doesn't work as before with CI 4.4.0 and new Config\Routing.php file. We have to add \\ at the end of $defaultNamespace if we don't want to have a 404 page with method unavailable. Before, when we use $routes->setDefaultNamespace in Config\App.php file, it add automatically \\ at the end of the string. Is it a bug or a feature ? Or me perhaps... Max
Can you show the sample code to reproduce the issue?
And do you use Auto-Routing Legacy or Improved?
I've just test with a fresh project and can reproduce it simply.
So, I download CI 4.4.0 and set only this : In .env PHP Code: CI_ENVIRONMENT = development In Config\Routing.php PHP Code: public bool $autoRoute = true; In Config\Feature.php, the parameters still set to Legacy PHP Code: public bool $autoRoutesImproved = false; Then, I create an Auth.php file in app\Controllers\ folder PHP Code: <?php When I want to access http://localhost:8080/auth, I have a 404 page with this message Code: Controller or its method is not found: \App\ControllersAuth::index
See https://github.com/codeigniter4/CodeIgniter4/pull/7874
All development is done in the main GitHub repository. CodeIgniter4 is a true community-driven framework. The more you all contribute, the faster it will be released. |
Welcome Guest, Not a member yet? Register Sign In |