Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1259 +/- ##
=======================================
Coverage 68.04% 68.05%
=======================================
Files 261 261
Lines 14929 14938 +9
=======================================
+ Hits 10159 10166 +7
- Misses 4334 4335 +1
- Partials 436 437 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for registering console commands through the ApplicationBuilder via a new WithCommands method. This allows developers to configure commands during application startup in a fluent manner, consistent with other builder methods like WithEvents and WithMiddleware.
- Added
WithCommandsmethod to register console commands - Updated the ApplicationBuilder contract and implementation
- Auto-generated mock for the new method
- Added test coverage for the nil Artisan facade scenario
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
contracts/foundation/application_builder.go |
Added WithCommands method to the ApplicationBuilder interface |
foundation/application_builder.go |
Implemented WithCommands method and command registration logic in the Create method |
foundation/application_builder_test.go |
Added test cases for WithCommands functionality |
mocks/foundation/ApplicationBuilder.go |
Auto-generated mock implementation for the new WithCommands method |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📑 Description
Closes goravel/goravel#794
This pull request introduces improvements to the Goravel framework's command and middleware registration system, especially for projects using bootstrap setup. It adds support for registering console commands and HTTP middleware via a new chainable API (
foundation.Setup().WithCommands(...)), updates code generation logic to handle both kernel and bootstrap scenarios, and enhances test coverage and code documentation.✅ Checks