Skip to content

Commit

Permalink
Update README and add upgrade guide (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
johanwilfer authored Aug 12, 2024
1 parent a510d99 commit 4c7b543
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 4 deletions.
41 changes: 37 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,23 @@
## About
SIEPHP is a library that enables export of bookkeeping-data to the Swedish SIE-format. For more information about SIE see http://www.sie.se/

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.
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.
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
Install the latest version with
Install the latest stable version with

```bash
$ composer require jttech/sie
$ composer require jttech/sie ^1.2
```

## Upgrade

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

## Usage

[examples/](examples) holds some examples on how to use SIE-PHP. This is [examples/simple.php](examples/simple.php):
Expand Down Expand Up @@ -72,6 +78,33 @@ And it will generate the following output (in PC8/CP437 encoding):

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

## Development

SIEPHP comes with docker compose to ease development, to build dev docker containers, run:
```bash
docker compose up --build -d
```

And once it is built, enter the php 8.2 or 8.3 container:
```bash
docker exec -it siephp-php83 bash
docker exec -it siephp-php84 bash
```

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

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

## Author
Johan Wilfer - johan [at] jttech.se - http://jttech.se

Expand Down
35 changes: 35 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Upgrade guide

## Version 2.0

Released: TBD

Breaking changes:
- PHP version required is now 8.2, PHP 8.3 is also supported
- Types added to all code base, also strict types are used
- All the SIE\Data classes are now final, and vars private instead of protected
- As object is now a reserved name in PHP the Data\Object class is now renamed to DimensionObject instead

Tooling added:
- Docker compose file added to ease local development, with envs for each supported PHP version
- ECS coding standard added, also integrated with github action to auto fix committed issues to PRs
- Rector added for automatic refactors and to keep code standard modern, also integrated in github actions
- Phpstan added and checked automatically in Github actions, solved all existing issues
- Phpunit added with the simple test example as a test case (more to be added)
- Github dependabot for upgrades of dev dependencies
- Github actions for running unit tests on supported PHP versions

The are all wrapped in composer scripts and you can run them this way:
```bash
composer cs-check
composer cs-fix
composer rector-check
composer rector-fix
composer phpunit
```

## Version 1.0

Released: 2015-09-21

Initial version

0 comments on commit 4c7b543

Please sign in to comment.