feat: [#667 #719] Add setup and relationship for all modules#1100
feat: [#667 #719] Add setup and relationship for all modules#1100
Conversation
|
The current |
|
@almas-x Yes, I'll create another PR to remove the configuration files in goravel/goravel. These new config.go files should not be built because their packages are not quoted. Previously, I wanted to publish #1099 into v1.16, but I found there are various works that need to be done, it's hard to complete it in v1.16. Hence I moved it to v1.17 in order to get more time to optimize it. |
|
But for this PR, it can be merged when it's ready. No impact on v1.16. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1100 +/- ##
==========================================
- Coverage 71.15% 66.79% -4.37%
==========================================
Files 185 212 +27
Lines 13213 14011 +798
==========================================
- Hits 9402 9358 -44
- Misses 3441 4283 +842
Partials 370 370 ☔ 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 scaffolding commands and introduces a Relationship() API for all framework modules, centralizes facade mappings, and marks facade install/uninstall support as a TODO for v1.17.
- Added
setup/main.goscripts for each module to install/uninstall providers and config files. - Updated all
service_provider.gofiles to implementRelationship()instead of separateBindings(),Dependencies(), andProvideFor(). - Commented out facade install/uninstall in console commands and tests, deferring full implementation to v1.17.
- Introduced
contracts/binding/binding.gowith centralized constants andFacadeToPathmapping and removed legacy facade files.
Reviewed Changes
Copilot reviewed 85 out of 86 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| */setup/setup.go (all modules) | New CLI scaffolding for install/uninstall of each module |
| */service_provider.go (all modules) | Added Relationship() method to describe bindings and deps |
| foundation/console/package_install_command.go | Commented out facade install logic, marked as TODO |
| foundation/console/package_uninstall_command.go | Commented out facade uninstall logic, marked as TODO |
| foundation/console/*_command_test.go | Commented out facade tests, reduced test coverage |
| contracts/binding/binding.go | Added central Binding constants, FacadeToPath, and struct |
| facades/*.go | Removed individual facade files in favor of consolidated one |
Comments suppressed due to low confidence (4)
foundation/console/package_install_command_test.go:122
- [nitpick] Facade installation tests are entirely commented out. To maintain test coverage, add or update tests for the new facade installation paths once implemented.
// TODO: Implement this in v1.17 https://github.com/goravel/goravel/issues/719
contracts/binding/binding.go:32
- [nitpick] The
FacadeToPathmap uses title-case keys (e.g., "Auth"). CLI input and code references may use lowercase—consider normalizing keys or documenting expected casing to avoid mismatches.
var FacadeToPath = map[string]string{
foundation/console/package_uninstall_command.go:72
- Facade uninstall logic is commented out, so non-package identifiers will always be handled as package uninstalls. Restore or replace this block to correctly route between package and facade uninstallation.
// if isPackage(pkg) {
foundation/console/package_install_command.go:65
- Facade install logic is commented out, causing all installs to use the package path flow. Implement the appropriate branch so facade identifiers are installed via their setup scripts.
// if isPackage(pkg) {
📑 Description
Closes goravel/goravel#667
Related goravel/goravel#719
✅ Checks