-
-
Notifications
You must be signed in to change notification settings - Fork 213
Fix adding prefix and suffix to generated IDs #2199
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
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 2.3.x #2199 +/- ##
============================================
- Coverage 48.61% 47.74% -0.87%
Complexity 2755 2755
============================================
Files 502 502
Lines 10047 9326 -721
============================================
- Hits 4884 4453 -431
+ Misses 5163 4873 -290
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ 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.
Pull request overview
This PR fixes issue #2197 by correcting the configuration keys used for ID generation prefix and suffix. The keys were changed from prefix/suffix to id_prefix/id_suffix to match the actual configuration keys defined in the database migrations and default company data.
Key changes:
- Updated
BillingIdGenerator::generate()to use the correct configuration keys (id_prefixandid_suffix) - Fixed all test mocks across 4 test files to expect the corrected configuration keys
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/CoreBundle/Generator/BillingIdGenerator.php |
Updated configuration key lookups from prefix/suffix to id_prefix/id_suffix in the ID generation logic |
src/CoreBundle/Tests/Generator/BillingIdGeneratorTest.php |
Updated test expectations to use corrected configuration keys in all three test methods |
src/InvoiceBundle/Tests/Cloner/InvoiceClonerTest.php |
Fixed mock expectations for invoice cloning tests to use correct configuration keys |
src/InvoiceBundle/Tests/Form/Handler/InvoiceCreateHandlerTest.php |
Updated mock configuration key expectations in invoice creation handler test |
src/QuoteBundle/Tests/Form/Handler/QuoteCreateHandlerTest.php |
Updated mock configuration key expectations in quote creation handler test |
The changes are consistent throughout the codebase. The correct keys (id_prefix and id_suffix) are already defined in:
migrations/Version20300.php(lines 274, 287, 313, 326)src/CoreBundle/Company/DefaultData.php(lines 85-86, 93-94)src/SettingsBundle/Tests/SystemConfigTest.php(lines 55-56, 61-62)
This fix ensures that the prefix and suffix configuration values will now be correctly retrieved and applied when generating invoice and quote IDs.
Bundle ReportChanges will decrease total bundle size by 408.77kB (-5.12%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: solidinvoice-webpack-bundle-array-pushAssets Changed:
|
Fixes #2197