psx/sql
PSX SQL is a lightweight SQL query builder and database abstraction layer for PHP. It offers a fluent API for composing SELECT, INSERT, UPDATE and DELETE statements with adapters for common databases, so you can build portable SQL without a full ORM.
psx/sql as a tactical accelerator for features that need typed PHP representations of an existing database schema—especially read models, DTOs, reporting payloads, admin screens, and integration adapters—without hand-writing boilerplate.psx/sql is not a substitute for Laravel’s Eloquent relationship lifecycle, migrations, and query ergonomics; it is better framed as a typed schema-contract generator.Consider psx/sql when:
Look elsewhere when:
Executive summary: psx/sql is a small Apache-2.0 PHP package that generates type-safe PHP classes from a database schema. It is worth a time-boxed pilot for legacy-schema integrations, read models, and typed DTOs—not a strategic platform bet. Its low adoption signals—17 stars and 0 dependents—mean we should treat it as a tactical accelerator with an ownership plan, not a default dependency for core product domains.
For engineering: The package can reduce hand-written mapping code and improve static analysis when the database schema is authoritative. The trade-off is integration and ownership: it is not a Laravel-native ORM, generated classes may not fit Eloquent conventions, and we must control regeneration, diffs, and upgrades. Run a short spike against one non-critical schema, measure time saved and maintenance overhead, and define exit criteria before broader adoption.
Decision requested: Approve a limited pilot in an internal or read-only feature, with a go/no-go gate based on developer velocity, schema-drift safety, and total ownership cost. Do not standardize it across core domain models until the pilot proves a clear advantage over Laravel-native or custom-generated alternatives.
How can I help you explore Laravel packages today?