Skip to content

Commit ff86d7c

Browse files
committed
chore: prepare release 2.9.1
1 parent 6991766 commit ff86d7c

File tree

1 file changed

+55
-3
lines changed

1 file changed

+55
-3
lines changed

CHANGELOG.md

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,57 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99

1010

11+
## [2.9.1] - 2025-11-04
12+
13+
### Added
14+
- **Enhanced Error Diagnostics** - Query context and debug information in exceptions:
15+
- **QueryDebugger class** - Helper class for parameter sanitization and context formatting
16+
- **QueryException enhancements** - `QueryException` now includes `queryContext` property with detailed query builder state
17+
- **getDebugInfo() methods** - Added to `QueryBuilder` and all component builders (`ConditionBuilder`, `JoinBuilder`, `SelectQueryBuilder`, `DmlQueryBuilder`)
18+
- **Automatic context capture** - Query context automatically captured and included in exceptions when errors occur
19+
- **Parameter sanitization** - Sensitive parameters (passwords, tokens, API keys) automatically masked in error messages
20+
- **Comprehensive documentation** - New `error-diagnostics.md` documentation page with examples
21+
- **Example** - `02-error-diagnostics.php` demonstrating new error diagnostics features
22+
- Implements roadmap item 1.1: Enhanced Error Diagnostics
23+
24+
- **ActiveRecord Relationship Enhancements**:
25+
- **Many-to-many relationships** - `viaTable()` and `via()` methods for junction table relationships
26+
- **Yii2-like syntax** - Support for Yii2-style relationship definitions for easier migration
27+
- Enhanced relationship documentation and examples
28+
29+
- **QueryBuilder Convenience Methods**:
30+
- **first()** - Get first row from query result
31+
- **last()** - Get last row from query result
32+
- **index()** - Index query results by a specific column
33+
- Improved developer experience with commonly used query patterns
34+
35+
- **CLI Migration Tool** - Yii2-style migration command-line tool:
36+
- Create, run, and rollback migrations via command line
37+
- Yii2-compatible migration workflow
38+
- Enhanced migration management capabilities
39+
40+
- **Documentation Improvements**:
41+
- **MariaDB configuration examples** - Added MariaDB configuration section to Getting Started documentation
42+
- **MariaDB connection examples** - Added MariaDB connection example to first-connection.md
43+
- Complete MariaDB setup guide for new users
44+
45+
### Changed
46+
- **Fulltext search helper** - Renamed `Db::fulltextMatch()` to `Db::match()` for clarity and consistency
47+
- **Composer script namespacing** - All composer scripts now use `pdodb:` prefix for better organization
48+
- **PdoDb scope methods** - Renamed for better readability and consistency
49+
50+
### Fixed
51+
- **LoadBalancerTests** - Fixed fatal error by implementing missing `setTempQueryContext()` method in test stub
52+
- **PHPStan type errors** - Fixed all type-related static analysis issues
53+
- **PHP-CS-Fixer issues** - Resolved all code style issues
54+
55+
### Technical Details
56+
- **All tests passing**: Comprehensive test coverage with improved ActiveQuery, EagerLoader, and CacheManager tests
57+
- **PHPStan Level 8**: Zero errors across entire codebase
58+
- **PHP-CS-Fixer**: All code complies with PSR-12 standards
59+
- **Full backward compatibility**: 100% maintained - all existing code continues to work
60+
- **Code quality**: Follows KISS, SOLID, DRY, YAGNI principles
61+
1162
## [2.9.0] - 2025-11-01
1263

1364
### Added
@@ -615,14 +666,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
615666
- **Exception handling system**: `loadCsv()` and `loadXml()` now throw specialized exceptions instead of returning `false`
616667
- **Impact**: Code that checks `if (!$ok)` for these methods will need to be updated to use try-catch blocks
617668
- **Migration**: Wrap calls in try-catch blocks and handle `DatabaseException` types
618-
- **Example**:
669+
- **Example**:
619670
```php
620671
// Before (2.5.x)
621672
$ok = $db->find()->table('users')->loadCsv($file);
622673
if (!$ok) {
623674
// handle error
624675
}
625-
676+
626677
// After (2.6.0)
627678
try {
628679
$db->find()->table('users')->loadCsv($file);
@@ -1059,7 +1110,8 @@ Initial tagged release with basic PDO database abstraction functionality.
10591110

10601111
---
10611112

1062-
[Unreleased]: https://github.com/tommyknocker/pdo-database-class/compare/v2.9.0...HEAD
1113+
[Unreleased]: https://github.com/tommyknocker/pdo-database-class/compare/v2.9.1...HEAD
1114+
[2.9.1]: https://github.com/tommyknocker/pdo-database-class/compare/v2.9.0...v2.9.1
10631115
[2.9.0]: https://github.com/tommyknocker/pdo-database-class/compare/v2.8.0...v2.9.0
10641116
[2.8.0]: https://github.com/tommyknocker/pdo-database-class/compare/v2.7.1...v2.8.0
10651117
[2.7.1]: https://github.com/tommyknocker/pdo-database-class/compare/v2.7.0...v2.7.1

0 commit comments

Comments
 (0)