Releases: Thavarshan/filterable
Releases · Thavarshan/filterable
v2.1.0
Added
- Publishable configuration defaults (
config/filterable.php) now seed feature toggles, runtime options, and cache TTLs automatically during filter construction. - New lifecycle events (
FilterApplying,FilterApplied,FilterFailed) fire aroundapply()so listeners can plug into telemetry, metrics, or alerts without overriding the base class. - Streaming helpers (
stream(),streamGenerator()) expose LazyCollection and generator pipelines for truly memory-safe traversal. - Rate limiting hooks allow filters to override default attempt counts, windows, and decay values per request.
- Added an end-to-end integration test covering filtering, caching, streaming, and lifecycle signals against the in-memory Testbench harness.
Changed
- Rate limiter keys incorporate the authenticated user identifier (when provided via
forUser()), reducing collisions across shared IPs. - Memory management now streams results under the hood before materialising them during
get()when enabled. - Documentation refreshed to surface lifecycle events, streaming helpers, rate limiting overrides, and configuration presets.
Fixed
- Prevents rate limiter collisions with richer key composition and hookable decay windows.
- Ensures streaming helpers respect the filter lifecycle by requiring
apply()before invocation.
What's Changed
- Bump actions/checkout from 4 to 5 by @dependabot[bot] in #27
- Bump stefanzweifel/git-auto-commit-action from 5 to 7 by @dependabot[bot] in #28
Full Changelog: 2.0.1...2.1.0
v2.0.1
Added
- Focuses on the new tests added to verify the fix and prevent regression
- Emphasizes that this improves the test coverage for edge cases
Changed
- Highlights the improvements to error handling and resilience
- Frames the changes as positive enhancements to the existing code
- Uses professional, descriptive language without being too technical
Fixed
- Clearly identifies the specific issue that was fixed
- References the GitHub issue number for traceability
- Includes the exact error message for users who might be searching for a solution
Full Changelog: 2.0.0...2.0.1
v2.0.0
Added
- Added support for Laravel 12.x
- Added feature flag system for more granular control over filter capabilities
- Added comprehensive test suite with 100+ tests for all traits
- Added
HandlesUserScopetrait for easily filtering by authenticated user - Added
HandlesRateLimitingtrait to prevent abuse via complex queries - Added
ValidatesFilterInputtrait for input validation - Added
MonitorsPerformancetrait for tracking and analyzing filter performance - Added
TransformsFilterValuestrait for transforming input values - Added
SupportsFilterChainingtrait for fluent API method chaining - Added
InteractsWithLoggingtrait for improved debugging and auditing - Added
OptimizesQueriestrait for better query performance - Added
ManagesMemorytrait for handling large datasets efficiently - Added support for custom pre-filters via the
HandlesPreFilterstrait - Added new artisan command (
make:filter) with support for model-specific filters
Changed
- Major architecture overhaul with modular trait-based design
- Improved SmartCaching with better cache key generation
- Updated all Cache interactions to use Carbon instances for TTL values
- Enhanced Filter base class with more robust constructor injection
- Standardized return types across all methods for better type safety
- Updated documentation with comprehensive examples for all features
- Improved error handling with more descriptive exceptions
- Modernized test cases to use latest PHPUnit assertions
- Switched to feature-based activation rather than global static methods
Fixed
- Fixed cache key generation for array values
- Fixed memory leaks when dealing with large datasets
- Fixed issues with query builder method chaining
- Fixed inconsistent behavior with filter application
- Fixed validation errors not being properly propagated
- Fixed user scoping not being applied correctly in some scenarios
- Fixed rate limiting bypass techniques
- Fixed performance monitoring accuracy
- Fixed logging inconsistencies when features are toggled
v1.2.0
Added
- Support for Laravel
^12
v1.1.7
Added
- Introduced the
FilterableServiceProviderto register theMakeFilterCommand. - Added a new
Filterableinterface to define the contract for the Filterable trait. - Added a new
Filterinterface to define the contract for the Filter class.
Changed
- Added type hints for method parameters and return types to improve code clarity and type safety.
- Improved the
Filterabletrait to ensure compatibility with PHP 8.4. - Enhanced the
Filterclass with better type hinting and method documentation. - Updated the
FilterableTestto include the necessary setup for bootstrapping the Laravel application.
Fixed
- Fixed an issue where the
configclass was not available during tests by bootstrapping the Laravel application in the test setup. - Corrected the test case to ensure the
applymethod is called correctly in thefilter_throws_exception_when_filter_application_failstest.
v1.1.6
Changed
- Extend compatibility to PHP 8.3
Fixed
- Laravel 9 compatibility issues
v1.1.5
- Minor dependency updates for security
v1.1.4
Changed
- Minor dependency updates for security
v1.1.3
Changed
- Updated dependencies
v1.1.2
Changed
- Modified the buildCacheKey method to sort and normalise
filterablesbefore generating the cache key. This change reduces the number of unique keys and helps mitigate cache pollution issues. (See PR #18)
Caching has now been changed to be disabled by default. This change provides more control over when caching is used, helping to prevent unnecessary cache pollution.