lonnieezell / forum-example

An in-progress sample forum application built on CodeIgniter 4.
MIT License
43 stars 10 forks source link

fix: Restore Routes file #390

Closed neznaika0 closed 2 months ago

neznaika0 commented 2 months ago

Initially, someone deleted the default app/Config/Routes.php. There is a constant error in the log.

WARNING - 2024-09-01 19:56:39 --> Routes file not found: "/home/aleksandr/www/codeigniter/forum-example/app/Config/Routes.php"

This file should be (even empty), the system reads it.

lonnieezell commented 2 months ago

Right. Routes were moved out to /app directory. And app/Config/Routing.php was updated.

I guess there's still someplace in CI that is looking for that file, though. Bummer. I'm ok with this as a workaround. Thanks.

neznaika0 commented 2 months ago

I've seen the changes. The Routing file hopes on default routes. Config arrays are merged.

neznaika0 commented 2 months ago

About the test error. It seems there is an error when creating the test. If you run the composer test ./tests/Policies/ThreadPolicyTest.php - the result is correct

EDIT: Yes. The test is written incorrectly. If you restart it multiple times, the error disappears periodically. Depends on the row from the DB