PHPackages                             vitexsoftware/pohodaser - 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. vitexsoftware/pohodaser

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

vitexsoftware/pohodaser
=======================

Stormware's Pohoda XML/PHP serialization

0.1.2(1y ago)17.6k—2.4%[4 PRs](https://github.com/VitexSoftware/php-pohoda-serialize/pulls)1MITPHPCI passing

Since Apr 18Pushed 3w ago2 watchersCompare

[ Source](https://github.com/VitexSoftware/php-pohoda-serialize)[ Packagist](https://packagist.org/packages/vitexsoftware/pohodaser)[ RSS](/packages/vitexsoftware-pohodaser/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (9)Versions (15)Used By (1)

Pohoda (Re)Serialize
====================

[](#pohoda-reserialize)

[![wakatime](https://camo.githubusercontent.com/528d1bc3f8f1dc0004a415f10fae0170ecf59f0af88dc125fca45e022c8f5066/68747470733a2f2f77616b6174696d652e636f6d2f62616467652f757365722f35616262613963612d383133652d343361632d396235662d6231636664663364633163372f70726f6a6563742f37626638633433352d366664332d343536382d393830612d6537383235333538353134332e737667)](https://wakatime.com/badge/user/5abba9ca-813e-43ac-9b5f-b1cfdf3dc1c7/project/7bf8c435-6fd3-4568-980a-e78253585143)

Stormware's Pohoda XML/PHP serializer.

This library provides a PHP-based solution for serializing and deserializing XML data for Stormware's Pohoda accounting software. It is designed to work with Pohoda's XML schema definitions (XSD) and simplifies the process of integrating Pohoda's data exchange into your PHP applications.

---

Features
--------

[](#features)

- **XML Serialization**: Convert PHP objects into Pohoda-compatible XML.
- **XML Deserialization**: Parse Pohoda XML files into PHP objects.
- **XSD Integration**: Automatically maps XML schema definitions to PHP classes.
- **Customizable**: Extend and modify the library to fit your specific Pohoda integration needs.

---

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- Composer
- [JMS Serializer](https://jmsyst.com/libs/serializer)
- [GoetasWebservices XSD2PHP](https://github.com/goetas-webservices/xsd2php)

---

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

[](#installation)

Install the library using Composer:

```
composer require vitexsoftware/pohodaser
```

XSD Taken from [https://www.stormware.cz/xml/schema/all\_schema\_ver2.zip](https://www.stormware.cz/xml/schema/all_schema_ver2.zip)

---

Example Usage
-------------

[](#example-usage)

### Serialize an Invoice Object to XML

[](#serialize-an-invoice-object-to-xml)

```
use Pohoda\Invoice\Invoice;
use Pohoda\XML\SerializerBuilder;

// Create an instance of the serializer
$serializer = SerializerBuilder::create()->build();

// Create an invoice object
$invoice = new InvoiceType();
$invoice->setId(123);
$invoice->setName('Sample Invoice');

// Serialize the object to XML
$xmlContent = $serializer->serialize($invoice, 'xml');

echo $xmlContent;
```

### Deserialize XML to an Invoice Object

[](#deserialize-xml-to-an-invoice-object)

```
use Pohoda\Invoice\InvoiceType;
use Pohoda\XML\SerializerBuilder;

// Create an instance of the serializer
$serializer = SerializerBuilder::create()->build();

// Load XML content
$xmlContent = file_get_contents('path/to/invoice.xml');

// Deserialize the XML into a PHP object
$invoice = $serializer->deserialize($xmlContent, InvoiceType::class, 'xml');

print_r($invoice);
```

### Detect and Deserialize XML to a PHP Object

[](#detect-and-deserialize-xml-to-a-php-object)

```
use Pohoda\Xml\Helper;
use Pohoda\XML\SerializerBuilder;

$serializer = SerializerBuilder::create()->build();
$xmlContent = file_get_contents('path/to/faktury_03_v2.0.xml');

// Detect the PHP class name from the XML
$phpClassName = Helper::xml2ns($xmlContent);

if ($phpClassName) {
    $object = $serializer->deserialize($xmlContent, $phpClassName, 'xml');
    print_r($object);
} else {
    echo "Namespace not found for the root element.\n";
}
```

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance72

Regular maintenance activity

Popularity26

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 51.7% of commits — single point of failure

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 ~1 days

Total

3

Last Release

484d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f24039b55245f141b108d0245b5821fe6cc4bb0585e36283f97301cd3aa792bc?d=identicon)[vitex](/maintainers/vitex)

---

Top Contributors

[![Vitexus](https://avatars.githubusercontent.com/u/2621130?v=4)](https://github.com/Vitexus "Vitexus (30 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (27 commits)")[![google-labs-jules[bot]](https://avatars.githubusercontent.com/in/842251?v=4)](https://github.com/google-labs-jules[bot] "google-labs-jules[bot] (1 commits)")

---

Tags

pohoda

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vitexsoftware-pohodaser/health.svg)

```
[![Health](https://phpackages.com/badges/vitexsoftware-pohodaser/health.svg)](https://phpackages.com/packages/vitexsoftware-pohodaser)
```

###  Alternatives

[horstoeko/zugferd

A library for creating and reading european electronic invoices

4306.4M37](/packages/horstoeko-zugferd)[jms/serializer-bundle

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

1.8k93.5M696](/packages/jms-serializer-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M236](/packages/sulu-sulu)[goetas-webservices/xsd2php-runtime

Convert XSD (XML Schema) definitions into PHP classes

4913.3M48](/packages/goetas-webservices-xsd2php-runtime)[easybill/zugferd-php

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

103339.5k11](/packages/easybill-zugferd-php)[dagger/dagger

Dagger PHP SDK

271.4k](/packages/dagger-dagger)

PHPackages © 2026

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