-
Notifications
You must be signed in to change notification settings - Fork 102
fix: [#743] package make command generates correct code #1151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 PR fixes the package make command to generate correct code for service provider registration and import handling. The changes update the generated stubs to use the proper API methods and include necessary imports.
Key Changes
- Added missing
bindingcontract import to the service provider template - Updated method calls from
FiletoGoFileand fromAddProvider/RemoveProvidertoRegister/Unregister
Comments suppressed due to low confidence (1)
foundation/console/package_make_command_stubs.go:159
- The change from RemoveProvider() to Unregister() method should be tested to ensure proper service provider unregistration code is generated.
Find(match.Providers()).Modify(modify.Unregister("&DummyName.ServiceProvider{}")).
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1151 +/- ##
=========================================
Coverage ? 68.44%
=========================================
Files ? 221
Lines ? 14320
Branches ? 0
=========================================
Hits ? 9801
Misses ? 4144
Partials ? 375 β View full report in Codecov by Sentry. π New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, could you fix this in v1.16 as well? And it's better to add a test case for this in goravel/example.
* correctly set cc and bcc headers (#1144) * correct the error return from SendMailJob handle (#1147) * fix: [#743] package make command generates correct code (#1151) (#1152) (cherry picked from commit 93dc8a3) * fix: [#749] The path is incorrect when publishing package files (#1157) * chore: optimize assertions for package installation (#1160) * fix: The configuredServiceProviders, publishes and publishGroups are not reset when Booting (#1162) * fix: The configuredServiceProviders, publishes and publishGroups are not reset when Booting * optimize * fix: [#738] The Orm Creating event can be triggered when the query with the Model method (#1166) * fix: [#738] The Orm Creating event can be triggered when the query with the Model method * fix tests * upgrade: v1.16.1 * fix: [#762] handle panic when using transaction (#1183) * fix: [#762] handle panic when using transaction * v1.16.2 * optimize * fix lint * fix: [#768] facades.DB will panic when migrating a new column (#1185) * fix: [#768] facades.DB will panic when migrating a new column * optimize * optimize * feat: [#770] Add a SelectRaw function for the ORM (#1186) * fix: [#770] Add a SelectRaw function for the ORM * fix: [#770] Add a SelectRaw function for the ORM * fix ci * upgrade: v1.16.3 * fix typo --------- Co-authored-by: krishan kumar <84431594+kkumar-gcc@users.noreply.github.com> Co-authored-by: ALMAS <almas.cc@icloud.com>
* correctly set cc and bcc headers (#1144) * correct the error return from SendMailJob handle (#1147) * fix: [#743] package make command generates correct code (#1151) (#1152) (cherry picked from commit 93dc8a3) * fix: [#749] The path is incorrect when publishing package files (#1157) * chore: optimize assertions for package installation (#1160) * fix: The configuredServiceProviders, publishes and publishGroups are not reset when Booting (#1162) * fix: The configuredServiceProviders, publishes and publishGroups are not reset when Booting * optimize * fix: [#738] The Orm Creating event can be triggered when the query with the Model method (#1166) * fix: [#738] The Orm Creating event can be triggered when the query with the Model method * fix tests * upgrade: v1.16.1 * fix: [#762] handle panic when using transaction (#1183) * fix: [#762] handle panic when using transaction * v1.16.2 * optimize * fix lint * fix: [#768] facades.DB will panic when migrating a new column (#1185) * fix: [#768] facades.DB will panic when migrating a new column * optimize * optimize * feat: [#770] Add a SelectRaw function for the ORM (#1186) * fix: [#770] Add a SelectRaw function for the ORM * fix: [#770] Add a SelectRaw function for the ORM * fix ci * upgrade: v1.16.3 * fix: comand cannot be run concurrently (#1243) * fix: comand cannot be run concurrently * fix ci * fix ci * optimize * optimize * optimize * optimize * optimize global options * fix ci * upgrade v1.16.4 * optimize * optimize --------- Co-authored-by: krishan kumar <84431594+kkumar-gcc@users.noreply.github.com> Co-authored-by: ALMAS <almas.cc@icloud.com>
* correctly set cc and bcc headers (#1144) * correct the error return from SendMailJob handle (#1147) * fix: [#743] package make command generates correct code (#1151) (#1152) (cherry picked from commit 93dc8a3) * fix: [#749] The path is incorrect when publishing package files (#1157) * chore: optimize assertions for package installation (#1160) * fix: The configuredServiceProviders, publishes and publishGroups are not reset when Booting (#1162) * fix: The configuredServiceProviders, publishes and publishGroups are not reset when Booting * optimize * fix: [#738] The Orm Creating event can be triggered when the query with the Model method (#1166) * fix: [#738] The Orm Creating event can be triggered when the query with the Model method * fix tests * upgrade: v1.16.1 * fix: [#762] handle panic when using transaction (#1183) * fix: [#762] handle panic when using transaction * v1.16.2 * optimize * fix lint * fix: [#768] facades.DB will panic when migrating a new column (#1185) * fix: [#768] facades.DB will panic when migrating a new column * optimize * optimize * feat: [#770] Add a SelectRaw function for the ORM (#1186) * fix: [#770] Add a SelectRaw function for the ORM * fix: [#770] Add a SelectRaw function for the ORM * fix ci * upgrade: v1.16.3 * fix: comand cannot be run concurrently (#1243) * fix: comand cannot be run concurrently * fix ci * fix ci * optimize * optimize * optimize * optimize * optimize global options * fix ci * upgrade v1.16.4 * fix: [#807] queue.Shutdown doesn't stop the queue as expected (#1252) * fix: [#807] queue.Shutdown doesn't stop the queue as expected * optimize * upgrade: v1.16.5 * fix * Update queue/worker_test.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * optimize --------- Co-authored-by: krishan kumar <84431594+kkumar-gcc@users.noreply.github.com> Co-authored-by: ALMAS <almas.cc@icloud.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* correctly set cc and bcc headers (#1144) * correct the error return from SendMailJob handle (#1147) * fix: [#743] package make command generates correct code (#1151) (#1152) (cherry picked from commit 93dc8a3) * fix: [#749] The path is incorrect when publishing package files (#1157) * chore: optimize assertions for package installation (#1160) * fix: The configuredServiceProviders, publishes and publishGroups are not reset when Booting (#1162) * fix: The configuredServiceProviders, publishes and publishGroups are not reset when Booting * optimize * fix: [#738] The Orm Creating event can be triggered when the query with the Model method (#1166) * fix: [#738] The Orm Creating event can be triggered when the query with the Model method * fix tests * upgrade: v1.16.1 * fix: [#762] handle panic when using transaction (#1183) * fix: [#762] handle panic when using transaction * v1.16.2 * optimize * fix lint * fix: [#768] facades.DB will panic when migrating a new column (#1185) * fix: [#768] facades.DB will panic when migrating a new column * optimize * optimize * feat: [#770] Add a SelectRaw function for the ORM (#1186) * fix: [#770] Add a SelectRaw function for the ORM * fix: [#770] Add a SelectRaw function for the ORM * fix ci * upgrade: v1.16.3 * fix: comand cannot be run concurrently (#1243) * fix: comand cannot be run concurrently * fix ci * fix ci * optimize * optimize * optimize * optimize * optimize global options * fix ci * upgrade v1.16.4 * fix: [#807] queue.Shutdown doesn't stop the queue as expected (#1252) * fix: [#807] queue.Shutdown doesn't stop the queue as expected * optimize * upgrade: v1.16.5 * fix * Update queue/worker_test.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * optimize --------- Co-authored-by: krishan kumar <84431594+kkumar-gcc@users.noreply.github.com> Co-authored-by: ALMAS <almas.cc@icloud.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
π Description
Closes goravel/goravel#743
β Checks