|
| 1 | +# Changelog |
| 2 | + |
| 3 | +All notable changes to this project will be documented in this file. |
| 4 | + |
| 5 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
| 6 | +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 7 | + |
| 8 | +## [Unreleased] |
| 9 | + |
| 10 | +### Added |
| 11 | + |
| 12 | +### Changed |
| 13 | + |
| 14 | +### Fixed |
| 15 | + |
| 16 | +### Documentation |
| 17 | + |
| 18 | +## [1.3.0] - 2025-06-06 |
| 19 | + |
| 20 | +### Added |
| 21 | +- Source tracking functionality for audit logs |
| 22 | + - Added `source` column to audit tables to track origin of changes |
| 23 | + - Automatic detection of console commands, HTTP routes, and background jobs |
| 24 | + - Enhanced debugging and compliance capabilities |
| 25 | +- New query scopes for source filtering: |
| 26 | + - `forSource(string $source)` - Filter by exact source match |
| 27 | + - `fromConsole()` - Filter for logs from console commands |
| 28 | + - `fromHttp()` - Filter for logs from HTTP requests |
| 29 | + - `fromCommand(string $command)` - Filter by specific console command |
| 30 | + - `fromController(?string $controller = null)` - Filter by controller |
| 31 | +- Enhanced query scopes for better audit log filtering |
| 32 | +- Improved code quality and static analysis |
| 33 | + |
| 34 | +### Changed |
| 35 | +- **BREAKING**: Replaced event-driven architecture with direct logging for better performance |
| 36 | + - Removed `ModelAudited` event dispatching |
| 37 | + - AuditBuilder now uses direct service calls instead of events |
| 38 | + - Improved performance by eliminating event dispatch overhead |
| 39 | +- Enhanced `getSource()` method to properly detect console commands from `$_SERVER['argv']` |
| 40 | +- Updated `EloquentAuditLog` model to include `source` in fillable attributes |
| 41 | +- Improved test coverage and architecture |
| 42 | +- Updated code structure and organization |
| 43 | +- Enhanced documentation with better examples |
| 44 | + |
| 45 | +### Fixed |
| 46 | +- Fixed event function calls with incorrect named parameters |
| 47 | +- Resolved database schema issues in test environment |
| 48 | +- Fixed PHP deprecation warnings for nullable parameters |
| 49 | +- Enhanced source detection for various application contexts |
| 50 | +- Fixed code style issues |
| 51 | +- Improved SQL query optimization |
| 52 | +- Resolved various minor bugs and inconsistencies |
| 53 | + |
| 54 | +### Documentation |
| 55 | +- Completely updated README.md to reflect new architecture |
| 56 | +- Removed outdated event-driven examples |
| 57 | +- Added comprehensive source tracking documentation |
| 58 | +- Enhanced query examples with new scopes |
| 59 | +- Added database schema documentation |
| 60 | +- Improved troubleshooting section with source-related guidance |
| 61 | + |
| 62 | +## [1.2.1] - 2025-05-30 |
| 63 | + |
| 64 | +### Added |
| 65 | +- Custom event support for manual audit logging |
| 66 | +- Enhanced fluent API for custom audit actions |
| 67 | + |
| 68 | +### Changed |
| 69 | +- Improved event handling mechanism |
| 70 | + |
| 71 | +## [1.2.0] - 2025-05-30 |
| 72 | + |
| 73 | +### Changed |
| 74 | +- **BREAKING**: Major structural changes to improve architecture |
| 75 | + - Moved `AuditLog` from Models to DTOs namespace |
| 76 | + - Redesigned `MySQLDriver` with simplified implementation |
| 77 | + - Refactored `AuditLogger` service for better performance |
| 78 | + - Updated `Auditable` trait with improved functionality |
| 79 | + |
| 80 | +### Added |
| 81 | +- New `EloquentAuditLog` model with comprehensive scopes |
| 82 | +- Enhanced test suite with better coverage: |
| 83 | + - `AuditLogBatchTest` for batch processing |
| 84 | + - `AuditLogIntegrationTest` for integration scenarios |
| 85 | + - `CustomAuditActionTest` for custom actions |
| 86 | + - `AuditLoggerServiceTest` for service testing |
| 87 | + - `AuditableTraitTest` for trait functionality |
| 88 | + - `CauserResolverTest` for user identification |
| 89 | + - `MySQLDriverTest` for driver functionality |
| 90 | +- Improved `User` mock with enhanced audit capabilities |
| 91 | + |
| 92 | +### Removed |
| 93 | +- Legacy test files that were replaced with new architecture |
| 94 | +- Outdated feature tests that didn't align with new structure |
| 95 | + |
| 96 | +### Fixed |
| 97 | +- Improved error handling and validation |
| 98 | +- Enhanced performance with optimized queries |
| 99 | +- Better memory management for large datasets |
| 100 | + |
| 101 | +## [1.1.0] - 2025-05-28 |
| 102 | + |
| 103 | +### Added |
| 104 | +- Laravel 10.x support |
| 105 | +- PHP 8.1 compatibility |
| 106 | +- Enhanced framework support for modern Laravel versions |
| 107 | + |
| 108 | +### Removed |
| 109 | +- Unused Docker configuration files |
| 110 | + |
| 111 | +### Changed |
| 112 | +- Updated composer dependencies for Laravel 10.x |
| 113 | +- Improved compatibility matrix |
| 114 | + |
| 115 | +## [1.0.0] - 2025-05-28 |
| 116 | + |
| 117 | +### Added |
| 118 | +- Initial release of Laravel Audit Logger |
| 119 | +- Entity-specific audit tables for optimized performance |
| 120 | +- Comprehensive change tracking for CRUD operations |
| 121 | +- Customizable field logging with include/exclude options |
| 122 | +- User tracking with automatic causer identification |
| 123 | +- Event-driven architecture for extensible audit logging |
| 124 | +- Batch processing support for high-performance scenarios |
| 125 | +- Type safety with PHP 8.1+ strict typing |
| 126 | +- MySQL driver implementation |
| 127 | +- Automatic migration support for audit tables |
| 128 | +- PSR-12 coding standards compliance |
| 129 | +- Comprehensive test suite |
| 130 | +- Full documentation and README |
| 131 | + |
| 132 | +### Features |
| 133 | +- `Auditable` trait for easy model integration |
| 134 | +- Fluent API for custom audit events |
| 135 | +- Configurable global field exclusions |
| 136 | +- Support for custom metadata |
| 137 | +- Relationship support for audit logs |
| 138 | +- Query scopes for efficient log retrieval |
| 139 | +- Batch operations for performance optimization |
| 140 | + |
| 141 | +[Unreleased]: https://github.com/iamfarhad/laravel-audit-log/compare/1.3.0...HEAD |
| 142 | +[1.3.0]: https://github.com/iamfarhad/laravel-audit-log/compare/1.2.1...1.3.0 |
| 143 | +[1.2.1]: https://github.com/iamfarhad/laravel-audit-log/compare/1.2.0...1.2.1 |
| 144 | +[1.2.0]: https://github.com/iamfarhad/laravel-audit-log/compare/1.1.0...1.2.0 |
| 145 | +[1.1.0]: https://github.com/iamfarhad/laravel-audit-log/compare/1.0.0...1.1.0 |
| 146 | +[1.0.0]: https://github.com/iamfarhad/laravel-audit-log/releases/tag/1.0.0 |
0 commit comments