Skip to content

feat: [#667] Registering service providers don't dependent order - #91

Merged
hwbrzzl merged 2 commits into
masterfrom
bowen/#667
Jul 1, 2025
Merged

feat: [#667] Registering service providers don't dependent order#91
hwbrzzl merged 2 commits into
masterfrom
bowen/#667

Conversation

@hwbrzzl

@hwbrzzl hwbrzzl commented Jul 1, 2025

Copy link
Copy Markdown
Contributor

📑 Description

Closes goravel/goravel#667

This pull request includes updates to the Goravel Minio integration, enhancements to the service_provider.go file, and dependency version upgrades in go.mod. The most significant changes focus on simplifying the installation process, improving service provider functionality, and updating dependencies to newer versions.

Updates to Goravel Minio Integration:

  • README.md: Simplified the installation process by replacing manual steps with an automated command (./artisan package:install) and added a reference to the setup file for manual installation.

Enhancements to Service Provider:

  • service_provider.go: Introduced the Relationship method to define bindings, dependencies, and provisions for the Minio service provider. This improves modularity and dependency management.
  • service_provider.go: Added the binding.Relationship import to support the new Relationship method.

Dependency Version Upgrades:

  • go.mod: Updated github.com/goravel/framework to v1.15.2-0.20250701070909-51b5ee2aed12.
  • go.mod: Upgraded indirect dependencies, including github.com/dromara/carbon/v2 to v2.6.9, github.com/go-viper/mapstructure/v2 to v2.3.0, and golang.org/x/exp to v0.0.0-20250620022241-b7579e27df2b. [1] [2]

✅ Checks

  • Added test cases for my code

@hwbrzzl
hwbrzzl requested a review from Copilot July 1, 2025 09:25

This comment was marked as outdated.

@hwbrzzl
hwbrzzl requested a review from Copilot July 1, 2025 14:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR decouples service provider registration order by introducing a Relationship method, simplifies package installation in the README, and updates several dependencies in go.mod.

  • Introduced Relationship method in service_provider.go to declare bindings, dependencies, and provisions.
  • Simplified installation steps in README.md using an automated artisan command.
  • Upgraded github.com/goravel/framework and various indirect dependencies in go.mod.

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
service_provider.go Added Relationship method; renamed receivers to r for Register and Boot methods.
go.mod Updated github.com/goravel/framework to v1.15.2-… and bumped carbon/v2, mapstructure/v2, and x/exp.
README.md Replaced manual install steps with ./artisan package:install; updated version compatibility.
Comments suppressed due to low confidence (2)

service_provider.go:17

  • Consider adding a unit test for the new Relationship method to verify that Bindings, Dependencies, and ProvideFor contain the intended values.
func (r *ServiceProvider) Relationship() binding.Relationship {

README.md:27

  • Reintroduce guidance on setting MINIO_ACCESS_KEY_ID, MINIO_ACCESS_KEY_SECRET, and MINIO_BUCKET environment variables or update tests to mock Minio, so users know how to satisfy test prerequisites.
Run command below to run test:

Comment thread service_provider.go
@hwbrzzl
hwbrzzl merged commit 6dc8a21 into master Jul 1, 2025
3 checks passed
@hwbrzzl
hwbrzzl deleted the bowen/#667 branch October 26, 2025 02:50
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.

Registering service providers don't dependent order

2 participants