@@ -22,13 +22,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2222 - ` Db::jsonGet() ` , ` Db::jsonLength() ` , ` Db::jsonKeys() ` , ` Db::jsonType() `
2323 - Unified API across MySQL, PostgreSQL, and SQLite
2424 - Edge-case testing for JSON operations
25- - ** Comprehensive examples directory** (` examples/ ` ) with 18 runnable examples:
25+ - ** Comprehensive examples directory** (` examples/ ` ) with 21 runnable examples:
2626 - Basic operations (connection, CRUD, WHERE conditions)
2727 - Intermediate patterns (JOINs, aggregations, pagination, transactions)
2828 - Advanced features (connection pooling, bulk operations, UPSERT)
2929 - JSON operations (complete guide with real-world usage)
3030 - Helper functions (string, math, date/time, NULL handling)
31- - Real-world applications (blog system with posts, comments, tags)
31+ - Real-world applications:
32+ - Blog system with posts, comments, tags, analytics
33+ - User authentication with sessions, RBAC, password hashing
34+ - Advanced search & filters with facets, sorting, pagination
35+ - Multi-tenant SaaS with resource tracking and quota management
3236- ** Dialect coverage tests** for better test coverage (300 total tests):
3337 - ` buildLoadCsvSql() ` - CSV loading SQL generation with temp file handling
3438 - ` buildLoadXML() ` - XML loading SQL generation with temp file handling
@@ -55,6 +59,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5559- ** Improved error messages** : Property hooks now provide clearer guidance for uninitialized connections
5660- ** Updated .gitignore** : Cleaned up and added examples-related ignores, coverage reports
5761- ** README.md improvements** : Removed ` ALL_TESTS=1 ` requirement - tests now run without environment variables
62+ - ** Enhanced examples** (14 files updated): Maximized use of ` Db:: ` helpers over ` Db::raw() ` for better code clarity:
63+ - Replaced 30+ raw SQL expressions with helper functions
64+ - ` Db::inc() ` /` Db::dec() ` for increments/decrements
65+ - ` Db::count() ` , ` Db::sum() ` , ` Db::avg() ` , ` Db::coalesce() ` for aggregations
66+ - ` Db::case() ` for conditional logic
67+ - ` Db::concat() ` with automatic string literal quoting
68+ - ** Improved test organization** : Added ` setUp() ` method in ` SharedCoverageTest ` for automatic table cleanup before each test
69+ - Removed 26+ redundant cleanup statements
70+ - Better test isolation and reliability
5871
5972### Removed
6073- ** Deprecated helper methods from PdoDb** (~ 130 lines removed):
@@ -69,6 +82,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6982 - ` buildInsertMultiSql() ` now correctly uses first column when ` id ` not present (matches ` insert() ` behavior)
7083 - Enables proper bulk UPSERT operations across all dialects
7184 - Without this fix, bulk inserts with ` onDuplicate ` parameter would fail on PostgreSQL/SQLite
85+ - ** CRITICAL: Db::concat() helper bugs** (2 major issues fixed):
86+ - ** Bug #1 ** : ` ConcatValue ` not initializing parent ` RawValue ` class causing "Typed property not initialized" error
87+ - Added ` parent::__construct('') ` call in ` ConcatValue ` constructor
88+ - Added protective ` getValue() ` override with clear error message to prevent misuse
89+ - ** Bug #2 ** : String literals (spaces, special chars) not auto-quoted, treated as column names
90+ - Enhanced ` DialectAbstract::concat() ` logic to auto-detect and quote string literals
91+ - Supports spaces, colons, pipes, dashes, emoji, and unicode characters
92+ - Examples: ` Db::concat('first_name', ' ', 'last_name') ` now works without ` Db::raw() `
93+ - Added 8 comprehensive edge-case tests in ` SharedCoverageTest ` :
94+ - ` testConcatWithStringLiterals() ` - spaces and simple literals
95+ - ` testConcatWithSpecialCharacters() ` - colon, pipe, dash
96+ - ` testConcatWithNestedHelpers() ` - ` Db::upper/lower ` inside concat
97+ - ` testConcatNestedInHelperThrowsException() ` - protection from incorrect usage
98+ - ` testConcatWithQuotedLiterals() ` - already-quoted strings
99+ - ` testConcatWithNumericValues() ` - number handling
100+ - ` testConcatWithEmptyString() ` - empty string edge case
101+ - ` testConcatWithMixedTypes() ` - mixed type concatenation
72102- Restored ` RawValue ` union type support in ` rawQuery() ` , ` rawQueryOne() ` , ` rawQueryValue() ` methods
73103- Corrected method calls in ` lock() ` , ` unlock() ` , ` loadData() ` , ` loadXml() ` to use ` prepare()->execute() ` pattern
74104- SQLite JSON support fixes for edge cases (array indexing, value encoding, numeric sorting)
@@ -78,8 +108,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
78108- ** PostgreSQL formatSelectOptions test** : Fixed to test actual supported features (FOR UPDATE/FOR SHARE)
79109
80110### Technical Details
81- - ** All tests passing** : 317 tests, 1464 assertions across MySQL, PostgreSQL, and SQLite (3 skipped for live testing)
82- - ** Test coverage** : 83%+ with comprehensive dialect-specific and edge-case testing
111+ - ** All tests passing** : 334 tests, 1499 assertions across MySQL, PostgreSQL, and SQLite (3 skipped for live testing)
112+ - ** 68 tests** in SharedCoverageTest (dialect-independent code)
113+ - ** 8 new edge-case tests** for ` Db::concat() ` bug fixes
114+ - Added ` setUp() ` method for automatic table cleanup before each test
115+ - ** Test coverage** : 90%+ with comprehensive dialect-specific and edge-case testing
83116- ** Full backward compatibility maintained** : Zero breaking changes (deprecated methods removal is non-breaking)
84117- Examples tested and verified on PHP 8.4.13
85118- ** Performance** : Optimized QueryBuilder reduces code duplication and improves maintainability
0 commit comments