Skip to content

Releases: devaction-labs/filterable-package

v2.0.2

26 Jan 00:31
409943a

Choose a tag to compare

What's Changed

Full Changelog: v2.0.1...v2.0.2

v2.0.1

24 Jan 23:01
a0290b2

Choose a tag to compare

What's Changed

Full Changelog: v2.0.0...v2.0.1

Release v2.0.0 - Full-Text Search & PHP 8.3+ Migration

24 Jan 21:30
7125f37

Choose a tag to compare

🚀 Major Features

Full-Text Search Filter

Added intelligent full-text search capabilities with automatic database adapter:

  • PostgreSQL: Native full-text search using to_tsvector(), to_tsquery(), and GIN indexes (10-100x faster!)
  • MySQL/SQLite: Automatic fallback to LIKE operator across multiple columns
  • Language Support: Configurable stemming for Portuguese, English, Spanish, French, and more
  • Prefix Matching: Control whether partial words match
  • High-Performance: Support for pre-computed search_vector columns with GIN indexes

Usage Example:

// Search across multiple columns                                                                                                                           
Filter::fullText(['name', 'description', 'tags'], 'search')                                                                                                 
    ->setFullTextLanguage('portuguese')                                                                                                                     
                                                                                                                                                            
// High-performance with GIN index (PostgreSQL)                                                                                                             
Filter::fullText('search_vector', 'q')                                                                                                                      
    ->setDatabaseDriver('pgsql')                                                                                                                            
                                                                                                                                                            
Performance:                                                                                                                                                
- Regular columns: ~500ms on 1M rows                                                                                                                        
- search_vector with GIN index: ~5ms on 1M rows (100x faster!)                                                                                              
                                                                                                                                                            
Configuration via Environment:                                                                                                                              
# .env                                                                                                                                                      
FULLTEXT_LANGUAGE=portuguese                                                                                                                                
                                                                                                                                                            
// config/app.php                                                                                                                                           
'fulltext_language' => env('FULLTEXT_LANGUAGE', 'simple'),                                                                                                  
                                                                                                                                                            
// Now use without specifying language                                                                                                                      
Filter::fullText(['title', 'content'], 'search')                                                                                                            
                                                                                                                                                            
⚠️ Breaking Changes                                                                                                                                         
                                                                                                                                                            
PHP Version Requirement                                                                                                                                     
                                                                                                                                                            
PHP 8.2 has been discontinued. This package now requires PHP 8.3, 8.4, or 8.5.                                                                              
                                                                                                                                                            
Migration:                                                                                                                                                  
# Update your PHP version                                                                                                                                   
sudo apt install php8.3  # Linux                                                                                                                            
brew install php@8.3     # macOS                                                                                                                            
                                                                                                                                                            
# Update composer.json                                                                                                                                      
"require": {                                                                                                                                                
    "php": "^8.3"                                                                                                                                           
}                                                                                                                                                           
                                                                                                                                                            
# Update dependencies                                                                                                                                       
composer update                                                                                                                                             
                                                                                                                                                            
Why?                                                                                                                                                        
- Better performance with PHP 8.3+ optimizations                                                                                                            
- Access to new language features (typed class constants, readonly amendments)                                                                              
- Security improvements and active support                                                                                                                  
- Better type system for improved code quality                                                                                                              
                                                                                                                                                            
📦 What's Changed                                                                                                                                           
                                                                               ...
Read more

v1.1.4

01 Oct 01:22
126a12f

Choose a tag to compare

What's Changed

Full Changelog: v1.1.3...v1.1.4

Add CursorPaginate

01 Oct 01:02
3d7ecc1

Choose a tag to compare

What's Changed

Added

  • Cursor Pagination Support: Added support for cursor-based pagination for improved performance on large datasets
    • customPaginate() now accepts three pagination types: 'paginate', 'simple', and 'cursor'
    • Cursor pagination ideal for infinite scroll implementations
    • Simple pagination option for better performance when total count is not needed

Changed

  • BREAKING: customPaginate() method signature updated from customPaginate(bool $useSimplePaginate, ?array $data) to customPaginate(string $type = 'paginate', ?int $perPage = null, ?array $data = null)
    • Migration: Change ->customPaginate(false, $data) to ->customPaginate('paginate', null, $data)
    • Migration: Change ->customPaginate(true, $data) to ->customPaginate('simple', null, $data)
  • Code refactoring: Removed all else statements in favor of early returns and guard clauses for improved readability
  • Improved README documentation with comprehensive pagination examples

Fixed

  • Optimized collectConditions() method by removing unnecessary size estimation loop

Full Changelog: v1.1.1...v1.1.3

🚀 [v1.1.1] - Caching Support and Performance Improvements

30 Sep 23:53
05ce697

Choose a tag to compare

What's Changed

Full Changelog: v1.0.24...v1.1.1

v1.1.0

15 Sep 00:17
117271b

Choose a tag to compare

Added

  • New Filter Types: Added 7 new commonly used filter types
    • ilike() - Case-insensitive LIKE with database-specific handling (PostgreSQL ILIKE, SQLite LIKE, MySQL LOWER())
    • notEquals() - NOT EQUALS (!=) filter for excluding specific values
    • notIn() - NOT IN filter for excluding multiple values from a list
    • notLike() - NOT LIKE filter for excluding text patterns
    • isNull() - IS NULL filter for checking null values
    • isNotNull() - IS NOT NULL filter for checking non-null values
    • startsWith() - STARTS WITH filter using LIKE with % suffix
    • endsWith() - ENDS WITH filter using LIKE with % prefix

Enhanced

  • Database Compatibility: Improved database-specific handling for different SQL dialects
    • PostgreSQL: Uses native ILIKE for case-insensitive searches
    • SQLite: Falls back to LIKE for case-insensitive searches
    • MySQL: Uses LOWER() function for case-insensitive comparisons
  • Filter Value Processing: Enhanced prepareValue() method to handle new filter types
    • Automatic pattern generation for STARTS_WITH and ENDS_WITH
    • Support for comma-separated values in NOT_IN filters
    • Pattern application for NOT_LIKE filters

Testing

  • Comprehensive Test Coverage: Added complete test suite for all new filter types
    • Unit tests for each new filter type
    • Database driver detection tests
    • Operator validation tests
    • Integration tests with Filterable trait

Performance

  • Optimized Query Building: Enhanced applyFilterToBuilder() method
    • Direct method calls for null checks (whereNull/whereNotNull)
    • Efficient handling of negation filters (whereNotIn)
    • Streamlined LIKE pattern processing

Release v1.0.24

15 Sep 00:17
117271b

Choose a tag to compare

Release v1.0.24

Please refer to the CHANGELOG.md for details.

Release v1.0.23

04 Apr 19:07
9841a74

Choose a tag to compare

Release v1.0.23

Please refer to the CHANGELOG.md for details.

Release v1.0.22

04 Apr 18:25
27f4748

Choose a tag to compare

Release v1.0.22

Please refer to the CHANGELOG.md for details.