PHPackages                             jttech/sie - 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. jttech/sie

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

jttech/sie
==========

Library for export to the Swedish SIE-format. Currently only a subset of the specification is supported, like export to SIE4 (verification/transaction data).

3.1(1mo ago)985.1k—5.9%7MITPHPPHP &gt;=8.3CI passing

Since Jan 8Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/johanwilfer/siephp)[ Packagist](https://packagist.org/packages/jttech/sie)[ RSS](/packages/jttech-sie/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (9)Dependencies (14)Versions (17)Used By (0)

SIEPHP
======

[](#siephp)

About
-----

[](#about)

SIEPHP is a library that enables export of bookkeeping-data to the Swedish SIE-format. For more information about SIE see

Currently only a subset of the specification is supported, like export to SIE4 (verification/transaction data). In the future a loader-class for SIE could be written as well, and support of more features in the SIE-standard.

It's built around simple data-classes that represents a Company / Verifications / Transactions by the model in the SIE-standard. It also comes with a dumper-class that can dump the data to SIE-format.

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

[](#installation)

Install the latest stable version with

```
$ composer require jttech/sie ^3.0
```

Upgrade
-------

[](#upgrade)

See [UPGRADE.md](UPGRADE.md) for how to upgrade.

Usage
-----

[](#usage)

[examples/](examples) holds some examples on how to use SIE-PHP. This is [examples/simple.php](examples/simple.php):

```
// create a company
$company = (new SIE\Data\Company())
    // set company name
    ->setCompanyName('My company')
    // add a verification series
    ->addVerificationSeries(new SIE\Data\VerificationSeries())
    // add two accounts
    ->addAccount((new SIE\Data\Account(1511))->setName('Kundfordringar'))
    ->addAccount((new SIE\Data\Account(3741))->setName('Öresutjämning'))
;

// add a verification with two transactions
$verification = (new SIE\Data\Verification(591000490))->setDate('20150105')
    ->addTransaction(
        (new SIE\Data\Transaction())
            ->setAccount($company->getAccount(1511))
            ->setAmount(-0.24)
    )
    ->addTransaction(
        (new SIE\Data\Transaction())
            ->setAccount($company->getAccount(3741))
            ->setAmount(0.24)
    )
;
// add the verification to the company
$company->getVerificationSeriesAll()[0]->addVerification($verification);
// validate data, will throw Exception if invalid data
$company->validate();

$dumper = new SIE\Dumper\SIEDumper();
$output = $dumper->dump($company);
echo $output;
```

And it will generate the following output (in PC8/CP437 encoding):

```
#FLAGGA 0
#FORMAT PC8
#SIETYP 4
#PROGRAM "SIE-PHP exporter" 1.0
#GEN 20150921
#FNAMN "My company"
#KONTO 1511 Kundfordringar
#KONTO 3741 Öresutjämning

#VER A 591000490 20150105
{
    #TRANS 1511 {} -0.24 20150105
    #TRANS 3741 {} 0.24 20150105
}

```

See [examples/TSVtoSIE.php](examples/TSVtoSIE.php) for a custom TSV to SIE converter, loading the same data from a TSV-file.

Development
-----------

[](#development)

SIEPHP comes with docker compose to ease development, to build dev docker containers, run:

```
docker compose up --build -d
```

And once it is built, enter the php 8.3, 8.4 or 8.5 container:

```
docker exec -it siephp-php83 bash
docker exec -it siephp-php84 bash
docker exec -it siephp-php85 bash
```

All the tooling is added as composer scripts, start by installing deps:

```
composer install
```

The you can use the code style (cs) commands to check/fix issues, rector to run the automatic refactors, or phpunit.

```
composer cs-check
composer cs-fix
composer rector-check
composer rector-fix
composer phpunit
```

Author
------

[](#author)

Johan Wilfer - johan \[at\] jttech.se -

Licence
-------

[](#licence)

SIE-PHP is licensed under the MIT License - see the LICENSE file for details

Thanks to
---------

[](#thanks-to)

- Mitronic AB () that funded the development of version 1
- Sirvoy () that funded the development of version 2

Questions?
----------

[](#questions)

Send an email to johan \[at\] jttech.se

###  Health Score

62

—

FairBetter than 99% of packages

Maintenance94

Actively maintained with recent releases

Popularity40

Moderate usage in the ecosystem

Community15

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 55% 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 ~210 days

Recently: every ~123 days

Total

12

Last Release

30d ago

Major Versions

1.x-dev → 2.0rc12024-08-12

2.x-dev → 3.02025-11-05

PHP version history (3 changes)1.0PHP &gt;=5.4.0

2.0rc1PHP &gt;=8.2

3.0PHP &gt;=8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/736a4f8f6c370024583124097cdc7e0efeac2cb4f58d7e28941ef028e881cd96?d=identicon)[johan.wifer](/maintainers/johan.wifer)

---

Top Contributors

[![johanwilfer](https://avatars.githubusercontent.com/u/1157420?v=4)](https://github.com/johanwilfer "johanwilfer (33 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (24 commits)")[![PatNowak](https://avatars.githubusercontent.com/u/9477704?v=4)](https://github.com/PatNowak "PatNowak (2 commits)")[![kwarszawski](https://avatars.githubusercontent.com/u/104359793?v=4)](https://github.com/kwarszawski "kwarszawski (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jttech-sie/health.svg)

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

###  Alternatives

[mck89/peast

Peast is PHP library that generates AST for JavaScript code

19037.7M41](/packages/mck89-peast)[karriere/json-decoder

JsonDecoder implementation that allows you to convert your JSON data into PHP class objects

141439.4k12](/packages/karriere-json-decoder)[sauladam/shipment-tracker

Parses tracking information for several carriers, like UPS, USPS, DHL and GLS by simply scraping the data. No need for any kind of API access.

9642.0k](/packages/sauladam-shipment-tracker)[jstewmc/rtf

Read and write Rich Text Format (RTF) documents with PHP

45143.1k6](/packages/jstewmc-rtf)[json-mapper/laravel-package

The JsonMapper package for Laravel

25188.9k3](/packages/json-mapper-laravel-package)[jamesmoss/toml

A parser for TOML implemented in PHP.

3231.7k15](/packages/jamesmoss-toml)

PHPackages © 2026

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