PHPackages                             easybill/zugferd-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. easybill/zugferd-php

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

easybill/zugferd-php
====================

ZUGFeRD PHP SDK (Factur-X, XRechnung) - Convert PHP Objects to XML and back.

v5.0.0(2mo ago)99295.7k↓19.1%35[2 PRs](https://github.com/easybill/zugferd-php/pulls)6MITPHPPHP ^8.3CI passing

Since Jun 28Pushed 1mo ago15 watchersCompare

[ Source](https://github.com/easybill/zugferd-php)[ Packagist](https://packagist.org/packages/easybill/zugferd-php)[ RSS](/packages/easybill-zugferd-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (63)Used By (6)

ZUGFeRD PHP
===========

[](#zugferd-php)

[![Latest Stable Version](https://camo.githubusercontent.com/8b56033378ef28061a580d8f71b6b34bf274d2fc23eefc9329fdc829d6e70d0c/68747470733a2f2f706f7365722e707567782e6f72672f6561737962696c6c2f7a7567666572642d7068702f762f737461626c652e706e67)](https://packagist.org/packages/easybill/zugferd-php) [![Total Downloads](https://camo.githubusercontent.com/3a161043eb988eaca319e865681ae1b00467fdbaee5f47af1a0428209a5e1688/68747470733a2f2f706f7365722e707567782e6f72672f6561737962696c6c2f7a7567666572642d7068702f646f776e6c6f6164732e706e67)](https://packagist.org/packages/easybill/zugferd-php)[![License](https://camo.githubusercontent.com/f8c10f70b809582213791436e5159844c4028dbe39347ee4fdf295822d8dbc69/68747470733a2f2f706f7365722e707567782e6f72672f6561737962696c6c2f7a7567666572642d7068702f6c6963656e73652e706e67)](https://packagist.org/packages/easybill/zugferd-php)

ZUGFeRD PHP SDK (Factur-X, XRechnung) - Convert PHP Objects to XML and back.

[Look @ Tests for more details](tests)

Installation
------------

[](#installation)

The recommended way of installing this library is using [Composer](http://getcomposer.org/).

Add this repository to your composer information using the following command

```
composer require easybill/zugferd-php
```

Usage ZUGFeRD v1
----------------

[](#usage-zugferd-v1)

Convert XML to PHP Objects:

```
use Easybill\ZUGFeRD\Reader;

$document = Reader::create()->getDocument('zugferd-file.xml');
echo $document->getHeader()->getId(); // Get invoice No.
```

Convert PHP Objects to XML:

```
use Easybill\ZUGFeRD\Builder;
use Easybill\ZUGFeRD\Model\Document;

$doc = new Document(Document::TYPE_COMFORT);
$doc->getHeader()->setId('RE1337'); // Set invoice No.

$xml = Builder::create()->getXML($doc);
echo $xml; // Zugferd XML.
```

Usage ZUGFeRD v2
----------------

[](#usage-zugferd-v2)

Convert XML to PHP Objects:

```
use Easybill\ZUGFeRD2\Reader;

$xml = file_get_contents('factur-x.xml');
$obj = Reader::create()->transform($xml);
```

Convert PHP Objects to XML:

```
use Easybill\ZUGFeRD2\Builder;

$obj = ...;

$xml = Builder::create()->transform($obj);
echo $xml; // Zugferd XML.
```

Contributing
------------

[](#contributing)

Please feel free to send bug reports and pull requests.

License
-------

[](#license)

Published as open source under the terms of [MIT License](http://opensource.org/licenses/MIT).

###  Health Score

70

—

ExcellentBetter than 100% of packages

Maintenance86

Actively maintained with recent releases

Popularity52

Moderate usage in the ecosystem

Community36

Small or concentrated contributor base

Maturity92

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~67 days

Recently: every ~33 days

Total

48

Last Release

84d ago

Major Versions

v0.15-alpha → v1.0.02020-11-25

v1.13.1 → v2.0.02024-03-11

v2.3.1 → v3.0.02025-09-13

v3.1.0 → v4.0.02025-10-14

v4.3.0 → v5.0.02026-02-23

PHP version history (8 changes)v0.1-alphaPHP &gt;=5.4.0

v0.2-alphaPHP ^7.2

v0.9-alphaPHP ^7.3

v0.10-alphaPHP ^7.4

v1.2.0PHP ^7.4 || ^8.0

v2.0.0PHP ^8.1

v2.2.0PHP ^8.2

v3.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/32529913a7a141306ef087a3b0ed0bb0b237601ea589fe654790eb8a71c4ebd3?d=identicon)[PATROMO](/maintainers/PATROMO)

![](https://www.gravatar.com/avatar/84b57ba1c61296c77e2890264b5814d45800617e64fbfffd7bc46573bc3859b8?d=identicon)[BolZer](/maintainers/BolZer)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (77 commits)")[![T-R3x](https://avatars.githubusercontent.com/u/4959676?v=4)](https://github.com/T-R3x "T-R3x (69 commits)")[![PATROMO](https://avatars.githubusercontent.com/u/318564?v=4)](https://github.com/PATROMO "PATROMO (47 commits)")[![BolZer](https://avatars.githubusercontent.com/u/19969518?v=4)](https://github.com/BolZer "BolZer (17 commits)")[![Eredom](https://avatars.githubusercontent.com/u/151145839?v=4)](https://github.com/Eredom "Eredom (7 commits)")[![guillaume-sainthillier](https://avatars.githubusercontent.com/u/5052984?v=4)](https://github.com/guillaume-sainthillier "guillaume-sainthillier (6 commits)")[![MaximilianKresse](https://avatars.githubusercontent.com/u/545671?v=4)](https://github.com/MaximilianKresse "MaximilianKresse (5 commits)")[![mxsxs2](https://avatars.githubusercontent.com/u/13612429?v=4)](https://github.com/mxsxs2 "mxsxs2 (4 commits)")[![bitbirddev](https://avatars.githubusercontent.com/u/15128942?v=4)](https://github.com/bitbirddev "bitbirddev (3 commits)")[![ChrisB9](https://avatars.githubusercontent.com/u/7099583?v=4)](https://github.com/ChrisB9 "ChrisB9 (2 commits)")[![mbaschnitzi](https://avatars.githubusercontent.com/u/4079612?v=4)](https://github.com/mbaschnitzi "mbaschnitzi (1 commits)")[![derklaro](https://avatars.githubusercontent.com/u/40468651?v=4)](https://github.com/derklaro "derklaro (1 commits)")[![olleharstedt](https://avatars.githubusercontent.com/u/607341?v=4)](https://github.com/olleharstedt "olleharstedt (1 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")[![blackgwe](https://avatars.githubusercontent.com/u/6592155?v=4)](https://github.com/blackgwe "blackgwe (1 commits)")[![derrabus](https://avatars.githubusercontent.com/u/1506493?v=4)](https://github.com/derrabus "derrabus (1 commits)")[![upsite4k](https://avatars.githubusercontent.com/u/28684500?v=4)](https://github.com/upsite4k "upsite4k (1 commits)")

---

Tags

factur-xxrechnungzugferdzugferd-phpZUGFeRDfactur-xxrechnung

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/easybill-zugferd-php/health.svg)

```
[![Health](https://phpackages.com/badges/easybill-zugferd-php/health.svg)](https://phpackages.com/packages/easybill-zugferd-php)
```

###  Alternatives

[horstoeko/zugferd

A library for creating and reading european electronic invoices

4174.3M18](/packages/horstoeko-zugferd)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[easybill/e-invoicing

A package to read and create EN16931 e-invoices or CIUS like: XRechnung, ZUGFeRD etc.

12122.5k](/packages/easybill-e-invoicing)[goetas-webservices/xsd2php-runtime

Convert XSD (XML Schema) definitions into PHP classes

4910.9M36](/packages/goetas-webservices-xsd2php-runtime)[atgp/factur-x

PHP library to manage your Factur-X / ZUGFeRD 2.0 PDF invoices files

138825.5k3](/packages/atgp-factur-x)[horstoeko/zugferd-laravel

A library for Laravel-Framework for creating and reading european electronic invoices

3693.6k2](/packages/horstoeko-zugferd-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
