Skip to content

Release v0.0.9

Choose a tag to compare

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

Release v0.0.9: HTTP Response helper method for generators

Changelog

Added

  • HTTP Response Helper Method: Added createResponse() method to both DirectDebitGenerator and RemesaGenerator
    • Method accepts XML content (string) and filename (string) as parameters
    • Returns a Symfony Response object with proper headers for XML file download
    • Automatically sets Content-Type: application/xml and Content-Disposition: attachment; filename="..."
    • Simplifies controller code by eliminating manual Response creation
    • Example usage: $generator->createResponse($xml, 'direct-debit.xml')

Added

  • Additional Fields Support for DirectDebit Transactions:

    • Added debtorBic field support in DirectDebitTransaction (optional BIC for debtor)
    • Added additionalData array for storing custom fields internally
    • Added methods: setDebtorBic(), getDebtorBic(), setAdditionalData(), getAdditionalData(), setAdditionalField(), getAdditionalField()
    • debtorBic is included in generated XML when provided
    • additionalData is stored internally but not included in XML (for internal use only)
    • Support for debtorBic and additional fields in generateFromArray() method
  • Documentation:

    • Added DEPRECATED_FIELDS.md documenting fields that are no longer allowed in SEPA Direct Debit transactions
    • Documented that postal addresses and contact information cannot be included in transactions (only in mandates)
    • Added examples of correct and incorrect usage
  • Test Coverage:

    • Added 5 new tests for DirectDebitTransaction covering debtorBic and additionalData functionality
    • Added 5 new tests for DirectDebitGenerator verifying BIC inclusion in XML and additional data handling
    • Tests verify that additional data is stored but not included in generated XML

Fixed

  • Fixed constant type declarations for PHP 8.2 compatibility
    • Removed const string type declarations that caused syntax errors in PHP 8.2
    • Changed to untyped constants with literal string values
    • Fixed in Configuration::ALIAS, DirectDebitGenerator::SERVICE_NAME, RemesaGenerator::SERVICE_NAME, IdentifierGenerator::SERVICE_NAME