Skip to content

Conversation

@pierredup
Copy link
Member

No description provided.

@pierredup pierredup changed the title Validate currency code to 3 characters Merge 2.3.x into 2.4.x Dec 27, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 27, 2025

Walkthrough

This PR adds explicit client-currency handling to forms and templates, renames billing ID config keys to use id_prefix/id_suffix, removes VAT setup logic from installer, adds rounding for flat-rate tax calculations, updates tests and form helpers, adjusts PDF logo sizing, and bumps a dependency.

Changes

Cohort / File(s) Summary
Form currency support & tests
src/ClientBundle/Form/Type/CreditType.php, src/ClientBundle/Twig/Components/ClientCredit.php, src/ClientBundle/Tests/Form/Type/CreditTypeTest.php, src/CoreBundle/Tests/FormTestCase.php
CreditType now requires a currency option and is instantiated with the client's currency; tests updated to pass Money\Currency; FormTestCase::assertFormData gains an optional formOptions parameter.
Template currency formatting
src/ClientBundle/Resources/views/Components/ClientCredit.html.twig, src/PaymentBundle/Resources/views/Payment/create.html.twig, src/DashboardBundle/Resources/views/Widget/recent_invoices.html.twig, src/DashboardBundle/Resources/views/Widget/recent_payments.html.twig, src/DashboardBundle/Resources/views/Widget/recent_quotes.html.twig
Multiple templates updated to pass the client/quote/invoice currency to formatCurrency calls instead of relying on an implicit default.
Invoice templates (email & PDF)
src/InvoiceBundle/Resources/views/Email/invoice.html.twig, src/InvoiceBundle/Resources/views/Pdf/invoice.html.twig
All monetary fields now format with invoice.client.currency; PDF header logo size changed from 75 to 55.
Quote templates (email & PDF)
src/QuoteBundle/Resources/views/Email/quote.html.twig, src/QuoteBundle/Resources/views/Pdf/quote.html.twig
All monetary fields now format with quote.client.currency; PDF header logo size adjusted (75 → 55).
Billing ID config key rename
src/CoreBundle/Generator/BillingIdGenerator.php, src/CoreBundle/Tests/Generator/BillingIdGeneratorTest.php, src/InvoiceBundle/Tests/Cloner/InvoiceClonerTest.php, src/InvoiceBundle/Tests/Form/Handler/InvoiceCreateHandlerTest.php, src/QuoteBundle/Tests/Form/Handler/QuoteCreateHandlerTest.php
Config keys for ID generation renamed from .../prefix and .../suffix to .../id_prefix and .../id_suffix; generator and tests updated accordingly.
Tax rounding change
src/CoreBundle/Billing/TotalCalculator.php
Flat-rate tax amount now applies an explicit rounding step (scale 0, HALF_EVEN) after rate multiplication before adding to totals.
Installer setup refactor
src/InstallBundle/Action/Setup.php
Setup class made readonly; VatCalculator dependency and VAT creation logic removed; constructor property visibilities adjusted and minor signature formatting change.
PDF/visual tweaks
src/InvoiceBundle/Resources/views/Pdf/invoice.html.twig, src/QuoteBundle/Resources/views/Pdf/quote.html.twig
Header logo size reduced (75 → 55) in PDF templates.
Dependency update
composer.json
solidworx/platform requirement changed from dev-main to ^0.2.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

enhancement

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 57.89% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess relevance to the changeset. Add a description explaining the purpose of this merge, key changes being integrated, and any migration notes or breaking changes developers should be aware of.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Merge 2.3.x into 2.4.x' accurately describes a merge operation between two branches and aligns with the PR objectives and source/target branch information.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch merge-up/2.3.x-to-2.4.x

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 34816b7 and 97041fe.

📒 Files selected for processing (1)
  • src/PaymentBundle/Resources/views/Payment/create.html.twig
🧰 Additional context used
📓 Path-based instructions (1)
src/*/Resources/views/**/*.twig

📄 CodeRabbit inference engine (AGENTS.md)

Create bundle-specific Twig templates in Resources/views/ directory

Files:

  • src/PaymentBundle/Resources/views/Payment/create.html.twig
🧠 Learnings (8)
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/PaymentBundle/**/*.php : Never store raw credit card data; use tokenization via Payum

Applied to files:

  • src/PaymentBundle/Resources/views/Payment/create.html.twig
📚 Learning: 2025-12-27T08:20:09.466Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-27T08:20:09.466Z
Learning: Applies to src/PaymentBundle/**/*.php : Use Payum for PCI-compliant payment processing without storing raw card data

Applied to files:

  • src/PaymentBundle/Resources/views/Payment/create.html.twig
📚 Learning: 2025-12-27T08:22:06.755Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T08:22:06.755Z
Learning: Applies to src/**/*.php : Never use a default currency; always use the currency configured on the Client entity

Applied to files:

  • src/PaymentBundle/Resources/views/Payment/create.html.twig
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/PaymentBundle/**/*.php : Use Payum library for all payment processing integrations

Applied to files:

  • src/PaymentBundle/Resources/views/Payment/create.html.twig
📚 Learning: 2025-12-27T08:19:38.749Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-27T08:19:38.749Z
Learning: Applies to src/PaymentBundle/**/*.php : Use Payum library for all payment gateway integrations with PCI-compliant processing

Applied to files:

  • src/PaymentBundle/Resources/views/Payment/create.html.twig
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/**/*.php : Always explicitly specify Currency on Money objects; never assume or use defaults

Applied to files:

  • src/PaymentBundle/Resources/views/Payment/create.html.twig
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/**/*.php : Always use Money objects with explicit Currency, never default currency

Applied to files:

  • src/PaymentBundle/Resources/views/Payment/create.html.twig
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/**/*.php : Use Money objects instead of raw floats for monetary values

