Skip to content

fix: update maintenance mode route dependency#1485

Open
goravel-coder wants to merge 1 commit into
masterfrom
fix-maintenance-mode-route-dependency
Open

fix: update maintenance mode route dependency#1485
goravel-coder wants to merge 1 commit into
masterfrom
fix-maintenance-mode-route-dependency

Conversation

@goravel-coder

Copy link
Copy Markdown
Contributor

Summary

  • Route installation now includes maintenance-mode dependencies required by the maintenance middleware.
  • Maintenance commands now register when the Route facade is available.
  • Maintenance mode now lets requests continue when required facades are unavailable and reports missing Hash for secret generation.

Why

Applications that use route middleware expect maintenance mode to be available with the route stack. The Route package now declares the supporting cache, config, hash, and storage dependencies, and the default command list follows Route availability instead of unrelated facade combinations.

facades.Route().GlobalMiddleware(middleware.CheckForMaintenanceMode())

Before this fix, apps without all maintenance dependencies could see requests aborted by the maintenance middleware or down --secret fail on a nil hash service. After this fix, requests continue when maintenance mode cannot be supported, and secret generation reports the missing Hash facade as a command error.

facades.Route().Get("/", func(ctx http.Context) http.Response {
	return ctx.Response().String(200, "Goravel")
})

@goravel-coder goravel-coder requested a review from a team as a code owner June 10, 2026 11:18
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.37%. Comparing base (4520b67) to head (360bfb6).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1485      +/-   ##
==========================================
+ Coverage   69.27%   69.37%   +0.09%     
==========================================
  Files         377      377              
  Lines       29613    29622       +9     
==========================================
+ Hits        20515    20549      +34     
+ Misses       8152     8128      -24     
+ Partials      946      945       -1     

☔ View full report in Codecov by Harness.
📢 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants