Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Zugferd Laravel Laravel Package

horstoeko/zugferd-laravel

Laravel integration for the horstoeko/zugferd library, making it easy to create, read, and validate ZUGFeRD/Factur-X electronic invoices. Provides service provider, facade, and configuration to generate PDF/A-3 files with embedded XML in Laravel apps.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

What this actually is. horstoeko/zugferd-laravel is a thin Laravel integration layer — a service provider, config file, and facade — over the mature horstoeko/zugferd PHP library. Almost all domain logic (ZUGFeRD 2.x / Factur-X / XRechnung profile handling, XML serialization, PDF/A-3 embedding, schema validation) lives in the upstream dependency. This distinction is the single most important thing to establish before scoring the package: the wrapper's low maturity score (0.365, 43 stars) reflects the glue, not the engine. Evaluate the engine separately.

Architecture fit. Good fit for any Laravel monolith or modular monolith that generates outbound invoices. The package assumes synchronous in-process generation and returns file artifacts (XML and/or PDF-A-3), which maps cleanly onto a job → storage → delivery pipeline. It does not provide document lifecycle management, numbering, delivery, or archiving — those remain your responsibilities. Treat it as an invoice-serialization library, not an e-invoicing platform.

Domain context (why this matters now). German B2B e-invoicing is mandated in phases (receive-capability from 2025, issue-capability phasing through 2028); France's Factur-X mandate is also phasing in. This is a compliance-driven, deadline-bound capability, not an optional feature. That raises the bar on correctness (a rejected invoice is a business interruption) and on longevity (you must be able to re-render and validate stored documents for the statutory retention period, typically 10 years in DE).

Integration feasibility. Low-to-moderate. Install via Composer, publish config, resolve the facade or inject the client. The hard work is not wiring — it is:

  • Selecting the correct profile per recipient (EN 16931/COMFORT, EXTENDED, BASIC, MINIMUM, XRECHNUNG, Factur-X variants). Wrong profile = recipient-side rejection.
  • PDF/A-3 generation. Embedding XML into an existing PDF requires a PDF/A-3-capable writer (FPDI/TCPDF-class tooling) and correct XMP metadata. If you already produce PDFs, you will likely re-render or post-process them; confirm the upstream library's embedding path and font-embedding behavior before committing.
  • Validation. XSD plus Schematron (and for XRechnung, the KoSIT validator) are the only reliable acceptance gates. Confirm what the library validates by default versus what you must run externally.

Technical risk.

  • Thin-wrapper risk (low): if the wrapper lags Laravel releases, you can bypass it — call horstoeko/zugferd directly. The facade is not load-bearing.
  • Upstream maintenance risk (moderate): a small-maintainer ecosystem around a standards-heavy library. Mitigate with a fork policy and golden-file test suite.
  • Standards drift (moderate-to-high): ZUGFeRD/Factur-X/XRechnung schemas and CIUS rules version on their own cadence; a pinned dependency can silently fall out of compliance.
  • Correctness risk (high business impact): silent invalidity (bad metadata, missing fonts, wrong profile) surfaces only at the recipient, not in your tests.
  • PDF fidelity risk (moderate): page geometry, embedded fonts, and tagging can be altered by the embedding step; visual regression is a real failure mode.

Key questions to answer before adoption.

  1. Which exact profiles and schema versions does the pinned upstream release support, and is our target (XRechnung 3.x / Factur-X EN 16931) among them?
  2. Does it embed into an existing PDF or generate the PDF itself? Which PDF writer, and does it produce genuinely PDF/A-3-conformant output (verifiable with veraPDF)?
  3. What validation runs inline versus what requires the external KoSIT/validating toolchain?
  4. Laravel and PHP version support matrix — does it cover our target (e.g., Laravel 11/12, PHP 8.2+)?
  5. Can profile, seller/buyer metadata, and output disk be configured per tenant rather than globally?
  6. Does the facade resolve correctly inside queued jobs and long-running workers (no stale config)?

Integration Approach

Stack fit. Strong for a standard Laravel stack (Composer, service container, config, filesystem disks, queues). It slots in as a domain service with no framework-level friction. If the wider application is not Laravel, skip the wrapper and use the underlying library — the wrapper buys you almost nothing outside the container/facade conveniences.

Migration path.

  • Greenfield: adopt directly. Wrap the package in a first-party InvoiceDocumentService that owns profile selection, numbering, and storage — do not let callers touch the facade.
  • Brownfield (existing PDF invoice generation): run the package in parallel as a shadow pipeline. Generate ZUGFeRD output alongside your current PDFs, validate both, and diff metadata and visuals before cutting over. Expect to change your PDF rendering, not just add an XML attachment.
  • Replacing another e-invoicing tool: build a fixture corpus from real historical invoices and use it as the acceptance gate for the migration.

Compatibility.

  • Pin the upstream horstoeko/zugferd version explicitly and track its release notes; pin schema/ZIP dependency versions too.
  • Verify PHP extension requirements (typically dom, libxml, zip, mbstring, plus whatever the PDF writer needs — often gd/imagick, iconv).
  • Confirm behavior on the target queue driver; PDF generation should never run on the web request path.

Sequencing (recommended).

  1. Spike (1–2 weeks): produce one valid EN 16931 and one XRechnung document from real data; validate with veraPDF and the KoSIT validator; confirm byte-level round-trip on re-read.
  2. Domain abstraction: define profile-selection rules, required master data (VAT IDs, Leitweg-ID for XRechnung, seller address), and a versioned document model.
  3. Pipeline: queue job → generate → validate → store immutably (S3/object storage with retention lock) → emit audit record.
  4. Hardening: golden-file regression suite, failure alerting on validation rejects, font/character coverage (umlauts, non-Latin names, currency symbols).
  5. Rollout: shadow mode → single customer cohort → full.

Operational Impact

Maintenance. Two maintenance surfaces: the wrapper (small, rarely changes — low effort) and the upstream library plus its schema/validation dependencies (active, standards-driven — recurring effort). Budget an owner with e-invoicing domain literacy, not just a PHP developer. Expect at least annual work tied to schema and mandate changes, plus dependency security patches.

Support. Community-only, single-primary-maintainer dynamics. No vendor SLA. For a compliance-critical path this is acceptable only if you are prepared to fork and patch the upstream library, and can articulate how you would validate a patch independently (the KoSIT validator and veraPDF give you that ground truth). Escalate to a build-vs-buy review if the organization cannot tolerate this.

Scaling. CPU- and memory-bound on PDF assembly and validation. Throughput is governed by worker concurrency, not by the package. Size workers generously (PDF/A-3 generation can spike memory on large invoices with many line items), isolate the invoice queue from general workloads, and cap concurrency to avoid memory pressure. Storage grows monotonically under retention requirements — plan for 10-year archival with immutability and lifecycle policy from day one.

Failure modes to instrument.

  • Silent invalidity: document generated but non-conformant (wrong profile, bad metadata, missing embedded font). Detect via mandatory post-generation validation, not trust.
  • Schema/version drift: upstream update or recipient validator upgrade causes rejects. Detect via pinned fixtures and a scheduled conformance test.
  • Character/font failures: non-ASCII or symbol characters break embedding or rendering. Detect via visual + textual regression on a character-coverage fixture set.
  • Resource exhaustion: large invoices OOM the worker mid-generation. Detect via queue timeouts and memory ceilings; ensure jobs are idempotent and artifacts are written atomically (temp → validate → move).
  • Archival integrity: stored documents cannot be re-read or re-validated years later. Detect via periodic re-validation sampling against retained artifacts.

Ramp-up. Moderate. A competent Laravel engineer is productive with the API in days; becoming reliably correct in e-invoicing takes weeks and requires learning profile semantics, validation tooling, and retention rules. Plan for that explicitly in estimation — the code is the easy part, the compliance semantics are not.

Overall TPM read. Technically viable and architecturally appropriate, with the caveat that the value and the risk both sit in the upstream library rather than the wrapper. The low package score is a proxy for ecosystem maturity, not for fitness. Proceed via a bounded validation spike, keep the wrapper non-load-bearing, and treat external conformance validation as a mandatory, permanently-staffed operational control rather than a launch-time checkbox.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log