Applied to files:

  • src/PaymentBundle/Resources/views/Payment/create.html.twig
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (18)
  • GitHub Check: DB (MySQL pdo_mysql 8.3)
  • GitHub Check: DB (PostgreSQL pdo_pgsql 16)
  • GitHub Check: DB (MariaDB pdo_mysql 10.11)
  • GitHub Check: DB (PostgreSQL pdo_pgsql 17)
  • GitHub Check: DB (MariaDB pdo_mysql 11.4)
  • GitHub Check: Unit ( PHP 8.4 )
  • GitHub Check: DB (MariaDB pdo_mysql 11)
  • GitHub Check: DB (MariaDB pdo_mysql 11.0)
  • GitHub Check: DB (MariaDB pdo_mysql 10.5)
  • GitHub Check: Unit ( PHP 8.4 )
  • GitHub Check: DB (MariaDB pdo_mysql 10.6)
  • GitHub Check: DB (MySQL pdo_mysql 9)
  • GitHub Check: DB (MySQL pdo_mysql 8.4)
  • GitHub Check: DB (MySQL pdo_mysql 8.0)
  • GitHub Check: DB (MariaDB pdo_mysql 10.4)
  • GitHub Check: DB (MySQL pdo_mysql 5.7)
  • GitHub Check: Lint
  • GitHub Check: PHPStan
🔇 Additional comments (1)
src/PaymentBundle/Resources/views/Payment/create.html.twig (1)

23-23: Previous issue resolved - currency parameter is now correct.

The change correctly addresses the concern raised in the previous review. The formatCurrency filter now receives the explicit invoice.client.currency property instead of the entire client object, ensuring consistency with other templates and proper type handling.

Based on learnings, this correctly uses the currency configured on the Client entity rather than any default.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🧹 Nitpick comments (1)
.github/workflows/scorecards.yml (1)

76-76: Consider pinning codeql-action to a specific SHA instead of a tag.

The change from a specific SHA to @v3 tag reduces security by allowing automatic updates that could introduce breaking changes or vulnerabilities. For security-critical workflows like Scorecard analysis, pinning to immutable SHAs is recommended.

🔎 Verify the latest v3 SHA and pin it
#!/bin/bash
# Get the latest commit SHA for the v3 tag
echo "Fetching latest v3 tag SHA for github/codeql-action..."
gh api repos/github/codeql-action/git/ref/tags/v3 --jq '.object.sha'
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 649148f and 3018582.

⛔ Files ignored due to path filters (1)
  • composer.lock is excluded by !**/*.lock
📒 Files selected for processing (31)
  • .github/workflows/automatic-release.yml
  • .github/workflows/codeql-analysis.yml
  • .github/workflows/cs.yml
  • .github/workflows/db-tests.yml
  • .github/workflows/dependency-review.yml
  • .github/workflows/release.yml
  • .github/workflows/scorecards.yml
  • .github/workflows/security-checker.yml
  • .github/workflows/static-analysis.yml
  • .github/workflows/unit-tests.yml
  • composer.json
  • src/ClientBundle/Form/Type/CreditType.php
  • src/ClientBundle/Resources/views/Components/ClientCredit.html.twig
  • src/ClientBundle/Tests/Form/Type/CreditTypeTest.php
  • src/ClientBundle/Twig/Components/ClientCredit.php
  • src/CoreBundle/Billing/TotalCalculator.php
  • src/CoreBundle/Generator/BillingIdGenerator.php
  • src/CoreBundle/Tests/FormTestCase.php
  • src/CoreBundle/Tests/Generator/BillingIdGeneratorTest.php
  • src/DashboardBundle/Resources/views/Widget/recent_invoices.html.twig
  • src/DashboardBundle/Resources/views/Widget/recent_payments.html.twig
  • src/DashboardBundle/Resources/views/Widget/recent_quotes.html.twig
  • src/InstallBundle/Action/Setup.php
  • src/InvoiceBundle/Resources/views/Email/invoice.html.twig
  • src/InvoiceBundle/Resources/views/Pdf/invoice.html.twig
  • src/InvoiceBundle/Tests/Cloner/InvoiceClonerTest.php
  • src/InvoiceBundle/Tests/Form/Handler/InvoiceCreateHandlerTest.php
  • src/PaymentBundle/Resources/views/Payment/create.html.twig
  • src/QuoteBundle/Resources/views/Email/quote.html.twig
  • src/QuoteBundle/Resources/views/Pdf/quote.html.twig
  • src/QuoteBundle/Tests/Form/Handler/QuoteCreateHandlerTest.php
🧰 Additional context used
📓 Path-based instructions (10)
src/*/Resources/views/**/*.twig

📄 CodeRabbit inference engine (AGENTS.md)

Create bundle-specific Twig templates in Resources/views/ directory

Files:

  • src/PaymentBundle/Resources/views/Payment/create.html.twig
  • src/ClientBundle/Resources/views/Components/ClientCredit.html.twig
  • src/InvoiceBundle/Resources/views/Email/invoice.html.twig
  • src/QuoteBundle/Resources/views/Email/quote.html.twig
  • src/DashboardBundle/Resources/views/Widget/recent_invoices.html.twig
  • src/QuoteBundle/Resources/views/Pdf/quote.html.twig
  • src/DashboardBundle/Resources/views/Widget/recent_payments.html.twig
  • src/InvoiceBundle/Resources/views/Pdf/invoice.html.twig
  • src/DashboardBundle/Resources/views/Widget/recent_quotes.html.twig
**/*.php

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.php: Include file header comment with license and copyright information in all PHP files
Always declare strict types with declare(strict_types=1); at the top of PHP files
Always specify parameter and return type hints in PHP
Follow PSR-12 and Symfony coding standards checked by EasyCodingStandard (ECS)

**/*.php: Include required file header comment with MIT license attribution
Always declare strict types at the top of PHP files using declare(strict_types=1);
Use type hints for all function parameters and return types in PHP
Follow PSR-12 and Symfony coding standards enforced by EasyCodingStandard

