PHPackages                             ongoing/swissrets-sdk - 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. ongoing/swissrets-sdk

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

ongoing/swissrets-sdk
=====================

A collection of classes to easier build SwissRETS JSON and XML files.

0.3.1(5mo ago)03.4k↓60.2%1MITPHPPHP &gt;=8.2

Since Aug 15Pushed 5mo agoCompare

[ Source](https://github.com/ongoing/swissrets-sdk)[ Packagist](https://packagist.org/packages/ongoing/swissrets-sdk)[ Docs](https://github.com/ongoing/swissrets-sdk)[ RSS](/packages/ongoing-swissrets-sdk/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (2)Versions (5)Used By (0)

Ongoing SwissRETS SDK
=====================

[](#ongoing-swissrets-sdk)

Ongoing SwissRETS SDK is a supporting library for easier creation of [SwissRETS files](https://swissrets.ch/) (JSON and XML).

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

[](#installation)

```
composer require "ongoing/swissrets-sdk"

```

Usage
-----

[](#usage)

```
use Ongoing\Swissrets\Dto\SwissRetsExportDto;
use Ongoing\Swissrets\Validator\SwissRetsValidator;

$exportDto = new SwissRetsExportDto(
    generatorName   : 'Test Export',
    generatorVersion: '1.0'
);

/*
 * Create and add propertyDtos to $exportDto
 */

// Validate DTO
SwissRetsValidator::validateExportDto($exportDto);

// Generate JSON
$json = $exportDto->generateJson();

// Generate XML
$xml = $exportDto->generateXml();
```

Consider looking at the `Ongoing\Swissrets\Dto\ExampleBuilder` for reference.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance71

Regular maintenance activity

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.1% 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 ~52 days

Total

4

Last Release

164d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/497943?v=4)[ongoing GmbH](/maintainers/ongoing)[@ongoing](https://github.com/ongoing)

---

Top Contributors

[![seizan8](https://avatars.githubusercontent.com/u/32196755?v=4)](https://github.com/seizan8 "seizan8 (11 commits)")[![dariobednarski](https://avatars.githubusercontent.com/u/10696790?v=4)](https://github.com/dariobednarski "dariobednarski (7 commits)")

---

Tags

jsonxmlstandardswitzerlandswissretsxml-structurerealestatestandards

### Embed Badge

![Health badge](/badges/ongoing-swissrets-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/ongoing-swissrets-sdk/health.svg)](https://phpackages.com/packages/ongoing-swissrets-sdk)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[greenter/xml

XML generación de documentos electrónicos, Facturacion Electrónica SUNAT - Perú

1159.4k4](/packages/greenter-xml)

PHPackages © 2026

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