num-num/ubl-invoice
A modern object-oriented PHP library to create valid UBL and Peppol BIS 3.0 files
v2.4.1
993K downloads/mo
#4029 most downloaded on Packagist
num-num/ubl-invoice
What this package is like to depend on
Last release 6 months ago
09 Feb 2026
Release timing varies
gaps range from 2 weeks to 4 months
Rarely documented
notes for 10 of 66 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
84 releases · first in 2018
17 releases in the last 12 months
see the full history below
Release timeline
84 releases · Nov 2018 to Feb 2026Releases
latest 60 of 84-
v2.4.109 Feb 2026Release notes
Open source →This release fixes parsing of UBL invoices containing large embedded attachments.
Bug Fixes
- Reader: Enable
LIBXML_PARSEHUGEto support parsing UBL documents with large base64-encoded PDF attachments (>10MB). Previously, libxml would throw "huge text node" errors when encountering large embedded binary objects. (Fixes #168)
- Reader: Enable
-
v2.4.006 Feb 2026Release notes
Open source →This release adds support for
AdditionalItemPropertyin Items and improves the robustness of theCommodityClassificationreader.New Features & Improvements
- Item: Added support for
cac:AdditionalItemPropertyelements. Items can now contain additional properties with name/value pairs. (Credits: @vtsiountas)
Bug Fixes
- CommodityClassification: Fixed reader to support
CommodityCodeelement as fallback whenItemClassificationCodeis not present. This prevents "Trying to access array offset on null" warnings when parsing UBL files that useCommodityCode. (Fixes #167)
Maintenance
- Bump symfony/process from 5.4.47 to 5.4.51.
- Bump phpunit/phpunit from 9.6.22 to 9.6.33.
Contributors
- Item: Added support for
-
v2.3.126 Jan 2026Release notes
Open source →This release adds support for the
IssueTimefield in Invoice documents.New Features & Improvements
- Invoice: Added support for
<cbc:IssueTime>tag, allowing you to set the issue time on invoices. This is required for Croatian e-invoicing compliance. (Credits: @hevesi)
Contributors
- Invoice: Added support for
-
v2.3.026 Jan 2026Release notes
Open source →This release adds support for self-billing credit notes and new getter methods for ID properties.
New Features & Improvements
- CreditNote: Added support for reading
CreditNoteTypeCodewhen deserializing credit notes, enabling proper handling of self-billing credit notes (UNCL1001 code 261). - Invoice: Added
getCustomizationId()andgetProfileId()getter methods to retrieve customization and profile identifiers. - InvoiceTypeCode: Added
SELF_BILLING_CREDIT_NOTEconstant (261) for self-billing credit note documents.
- CreditNote: Added support for reading
-
v2.2.022 Jan 2026Release notes
Open source →This release adds support for UBL 2.1 DebitNote documents and fixes SettlementPeriod date handling to comply with Peppol BIS 3.0 specification.
New Features & Improvements
- DebitNote: Add support for UBL 2.1 DebitNote documents, including
DebitNoteandDebitNoteLineclasses,Generator::debitNote()method, and Reader support.
Bug Fixes
- SettlementPeriod: Make
StartDateandEndDateoptional per Peppol BIS 3.0 spec (BR-CO-19) - at least one of the dates must be present instead of requiring both.
Maintenance
- Translate comments from Dutch to English in
SettlementPeriod.
- DebitNote: Add support for UBL 2.1 DebitNote documents, including
-
v2.1.014 Jan 2026Release notes
Open source →This release includes significant improvements to UBL invoice parsing, new features for tax handling, and several bug fixes for XML serialization.
New Features & Improvements
- TaxCurrencyCode: Added support for getting and setting
cbc:TaxCurrencyCodeon invoices. (Credits: @CasperBE) - TaxSubtotal: Now reads all
cac:TaxSubtotalelements fromcac:TaxTotalinstead of only the first one. (Credits: @CasperBE) - PayeeParty: Improved retrieval of
cac:PayeePartywith a dedicated class that properly handles its different structure. (Credits: @CasperBE) - AllowanceCharge: Added support for reading
cac:TaxCategoryoncac:AllowanceChargeelements. (Credits: @CasperBE)
Bug Fixes
- Reference Classes: Fixed TypeError when parsing UBL files with missing optional ID elements by making setter types nullable for
OrderReference,ProjectReference,ContractDocumentReference, andInvoiceDocumentReference. (Credits: @TNAJanssen) - TaxAmount: Fixed reading of
TaxAmountvalues. - Price: Made
cbc:BaseQuantityoptional in Price XML serialization, aligning with the UBL 2.1 schema specification. Previously it was incorrectly written with a 0 value even when not set. (Credits: @hevesi) - Delivery: Fixed
ActualDeliveryDateto properly cast to a DateTime object. (Credits: @CasperBE) - Date Handling: Improved handling of date values during parsing.
Maintenance
- Removed duplicate array key in codebase.
- Renamed variable for consistency.
Contributors
- TaxCurrencyCode: Added support for getting and setting
-
v2.0.314 Jan 2026Release notes
Open source →Bug Fixes
- NumberFormatter: Fixed PHP 7.4 compatibility by removing trailing commas in function signatures that were only supported in PHP 8.0+.
Maintenance
- NumberFormatter: Refactored
format()method for improved readability - simplified decimal point detection by always usinglocaleconv(), applied consistent code style, and clarified comments explaining locale decimal point usage.
Full Changelog: v2.0.2...v2.0.3
-
v2.0.219 Dec 2025Release notes
Open source →This release fixes a TypeError that occurred when using InvoiceTypeCode constants with strict types enabled.
Bug Fixes
- Invoice: Fixed TypeError when setting InvoiceTypeCode - changed type from string to int to match the constant definitions. (Fixes #96)
-
v2.0.118 Dec 2025Release notes
Open source →This release includes bug fixes for XML deserialization and number formatting, along with a cleanup
of deprecated methods.Note: This release contains a breaking change. Please refer to the Upgrading
Guide.Bug Fixes
- TaxSubTotal: Fixed a typo when reading the
TaxCategoryfromTaxSubTotalduring XML
deserialization. Added tests for readingTaxTotalinformation. (Credits: @CasperBE)
Maintenance
- Added comprehensive documentation guides for the 2.0 release.
Breaking Changes
- Invoice: Removed deprecated methods
Invoice::setSupplierAssignedAccountID()and
Invoice::getSupplierAssignedAccountID(). UseAccountingParty::setSupplierAssignedAccountId()
andAccountingParty::getSupplierAssignedAccountId()instead. (Credits: @CasperBE)
Upgrading
See the upgrade guide for migration details:
UPGRADING.mdContributors
- TaxSubTotal: Fixed a typo when reading the
-
v2.0.018 Dec 2025Release notes
Open source →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
xmlDeserializesupport for theCreditNoteclass 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>.
- Added
- Address & Location:
- Standards:
- Added FRCTC Electronic Address (
0225) to EASCode. (Credits: @UbiManu) - Updated
AllowanceCharge::allowanceChargeReasonCodeto acceptint|string|null, allowing string values like "ZZZ". (Credits: @Mikael-Leger)
- Added FRCTC Electronic Address (
Bug Fixes
- Fixed
Attachment::xmlSerialize()to prevent output ofEmbeddedDocumentBinaryObjectwhen onlyexternalReferenceis set. (Credits: @fMads)
Maintenance
- Updated dependency constraints to support Carbon 3.x and Doctrine Collections 2.x. (Credits: @GHuygen)
Breaking Changes
- Class Structure:
Invoice::setAccountingSupplierPartyandgetAccountingSupplierPartynow use anAccountingPartyobject instead ofParty.Invoice::setAccountingCustomerPartyandgetAccountingCustomerPartynow use anAccountingPartyobject instead ofParty.- Removed
Invoice::accountingCustomerPartyContact. UseInvoice::getAccountingCustomerParty()->setAccountingContact()instead. Invoice::setSupplierAssignedAccountID/getmoved toAccountingParty::setSupplierAssignedAccountID/get.
- Renamed Methods:
Attachment:setFileStream/getFileStreamrenamed tosetBase64Content/getBase64Content.setUBLVersionID->setUBLVersionIdsetSupplierAssignedAccountID->setSupplierAssignedAccountIdsetUnitCodeListID->setUnitCodeListIdsetSchemeID->setSchemeIdsetCustomizationID->setCustomizationIdsetProfileID->setProfileId
Upgrading
See the upgrade guide for migration details:
UPGRADING.mdContributors
-
v2.0.0-beta924 Jun 2025 pre-releaseNothing published for this version
-
v2.0.0-beta819 May 2025 pre-releaseNothing published for this version
-
v2.0.0-beta705 May 2025 pre-releaseNothing published for this version
-
v2.0.0-beta605 May 2025 pre-releaseNothing published for this version
-
v2.0.0-beta526 Mar 2025 pre-releaseNothing published for this version
-
v2.0.0-beta426 Mar 2025 pre-releaseNothing published for this version
-
v2.0.0-beta306 Mar 2025 pre-releaseNothing published for this version
-
v2.0.0-beta203 Mar 2025 pre-releaseNothing published for this version
-
v2.0.0-beta1518 Dec 2025 pre-releaseNothing published for this version
-
v2.0.0-beta1417 Dec 2025 pre-releaseNothing published for this version
-
v2.0.0-beta1306 Nov 2025 pre-releaseNothing published for this version
-
v2.0.0-beta1201 Jul 2025 pre-releaseNothing published for this version
-
v2.0.0-beta1101 Jul 2025 pre-releaseNothing published for this version
-
v2.0.0-beta1001 Jul 2025 pre-releaseNothing published for this version
-
v2.0.0-beta118 Feb 2025 pre-releaseNothing published for this version
-
v2.0.0-alpha321 Jan 2025 pre-releaseNothing published for this version
-
v2.0.0-alpha220 Jan 2025 pre-releaseNothing published for this version
-
v2.0.0-alpha118 Jan 2025 pre-releaseNothing published for this version
-
v1.22.218 Dec 2025Nothing published for this version
-
v1.22.117 Dec 2025Nothing published for this version
-
v1.22.017 Dec 2025Nothing published for this version
-
v1.21.404 Nov 2025Nothing published for this version
-
v1.21.301 Jul 2025Nothing published for this version
-
v1.21.201 Jul 2025Nothing published for this version
-
v1.21.125 Jun 2025Nothing published for this version
-
v1.21.025 Jun 2025Nothing published for this version
-
v1.20.019 May 2025Nothing published for this version
-
v1.19.105 May 2025Nothing published for this version
-
v1.18.226 Mar 2025Nothing published for this version
-
v1.18.120 Nov 2024Nothing published for this version
-
v1.15.504 Dec 2023Nothing published for this version
-
v1.15.402 Oct 2023Nothing published for this version
-
v1.15.329 Aug 2023Nothing published for this version
-
v1.15.217 Aug 2023Nothing published for this version
-
v1.15.116 Aug 2023Nothing published for this version
-
v1.10.226 Nov 2020Nothing published for this version
-
v1.10.112 Nov 2020Nothing published for this version
-
v1.9.629 Oct 2020Nothing published for this version
-
v1.9.521 Oct 2020Nothing published for this version
-
v1.9.420 Oct 2020Nothing published for this version
-
v1.9.314 Oct 2020Nothing published for this version
-
v1.9.208 Oct 2020Nothing published for this version
-
v1.9.108 Oct 2020Nothing published for this version
-
v1.9.022 Sep 2020Nothing published for this version
-
v1.8.617 Sep 2020Nothing published for this version
-
v1.8.516 Sep 2020Nothing published for this version
-
v1.8.427 Jul 2020Nothing published for this version
-
v1.8.327 Jul 2020Nothing published for this version
-
v1.8.227 Jul 2020Nothing published for this version
-
v1.8.127 May 2020Nothing published for this version