refactors Mvc directory and Middleware
Hi, i'm glad to contribute to your project! i tried to refactor as issue #253 requires. I refactored the MvcManager class (renamed to RouteDispatcher) by extracting middleware and view cache logic into separate classes — MiddlewareExecutor and ViewCacheHandler. Additionally, i merged the QtController functionality into RouteController, eliminating unnecessary inheritance and simplifying the controller structure.
I tried to resolve test errors but I'm afraid that anything went wrong on my machine, please let me know
Hi Arno, I don't know why those 3 tests fail even with composer dump-autoload command executed. The issue called for streamlining the QtController by implementing a route dispatcher, but I'm currently struggling to find a viable solution. Could you offer some assistance?
Hi Arno, I don't know why those 3 tests fail even with composer dump-autoload command executed. The issue called for streamlining the QtController by implementing a route dispatcher, but I'm currently struggling to find a viable solution. Could you offer some assistance?
Hello, sure, I'm happy to help you. I checked your code and identified the problems. You have 3 errors in the unit test: 2 ViewCacheHandler not found errors, and one QtController not found error.
ViewCacheHandler error: It seems that the file containing this class has the name VIewCacheHandler.php (with uppercase I). Try to correct that and see if the error persists.
QtController error: This is a bit tricky, as the ModuleManager itself doesn't use it, but the errors show that it has occurred there. The ModuleManager class serves as a tool that lets you generate modules from templates. You can see them in the Libraries/Modules/Templates folder. In the folder (which basically contains PHP files but with .tpl extension) change the use of QtController and replace it with the proper class.
I hope I explained it clearly. If you have any questions or need some help, feel free to ask.
Thank you! I'll fix asap!
Hello, I just pushed fix commit but I haven't found VIewCacheHandler.php file (with uppercase I). I also replace QtController where not properly required
Hello, I just pushed fix commit but I haven't found VIewCacheHandler.php file (with uppercase I). I also replace QtController where not properly required
Looks like most of the issues are resolved now, only one error is left: Error: Class 'Quantum\Handlers\ViewCacheHandler' not found this is because the class name is ViewCacheHandler whereas the class file name is VIewCacheHandler.php, see the screenshot attached.
Got it! Thank you!
Closes #256