Files:

  • src/CoreBundle/Billing/TotalCalculator.php
  • src/QuoteBundle/Tests/Form/Handler/QuoteCreateHandlerTest.php
  • src/ClientBundle/Form/Type/CreditType.php
  • src/ClientBundle/Tests/Form/Type/CreditTypeTest.php
  • src/InvoiceBundle/Tests/Form/Handler/InvoiceCreateHandlerTest.php
  • src/CoreBundle/Tests/Generator/BillingIdGeneratorTest.php
  • src/InvoiceBundle/Tests/Cloner/InvoiceClonerTest.php
  • src/CoreBundle/Generator/BillingIdGenerator.php
  • src/ClientBundle/Twig/Components/ClientCredit.php
  • src/CoreBundle/Tests/FormTestCase.php
  • src/InstallBundle/Action/Setup.php
src/**/*.php

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.php: Use constructor dependency injection for all service dependencies
Prefer final classes unless inheritance is specifically needed
Always specify visibility modifiers (public, private, protected) on properties and methods
Never use hardcoded values; use environment variables or configuration for all configurable settings
Use Money objects from moneyphp/money library instead of raw floats for monetary values
Always use Doctrine ORM repositories instead of raw SQL queries
Run static analysis with PHPStan at Level 6 before committing code
Use Rector for automated code refactoring to modernize PHP code and apply best practices
Use Symfony Security component and voter pattern for implementing role-based access control
Use Symfony Mailer for all email sending operations
Use PDF generation manager service for all PDF output instead of direct mPDF calls
Each PHP file must contain exactly one class and the filename must match the class name
Use namespace structure that reflects directory structure with proper PSR-4 autoloading
Order use statements in the following order: constants, classes, functions
Integrate Symfony Workflow for state machine transitions on invoices and complex domain objects

src/**/*.php: Always use constructor injection for dependencies in classes
Always use Money objects from moneyphp/money library, never raw floats for monetary values
Validate all user input using Symfony Validator and Form validation
Prefer final classes unless inheritance is explicitly needed
Always specify visibility modifiers (public, private, protected) for properties and methods
Use class constants instead of global constants for configuration values
Implement one class per file with filename matching the class name
Use statement ordering: const, class, function in use declarations
Use PHPStan static analysis at Level 6 to ensure type safety and code quality
Use Rector for automated code refactoring and modernization of PHP code
Implement proper error handl...

Files:

  • src/CoreBundle/Billing/TotalCalculator.php
  • src/QuoteBundle/Tests/Form/Handler/QuoteCreateHandlerTest.php
  • src/ClientBundle/Form/Type/CreditType.php
  • src/ClientBundle/Tests/Form/Type/CreditTypeTest.php
  • src/InvoiceBundle/Tests/Form/Handler/InvoiceCreateHandlerTest.php
  • src/CoreBundle/Tests/Generator/BillingIdGeneratorTest.php
  • src/InvoiceBundle/Tests/Cloner/InvoiceClonerTest.php
  • src/CoreBundle/Generator/BillingIdGenerator.php
  • src/ClientBundle/Twig/Components/ClientCredit.php
  • src/CoreBundle/Tests/FormTestCase.php
  • src/InstallBundle/Action/Setup.php
src/CoreBundle/**/*.php

📄 CodeRabbit inference engine (CLAUDE.md)

Use PDF manager service for generating PDFs, with proper HTML templates

Use mPDF library for all PDF generation via the PDF manager service

Files:

  • src/CoreBundle/Billing/TotalCalculator.php
  • src/CoreBundle/Tests/Generator/BillingIdGeneratorTest.php
  • src/CoreBundle/Generator/BillingIdGenerator.php
  • src/CoreBundle/Tests/FormTestCase.php
src/**/Tests/**/*.php

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/Tests/**/*.php: Follow strict testing requirements: use PHPUnit 10.4+, with test execution in random order and strict mode
Write unit tests for all new classes and business logic
Use Mockery for mocking dependencies in unit tests
Use Foundry for fixture management in tests instead of manual fixtures

src/**/Tests/**/*.php: Add proper PHPUnit file header with declare(strict_types=1) to all test files
Add unit tests for all business logic classes
Run tests in random order via PHPUnit executionOrder setting
Use Foundry Factory classes for generating test fixtures
Create test cases that extend appropriate base classes (TestCase, ApiTestCase, FunctionalTestCase)
Separate unit tests for individual classes from functional tests for workflows
Use strict assertions in tests (assertEquals not ==, etc.)
Test error cases and edge cases, not just happy path

src/**/Tests/**/*.php: Write unit tests for all new business logic in Tests/ directory of appropriate bundle
Use Foundry for fixture generation in tests
Use Mockery for mocking dependencies in unit tests
Use Symfony Panther for end-to-end browser testing

Files:

  • src/QuoteBundle/Tests/Form/Handler/QuoteCreateHandlerTest.php
  • src/ClientBundle/Tests/Form/Type/CreditTypeTest.php
  • src/InvoiceBundle/Tests/Form/Handler/InvoiceCreateHandlerTest.php
  • src/CoreBundle/Tests/Generator/BillingIdGeneratorTest.php
  • src/InvoiceBundle/Tests/Cloner/InvoiceClonerTest.php
  • src/CoreBundle/Tests/FormTestCase.php
src/*/Tests/**/*.php

📄 CodeRabbit inference engine (CLAUDE.md)

src/*/Tests/**/*.php: Write unit tests for individual classes in isolation using Mockery for dependencies
Use PHPUnit with random test execution order and strict mode enabled

Files:

  • src/QuoteBundle/Tests/Form/Handler/QuoteCreateHandlerTest.php
  • src/ClientBundle/Tests/Form/Type/CreditTypeTest.php
  • src/InvoiceBundle/Tests/Form/Handler/InvoiceCreateHandlerTest.php
  • src/CoreBundle/Tests/Generator/BillingIdGeneratorTest.php
  • src/InvoiceBundle/Tests/Cloner/InvoiceClonerTest.php
  • src/CoreBundle/Tests/FormTestCase.php
