Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1272 +/- ##
==========================================
- Coverage 68.46% 68.19% -0.28%
==========================================
Files 263 264 +1
Lines 15350 15425 +75
==========================================
+ Hits 10510 10519 +9
- Misses 4383 4449 +66
Partials 457 457 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This pull request adds a new WithPaths function to allow customizable application path configuration in the Goravel framework. The PR introduces a fluent API for setting custom paths and refactors existing path-related code for better maintainability and consistency.
Key Changes:
- Introduces a new
Pathsinterface and implementation that allows developers to customize application paths viaWithPathsin the application builder - Refactors the
support.Pathsstruct by renamingAppfield toBootstrapto more accurately reflect its purpose as a directory rather than a specific file path - Consolidates path resolution logic by adding a
BootstrapApp()helper function and renaming internal path functions (AbsPath→Abs,FacadesPath→Facades) for consistency
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
support/variable.go |
Renames App field to Bootstrap in Paths struct and updates default path from full file path to directory |
contracts/foundation/configuration/paths.go |
Defines new Paths interface with fluent API for path configuration |
foundation/configuration/paths.go |
Implements Paths interface with methods that modify global path configuration |
contracts/foundation/application_builder.go |
Adds WithPaths method to ApplicationBuilder interface |
foundation/application_builder.go |
Implements WithPaths method and calls it before service provider registration in Create() |
foundation/application_builder_test.go |
Adds tests for WithPaths functionality |
support/path/internals/path.go |
Renames AbsPath to Abs and FacadesPath to Facades, adds new BootstrapApp() helper |
support/path/internals/path_test.go |
Updates tests to use renamed functions |
foundation/application.go |
Updates calls to use renamed Abs and Facades functions |
packages/modify/actions.go |
Refactors to use new BootstrapApp() helper |
packages/modify/with_slice_actions.go |
Refactors to use new BootstrapApp() helper |
packages/modify/modify.go |
Updates to use renamed Facades function |
packages/modify/actions_test.go |
Updates tests to use new path structure with proper cleanup |
packages/modify/with_slice_actions_test.go |
Updates tests to use new path structure with proper cleanup |
mocks/foundation/ApplicationBuilder.go |
Adds mock for WithPaths method |
mocks/foundation/configuration/Paths.go |
Adds complete mock implementation for Paths interface |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
📑 Description
Closes goravel/goravel#802
This pull request introduces a new mechanism for configuring and customizing application paths throughout the framework. It adds a
Pathsinterface and implementation, updates the application builder to support custom path configuration, and refactors existing code to use the new path utilities. The changes also include updates to tests and internal utilities to ensure consistency and maintainability.✅ Checks