Search by

silarhi / qif-library

guillaume-sainthillier

A PHP library to parse and write QIF (Quicken Interchange Format) files

Package info

github.com/silarhi/qif-library

pkg:composer/silarhi/qif-library

Statistics

Installs: 34

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

4.0.0 2026-10-13 07:05 UTC

This package is auto-updated.

Last update: 2026-10-14 07:31:42 UTC


README

Latest Stable Version Total Downloads License PHP Version CI Status Coverage

QIF Library

A PHP library to parse and write QIF files.
Read Quicken Interchange Format exports into typed PHP objects, or generate QIF files from your own transactions.

📖 Documentation

Features

  • Parser: reads the date, amount, memo, cleared status, payee, address, category and splits of every transaction
  • Writer: builds QIF output from Transaction objects, splits, memo and address included
  • Typed results: dates as DateTimeImmutable, amounts as float, account types and cleared status as enums
  • No silent guesses: impossible dates (31/02/2023) and ambiguous amounts (1,234) throw a ParseException instead of being rolled over or misread, with the line where they are
  • Both number conventions: 1,234.50 and 1.234,50, detected per amount or set explicitly
  • Day- or month-first dates: d/m/Y by default, m/d/Y on demand, read and written; ISO dates always
  • No dependencies: plain PHP, Windows and Unix line endings, UTF-8 BOM stripped

Requirements

  • PHP 8.2+

Installation

composer require silarhi/qif-library

Quick start

use Silarhi\Qif\Enums\Types;
use Silarhi\Qif\Parser;
use Silarhi\Qif\Transaction;
use Silarhi\Qif\Writer;

// Parse
foreach (Parser::parseFile('/path/to/export.qif')->getTransactions() as $transaction) {
    $transaction->getDate();        // ?DateTimeImmutable
    $transaction->getAmount();      // ?float
    $transaction->getDescription(); // ?string, the payee
}

// Write
$writer = new Writer();
$writer->addTransaction(
    (new Transaction(Types::Bank))
        ->setDate(new DateTimeImmutable('2026-01-31'))
        ->setDescription('Acme Corp')
        ->setAmount(2400)
        ->setCategory('Income:Salary')
);
$writer->saveToFile('/path/to/export.qif');

Documentation

Everything else is on qif-library.silarhi.dev:

Contributing

See CONTRIBUTING.md. Release notes are in CHANGELOG.md.

Credits

This library started as a fork of mimographix/qif-library by Mário Čechovič.

License

MIT License. See LICENSE for details.

Built with care by SILARHI.
If QIF Library saves you time, consider giving it a star on GitHub.