PHPackages                             trf4php/trf4php - 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. trf4php/trf4php

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

trf4php/trf4php
===============

This is a facade for transaction managers.

2.0.0(8y ago)330.5k—3.4%2MITPHPPHP &gt;=7.1

Since Dec 15Pushed 8y ago1 watchersCompare

[ Source](https://github.com/szjani/trf4php)[ Packagist](https://packagist.org/packages/trf4php/trf4php)[ RSS](/packages/trf4php-trf4php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (14)Used By (2)

trf4php
=======

[](#trf4php)

This is a transaction manager facade library. It wraps and hides database handler libraries thus you can whenever switch to another one. The idea came from the Spring framwework.

Why is it useful?
-----------------

[](#why-is-it-useful)

If you separate your project to layers, you probably have application layer with several service classes. Common requirement is that database libraries do not be used directly in higher levels. This problem partially solved by ORM-s which follow datamapper pattern: you can use simple classes to persisting them. You can even use repositories through interfaces. However, transaction handling is not hidden, you cannot switch your library to another one without modifying your service classes.

trf4php is a simple interface. You can use it in your code for transaction handling and you can change the current implementation. Perhaps you use simple PDO but you would like to switch to Doctrine. It requires just a configuration change.

Features
--------

[](#features)

Currently there is one binding implementation: [trf4php-doctrine](https://github.com/szjani/trf4php-doctrine)

Feel free to implement a binding for your preferred database handling framework.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

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 ~160 days

Recently: every ~372 days

Total

13

Last Release

2976d ago

Major Versions

1.2.x-dev → 2.0.02018-03-19

PHP version history (2 changes)1.0.0PHP &gt;=5.3.0

2.0.0PHP &gt;=7.1

### Community

Maintainers

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

---

Tags

wrapperfacadetransaction

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[simplesoftwareio/simple-qrcode

Simple QrCode is a QR code generator made for Laravel.

2.9k27.6M92](/packages/simplesoftwareio-simple-qrcode)[webpatser/laravel-uuid

Laravel integration for webpatser/uuid - High-performance drop-in UUID replacements (15% faster than Ramsey). Provides Str macros, HasUuids trait, facades, and casts. RFC 4122/9562 compliant.

1.8k17.3M129](/packages/webpatser-laravel-uuid)[artisaninweb/laravel-soap

A SoapClient wrapper integration for Laravel

6314.5M12](/packages/artisaninweb-laravel-soap)[mhor/php-mediainfo

PHP wrapper around the mediainfo command

120574.8k7](/packages/mhor-php-mediainfo)[bocharsky-bw/arrayzy

A native PHP arrays easy manipulation library in OOP way.

38425.4k](/packages/bocharsky-bw-arrayzy)[innmind/immutable

Immutable PHP primitive wrappers

75218.0k74](/packages/innmind-immutable)

PHPackages © 2026

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