Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Db Sqlite Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Framework/runtime modernization. 2.0.0 moves the supported PHP range to 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.
  • Build vs. buy for database access. This is the Yii3 SQLite driver (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.
  • Feature roadmap input. New capabilities worth putting in front of product/engineering as available primitives:
    • JSON overlaps conditions (#310, #393) plus JSON expression handling moved into core 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.
    • Enumeration column type (#404) and column collation (#380) — schema fidelity for multi-locale and constrained-value data.
    • Type-cast performance work (ColumnSchemaInterface implementations, ColumnFactory, SqlParser) — fewer per-row conversion costs on read-heavy endpoints.
  • Technical-debt triage. A large fraction of this release is internal restructuring (column factory/builder, schema refactor, removal of 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?"
  • Vendor/integration risk tracking. The yiisoft/db-implementation virtual package (#368) formalizes driver compatibility, which gives you a cleaner way to reason about which drivers must be upgraded together.

When to Consider This Package

Adopt when:

  • You are building or maintaining on Yii3 (PSR-compatible Yii) and need SQLite as a supported backend, including dev/test parity with a production database. Be explicit with stakeholders: this is not a Laravel package — it will not drop into an Eloquent/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.
  • You need reliable schema introspection and DDL generation against SQLite (migrations, table/column reflection) rather than hand-written SQL.
  • You want RETURNING, JSON overlap queries, enum columns, or collation support without bespoke SQLite-specific SQL in application code.
  • You are prepared to upgrade in lockstep with yiisoft/db 2.x — this release is a coordinated major bump, not a standalone.

Look elsewhere when:

  • You are on Laravel, Symfony with Doctrine, or a plain PDO stack. Use the native integration; the abstraction payoff here is Yii-specific.
  • You need long-term support on PHP 8.0 or lower — 2.0.0 will not install.
  • Your codebase depends on the removed/renamed APIs (see below) and you lack the bandwidth for a coordinated upgrade; stay on 1.x until a window exists.
  • You require database features SQLite does not offer. The release explicitly makes 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.
  • You want zero-friction minor-version upgrades. This is a breaking major by design.

Upgrade-risk checklist for the PM to socialize:

  • Renames/removals: 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).
  • Behavioral changes: identifier quote character changed from ` 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).
  • Constructor and dependency changes: QueryBuilder constructor (#330) and yiisoft/json dependency removed (#343).
  • Existing schema risk: any tables or migrations declaring unsigned columns will now fail loudly.

How to Pitch It (Stakeholders)

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console