Repository navigation
Overview
maatify/php-persistence 1.0.0 is the first stable release of the direct-PDO Transaction, Pagination, and Ordering toolkit for MySQL and MariaDB.
Added
- Safe matched UPDATE for a single key with explicit transaction ownership and a settlement that distinguishes a matched unchanged row from a missing row.
- Verified Apply/Discard and protected Host write checkout. Both expose transaction settlement so callers can determine how to handle the connection.
- Snapshot pagination on delegated connections and Host-owned transactions, forward-only Keyset pagination, and static composite and dynamic Offset sorting.
- Protected UNIQUE-safe Ordering for dense InnoDB scopes, including append, move, and delete with compaction.
Changed and fixed
- Raw Ordering bounds locking tail reads. A move validates its timestamp before SQL and throws if cleanup cannot confirm settlement. Check the connection and transaction state before retrying or reusing the connection.
- Transaction failure handling preserves the original error when a cleanup check also fails. Pagination attempts to release its cursors after read, validation, or mapping failures.
Installation and upgrading from RC.2
Requires PHP 8.4.27 or later within PHP 8.4, or PHP 8.5.12 or later within PHP 8, plus ext-pdo and ext-pdo_mysql.
Install the exact published version from Packagist:
composer require maatify/php-persistence:1.0.0- Use canonical constructor inputs without trailing newlines. Ordering timestamps use
YYYY-MM-DD HH:MM:SSwith an optional fraction of up to six digits. SortDirectionEnumcases are nowAscandDesc. TheASCandDESCaliases and backing values remain available. Decode native PHP serialized RC.2 values before upgrading or rebuild the affected caches.
Package on Packagist · Package reference and migration guide · Full changelog