Download the PHP package b3it/x-rechnung-ubl without Composer
On this page you can find all versions of the php package b3it/x-rechnung-ubl. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package x-rechnung-ubl
XRechnung UBL
A PHP library for building, serializing, and deserializing UBL 2.1 Invoices compliant with XRechnung and PEPPOL BIS Billing 3.0. It provides a complete, type-hinted, object-oriented model of the UBL Common Aggregate Components (CAC), Common Basic Components (CBC), and Unqualified Data Types (UDT), and uses the Symfony Serializer to convert between PHP objects and UBL/XML.
Features
- Object model covering the UBL 2.1
Invoicedocument, including Common Aggregate Components, Common Basic Components, Unqualified Data Types, and Core Component Type Schema (CCTS) types. - Serialization of PHP objects into UBL-conformant XML and deserialization of XML back into PHP objects.
- Sensible defaults for XRechnung, including
CustomizationID(versioned for XRechnung 3.0 CIUS/extension) and the PEPPOLProfileID. - Enums for common PEPPOL/UNCL code lists, e.g.
AllowanceReasonCode,ChargeReasonCode,PaymentMeansCode,TaxCategoryCode,VatexCode. - Bundled reference assets: UBL 2.1 XSD schemas and the EN 16931 / XRechnung XSLT validation stylesheets (
assets/). - Fluent
add*()helpers on collection properties (e.g.addInvoiceLine(),addTaxTotal(),addPaymentTerms()) for convenient invoice construction.
Requirements
- PHP
^8.1 - PHP extensions:
ext-dom,ext-xml,ext-xsl symfony/property-access,symfony/property-info,symfony/serializer(^6.4 || ^7.1 || ^8.0)phpdocumentor/reflection-docblock^5.3
Installation
Install via Composer:
Usage
Building an invoice
Parsing an existing UBL invoice
Default XRechnung/PEPPOL identifiers
UBL\Invoice exposes constants used to populate the mandatory profile identifiers for XRechnung 3.0:
Reference assets
The assets/ directory bundles the official reference schemas and validation stylesheets used to check invoices for standards compliance:
assets/common/andassets/maindoc/— UBL 2.1 XSD schemas (OASIS).assets/validation/EN16931-UBL-validation.xsl— EN 16931 (European Norm) Schematron-generated validation.assets/validation/XRechnung-UBL-validation.xsl— XRechnung-specific validation rules.
These can be used with any standard XML/XSLT tooling (e.g. PHP's ext-xsl or ext-dom) to validate generated invoices against the XRechnung and EN 16931 rule sets.
Development
Install dependencies and run the test suite with PHPUnit:
The test suite (tests/) includes round-trip serialization/deserialization tests against sample UBL invoices in tests/assets/.
License
This project is licensed under the Open Software License 3.0 (OSL-3.0).
All versions of x-rechnung-ubl with dependencies
ext-dom Version *
ext-xml Version *
ext-xsl Version *
symfony/property-access Version ^6.4 || ^7.1 || ^8.0
symfony/property-info Version ^6.4 || ^7.1 || ^8.0
symfony/serializer Version ^6.4 || ^7.1 || ^8.0
phpdocumentor/reflection-docblock Version ^5.3