Skip to content

feat: package:install supports install internal package#1231

Merged
hwbrzzl merged 6 commits intomasterfrom
bowen/optimize-package-install
Oct 19, 2025
Merged

feat: package:install supports install internal package#1231
hwbrzzl merged 6 commits intomasterfrom
bowen/optimize-package-install

Conversation

@hwbrzzl
Copy link
Contributor

@hwbrzzl hwbrzzl commented Oct 17, 2025

📑 Description

Closes https://github.com/goravel/goravel/issues/

Able to install internal package.

image

✅ Checks

  • Added test cases for my code

@codecov
Copy link

codecov bot commented Oct 17, 2025

Codecov Report

❌ Patch coverage is 64.70588% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.42%. Comparing base (2d07c62) to head (a8db6ba).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
queue/setup/setup.go 0.00% 19 Missing ⚠️
cache/setup/stubs.go 0.00% 1 Missing ⚠️
filesystem/setup/stubs.go 0.00% 1 Missing ⚠️
foundation/console/package_install_command.go 95.00% 1 Missing ⚠️
queue/setup/stubs.go 0.00% 1 Missing ⚠️
session/setup/stubs.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1231      +/-   ##
==========================================
+ Coverage   66.35%   66.42%   +0.06%     
==========================================
  Files         245      245              
  Lines       16914    16946      +32     
==========================================
+ Hits        11224    11256      +32     
- Misses       5308     5310       +2     
+ Partials      382      380       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hwbrzzl hwbrzzl changed the title feat: package:install supports install redis feat: package:install supports install redis,etc. Oct 18, 2025
@hwbrzzl hwbrzzl marked this pull request as ready for review October 18, 2025 08:55
@hwbrzzl hwbrzzl requested a review from a team as a code owner October 18, 2025 08:55
Copilot AI review requested due to automatic review settings October 18, 2025 08:55
@hwbrzzl hwbrzzl changed the title feat: package:install supports install redis,etc. feat: package:install supports install internal package Oct 18, 2025
Copy link
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

Adds support for installing internal drivers (e.g. database, memory, file, route) via a new --driver option, introduces a WhenDriver modifier, and extends binding metadata with driver definitions. Also refactors install logic to return errors and adjusts tests accordingly. Key changes:

  • Added --driver parsing, options.Driver, WhenDriver modifier, and internal driver installation flow.
  • Extended binding definitions with driver lists and updated tests for driver selection and installation.
  • Changed several generated config stubs to hard-coded defaults (removing previous environment variable overrides).

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
session/setup/stubs.go Hard-codes session default driver instead of reading from environment.
queue/setup/stubs.go Hard-codes queue default connection value.
queue/setup/setup.go Adds internal database driver config modification guarded by WhenDriver.
packages/setup_test.go Updates mock expectations to include new driver option.
packages/setup.go Adds driver field and passes Driver option to Apply.
packages/options/options_test.go Adds test for new Driver option helper.
packages/options/options.go Introduces Driver option function.
packages/modify/modify_test.go Adds tests for WhenDriver behavior.
packages/modify/modify.go Implements WhenDriver modifier struct and logic.
foundation/console/package_install_command_test.go Adjusts error messages to lowercase and adds internal driver install test cases.
foundation/console/package_install_command.go Returns errors from install helpers and adds internal driver branch; success message for internal driver.
filesystem/setup/stubs.go Hard-codes filesystem default disk.
database/setup/setup.go Reorders install steps; moves config/service provider creation earlier.
contracts/binding/binding.go Adds driver metadata for multiple bindings (Cache, Queue, Session, Storage).
cache/setup/stubs.go Hard-codes cache default store.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.

Benchmark suite Current: a8db6ba Previous: 2d07c62 Ratio
Benchmark_EncryptString 5151 ns/op 2152 B/op 14 allocs/op 1610 ns/op 2152 B/op 14 allocs/op 3.20
Benchmark_EncryptString - ns/op 5151 ns/op 1610 ns/op 3.20

This comment was automatically generated by workflow using github-action-benchmark.

@hwbrzzl hwbrzzl force-pushed the bowen/optimize-package-install branch from 856a4f8 to a8db6ba Compare October 18, 2025 11:22
@hwbrzzl hwbrzzl merged commit e4741a0 into master Oct 19, 2025
12 of 14 checks passed
@hwbrzzl hwbrzzl deleted the bowen/optimize-package-install branch October 19, 2025 00:42
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.

2 participants