Skip to content

v2.0.0 馃帀

Choose a tag to compare

@brtdv brtdv released this 18 Dec 13:27
· 63 commits to master since this release
569df87

This release introduces the ability to deserialize XML files into object trees. It also adds support for Carbon 3.x and Doctrine Collections 2.x, along with various updates to UBL structures.

Note: This is a major version release containing breaking changes. Please refer to the Upgrading Guide.

New Features & Improvements

  • XML Deserialization: Added functionality to deserialize XML into an object tree.
  • CreditNote: Added xmlDeserialize support for the CreditNote class to parse <cac:CreditNoteLine> elements. (Credits: @RoanB)
  • Invoice References:
    • Added <cac:DespatchDocumentReference> to <Invoice>. (Credits: @fMads)
    • Added <cac:ReceiptDocumentReference> to <Invoice>.
    • Added <cac:OriginatorDocumentReference> to <Invoice>.
  • Address & Location:
    • Added <cac:AddressLine> support to <cac:Address> for unstructured address lines. (Credits: @fMads)
    • Added <cac:OriginCountry> support to <cac:Item> for specifying country of origin. (Credits: @fMads)
  • Standards:
    • Added FRCTC Electronic Address (0225) to EASCode. (Credits: @UbiManu)
    • Updated AllowanceCharge::allowanceChargeReasonCode to accept int|string|null, allowing string values like "ZZZ". (Credits: @Mikael-Leger)

Bug Fixes

  • Fixed Attachment::xmlSerialize() to prevent output of EmbeddedDocumentBinaryObject when only externalReference is set. (Credits: @fMads)

Maintenance

  • Updated dependency constraints to support Carbon 3.x and Doctrine Collections 2.x. (Credits: @GHuygen)

Breaking Changes

  • Class Structure:
    • Invoice::setAccountingSupplierParty and getAccountingSupplierParty now use an AccountingParty object instead of Party.
    • Invoice::setAccountingCustomerParty and getAccountingCustomerParty now use an AccountingParty object instead of Party.
    • Removed Invoice::accountingCustomerPartyContact. Use Invoice::getAccountingCustomerParty()->setAccountingContact() instead.
    • Invoice::setSupplierAssignedAccountID/get moved to AccountingParty::setSupplierAssignedAccountID/get.
  • Renamed Methods:
    • Attachment: setFileStream/getFileStream renamed to setBase64Content/getBase64Content.
    • setUBLVersionID -> setUBLVersionId
    • setSupplierAssignedAccountID -> setSupplierAssignedAccountId
    • setUnitCodeListID -> setUnitCodeListId
    • setSchemeID -> setSchemeId
    • setCustomizationID -> setCustomizationId
    • setProfileID -> setProfileId

Upgrading

See the upgrade guide for migration details:
UPGRADING.md

Contributors

@RoanB, @fMads, @UbiManu, @Mikael-Leger, @GHuygen