Breaking Changes
- Minimum PHP raised to 8.1 —
composer.jsonnow requiresphp: ^8.1and the CI matrix drops 8.0. PHP 8.0 users should pin1.26.4(last 8.0-compatible release); the typed>= 1.24.406line already targets 8.1+
New Features
- String, date and enum type wrappers (#269, @sander-hash) —
StringType(PHP reservesString),FixedString(N)with strict byte-length validation,Date,DateTime(with optional non-mutating timezone conversion),Enum8,Enum16. All implement the newStringableTypeinterface: unlike legacyTypeobjects, their values are escaped byValueFormatter, bindings, and native parameters - Full numeric scalar type coverage (#271, @RemcoSmitsDev) —
Int8–Int256,UInt8–UInt256,Float32/Float64,Decimal32–Decimal256via the newScalarNumericTypeinterface (Boolmaps to the existingBooleanclass).fromString()validates input — integers require^-?\d+$, floats/decimals requireis_numeric()— closing an SQL-injection vector for untrusted input, sinceTypevalues are interpolated into SQL unescaped - Structured exceptions enriched (#270, @sander-hash) —
DatabaseException::getServerVersion()andgetServerStackTrace()(populate with per-query['stacktrace' => 1]); reworked error-response parsing inStatement. The server stack trace is kept out ofgetMessage()— it is available only via the dedicated getter
Testing
- IEEE 754 mantissa test suite (
tests/Type/Ieee754MantissaTest.php, 31 cases) — significand limits and overflow collapse forFloat32(2^24),Float64(2^53),BFloat16(2^8, CH 24.11+);0.1 + 0.2 != 0.3vs exactDecimalarithmetic;inf/nan→nullin JSON; scale-0 truncation toward zero;Decimalarriving as an unquoted JSON number on every supported server; thejson_decode()precision trap for >16-digit decimals (exact reads needtoString()) - ClickHouse 26.9 test matrix — third container
clickhouse-26-9(26.9.1.1629, port 8125),phpunit-ch269.xml, CI job PHP 8.1–8.4 × CH 26.9. Suites for 21.9 / 26.3 / 26.9 run separately - Per-query settings integration test for CH 26 (#272, @sander-hash) — verifies per-query
max_execution_timeis visible togetSetting()without touching global settings
Documentation
- IEEE 754 references — Float sections in
README.md,doc/types.md, and the Pages site now link the IEEE 754 standard and the ClickHouse Float reference, with a verified0.1 + 0.2 != 0.3example and the exact-Decimalcounterpart todo.mdtranslated to English (#268, @sander-hash)- Fixed the version-compatibility table in
README.mdand the Pages site (docs/index.md)
CI / Chore
- Scrutinizer integration removed — the GitHub Actions matrix already covers tests, PHPStan, and PHPCS
.gitignorenow covers.DS_Store,.idea/, vim swap files, and local ClickHouse data directories
Merged PRs
- #268 — Translate todo from russian to english (@sander-hash)
- #269 — Add string and date type support (@sander-hash)
- #270 — Added structuredExceptions (@sander-hash)
- #271 — Add more numeric types (@RemcoSmitsDev)
- #272 — Improve per query settings tests (@sander-hash)