ascetic-soft/rowcast
Rowcast is a lightweight PDO DataMapper for PHP 8.4+. It maps DB rows to DTOs via reflection with auto/explicit mapping and type conversion, plus a fluent query builder with dialect-aware UPSERT.
Build vs. Buy: Justify buying this lightweight package over building a custom DataMapper/QueryBuilder for PHP 8.4+ projects, especially when:
0/1 to PHP bool, JSON to array, or string timestamps to DateTime).ILIKE, SQLite chunking for batch operations).Feature Prioritization:
findOne(), batchInsert()).Enum support, DateTime parsing).OR conditions, BETWEEN, LIKE) without raw SQL vulnerabilities.Use Cases:
Adopt if:
WHERE clauses, JOINs via QueryBuilder).usr_email) and you need custom NameConverters.Look elsewhere if:
$user->save()) → Avoid this package.Alternatives to Evaluate:
*"Rowcast is a low-risk, high-reward PHP package that lets us:
string timestamps → DateTime objects).It’s not an ORM (so no bloat), but it gives us 90% of the safety and convenience of one for internal tools and microservices. The team can prototype it in a week and roll it out incrementally. Given its PHP 8.4+ focus, it aligns with our long-term stack modernization."*
*"Rowcast solves three key pain points:
snake_case columns → camelCase properties) with customizable type conversion (e.g., JSON ↔ array, bool ↔ 0/1).ILIKE, SQLite chunking for batch inserts).batchUpsert(), save(), and iterateAll() handle edge cases (e.g., parameter binding limits, transactions) out of the box.Why not build it?
TypeConverterInterface. Non-standard column names? Use NameConverterInterface.Migration path:
DataMapper for simple CRUD (e.g., findOne(), insert()).QueryBuilder for complex queries (e.g., OR conditions, BETWEEN).Risk mitigation:
How can I help you explore Laravel packages today?