oralunal/phpclickhouse-laravel
Laravel integration for ClickHouse built on phpClickHouse. Add ClickHouse as a database connection, run analytical queries through Laravel’s DB facade, and use familiar query builder and configuration patterns. Ideal for analytics and reporting workloads.
make:clickhouse-model and make:clickhouse-migration, which shortens the path from "we want product analytics / event tracking / large-scale reporting" to a working schema. This supports committing to analytics-heavy roadmap items with less upfront engineering risk.MATERIALIZED/ALIAS columns, parallel query typing, disabling Larastan's migration cache). This lowers the cost of enforcing static analysis on analytics code — a meaningful signal when deciding whether to mandate PHPStan across the codebase.lc-upgrade-3x-to-4x refinement (only suggesting schema:dump for tables no migration creates) reduces friction in 3.x→4.x upgrades, informing timing of a framework/database modernization initiative.Consider adopting when:
Look elsewhere when:
PHPStan\ConnectionConfig::isReadOnly() in favor of hasReadOnlyClickHouseConnection(); teams sensitive to deprecation cycles should weigh that.For executives: This release is a maturity milestone for our ClickHouse-on-Laravel integration. It does not change the product surface we ship to customers; it reduces engineering risk and cost in our analytics stack. Concretely, it (1) adds Artisan generators so engineers scaffold ClickHouse models and migrations in minutes instead of hand-writing schema, (2) substantially strengthens static analysis so analytics code is checked in CI like the rest of our codebase, and (3) smooths the 3.x-to-4.x upgrade path. Net effect: faster delivery of analytics/reporting features, fewer production schema surprises, and lower long-term maintenance burden. There is one internal deprecation (isReadOnly() → hasReadOnlyClickHouseConnection()) that affects our own tooling only, not customers.
For engineering: v4.2.0 is primarily a developer-experience release for the PHPStan extension. Highlights: migrations and ClickHouse column types are now understood by static analysis; Float32/Float64 and MATERIALIZED/ALIAS columns are correctly typed as nullable (including read-only-connection awareness); Larastan's migration cache is disabled to avoid stale-type false positives; Parallel::get()/getRows() accept any model's query; and new SchemaDropCommand/SchemaIndexDefinition classes make drop()->sync() and index()->granularity() type-safe. New make:clickhouse-model and make:clickhouse-migration commands bring schema authoring in line with standard Laravel workflows. Action items: migrate off the deprecated ConnectionConfig::isReadOnly(), re-run PHPStan after upgrading, and review the refined lc-upgrade-3x-to-4x guidance if mid-upgrade. No breaking changes in this release.
How can I help you explore Laravel packages today?