PHPackages                             ksfraser/contact-dto - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ksfraser/contact-dto

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ksfraser/contact-dto
====================

Shared Contact Data Transfer Object for bank import parsers and CRM integration

0.1.0(3mo ago)010↓33.3%2MITPHPPHP ^7.3 || ^8.0

Since Mar 20Pushed 3mo agoCompare

[ Source](https://github.com/ksfraser/Contact-DTO)[ Packagist](https://packagist.org/packages/ksfraser/contact-dto)[ RSS](/packages/ksfraser-contact-dto/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (2)

Ksfraser Contact DTO
====================

[](#ksfraser-contact-dto)

A lightweight, self-contained Data Transfer Object for contact/payee information. Designed to be shared across multiple packages including bank import parsers (QIF, OFX, CSV) and CRM integrations.

Features
--------

[](#features)

- **Zero dependencies** - Pure PHP, no external requirements
- **PHP 7.3+ compatible** - Works with legacy and modern PHP versions
- **Normalized contact fields** - Address broken into components, comprehensive contact details
- **CRM-ready** - Fields for linking to FrontAccounting customers/suppliers
- **Parser-friendly** - Methods for recording transaction statistics and populating from arrays
- **Fully tested** - Comprehensive PHPUnit test suite with 20+ test cases

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

[](#installation)

```
composer require ksfraser/contact-dto
```

Quick Start
-----------

[](#quick-start)

```
use Ksfraser\Contact\DTO\ContactData;

$contact = new ContactData();
$contact->name = 'ACME Corp';
$contact->email = 'billing@acme.com';
$contact->phone = '555-0123';
$contact->contact_type = 'vendor';

// Record a transaction
$contact->recordTransaction(150.00, '2023-06-15 10:30:00');

// Export to database
$data = $contact->toArray();
```

Full Documentation
------------------

[](#full-documentation)

See [README.md](README.md) for comprehensive documentation including:

- Detailed usage examples
- All available methods
- Property reference
- Testing instructions

Testing
-------

[](#testing)

Run the test suite:

```
composer install --dev
vendor/bin/phpunit
```

Development Environment
-----------------------

[](#development-environment)

- **PHP**: 7.3+ (production), 8.x (development/testing)
- **PHPUnit**: 11 (dev-only)

License
-------

[](#license)

MIT

Repository
----------

[](#repository)

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance82

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

97d ago

### Community

Maintainers

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

---

Top Contributors

[![ksfraser](https://avatars.githubusercontent.com/u/54461925?v=4)](https://github.com/ksfraser "ksfraser (1 commits)")

---

Tags

crmdtocontactbank-import

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ksfraser-contact-dto/health.svg)

```
[![Health](https://phpackages.com/badges/ksfraser-contact-dto/health.svg)](https://phpackages.com/packages/ksfraser-contact-dto)
```

###  Alternatives

[zero-to-prod/data-model

Transforms Data into Type-Safe DTOs.

14129.4k32](/packages/zero-to-prod-data-model)[astrotomic/laravel-vcard

A fluent builder class for vCard files.

5332.8k](/packages/astrotomic-laravel-vcard)[dereuromark/cakephp-dto

A CakePHP plugin for generating immutable Data Transfer Objects with full type safety

3096.0k5](/packages/dereuromark-cakephp-dto)[nutgram/hydrator

Hydrator for PHP 8.0+

12320.2k8](/packages/nutgram-hydrator)[tangwei/dto

php hyperf dto

18136.0k2](/packages/tangwei-dto)[cerbero/dto

Data Transfer Object (DTO)

17121.0k1](/packages/cerbero-dto)

PHPackages © 2026

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