Skip to content

Conversation

@armanist
Copy link
Member

ModuleLoader no longer executes module route closures or builds runtime routes.
It only loads module configs/dependencies and returns module route definition closures.

RouteBuilder is responsible for executing those closures using the existing Route DSL collector
and producing the final runtime routes array that Router expects today.

IMPORTANT:

  • This is an incremental refactor and preserves the current public routing API/behavior.
  • RouteController/Router still operate on route arrays at this stage.
  • Converting routes to a Route object-centric internal representation will be done in a follow-up,
    because it requires coordinated changes across Router matching, RouteController state and helpers.

@armanist armanist changed the title Refactor Router & ModuleLoader: Decouple module loading from route building Refactor Router and ModuleLoader: Decouple module loading from route building Jan 18, 2026
@armanist armanist added the enhancement New feature or request label Jan 18, 2026
@armanist armanist added this to the 3.0.0 milestone Jan 18, 2026
@codecov
Copy link

codecov bot commented Jan 18, 2026

Codecov Report

❌ Patch coverage is 71.42857% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.88%. Comparing base (5f481a5) to head (7b0272a).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/Console/Commands/OpenApiCommand.php 0.00% 4 Missing ⚠️
src/Console/Commands/RouteListCommand.php 0.00% 4 Missing ⚠️
src/Module/ModuleLoader.php 82.35% 3 Missing ⚠️
src/Router/Route.php 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #409      +/-   ##
============================================
- Coverage     79.90%   79.88%   -0.02%     
- Complexity     2492     2495       +3     
============================================
  Files           229      230       +1     
  Lines          6609     6623      +14     
============================================
+ Hits           5281     5291      +10     
- Misses         1328     1332       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@armanist armanist merged commit 8192723 into softberg:master Jan 19, 2026
4 of 6 checks passed
@armanist armanist deleted the 383-Refactor-Router-&-ModuleLoader-Introduce-Route-as-Single-Route-Entity-and-Decouple-Module-Loading branch January 19, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor Router & ModuleLoader: Introduce Route as Single-Route Entity and Decouple Module Loading

3 participants