src/InvoiceBundle/**/*.php

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use Symfony Workflow component for invoice state machine management with defined states (draft, pending, recurring, paid, sent, viewed, cancelled)

Use Symfony Workflow for invoice state management with defined states: draft, pending, recurring, paid, sent, viewed, cancelled

src/InvoiceBundle/**/*.php: Use entity state machine via Symfony Workflow for invoice state transitions
Use Symfony Workflow for managing invoice state transitions

Use Symfony Workflow for invoice state management with proper state transitions

Files:

  • src/InvoiceBundle/Tests/Form/Handler/InvoiceCreateHandlerTest.php
  • src/InvoiceBundle/Tests/Cloner/InvoiceClonerTest.php
src/**/Action/*.php

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Name actions with verb or purpose (e.g., CreateAction, EditAction, IndexAction) and place in Action directory

src/**/Action/*.php: Create Action classes as entry points for HTTP requests instead of traditional controllers
Name Action classes with descriptive verb or purpose (CreateAction, EditAction, IndexAction)
Keep business logic in Manager classes and repositories, not in Action classes
Use dependency injection in Action classes to access services
Return Response objects from Action classes, not arrays or strings

src/**/Action/*.php: Action classes should be single-responsibility entry points for HTTP requests with __invoke method
Action classes should use verb or purpose names (e.g., CreateAction, EditAction, IndexAction)

Files:

  • src/InstallBundle/Action/Setup.php
src/*/Action/*.php

📄 CodeRabbit inference engine (CLAUDE.md)

src/*/Action/*.php: Create Action classes for HTTP request entry points instead of traditional controllers
Follow action naming convention: Verb or purpose (e.g., CreateAction, EditAction)

Files:

  • src/InstallBundle/Action/Setup.php
src/**/{Action,Controller}/*.php

📄 CodeRabbit inference engine (CLAUDE.md)

Use role-based access control (RBAC) with Symfony Security voters for authorization

Files:

  • src/InstallBundle/Action/Setup.php
🧠 Learnings (27)
📚 Learning: 2025-12-27T08:22:06.755Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T08:22:06.755Z
Learning: Applies to src/**/*.php : Never use a default currency; always use the currency configured on the Client entity

Applied to files:

  • src/PaymentBundle/Resources/views/Payment/create.html.twig
  • src/ClientBundle/Resources/views/Components/ClientCredit.html.twig
  • src/ClientBundle/Form/Type/CreditType.php
  • src/ClientBundle/Tests/Form/Type/CreditTypeTest.php
  • src/InvoiceBundle/Resources/views/Email/invoice.html.twig
  • src/QuoteBundle/Resources/views/Email/quote.html.twig
  • src/ClientBundle/Twig/Components/ClientCredit.php
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/**/*.php : Always explicitly specify Currency on Money objects; never assume or use defaults

Applied to files:

  • src/ClientBundle/Form/Type/CreditType.php
  • src/ClientBundle/Tests/Form/Type/CreditTypeTest.php
📚 Learning: 2025-12-27T08:22:06.755Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T08:22:06.755Z
Learning: Use Doctrine ORM with custom types for Money, UUID, and other domain objects

Applied to files:

  • src/ClientBundle/Form/Type/CreditType.php
  • src/ClientBundle/Tests/Form/Type/CreditTypeTest.php
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/**/*.php : Always use Money objects with explicit Currency, never default currency

Applied to files:

  • src/ClientBundle/Tests/Form/Type/CreditTypeTest.php
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/**/*.php : Use Money objects instead of raw floats for monetary values

Applied to files:

  • src/ClientBundle/Tests/Form/Type/CreditTypeTest.php
📚 Learning: 2025-12-27T08:22:06.755Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T08:22:06.755Z
Learning: Applies to src/**/Normalizer/*.php : Implement API endpoints using custom normalizers for complex types like Money and Credits

Applied to files:

  • src/ClientBundle/Tests/Form/Type/CreditTypeTest.php
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/**/Tests/**/*.php : Use strict assertions in tests (assertEquals not ==, etc.)

Applied to files:

  • src/ClientBundle/Tests/Form/Type/CreditTypeTest.php
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/**/*.php : Use the Money library to handle all monetary calculations, comparisons, and formatting

Applied to files:

  • src/ClientBundle/Tests/Form/Type/CreditTypeTest.php
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/InvoiceBundle/**/*.php : Use entity state machine via Symfony Workflow for invoice state transitions

Applied to files:

  • src/InvoiceBundle/Resources/views/Email/invoice.html.twig
  • src/InvoiceBundle/Tests/Form/Handler/InvoiceCreateHandlerTest.php
  • src/InvoiceBundle/Tests/Cloner/InvoiceClonerTest.php
  • src/InvoiceBundle/Resources/views/Pdf/invoice.html.twig
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/InvoiceBundle/**/*.php : Use Symfony Workflow for managing invoice state transitions

Applied to files:

  • src/InvoiceBundle/Resources/views/Email/invoice.html.twig
  • src/InvoiceBundle/Resources/views/Pdf/invoice.html.twig
📚 Learning: 2025-12-27T08:22:06.755Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T08:22:06.755Z
Learning: Applies to src/InvoiceBundle/**/*.php : Use Symfony Workflow for invoice state management with proper state transitions

Applied to files:

  • src/InvoiceBundle/Resources/views/Email/invoice.html.twig
  • src/InvoiceBundle/Resources/views/Pdf/invoice.html.twig
📚 Learning: 2025-12-27T08:20:09.466Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-27T08:20:09.466Z
Learning: Applies to src/InvoiceBundle/**/*.php : Use Symfony Workflow for invoice state management with defined states: draft, pending, recurring, paid, sent, viewed, cancelled

Applied to files:

  • src/InvoiceBundle/Resources/views/Email/invoice.html.twig
  • src/InvoiceBundle/Resources/views/Pdf/invoice.html.twig
📚 Learning: 2025-12-27T08:19:38.749Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-27T08:19:38.749Z
Learning: Applies to src/InvoiceBundle/**/*.php : Use Symfony Workflow component for invoice state machine management with defined states (draft, pending, recurring, paid, sent, viewed, cancelled)

Applied to files:

  • src/InvoiceBundle/Resources/views/Email/invoice.html.twig
  • src/InvoiceBundle/Resources/views/Pdf/invoice.html.twig
📚 Learning: 2025-06-30T10:17:55.570Z
Learnt from: pierredup
Repo: SolidInvoice/SolidInvoice PR: 1825
File: src/UserBundle/Resources/views/Security/TwoFactor/index.html.twig:17-17
Timestamp: 2025-06-30T10:17:55.570Z
Learning: The `<twig:Platform:Security:TwoFactor />` Twig component is registered in the external solidworx/platform package, not within the SolidInvoice codebase itself.

Applied to files:

  • composer.json
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/**/Tests/Functional/**/*.php : Write integration tests for complex workflows spanning multiple bundles

Applied to files:

  • src/InvoiceBundle/Tests/Form/Handler/InvoiceCreateHandlerTest.php
  • src/CoreBundle/Tests/Generator/BillingIdGeneratorTest.php
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/**/Tests/Unit/**/*.php : Mock external services and dependencies in unit tests

Applied to files:

  • src/InvoiceBundle/Tests/Form/Handler/InvoiceCreateHandlerTest.php
📚 Learning: 2025-12-27T08:22:06.755Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T08:22:06.755Z
Learning: Use GitHub Actions CI/CD pipeline for automated testing and code quality checks

Applied to files:

  • .github/workflows/security-checker.yml
  • .github/workflows/dependency-review.yml
  • .github/workflows/automatic-release.yml
  • .github/workflows/codeql-analysis.yml
  • .github/workflows/cs.yml
  • .github/workflows/release.yml
  • .github/workflows/scorecards.yml
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/**/Tests/**/*.php : Separate unit tests for individual classes from functional tests for workflows

Applied to files:

  • .github/workflows/unit-tests.yml
📚 Learning: 2025-12-27T08:19:38.749Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-27T08:19:38.749Z
Learning: Applies to src/**/Tests/**/*.php : Follow strict testing requirements: use PHPUnit 10.4+, with test execution in random order and strict mode

Applied to files:

  • .github/workflows/unit-tests.yml
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/**/*.php : Run bin/rector process to apply PHP 8.4+ and best practice refactorings

Applied to files:

  • .github/workflows/unit-tests.yml
📚 Learning: 2025-12-27T08:22:06.755Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T08:22:06.755Z
Learning: Applies to src/**/*.php : Use Rector for automated code refactoring following PHP 8.4+ best practices

Applied to files:

  • .github/workflows/unit-tests.yml
📚 Learning: 2025-12-27T08:22:06.755Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T08:22:06.755Z
Learning: Applies to src/**/*.php : All PHP code must pass PHPStan static analysis at Level 6

Applied to files:

  • .github/workflows/unit-tests.yml
📚 Learning: 2025-12-27T08:20:09.466Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-27T08:20:09.466Z
Learning: Applies to src/*/Form/*Type.php : Follow form type naming convention: EntityName + Type (e.g., InvoiceType)

Applied to files:

  • src/ClientBundle/Twig/Components/ClientCredit.php
📚 Learning: 2025-12-27T08:19:38.749Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-27T08:19:38.749Z
Learning: Applies to src/**/Form/*.php : Name form types with Entity name + 'Type' suffix (e.g., InvoiceType, ClientType)

Applied to files:

  • src/ClientBundle/Twig/Components/ClientCredit.php
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/**/*.php : Run bin/ecs check --fix before committing to fix coding standards automatically

Applied to files:

  • .github/workflows/cs.yml
📚 Learning: 2025-12-27T08:19:38.749Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-27T08:19:38.749Z
Learning: Commit code only after passing all CI checks: unit tests, coding standards (ECS), and static analysis (PHPStan)

Applied to files:

  • .github/workflows/cs.yml
📚 Learning: 2025-12-27T08:19:38.748Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-27T08:19:38.748Z
Learning: Applies to **/*.php : Follow PSR-12 and Symfony coding standards checked by EasyCodingStandard (ECS)

Applied to files:

  • .github/workflows/cs.yml
🧬 Code graph analysis (5)
src/CoreBundle/Billing/TotalCalculator.php (1)
src/TaxBundle/Entity/Tax.php (1)
  • getRate (161-164)
src/ClientBundle/Tests/Form/Type/CreditTypeTest.php (2)
src/CoreBundle/Tests/FormTestCase.php (1)
  • assertFormData (134-154)
src/ClientBundle/Form/Type/CreditType.php (1)
  • CreditType (27-61)
src/CoreBundle/Generator/BillingIdGenerator.php (1)
src/SettingsBundle/SystemConfig.php (1)
  • get (40-47)
src/ClientBundle/Twig/Components/ClientCredit.php (2)
src/ClientBundle/Form/Type/CreditType.php (1)
  • CreditType (27-61)
src/ClientBundle/Entity/Client.php (1)
  • getCurrency (429-436)
src/InstallBundle/Action/Setup.php (1)
src/CoreBundle/ConfigWriter.php (2)
  • __construct (32-38)
  • ConfigWriter (26-61)
🪛 GitHub Actions: DB Tests
composer.json

[warning] 1-1: Lock file is not up to date with composer.json. It is recommended to run 'composer update'. The lock file contains solidworx/platform as '9999999-dev' but the constraint is '0.1.0'.

🪛 GitHub Actions: Static Analysis
composer.json

[warning] 1-1: Lock file not up to date with composer.json. You may be getting outdated dependencies. The lock file contains 'solidworx/platform' as '9999999-dev' which does not satisfy constraint '0.1.0'. Run 'composer update' or 'composer update '.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Lint
🔇 Additional comments (38)
src/CoreBundle/Tests/FormTestCase.php (2)

132-134: LGTM! Well-implemented backwards-compatible extension.

The addition of the optional $formOptions parameter is properly documented and maintains backwards compatibility with the default empty array. The parameter placement follows Symfony conventions by placing options as the last parameter.


139-139: LGTM! Correct propagation of form options.

The implementation correctly passes the $formOptions parameter to Symfony's form factory, which accepts options as the third parameter. This enables test cases to provide custom form options when needed.

src/CoreBundle/Billing/TotalCalculator.php (1)

89-92: LGTM! Rounding makes flat-rate tax calculation consistent and precise.

The addition of .toScale(0, RoundingMode::HALF_EVEN) ensures the flat-rate tax amount is an integer in the smallest currency unit (e.g., cents), handling potential float precision issues. This makes the TYPE_FLAT_RATE calculation consistent with TYPE_EXCLUSIVE (line 86), which already applies the same rounding.

src/InstallBundle/Action/Setup.php (2)

35-35: Good use of readonly class for immutability.

The final readonly class declaration follows best practices and ensures all properties are immutable, which is appropriate for an action class that holds only dependencies.


146-156: The VAT calculation removal is intentional and does not break functionality. The VatCalculator service remains registered and is actively used in src/TaxBundle/Action/Validate.php for VAT validation. The Tax entity is fully available throughout the application (TaxBundle, QuoteBundle, InvoiceBundle, CoreBundle). The change only removes automatic VAT tax creation during setup, allowing users to manually configure tax rates appropriate for their country and use case, which is more flexible than forcing defaults.

src/CoreBundle/Tests/Generator/BillingIdGeneratorTest.php (1)

56-57: Test updates are consistent with production code changes.

All three test methods correctly updated to use the new configuration keys id_prefix and id_suffix. The test coverage remains comprehensive and the expectations are accurate.

Also applies to: 100-101, 140-141

src/InvoiceBundle/Tests/Cloner/InvoiceClonerTest.php (1)

89-95: Test correctly updated for new configuration keys.

The mock expectations now use invoice/id_generation/id_prefix and invoice/id_generation/id_suffix, consistent with the production code changes.

src/InvoiceBundle/Tests/Form/Handler/InvoiceCreateHandlerTest.php (1)

200-207: Test mocks correctly updated for new configuration keys.

The system config mocks now expect invoice/id_generation/id_prefix and invoice/id_generation/id_suffix, maintaining consistency with the production code changes.

src/ClientBundle/Tests/Form/Type/CreditTypeTest.php (1)

18-18: Currency option correctly added to form test.

The test now provides the required currency option when testing the CreditType form. Using a faker-generated currency code is appropriate for this unit test, as it validates the form type's ability to handle any valid currency. In production usage, the currency comes from the client entity as per the coding guidelines.

Also applies to: 41-41

src/ClientBundle/Resources/views/Components/ClientCredit.html.twig (1)

3-3: Excellent improvement: explicit currency usage.

Passing client.currency explicitly to formatCurrency ensures the credit amount is formatted using the client's configured currency, avoiding any default currency assumptions. This aligns perfectly with the coding guideline: "Never use a default currency; always use the currency configured on the Client entity."

src/QuoteBundle/Tests/Form/Handler/QuoteCreateHandlerTest.php (1)

203-210: Test mocks correctly updated for quote ID generation.

The configuration key lookups now use quote/id_generation/id_prefix and quote/id_generation/id_suffix, maintaining consistency with the invoice-related updates and the production code changes.

src/DashboardBundle/Resources/views/Widget/recent_quotes.html.twig (1)

46-46: Explicit currency usage improves correctness.

Now passing quote.client.currency explicitly to formatCurrency ensures each quote's total is formatted with its associated client's currency. This is consistent with the broader pattern in this PR and aligns with the coding guideline about never using default currencies.

src/CoreBundle/Generator/BillingIdGenerator.php (1)

53-55: Configuration keys are new, not renamed—no migration needed.

The id_prefix and id_suffix keys are newly introduced in Version20300.php and do not represent a rename from existing keys. There is no prior configuration using prefix/suffix without the id_generation/ namespace, so no migration path is required for existing installations. This is a new feature addition, not a breaking change.

src/DashboardBundle/Resources/views/Widget/recent_payments.html.twig (1)

29-29: LGTM! Explicit currency parameter added.

The change correctly passes the client's currency to the formatCurrency filter, ensuring currency-aware formatting based on the payment's associated client. This aligns with the coding guideline to always use the currency configured on the Client entity.

src/ClientBundle/Twig/Components/ClientCredit.php (1)

43-45: LGTM! Currency option properly passed to form.

The form instantiation correctly passes the client's currency as an option to CreditType, ensuring the MoneyType field uses the appropriate currency. This follows the coding guideline to always use the currency configured on the Client entity. Based on learnings.

src/DashboardBundle/Resources/views/Widget/recent_invoices.html.twig (1)

54-54: LGTM! Explicit currency parameter added.

The change correctly passes the client's currency to the formatCurrency filter for invoice total formatting. This ensures currency-aware formatting based on the invoice's associated client currency.

src/QuoteBundle/Resources/views/Email/quote.html.twig (1)

76-76: LGTM! Currency parameters consistently applied.

All monetary value formatting in the quote email now explicitly passes quote.client.currency to the formatCurrency filter (baseTotal, tax, discount, and total). This ensures consistent currency-aware formatting throughout the email template based on the quote's associated client currency.

Also applies to: 86-86, 97-97, 108-108

src/QuoteBundle/Resources/views/Pdf/quote.html.twig (2)

42-42: Logo size adjustment.

The logo size was reduced from 75 to 55. While this change is unrelated to the currency formatting updates, ensure this adjustment is intentional and maintains acceptable visual quality in the PDF output.


99-99: LGTM! Comprehensive currency parameter coverage.

All monetary value formatting throughout the PDF quote template now explicitly passes quote.client.currency to the formatCurrency filter. This includes the header total, line item prices and totals, subtotal, tax, discount, and final total. The consistent application ensures proper currency-aware formatting across the entire document.

Also applies to: 162-162, 173-173, 192-192, 203-203, 216-216, 229-229

src/ClientBundle/Form/Type/CreditType.php (3)

16-16: LGTM! Proper imports added.

The necessary imports for Money\Currency and Symfony\Component\OptionsResolver\OptionsResolver have been added to support the new currency option functionality.

Also applies to: 20-20


44-44: LGTM! Currency option passed to MoneyType field.

The currency option is correctly extracted from the form options and passed to the MoneyType field, ensuring the amount field uses the appropriate currency for display and validation.


49-55: LGTM! Proper option configuration with type safety.

The configureOptions method correctly enforces that:

  • The currency option is required
  • The option must be an instance of Money\Currency

This provides type safety and ensures the form cannot be instantiated without an explicit currency, aligning with the coding guideline to never use a default currency. Based on learnings.

src/InvoiceBundle/Resources/views/Email/invoice.html.twig (1)

41-41: LGTM! Comprehensive currency parameter coverage.

All monetary value formatting throughout the invoice email template now explicitly passes invoice.client.currency to the formatCurrency filter. This includes:

  • Structured data (JSON-LD schema.org markup) for minimum and total payment due
  • Invoice subtotal, tax, and discount
  • Individual payment amounts
  • Balance and total displays

The consistent application ensures proper currency-aware formatting across the entire email template, including machine-readable structured data.

Also applies to: 51-51, 95-95, 105-105, 116-116, 130-130, 147-147, 149-149

src/InvoiceBundle/Resources/views/Pdf/invoice.html.twig (3)

42-42: LGTM!

Logo size adjustment is consistent with similar changes in other PDF templates.


106-106: LGTM!

Explicit currency parameter ensures monetary values are formatted using the client's currency rather than relying on a system default. This is a good improvement for multi-currency support.

Also applies to: 169-180


199-261: Consistent currency formatting across invoice summary.

All monetary values (subtotal, tax, discount, payments, balance, and total) now explicitly use invoice.client.currency. This ensures the PDF correctly reflects the client's currency throughout.

.github/workflows/security-checker.yml (1)

13-13: Action version updates look consistent.

The SHA updates for Harden Runner and Checkout actions match the versions used in other workflow files, maintaining consistency across the CI pipeline.

Also applies to: 20-20

.github/workflows/codeql-analysis.yml (1)

27-27: CodeQL action updates look good.

The CodeQL actions have been consistently updated to the same SHA across init, autobuild, and analyze steps, which is the correct approach for maintaining compatibility.

Also applies to: 40-40, 43-43, 48-48, 51-51

.github/workflows/automatic-release.yml (1)

21-21: Action updates are consistent across workflows.

The SHA updates in this workflow match the versions used in other workflows (db-tests.yml), maintaining consistency across the release pipeline.

Also applies to: 51-51, 57-57, 63-63

.github/workflows/scorecards.yml (1)

37-37: Action version updates look good.

The Checkout, Scorecard, and upload-artifact actions have been updated to newer versions with proper SHA pinning.

Also applies to: 42-42, 67-67

.github/workflows/unit-tests.yml (1)

41-41: Action updates are consistent.

The Harden Runner and Codecov action updates align with the SHA updates in other workflows.

Also applies to: 121-121

.github/workflows/db-tests.yml (1)

159-159: All action versions are legitimate with no critical breaking changes for this workflow.

  • step-security/harden-runner@c6295a65... is v2.11.1 (released Apr 1, 2025) with GitHub Actions cache v2 support.
  • actions/checkout@11bd71... is a v4 commit from Oct 3, 2024; v4 has breaking changes (shallow fetch by default, credentials persistence), but the workflow doesn't rely on affected behavior.
  • shivammathur/setup-php@cf4cade... is v2.34.1 with only bug fixes (no breaking changes).
  • oven-sh/setup-bun@4bc047a... is v2.0.1 (July 15).
  • ramsey/composer-install@e52779... is the current v3 release.
.github/workflows/cs.yml (2)

16-38: Action SHA updates look good.

The action version pins for step-security/harden-runner, actions/checkout, shivammathur/setup-php, and ramsey/composer-install are consistently updated across the ecs job with proper version comments where applicable.


49-87: Endpoint additions and action updates for composer-normalize job are appropriate.

The addition of raw.githubusercontent.com:443 and release-assets.githubusercontent.com:443 to the allowed endpoints is reasonable for fetching GitHub release assets and raw content.

.github/workflows/release.yml (3)

62-77: Action updates for build-dist job look good.

SHA-pinned actions (harden-runner, checkout, setup-php, setup-bun) are consistently updated. PHP 8.3 is a reasonable choice for the build.


114-154: Build-mac job updates are consistent.

PHP version 8.3.20 is appropriately specific for binary builds where reproducibility matters. Action updates for checkout, download-artifact, setup-go, and cache actions are aligned with the broader upgrade.


165-209: Build-linux job updates are appropriate.

Docker-related actions are updated to current major versions (v3, v6). The docker/bake-action@v6 usage with cache configuration looks correct for the cloud builder setup.

.github/workflows/static-analysis.yml (1)

16-71: Action SHA updates are consistent with other workflows.

The phpstan job updates align with the version pinning strategy applied across other workflow files in this PR. The endpoint allowlist appears appropriate for the static analysis toolchain.

@codecov
Copy link

codecov bot commented Dec 27, 2025

Codecov Report

❌ Patch coverage is 69.23077% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.18%. Comparing base (649148f) to head (44f4260).

Files with missing lines Patch % Lines
src/ClientBundle/Twig/Components/ClientCredit.php 0.00% 3 Missing ⚠️
src/InstallBundle/Action/Setup.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              2.4.x    #2202      +/-   ##
============================================
+ Coverage     48.11%   48.18%   +0.07%     
  Complexity     2830     2830              
============================================
  Files           519      519              
  Lines          9563     9561       -2     
============================================
+ Hits           4601     4607       +6     
+ Misses         4962     4954       -8     
Flag Coverage Δ
unittests 48.18% <69.23%> (+0.07%) ⬆️

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
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/PaymentBundle/Resources/views/Payment/create.html.twig (1)

12-12: Typo in translation key.

The translation key contains "tite" which should likely be "title": payment.create.title.

🔎 Proposed fix
-{% block title %}{{ "payment.create.tite"|trans|replace({"%id%" : invoice.invoiceId}) }}{% endblock %}
+{% block title %}{{ "payment.create.title"|trans|replace({"%id%" : invoice.invoiceId}) }}{% endblock %}
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 34816b7 and 97041fe.

📒 Files selected for processing (1)
  • src/PaymentBundle/Resources/views/Payment/create.html.twig
🧰 Additional context used
📓 Path-based instructions (1)
src/*/Resources/views/**/*.twig

📄 CodeRabbit inference engine (AGENTS.md)

Create bundle-specific Twig templates in Resources/views/ directory

Files:

  • src/PaymentBundle/Resources/views/Payment/create.html.twig
🧠 Learnings (8)
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/PaymentBundle/**/*.php : Never store raw credit card data; use tokenization via Payum

Applied to files:

  • src/PaymentBundle/Resources/views/Payment/create.html.twig
📚 Learning: 2025-12-27T08:20:09.466Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-27T08:20:09.466Z
Learning: Applies to src/PaymentBundle/**/*.php : Use Payum for PCI-compliant payment processing without storing raw card data

Applied to files:

  • src/PaymentBundle/Resources/views/Payment/create.html.twig
📚 Learning: 2025-12-27T08:22:06.755Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-27T08:22:06.755Z
Learning: Applies to src/**/*.php : Never use a default currency; always use the currency configured on the Client entity

Applied to files:

  • src/PaymentBundle/Resources/views/Payment/create.html.twig
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/PaymentBundle/**/*.php : Use Payum library for all payment processing integrations

Applied to files:

  • src/PaymentBundle/Resources/views/Payment/create.html.twig
📚 Learning: 2025-12-27T08:19:38.749Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-27T08:19:38.749Z
Learning: Applies to src/PaymentBundle/**/*.php : Use Payum library for all payment gateway integrations with PCI-compliant processing

Applied to files:

  • src/PaymentBundle/Resources/views/Payment/create.html.twig
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/**/*.php : Always explicitly specify Currency on Money objects; never assume or use defaults

Applied to files:

  • src/PaymentBundle/Resources/views/Payment/create.html.twig
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/**/*.php : Always use Money objects with explicit Currency, never default currency

Applied to files:

  • src/PaymentBundle/Resources/views/Payment/create.html.twig
📚 Learning: 2025-12-27T08:21:22.801Z
Learnt from: CR
Repo: SolidInvoice/SolidInvoice PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-27T08:21:22.801Z
Learning: Applies to src/**/*.php : Use Money objects instead of raw floats for monetary values

Applied to files:

  • src/PaymentBundle/Resources/views/Payment/create.html.twig
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (18)
  • GitHub Check: DB (MySQL pdo_mysql 8.3)
  • GitHub Check: DB (PostgreSQL pdo_pgsql 16)
  • GitHub Check: DB (MariaDB pdo_mysql 10.11)
  • GitHub Check: DB (PostgreSQL pdo_pgsql 17)
  • GitHub Check: DB (MariaDB pdo_mysql 11.4)
  • GitHub Check: Unit ( PHP 8.4 )
  • GitHub Check: DB (MariaDB pdo_mysql 11)
  • GitHub Check: DB (MariaDB pdo_mysql 11.0)
  • GitHub Check: DB (MariaDB pdo_mysql 10.5)
  • GitHub Check: Unit ( PHP 8.4 )
  • GitHub Check: DB (MariaDB pdo_mysql 10.6)
  • GitHub Check: DB (MySQL pdo_mysql 9)
  • GitHub Check: DB (MySQL pdo_mysql 8.4)
  • GitHub Check: DB (MySQL pdo_mysql 8.0)
  • GitHub Check: DB (MariaDB pdo_mysql 10.4)
  • GitHub Check: DB (MySQL pdo_mysql 5.7)
  • GitHub Check: Lint
  • GitHub Check: PHPStan
🔇 Additional comments (1)
src/PaymentBundle/Resources/views/Payment/create.html.twig (1)

23-23: Previous issue resolved - currency parameter is now correct.

The change correctly addresses the concern raised in the previous review. The formatCurrency filter now receives the explicit invoice.client.currency property instead of the entire client object, ensuring consistency with other templates and proper type handling.

Based on learnings, this correctly uses the currency configured on the Client entity rather than any default.

@pierredup pierredup merged commit 6575e11 into 2.4.x Dec 27, 2025
24 of 26 checks passed
@pierredup pierredup deleted the merge-up/2.3.x-to-2.4.x branch December 27, 2025 13:09
@codecov
Copy link

codecov bot commented Dec 27, 2025

Bundle Report

Changes will increase total bundle size by 3.85MB (100.0%) ⬆️⚠️, exceeding the configured threshold of 5%.

Bundle name Size Change
solidinvoice-webpack-bundle-array-push 3.85MB 3.85MB (100%) ⬆️⚠️

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants