ascetic-soft/rowcast
Lightweight DataMapper over PDO for PHP 8.4+. Maps database rows to DTOs and back using reflection, with auto or explicit mapping, type conversion, and a fluent query builder featuring dialect-aware UPSERT.
Mapping::explicit(...), column/property overrides, and a pluggable NameConverterInterface directly reduce the cost of working with schemas that don't follow conventions (usr_email → email). That's a scoping enabler, not just a nicety.batchInsert / batchUpsert / batchUpdate with automatic chunking against bind-parameter limits (SQLite's 999) inside a single transaction, plus dialect-aware UPSERT, turns "we can't do that efficiently" into "that's a one-sprint item."TypeConverterRegistry (dates, enums, JSON, bools, plus custom UUID/vo converters) means one decision about where type coercion lives, instead of ad hoc casting scattered per feature.onBeforeQuery / onAfterQuery hooks let you decide "log queries via a listener" without adopting a profiler dependency — relevant when scoping APM/profiling work.Consider it when:
Mapping) rather than as glue code.llms.txt, and a fast self-contained test suite (in-memory SQLite). These are real signals of engineering discipline.Look elsewhere when:
Connection is a thin PDO wrapper plus savepoint-based nested transactions.GenericDialect.To executives — one paragraph: Rowcast is a small, single-dependency PHP library that removes hand-written boilerplate for moving data between database rows and typed objects. The value is reduced code and fewer class-of-bug errors (date/timezone, enum, JSON, and boolean coercion) in exactly the features that generate them: bulk imports, exports, sync jobs, and internal tooling. Cost of trying it is low — one composer require, adopted one table at a time, no framework lock-in, no infrastructure change. The risk is maturity, not quality: the codebase shows strong engineering hygiene (CI, PHPStan level 9, coverage, bilingual docs, fast test suite), but it has effectively zero external adoption today.
To engineering: It's a DataMapper over PDO with explicit mapping, a fluent query builder, dialect-aware UPSERT, and batched writes that chunk around bind limits inside one transaction. It gives you typed DTO boundaries without Eloquent/Doctrine, and an extension point for UUIDs, value objects, and custom naming. It will not give you relations, migrations, or a unit of work — if you need those, this is the wrong tool and we should say so now.
The honest risk statement to include in any pitch: 0 stars, 0 dependents, first release cycle, single maintainer. Mitigations: pin exact versions, keep DataMapper behind a thin internal interface so it's swappable, and be prepared to vendor/fork into our namespace if we standardise.
Recommendation and ask: fund a 2–3 day spike on one non-critical read-heavy or bulk-write path, with a go/no-go review after one sprint. Don't standardise org-wide, and don't adopt at all if the team is staying on PHP < 8.4 or is committed to Eloquent/Doctrine.
How can I help you explore Laravel packages today?