-
-
Notifications
You must be signed in to change notification settings - Fork 213
Merge 2.3.x into 2.4.x #2202
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
Merge 2.3.x into 2.4.x #2202
Conversation
This reverts commit de988e2.
WalkthroughThis PR adds explicit client-currency handling to forms and templates, renames billing ID config keys to use Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)src/*/Resources/views/**/*.twig📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (8)📚 Learning: 2025-12-27T08:21:22.801ZApplied to files:
📚 Learning: 2025-12-27T08:20:09.466ZApplied to files:
📚 Learning: 2025-12-27T08:22:06.755ZApplied to files:
📚 Learning: 2025-12-27T08:21:22.801ZApplied to files:
📚 Learning: 2025-12-27T08:19:38.749ZApplied to files:
📚 Learning: 2025-12-27T08:21:22.801ZApplied to files:
📚 Learning: 2025-12-27T08:21:22.801ZApplied to files:
📚 Learning: 2025-12-27T08:21:22.801ZApplied to files:
⏰ 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)
🔇 Additional comments (1)
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. Comment |
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.
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
@v3tag 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
⛔ Files ignored due to path filters (1)
composer.lockis 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.ymlcomposer.jsonsrc/ClientBundle/Form/Type/CreditType.phpsrc/ClientBundle/Resources/views/Components/ClientCredit.html.twigsrc/ClientBundle/Tests/Form/Type/CreditTypeTest.phpsrc/ClientBundle/Twig/Components/ClientCredit.phpsrc/CoreBundle/Billing/TotalCalculator.phpsrc/CoreBundle/Generator/BillingIdGenerator.phpsrc/CoreBundle/Tests/FormTestCase.phpsrc/CoreBundle/Tests/Generator/BillingIdGeneratorTest.phpsrc/DashboardBundle/Resources/views/Widget/recent_invoices.html.twigsrc/DashboardBundle/Resources/views/Widget/recent_payments.html.twigsrc/DashboardBundle/Resources/views/Widget/recent_quotes.html.twigsrc/InstallBundle/Action/Setup.phpsrc/InvoiceBundle/Resources/views/Email/invoice.html.twigsrc/InvoiceBundle/Resources/views/Pdf/invoice.html.twigsrc/InvoiceBundle/Tests/Cloner/InvoiceClonerTest.phpsrc/InvoiceBundle/Tests/Form/Handler/InvoiceCreateHandlerTest.phpsrc/PaymentBundle/Resources/views/Payment/create.html.twigsrc/QuoteBundle/Resources/views/Email/quote.html.twigsrc/QuoteBundle/Resources/views/Pdf/quote.html.twigsrc/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.twigsrc/ClientBundle/Resources/views/Components/ClientCredit.html.twigsrc/InvoiceBundle/Resources/views/Email/invoice.html.twigsrc/QuoteBundle/Resources/views/Email/quote.html.twigsrc/DashboardBundle/Resources/views/Widget/recent_invoices.html.twigsrc/QuoteBundle/Resources/views/Pdf/quote.html.twigsrc/DashboardBundle/Resources/views/Widget/recent_payments.html.twigsrc/InvoiceBundle/Resources/views/Pdf/invoice.html.twigsrc/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 withdeclare(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 usingdeclare(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.phpsrc/QuoteBundle/Tests/Form/Handler/QuoteCreateHandlerTest.phpsrc/ClientBundle/Form/Type/CreditType.phpsrc/ClientBundle/Tests/Form/Type/CreditTypeTest.phpsrc/InvoiceBundle/Tests/Form/Handler/InvoiceCreateHandlerTest.phpsrc/CoreBundle/Tests/Generator/BillingIdGeneratorTest.phpsrc/InvoiceBundle/Tests/Cloner/InvoiceClonerTest.phpsrc/CoreBundle/Generator/BillingIdGenerator.phpsrc/ClientBundle/Twig/Components/ClientCredit.phpsrc/CoreBundle/Tests/FormTestCase.phpsrc/InstallBundle/Action/Setup.php
src/**/*.php
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
src/**/*.php: Use constructor dependency injection for all service dependencies
Preferfinalclasses 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
Orderusestatements 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
Preferfinalclasses 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.phpsrc/QuoteBundle/Tests/Form/Handler/QuoteCreateHandlerTest.phpsrc/ClientBundle/Form/Type/CreditType.phpsrc/ClientBundle/Tests/Form/Type/CreditTypeTest.phpsrc/InvoiceBundle/Tests/Form/Handler/InvoiceCreateHandlerTest.phpsrc/CoreBundle/Tests/Generator/BillingIdGeneratorTest.phpsrc/InvoiceBundle/Tests/Cloner/InvoiceClonerTest.phpsrc/CoreBundle/Generator/BillingIdGenerator.phpsrc/ClientBundle/Twig/Components/ClientCredit.phpsrc/CoreBundle/Tests/FormTestCase.phpsrc/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.phpsrc/CoreBundle/Tests/Generator/BillingIdGeneratorTest.phpsrc/CoreBundle/Generator/BillingIdGenerator.phpsrc/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.phpsrc/ClientBundle/Tests/Form/Type/CreditTypeTest.phpsrc/InvoiceBundle/Tests/Form/Handler/InvoiceCreateHandlerTest.phpsrc/CoreBundle/Tests/Generator/BillingIdGeneratorTest.phpsrc/InvoiceBundle/Tests/Cloner/InvoiceClonerTest.phpsrc/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.phpsrc/ClientBundle/Tests/Form/Type/CreditTypeTest.phpsrc/InvoiceBundle/Tests/Form/Handler/InvoiceCreateHandlerTest.phpsrc/CoreBundle/Tests/Generator/BillingIdGeneratorTest.phpsrc/InvoiceBundle/Tests/Cloner/InvoiceClonerTest.phpsrc/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 transitionsUse Symfony Workflow for invoice state management with proper state transitions
Files:
src/InvoiceBundle/Tests/Form/Handler/InvoiceCreateHandlerTest.phpsrc/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__invokemethod
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.twigsrc/ClientBundle/Resources/views/Components/ClientCredit.html.twigsrc/ClientBundle/Form/Type/CreditType.phpsrc/ClientBundle/Tests/Form/Type/CreditTypeTest.phpsrc/InvoiceBundle/Resources/views/Email/invoice.html.twigsrc/QuoteBundle/Resources/views/Email/quote.html.twigsrc/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.phpsrc/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.phpsrc/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.twigsrc/InvoiceBundle/Tests/Form/Handler/InvoiceCreateHandlerTest.phpsrc/InvoiceBundle/Tests/Cloner/InvoiceClonerTest.phpsrc/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.twigsrc/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.twigsrc/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.twigsrc/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.twigsrc/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.phpsrc/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
$formOptionsparameter 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
$formOptionsparameter 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 readonlyclass 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. TheVatCalculatorservice remains registered and is actively used insrc/TaxBundle/Action/Validate.phpfor VAT validation. TheTaxentity 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_prefixandid_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_prefixandinvoice/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_prefixandinvoice/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
currencyoption 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.currencyexplicitly toformatCurrencyensures 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_prefixandquote/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.currencyexplicitly toformatCurrencyensures 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_prefixandid_suffixkeys are newly introduced in Version20300.php and do not represent a rename from existing keys. There is no prior configuration usingprefix/suffixwithout theid_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
formatCurrencyfilter, 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
formatCurrencyfilter 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.currencyto theformatCurrencyfilter (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.currencyto theformatCurrencyfilter. 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\CurrencyandSymfony\Component\OptionsResolver\OptionsResolverhave been added to support the new currency option functionality.Also applies to: 20-20
44-44: LGTM! Currency option passed to MoneyType field.The
currencyoption is correctly extracted from the form options and passed to theMoneyTypefield, ensuring the amount field uses the appropriate currency for display and validation.
49-55: LGTM! Proper option configuration with type safety.The
configureOptionsmethod correctly enforces that:
- The
currencyoption is required- The option must be an instance of
Money\CurrencyThis 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.currencyto theformatCurrencyfilter. 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, andramsey/composer-installare consistently updated across theecsjob 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:443andrelease-assets.githubusercontent.com:443to 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.20is appropriately specific for binary builds where reproducibility matters. Action updates forcheckout,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@v6usage 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
phpstanjob 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 Report❌ Patch coverage is
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
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.
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
📒 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
formatCurrencyfilter now receives the explicitinvoice.client.currencyproperty 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.
Bundle ReportChanges will increase total bundle size by 3.85MB (100.0%) ⬆️
|
No description provided.