Skip to content

Conversation

@pierredup
Copy link
Member

Fixes #2197

@pierredup pierredup added this to the 2.3.12 milestone Dec 27, 2025
@pierredup pierredup requested a review from Copilot December 27, 2025 08:24
@pierredup pierredup self-assigned this Dec 27, 2025
@pierredup pierredup added the bug label Dec 27, 2025
@codecov
Copy link

codecov bot commented Dec 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.74%. Comparing base (891f5a7) to head (2fb085e).
⚠️ Report is 9 commits behind head on 2.3.x.

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     
Flag Coverage Δ
unittests 47.74% <100.00%> (-0.87%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

Copy link

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 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_prefix and id_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.

@pierredup pierredup merged commit 05734e5 into 2.3.x Dec 27, 2025
33 of 34 checks passed
@pierredup pierredup deleted the fix-id-generation branch December 27, 2025 08:36
@codecov
Copy link

codecov bot commented Dec 27, 2025

Bundle Report

Changes will decrease total bundle size by 408.77kB (-5.12%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
solidinvoice-webpack-bundle-array-push 7.57MB -408.77kB (-5.12%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: solidinvoice-webpack-bundle-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
app.*.css -555 bytes 1.36MB -0.04%
email.*.css -152.22kB 504.16kB -23.19%
pdf.*.css -152.22kB 445.21kB -25.48%
648.*.js (New) 376.06kB 376.06kB 100.0% 🚀
709.*.css (New) 285.35kB 285.35kB 100.0% 🚀
core.*.css 11.28kB 12.31kB 1104.11% ⚠️
core.*.js 53 bytes 3.1kB 1.74%
355.*.js (Deleted) -446.4kB 0 bytes -100.0% 🗑️
847.*.css (Deleted) -330.13kB 0 bytes -100.0% 🗑️

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants