versaorm/versaorm-php
VersaORM is a lightweight, expressive PHP ORM featuring a fluent query builder, active-record models, relationships, and schema migrations. It supports popular databases and keeps your data layer clean without heavy dependencies or complex configuration.
DB::select() with hand-written SQL, which is already in the stack, already free, and already owned by your team. So the decision is "add a fifth dependency and a second PDO connection" versus "write ~40 lines of SQL per query." This package wins only when the query volume and complexity inside that one workload justify it. For a single aggregate endpoint, it does not.documents:reindex command that owns embedding writes and query rebuilds in one place; ingestion/staging tables Eloquent does not and should not own.DB driver, no model events, casts, factories, soft deletes, policies, or paginate(). Every Laravel convenience you rely on today would become a scoped engineering task. The product decision is coexistence, and that decision must be written down so nobody interprets adoption as a migration.Adopt (as a timeboxed pilot, pinned to 2.0.1):
NULLs on SQLite and MySQL. Multi-engine CI is a testing convenience; it is not a safety net.Look elsewhere:
NULL in a price, score, ranking, or aggregate would produce a wrong business number or a bad customer decision. In 2.0.0 that was the documented failure mode, and the headline pgvector feature shipped with all 13 of its tests skipped in both local and CI. That is a maturity signal, not a one-off.withCount, read/write splitting, multi-tenancy, or first-party package compatibility. All of it is absent by design and would be hand-rolled.DB::select already cover that without a dependency. Also check whether first-party Laravel Postgres/vector support or a better-maintained alternative covers the retrieval case before committing.Recommendation: run a one-sprint, read-only spike against a restored production copy. Go/no-go on three gates — retrieval works on your real data, staging is engine-identical to production, and every computed column is asserted non-null in your own tests. No production writes through this package in phase one.
For executives: We can evaluate semantic search on the database we already run, for the cost of one engineer for one sprint and no new infrastructure, no vendor contract, no data-export or privacy review. The exposure is deliberately capped: read-only, behind a handful of wrapper classes, replaceable with plain SQL or a managed vector service in days if it disappoints. The realistic outcome is either a shipped feature at near-zero marginal infrastructure cost, or a cheap and well-documented "no."
For engineering: This is a standalone, PDO-backed ORM — not an Eloquent replacement, not a Laravel package. It ships no service provider or facade; we register it ourselves as a lazily-resolved singleton reading from the same .env, and we confine every ->table() chain to app/Queries/. It buys us fluent pgvector similarity search, selectRaw aggregate paths that read better than heredoc SQL, and a clean home for reindex commands and replica reads. In exchange we accept two connections, hand-rolled pagination, no casts/events/factories, and a hard rule that writes and transactions stay in Eloquent — you cannot straddle two connections inside a transaction.
The risk paragraph — say it out loud, don't bury it: the project is early. 5 stars, no dependents, one maintainer, and its most recent patch fixed a defect that returned silent NULLs rather than errors on two of three supported engines. Its vector support had never actually executed in CI before that release. PHPStan level 9 and a clean style check are genuine positives, but they did not catch it. We therefore pin the exact version, treat every changelog as a correctness note, own our own upgrade gate, and keep anything touching money, ranking, or pricing out of this package until it has a track record with us. If the spike passes, we revisit in a quarter with real usage data; if it fails, we have lost one sprint and learned something concrete about our own retrieval requirements.
How can I help you explore Laravel packages today?