Skip to content

feat: [#823] register service providers to bootstrap/providers.go#77

Merged
hwbrzzl merged 1 commit intomasterfrom
bowen/#823
Dec 5, 2025
Merged

feat: [#823] register service providers to bootstrap/providers.go#77
hwbrzzl merged 1 commit intomasterfrom
bowen/#823

Conversation

@hwbrzzl
Copy link
Copy Markdown
Contributor

@hwbrzzl hwbrzzl commented Dec 5, 2025

📑 Description

Closes goravel/goravel#823

This pull request updates dependencies in go.mod and refactors the setup logic in setup/setup.go to better support bootstrap setups and improve maintainability. The main changes include upgrading and adding several dependencies, and restructuring how the Postgres service provider is registered or removed depending on the environment.

Dependency updates and additions:

  • Upgraded Go version to 1.24.0 and updated many indirect dependencies to newer versions for improved compatibility and security. [1] [2] [3]
  • Added several new indirect dependencies, including UI libraries (bubbletea, lipgloss, etc.), clipboard support, and string utilities.

Setup logic improvements:

  • Refactored setup/setup.go to use the env.IsBootstrapSetup() function to conditionally register or remove the Postgres service provider in either app.go or providers.go, depending on the setup type. This makes the setup process more flexible and maintainable. [1] [2]
  • Improved configuration matching by storing config keys in variables (databaseConnectionsConfig, databaseConfig), reducing duplication and potential for errors.

Configuration handling:

  • Changed how the Postgres connection and default database are added or removed from database.go, using the new config key variables for consistency.

These changes collectively improve dependency management, setup flexibility, and code maintainability.

image

✅ Checks

  • Added test cases for my code

Copilot AI review requested due to automatic review settings December 5, 2025 09:34
@hwbrzzl hwbrzzl merged commit 70b5cb7 into master Dec 5, 2025
9 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request implements conditional service provider registration to support bootstrap setups, allowing the Postgres service provider to be registered either in app.go (traditional setup) or providers.go (bootstrap setup) depending on the environment configuration.

Key changes:

  • Refactored setup logic to conditionally register/unregister the Postgres service provider based on env.IsBootstrapSetup()
  • Improved code maintainability by extracting config matchers into reusable variables
  • Updated Go version and dependencies to newer versions

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
setup/setup.go Refactored to support conditional provider registration using modify.When() and env.IsBootstrapSetup(), moved config variable to function scope for better encapsulation
go.mod Updated Go version to 1.24.0, updated framework dependency, and added new indirect dependencies for UI libraries and utilities
go.sum Updated checksums for all modified and new dependencies to maintain integrity

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sub-packages should register service providers to bootstrap/providers.go

2 participants