yiisoft/db-sqlite
SQLite driver for the Yii Database library, providing connection handling, schema introspection, query building, and ActiveRecord support for SQLite-backed Yii applications.
8.1 – 8.5, so this release is the gate for any decision to standardize on a modern PHP baseline. If your platform still runs 8.0, this major version is effectively a forcing function for an upgrade — treat the two decisions as one.yiisoft/db-sqlite). The release hardens exactly the parts of a DB layer teams most often hand-roll and regret: schema introspection, column type mapping, DDL generation, quoting, and value casting. Verdict: buy, provided you are on the Yii3 stack.yiisoft/db — enables JSON-column search features without raw SQL strings.RETURNING support (upsertReturning, insertReturningPks, #356/#357/#360/#361) — removes the classic insert-then-last-insert-id dance; cleaner, less race-prone write paths.FOR clause support (#354) and case-sensitive LIKE (#344) — query expressiveness for search and reporting features.ColumnSchemaInterface implementations, ColumnFactory, SqlParser) — fewer per-row conversion costs on read-heavy endpoints.TableSchema, DbArrayHelper changes). It buys long-term maintainability, not new user-facing features — useful context when someone asks "what did we get for the upgrade?"yiisoft/db-implementation virtual package (#368) formalizes driver compatibility, which gives you a cleaner way to reason about which drivers must be upgraded together.Adopt when:
Illuminate\Database application. If the ask is "SQLite on Laravel," the right answer is Laravel's built-in SQLite connection plus doctrine/dbal where needed.RETURNING, JSON overlap queries, enum columns, or collation support without bespoke SQLite-specific SQL in application code.yiisoft/db 2.x — this release is a coordinated major bump, not a standalone.Look elsewhere when:
unsigned columns throw an exception (#402) rather than silently ignore them — a good change, but it signals that MySQL-ism portability is not the goal here.Upgrade-risk checklist for the PM to socialize:
ColumnSchemaInterface → ColumnInterface (#334) while the old ColumnInterface is removed (#332); TableSchema removed and Schema refactored (#377); Schema::getCacheKey()/getCacheTag() removed (#347); SchemaInterface::getRawTableName() moved to QuoterInterface (#307).` to " (#362) — audit any raw SQL, snapshots, or query caches; Connection::insertWithReturningPks() now returns array|false (#339); \InvalidArgumentException replaces the namespaced Yii exception (#364) — audit any catch blocks; DMLQueryBuilder no longer honors hasLimit()/hasOffset() (#342).QueryBuilder constructor (#330) and yiisoft/json dependency removed (#343).unsigned columns will now fail loudly.For executives (one paragraph): We evaluated yiisoft/db-sqlite 2.0.0, the database driver our Yii3 services use to talk to SQLite. This is a major release: it modernizes the supported PHP baseline to 8.1–8.5 and pays down structural debt in how the driver reads schemas, maps column types, and generates SQL. It adds a handful of capabilities we would otherwise hand-build — RETURNING-based inserts, JSON overlap search, enum columns, and collation support. The cost is a deliberate breaking-change migration, including renamed APIs and a change to SQL quoting. The strategic value is lower maintenance burden and better read performance, not new customer-facing features. Recommended: upgrade, but schedule it as a scoped migration tied to the PHP 8.1+ baseline decision, not as a routine dependency bump.
For engineering leads: This is a lockstep major with yiisoft/db 2.x. Budget for an audit across four surfaces: (1) anything touching ColumnInterface/ColumnSchemaInterface/TableSchema, which were renamed, removed, or refactored; (2) any raw SQL or cached queries affected by the ` → " quoting change; (3) catch blocks expecting Yiisoft\Db\Exception\InvalidArgumentException, now \InvalidArgumentException; (4) migrations defining unsigned columns, which now throw. In exchange you get upsertReturning/insertReturningPks, JSON overlap builders, a FOR clause, case-sensitive LIKE, enum column support, and a reworked column factory/builder pipeline that should reduce per-row casting overhead. Pin yiisoft/db and the driver together, run the schema-introspection tests first — they are the highest-risk area — and treat the yiisoft/db-implementation virtual package as your compatibility contract for any other drivers in the fleet.
One-line framing: Buy, don't build — but only if we are on Yii3, and only as a planned migration rather than an opportunistic upgrade.
How can I help you explore Laravel packages today?