plin-code/laravel-sql-dialect
A Laravel package for handling SQL dialects, helping you generate and adapt database-specific SQL across supported drivers. Useful when your application needs consistent query behavior across different database engines.
Architecture fit. plin-code/laravel-sql-dialect is a thin, additive query-layer abstraction: LikeOperator (dialect-correct LIKE/ILIKE and collation semantics), YearExpression (MySQL YEAR() vs. EXTRACT/YEAR on Postgres vs. strftime on SQLite), and CsvValues (comma-delimited matching via FIND_IN_SET vs. array operators vs. instr). It fits any Laravel application that must run the same query-builder code against more than one engine — per-tenant databases, SQLite in CI with MySQL/Postgres in production, or an in-flight engine migration. Nothing in the release notes implies a service provider with boot-time behavior, migrations, or config publication, so the runtime footprint is negligible.
Critically, v1.2.0 changes no runtime code. It adds resources/boost/guidelines/core.blade.php — a guideline file consumed by Laravel Boost — plus a CI drift test. The architectural assessment of this release is therefore an assessment of developer-tooling surface, not of query execution.
Integration feasibility. High. laravel/boost is suggest-only, so the dependency graph is unchanged; apps without Boost simply ship an unused Blade file. Discovery requires the package to be a direct requirement in the app's composer.json — transitive installs receive nothing, silently. Install paths are php artisan boost:install or php artisan boost:update --discover for existing Boost apps.
Technical risk. Low, but not zero.
src/ is a materially better pattern than static documentation. But it runs only in the package's own CI — it cannot detect a consumer pinned to v1.1, or a Boost install that excludes the guideline path.laravel/boost as suggested-not-required is the right posture; watch that it does not drift to a hard requirement.Key questions.
GROUP_CONCAT/string_agg, upserts, regex, identifier quoting, and boolean handling are all still hand-written. An agent told "don't hand-write LIKE" may reasonably infer broader portability guarantees than the package offers. Is that ambiguity addressed in the guideline text?Stack fit. Laravel 10–12 / PHP 8.x (confirm constraints against the package composer.json). Purely additive — no conflicts with existing query-builder or raw-SQL usage, and existing raw SQL needs no remediation to adopt the release.
Migration path. From 1.1.x: composer update plin-code/laravel-sql-dialect to ^1.2; no code changes, no schema changes, no re-test obligation beyond a green suite. New adoption: add as a direct requirement (composer require plin-code/laravel-sql-dialect), not a transitive pull, specifically so Boost discovery works.
Compatibility. Boost is optional and independent. If the app already uses Boost, boost:update --discover merges the new guidelines into existing AI context; check for conflicts with any project-authored AGENTS.md / CLAUDE.md / .ai/ conventions, since the two sources will now both instruct the agent on SQL style.
Sequencing.
boost:update --discover, diff the generated files, and review them as code.Maintenance. Near zero. Semver minor, no runtime surface, standard composer bump. The one durable cost is guideline-file churn: every future rename or signature change in the package will touch committed AI-context files, producing diff noise and merge conflicts across long-lived branches and multiple application repos. Low, but newly non-zero for a package that previously required zero attention on upgrade.
Support. A genuinely new support vector: "the agent generated a call the package doesn't expose." Route those to the drift test as package bugs, not app bugs. Secondary burden is explaining why guidelines failed to appear — almost always a transitive dependency or an excluded Boost path, both silent failures.
Scaling. No runtime scaling concerns. Organizationally this scales well: one Blade file propagates a SQL convention across every app using Boost, replacing a hand-maintained internal style guide. That is the real value of the release — encoded convention rather than prose docs. Cost scales with repo count only through guideline-file merge conflicts.
Failure modes.
Ramp-up. Roughly one hour for a Laravel developer already familiar with Boost; half a day for a team new to it (installation, file review, AGENTS.md hygiene, deciding what gets committed). No DBA or SRE involvement. Recommend assigning a named owner for the repository's AI-context files before adopting, so guideline updates get reviewed rather than auto-merged.
How can I help you explore Laravel packages today?