PHPackages                             sebastianwalker/statement - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. sebastianwalker/statement

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

sebastianwalker/statement
=========================

Read, parse and match bank statements

v1.6.2(8y ago)5281CC-BY-SA-4.0PHPPHP ^7.0

Since Feb 28Pushed 8y ago2 watchersCompare

[ Source](https://github.com/hiwye/statement)[ Packagist](https://packagist.org/packages/sebastianwalker/statement)[ RSS](/packages/sebastianwalker-statement/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (8)Dependencies (5)Versions (9)Used By (0)

statement
=========

[](#statement)

A **PHP library** to **read, parse and match** bank account exports.

You can use statement to

- Parse CSV bank statements into usable PHP classes
- Guess column mappings
- Match domain objects with transaction descriptions (e.g. for payment processing)

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

[](#installation)

```
composer require sebastianwalker/statement

```

Transactions
------------

[](#transactions)

```
// Transaction ($amount, $description, $payer, $iban, $date)
$transaction = new \SebastianWalker\Statement\Transaction(12.34, "Desc", "John Doe", "DE...00", new \Carbon\Carbon("2018-02-12"));

$transaction->getAmount(); // float

$transaction->getDescription(); // string

$transaction->getPayer(); // string

$transaction->getIban(); // string | null

$transaction->getDate(); // Carbon instance: http://carbon.nesbot.com/docs/
```

Importing statements
--------------------

[](#importing-statements)

### From CSV

[](#from-csv)

```
// FromCsv($filename, $delimiter, $known_mapping, $known_offset)
$importer = new \SebastianWalker\Statement\Importers\FromCsv("file.csv");

// Get the imported transactions
$transactions = $importer->getTransactions();

// Get the mapping used (guessed + known_mapping)
$mapping = $importer->getMapping();
/*[
  "amount"=>"Amount",
  "description"=>"Description",
  "payer"=>"Payer/Payee",
  "iban"=>"IBAN",
  "date"=>"Valuta Date"
]*/

// Get the column titles usable for mapping as an array
$columns = $importer->getColumns();
```

### From Array

[](#from-array)

```
// FromArray($transactions)
$importer = new \SebastianWalker\Statement\Importers\FromArray([/*Array of Transactions*/]);

// Get the imported transactions
$transactions = $importer->getTransactions();
```

Matching Transactions with Domain Objects
-----------------------------------------

[](#matching-transactions-with-domain-objects)

### Matching by Prefix

[](#matching-by-prefix)

Ask your payers to include a transaction description of {Your Prefix}{Your Object Identifier} when sending the funds.
*Example Description: PFIX-12345678*

```
$matcher = new \SebastianWalker\Statement\Matchers\PrefixMatcher("PFIX-");

// Get all matching entities that are referenced in a given transaction
$matches = $matcher->getEntities($transaction);
```

The prefix matcher looks for occurrences in the transaction's description of the given prefix and returns the appended part of each of them.

### Matching by Entity List

[](#matching-by-entity-list)

Ask your payers to include an object identifier (e.g. their record's id) in the transaction description when sending the funds. *Example Description: 12345678*

```
// Pass basic strings
$matcher = new \SebastianWalker\Statement\Matchers\ListMatcher(["1234","5678","9012"]);

// OR set a property which will be matched
$matcher = new \SebastianWalker\Statement\Matchers\ListMatcher([
    ["id"=>"1234"],
    ["id"=>"5678"],
    ["id"=>"9012"]
], "id");

// Get all matching entities that are referenced in a given transaction
$matches = $matcher->getEntities($transaction);
```

The list matcher looks for occurences in the transaction's description of the items contained in the given list and returns all matching items.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~5 days

Total

8

Last Release

2961d ago

PHP version history (2 changes)v1.0PHP ^5.3.3 || ^7.0

v1.6.2PHP ^7.0

### Community

Maintainers

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

---

Top Contributors

[![sebwalk](https://avatars.githubusercontent.com/u/6324895?v=4)](https://github.com/sebwalk "sebwalk (19 commits)")

---

Tags

bank-statementcsvimportmatchingparser

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sebastianwalker-statement/health.svg)

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

###  Alternatives

[consoletvs/invoices

Generate PDF invoices for your customers in laravel

455275.5k](/packages/consoletvs-invoices)[azishapidin/indoregion

Package containing region of Indonesia (provinces, regencies, districts, and villages) for Laravel

27274.9k](/packages/azishapidin-indoregion)[rgilyov/laravel-csv-importer

Easy and reliable way to import, parse, validate and transform your csv files with laravel

166.1k](/packages/rgilyov-laravel-csv-importer)

PHPackages © 2026

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