PackageTrack
Sign in Get early access

smi2/phpclickhouse

PHP ClickHouse Client

1.26.610 13M downloads/mo #944 most downloaded on Packagist smi2/phpClickHouse

What this package is like to depend on

Last release 2 months ago

10 Jun 2026

Release timing varies

gaps range from 2 weeks to 1.2 years

Some releases are documented

notes for 14 of 52 stable releases

Nothing withdrawn

no release was ever pulled

10 years old

52 releases · first in 2016

8 releases in the last 12 months

see the full history below

Release timeline

52 releases · Aug 2016 to Jun 2026
2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 52
  1. 1.26.610 10 Jun 2026
    Release notes

    Bug Fixes

    • Distributed DDL (ON CLUSTER) formatting reworked (#241, #263, #262) — Http::prepareWrite() no longer appends FORMAT JSON to the SQL of ON CLUSTER queries. Instead the response format is requested via the default_format=JSON query setting:
      • CREATE USER / GRANT / ALTER ... ON CLUSTER no longer fail with SYNTAX_ERROR from a stray FORMAT JSON (#241)
      • CREATE / ALTER ... ON CLUSTER results are now parseable JSON again — no more Can't find meta when reading the per-host execution status (#263)
      • a bare ON CLUSTER substring inside INSERT data (e.g. 'REGION CLUSTER') is no longer mistaken for the keyword — \b word boundaries match the real keyword only (#262)
    • False-positive error detection on large JSON responses (#261) — Statement::hasErrorClickhouse() now confirms a tail-regex match with json_validate() (PHP 8.3+) before flagging an error, so valid JSON whose data legitimately contains ClickHouse exception text is not reported as a failure (@jradtilbrook)

    Testing

    • New tests/ClickHouse26/OnClusterTest.php — distributed DDL regression tests (CREATE / ALTER / CREATE USER ... ON CLUSTER); skips gracefully when no Keeper/ZooKeeper backend is configured
    • Embedded ClickHouse Keeper added to the test environment (tests/clickhouse-latest-config/keeper.xml, mounted in docker-compose.yaml and copied in CI) so the single-node default cluster can execute ON CLUSTER queries
    • testInsertWithOnClusterInData added to both CH 21 and CH 26 client tests (#262)

    Merged PRs

    • #261 — Fix false positive error detection when JSON data contains ClickHouse exception text (@jradtilbrook)

    Closed Issues

    • #241 — ALTER / CREATE / DROP / RENAME queries fail when using ON CLUSTER
    • #262 — extra FORMAT JSON in the query when inserting a record (superseded by the default_format fix)
    • #263 — "Can't find meta" error since 1.24.406
    Open source →
  2. 1.26.423 23 Apr 2026
    Release notes

    2026-04-23 [Release 1.26.423]

    Bug Fixes

    • Escape single quotes and backslashes in scalar string native params (#258, #259) — convertParamValue() now escapes \\\ and '\' for scalar String params in selectWithParams() / writeWithParams(). Previously strings like hello\ caused CANNOT_PARSE_ESCAPE_SEQUENCE in ClickHouse (@sander-hash, @tom-on-the-internet)

    Testing

    • 5 new native-params tests — scalar strings with trailing backslash, embedded backslash, single quote, injection attempt, and writeWithParams with backslash

    Merged PRs

    Closed Issues

    • #258 — Scalar string params are not escaped, causing CANNOT_PARSE_ESCAPE_SEQUENCE
    Open source →
  3. 1.26.417 16 Apr 2026
    Release notes

    2026-04-17 [Release 1.26.417]

    Bug Fixes

    • Correctly encode arrays for native param binding (#257) — convertParamValue() now produces ClickHouse-compatible array literals ['foo','bar'] (single quotes) instead of JSON format ["foo","bar"]. Previously any Array(String) parameter in selectWithParams() / writeWithParams() failed with a parse error (@sander-hash)
    • Escape single quotes and backslashes in array strings — follow-up to #257. Strings containing ' or \ are now properly escaped (e.g. "it's"'it\'s'), preventing query errors and array-element injection

    Testing

    • 6 new native-params tests — cover Array(UInt32), Array(String), empty arrays, strings with single quotes, strings with backslashes, and injection attempts

    Merged PRs

    Open source →
  4. 1.26.412 11 Apr 2026
    Release notes

    2026-04-12 [Release 1.26.412]

    Bug Fixes

    • Fix bindParams() TypeError with numeric keys (#256) — bindParams() now casts integer array keys to string before passing to bindParam(string $column), restoring backward compatibility with numerically-indexed arrays. Affected downstream packages like phpclickhouse-laravel (@yehezkel-fullpath)

    Testing

    • Flaky tests excluded from default runstestConnectTimeout, testStreamInsert, testStreamInsertFormatJSONEachRow marked @group flaky and excluded via PHPUnit config. Run separately with ./vendor/bin/phpunit --group flaky
    • 2 new binding teststestBindParamsWithNumericKeys, testBindParamsWithMixedKeys covering #256 regression

    Closed Issues

    • #256 — Breaking change: strict string type on Bindings::bindParam() rejects integer keys
    Open source →
  5. 1.26.410 09 Apr 2026
    Release notes

    2026-04-10 [Release 1.26.410]

    New Features

    • readWithParams() (#254) — stream query results with native ClickHouse typed parameters ({name:Type} syntax), combining server-side parameter binding with streaming output (@sander-hash)

    Code Quality

    • Stringable interfaces (#252) — all Type classes now explicitly implement Stringable for consistency (@sander-hash)
    • PHPStan test fixes (#253) — removed redundant assertions in static tests, improved assertion quality (@sander-hash)
    • Documentation sync — updated GitHub Pages (docs/) with readWithParams() in native-params, streaming, and per-query-settings guides

    Merged PRs

    Open source →
  6. 1.26.406 06 Apr 2026
    Release notes

    2026-04-06 [Release 1.26.406]

    WARNING : PHP 8.1+

    New Features

    • Boolean Type (#251) — new ClickHouseDB\Type\Boolean class with fromString(), fromBool(), getValue(), __toString() (@sander-hash)

    Code Quality

    • PHP 8.1+ native type declarations — full migration across all 33 src/ files: property types, parameter types, return types. Interfaces (Degeneration, IStream, Type) unchanged for backward compatibility
    • PR Security Review rules — added supply-chain attack detection checklist to CLAUDE.md (outbound network calls, data exfiltration, obfuscation, credential leakage patterns)
    • Security audit — full code audit of src/, results saved in secure-scan.md. All clean: no backdoors, exfiltration, or obfuscation found

    Testing

    • 153 new static unit tests — run without ClickHouse server:
      • ValueFormatterTest (28) — SQL escaping, types, DateTimeInterface, Expression
      • StrictQuoteLineTest (32) — CSV/TSV/Insert formatting, encodeString
      • SettingsTest (24) — get/set/is, sessions, timeouts, readonly
      • WriteToFileTest (15) — file validation, formats, gzip
      • TypesTest (26+5) — UInt64, DateTime64, MapType, TupleType, Boolean and more
      • BindingsUnitTest (16) — compile_binds, Conditions {if}/{else}
      • CurlerRequestResponseTest (35) — headers, auth, URL, JSON, dump
    • Total: 313+ tests (CH 21.9 + CH 26.3 + static), all passing

    Merged PRs

    Open source →
  7. 1.26.4 04 Apr 2026
    Release notes

    2026-04-04 [Release 1.26.4]

    Many changes see change.log

    Open source →
  8. 1.24.406 06 Apr 2026
    Release notes

    Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]

    Open source →
  9. 1.6.0 15 Jan 2025
    Release notes

    2025-01-14 [Release 1.6.0]

    • Support php 8
    • And some pr & fixes
    Open source →
  10. 1.5.3 18 Jan 2024
    Release notes

    2024-01-18 [Release 1.5.3]

    • Fix release 1.5.2
    • Support php 7
    • Update Statement.php #204
    • fix(#202): Fix converting boolean when inserting into int and fix(#194): Fix unexpected readonly mode with specific string in query #203
    • Update README.md #199
    • remove dev files for --prefer-dist #192
    Open source →
  11. 1.5.2 16 Jan 2024

    Nothing published for this version

  12. 1.5.1 24 May 2023

    Nothing published for this version

  13. 1.5.0 20 Dec 2022

    Nothing published for this version

  14. 1.4.6 22 Jun 2022

    Nothing published for this version

  15. 1.4.5 09 Jun 2022

    Nothing published for this version

  16. 1.4.4 23 Apr 2022

    Nothing published for this version

  17. 1.4.3 20 Apr 2022

    Nothing published for this version

  18. 1.4.2 11 Feb 2022

    Nothing published for this version

  19. 1.4.1 20 Jan 2021

    Nothing published for this version

  20. 1.4.0 19 Jan 2021

    Nothing published for this version

  21. 1.3.10 29 Sep 2020

    Nothing published for this version

  22. 1.3.9 03 Feb 2020

    Nothing published for this version

  23. 1.3.8 17 Jan 2020

    Nothing published for this version

  24. 1.3.7 20 Sep 2019

    Nothing published for this version

  25. 1.3.6 24 Aug 2019

    Nothing published for this version

  26. 1.3.5 28 Apr 2019

    Nothing published for this version

  27. 1.3.4 28 Apr 2019

    Nothing published for this version

  28. 1.3.3 24 Apr 2019

    Nothing published for this version

  29. 1.3.2 18 Mar 2019

    Nothing published for this version

  30. 1.3.1 25 Sep 2018

    Nothing published for this version

  31. 1.2.4 11 Sep 2018

    Nothing published for this version

  32. 1.2.3 30 Aug 2018

    Nothing published for this version

  33. 1.2.2 24 Jul 2018

    Nothing published for this version

  34. 1.2.1 16 Jul 2018

    Nothing published for this version

  35. 1.2.0 06 Jul 2018

    Nothing published for this version

  36. 1.1.2 03 Jul 2018

    Nothing published for this version

  37. 1.1.1 03 Jul 2018

    Nothing published for this version

  38. 1.1.0 02 Jul 2018

    Nothing published for this version

  39. 1.0.1 29 Jun 2018

    Nothing published for this version

  40. 1.0.0 25 Jun 2018

    Nothing published for this version

  41. 0.17.12 22 Dec 2017

    Nothing published for this version

  42. 0.17.11 22 Nov 2017

    Nothing published for this version

  43. 0.16.10 25 Oct 2016
    Release notes
    • fix timeout error and add test
    Open source →
  44. 0.2.0 11 Aug 2016
    Release notes
    • exception on error write
    Open source →
  45. 0.1.0 06 Aug 2016
    Release notes
    • init
    Open source →
  46. 0.18.06.19 19 Jun 2018

    Nothing published for this version

  47. 0.18.06.18 17 Jun 2018

    Nothing published for this version

  48. 0.18.06.17 17 Jun 2018

    Nothing published for this version

  49. 0.18.05.09 10 May 2018

    Nothing published for this version

  50. 0.17.12.1 28 Dec 2017

    Nothing published for this version

  51. 0.17.02 20 Feb 2017

    Nothing published for this version

  52. 0.16.09 19 Sep 2016
    Release notes
    • Version/Release names: [ zero dot year dot month]
    • Support cluster: new class Cluster and ClusterQuery
    • output_format_write_statistics, for clickhouse version > v1.1.54019-stable
    • WriteToFile in select,selectAsync
    • Degeneration for Bindings & Conditions
    • $db->select(new Query("Select..."));
    • remove findActiveHostAndCheckCluster , clusterHosts , checkServerReplicas
    • Add cleanQueryDegeneration(),addQueryDegeneration()
    • Need $db->enableQueryConditions(); for use Conditions ; default Conditions - disabled;
    • float in CurlerRequest->timeOut(2.5) = 2500 ms
    • tablesSize() - add sizebytes
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive