Skip to content

Release v0.0.12

Choose a tag to compare

@github-actions github-actions released this 09 Jan 08:56
· 269 commits to main since this release

Release version 0.0.12: Complete feature parity, comprehensive tests, English routes, PHPDoc translation, and improved documentation

  • RemesaGenerator: Complete feature parity with DirectDebitGenerator
    • generateFromArray() method with camelCase and snake_case support
    • Postal address support (creditor and debtor)
    • 30 comprehensive tests (83.08% line coverage)
  • Internationalization: All routes, templates, and PHPDoc in English
  • Test Coverage: 173 tests, 608 assertions, 87.95% overall line coverage
  • Documentation: Reorganized and fully updated

Changelog

Added

  • RemesaGenerator: Complete Feature Parity with DirectDebitGenerator:
    • Added generateFromArray() method to RemesaGenerator for generating SEPA Credit Transfer XML from array data
    • Supports both camelCase and snake_case field names (same as DirectDebitGenerator)
    • Added postal address support for creditor in RemesaData:
      • setCreditorAddress() - Set creditor address (array or individual fields)
      • setCreditorAddressFromArray() - Set creditor address from array
      • getCreditorAddress() - Get creditor address
    • Added postal address support for debtor in Transaction:
      • setDebtorAddress() - Set debtor address (array or individual fields)
      • setDebtorAddressFromArray() - Set debtor address from array
      • getDebtorAddress() - Get debtor address
    • Addresses are automatically included in the generated XML (pain.001.001.03 format)
    • Addresses are added using DOM manipulation to ensure compatibility with SEPA standards
    • Support for address fields in generateFromArray() method:
      • creditorAddress or individual fields: creditorStreet, creditorCity, creditorPostalCode, creditorCountry
      • debtorAddress or individual fields: debtorStreet, debtorCity, debtorPostalCode, debtorCountry
      • Both camelCase and snake_case formats supported

Improved

  • Feature Parity: RemesaGenerator now has the same functionality as DirectDebitGenerator:
    • Array-based generation with generateFromArray()
    • Postal address support (creditor and debtor)
    • Snake_case and camelCase field name support
    • Automatic address inclusion in XML
  • Demo Applications: Updated all demo applications (Symfony 6, 7, 8) with new endpoints:
    • /demo-credit-transfer-array - Generate from array (camelCase)
    • /demo-credit-transfer-with-addresses - Generate from array with addresses
    • /demo-credit-transfer-snake-case - Generate from array (snake_case)
    • Updated existing /demo-credit-transfer to include address examples
  • Test Coverage: Added comprehensive test coverage for new RemesaGenerator features:
    • Tests for generateFromArray() method with camelCase and snake_case formats
    • Tests for address handling (creditor and debtor) in both array and object formats
    • Tests for RemesaData and Transaction address methods
    • Edge case tests (empty arrays, missing fields, validation)
    • Additional tests for DateTimeInterface support (requestedExecutionDate, creationDate)
    • Tests for amount conversion from cents (> 10000)
    • Tests for optional fields (creditorBic, debtorBic, remittanceInformation, currency, batchBooking)
    • Tests for date type validation (invalid types)
    • Tests for multiple transactions with addresses
    • Total of 30 tests for RemesaGenerator (12 new tests added)
    • Test coverage improved to 83.08% lines for RemesaGenerator
    • Overall test suite: 173 tests, 608 assertions
  • Documentation: Improved documentation structure:
    • Moved detailed usage examples to docs/USAGE.md
    • Moved console commands documentation to docs/COMMANDS.md
    • Moved demo information to docs/DEMOS.md
    • Moved development guidelines to docs/DEVELOPMENT.md
    • Main README.md now provides concise overview with references
  • Internationalization: All demo routes and templates now use English:
    • Routes translated to English:
      • /demo-remesa-pago → /demo-credit-transfer
      • /demo-remesa-pago-array → /demo-credit-transfer-array
      • /demo-remesa-pago-with-addresses → /demo-credit-transfer-with-addresses
      • /demo-remesa-pago-snake-case → /demo-credit-transfer-snake-case
      • /demo-remesa-cobro → /demo-direct-debit
      • /demo-remesa-cobro-snake-case → /demo-direct-debit-snake-case
      • /demo-remesa-cobro-with-addresses → /demo-direct-debit-with-addresses
    • Route names translated: All route names now use English (e.g., demo_credit_transfer instead of demo_remesa_pago)
    • File names translated: Generated XML files now use English names (e.g., credit-transfer.xml instead of remesa-pago.xml)
    • Templates translated: All demo templates now use English text:
      • Replaced "Remesa de Pago" with "Credit Transfer"
      • Replaced "Remesa de Cobro" with "Direct Debit"
      • All user-facing text in demo applications is now in English
  • Code Documentation: All PHPDoc comments translated to English:
    • Replaced "remesa data" with "credit transfer data" in all PHPDoc comments
    • Updated example filenames in PHPDoc: remesa-pago.xml → credit-transfer.xml
    • Updated example filenames in PHPDoc: remesa-cobro.xml → direct-debit.xml
    • Updated class descriptions to use English terminology
    • All PHPDoc comments now consistently use English
    • Improved PHPDoc comments for address handling methods to clarify DOM manipulation fallback mechanism
    • Added PHPStan ignore annotations for dynamic method calls verified with method_exists()