genkgo / camt
Library to read CAMT files (XML containing bank statements).
Installs: 700 233
Dependents: 3
Suggesters: 0
Security: 0
Stars: 81
Watchers: 17
Forks: 66
Open Issues: 6
Requires
- php: ^8.1
- ext-dom: *
- ext-libxml: *
- ext-simplexml: *
- jschaedl/iban-validation: ^2.0
- moneyphp/money: ^4.0
Requires (Dev)
- friendsofphp/php-cs-fixer: @stable
- phpstan/phpstan: @stable
- phpunit/phpunit: @stable
- dev-master
- 2.8.0
- 2.7.0
- 2.6.2
- 2.6.1
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.0
- 2.0.0
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.0
- 0.6.0
- 0.5.0
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.0
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.7
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- dev-dependabot/composer/symfony/process-6.4.14
- dev-powerkiki
- dev-camt-version-8
- dev-php81
- dev-money_old
This package is auto-updated.
Last update: 2024-11-07 08:40:54 UTC
README
Library to read CAMT files. Currently only CAMT.052, CAMT.053 and CAMT.054 are supported.
Supported Versions
Camt 052
Camt 053
Camt 054
Installation
It is installable and autoloadable via Composer:
composer require genkgo/camt
Getting Started
Read a CAMT file, and loop through its statements and entries.
<?php use Genkgo\Camt\Config; use Genkgo\Camt\Reader; $reader = new Reader(Config::getDefault()); $message = $reader->readFile('test/data/camt053.v2.minimal.xml'); $statements = $message->getRecords(); foreach ($statements as $statement) { $entries = $statement->getEntries(); }
XSD validation
This library provides a XSD validation for each supported CAMT format. The validation is executed by default. But in some cases, you might want to disable it.
<?php use Genkgo\Camt\Config; use Genkgo\Camt\Reader; $config = Config::getDefault(); $config->disableXsdValidation(); $reader = new Reader($config);
Contributing
- Found a bug? Please try to solve it yourself first and issue a pull request. If you are not able to fix it, at least give a clear description what goes wrong. We will have a look when there is time.
- Want to see a feature added, issue a pull request and see what happens. You could also file a bug of the missing feature and we can discuss how to implement it.
Quality
To check that everything is as it should be, run:
composer check
To fix code style, run:
composer check
How to release
- Create an annotated tag
git tag -a 1.2.3
- Tag subject must be the version number, eg:
1.2.3
- Tag body must be a copy-paste of the changelog entries
- Push tag with
git push --tags
, then GitHub Actions will create a GitHub release automatically