Skip to content

Conversation

@ginkelsoft-development
Copy link
Owner

No description provided.

This update expands the package’s compatibility to cover Laravel versions 8 through 12,
ensuring smooth integration across both legacy and modern Laravel applications.

Changes include:
- Updated composer.json to support illuminate/* ^8.0–^12.0.
- Broadened PHP compatibility to ^7.4 || ^8.0–^8.3.
- Adjusted dev dependencies (Orchestra Testbench, PHPUnit) for version range alignment.
- Ensured backward-compatible conventions for older Laravel versions.

This change guarantees that the Encrypted Search Index package can be safely
installed in any Laravel environment from 8.x up to 12.x.
@ginkelsoft-development ginkelsoft-development merged commit ac97e09 into main Oct 9, 2025
10 checks passed
ginkelsoft-development added a commit that referenced this pull request Oct 13, 2025
This feature enables efficient searching across multiple fields in a
single database query, significantly improving performance for complex
search scenarios.

New Scopes Added:
1. encryptedSearchAny() - OR logic across multiple fields
   - Searches same term in multiple fields
   - Returns models where ANY field matches
   - Example: Client::encryptedSearchAny(['first_names', 'last_names'], 'John', 'exact')

2. encryptedSearchAll() - AND logic with field-specific terms
   - Searches different terms in different fields
   - Returns models where ALL fields match their respective terms
   - Example: Client::encryptedSearchAll(['first_names' => 'John', 'last_names' => 'Doe'], 'exact')

Benefits:
- Single database query instead of multiple individual queries
- Reduced database round-trips
- Lower memory footprint
- Better performance at scale
- Supports both exact and prefix search types
- Works with both database and Elasticsearch backends

Test Coverage:
- Added 13 comprehensive tests (BatchQueryTest.php)
- Tests cover OR/AND logic, edge cases, empty inputs
- Performance comparison test validates optimization
- Tests confirm minimum prefix length compliance
- All 89 tests passing (161 assertions)

This addresses performance optimization requirement #1:
batch queries for multiple fields in complex search scenarios.
ginkelsoft-development added a commit that referenced this pull request Oct 14, 2025
This feature enables efficient searching across multiple fields in a
single database query, significantly improving performance for complex
search scenarios.

New Scopes Added:
1. encryptedSearchAny() - OR logic across multiple fields
   - Searches same term in multiple fields
   - Returns models where ANY field matches
   - Example: Client::encryptedSearchAny(['first_names', 'last_names'], 'John', 'exact')

2. encryptedSearchAll() - AND logic with field-specific terms
   - Searches different terms in different fields
   - Returns models where ALL fields match their respective terms
   - Example: Client::encryptedSearchAll(['first_names' => 'John', 'last_names' => 'Doe'], 'exact')

Benefits:
- Single database query instead of multiple individual queries
- Reduced database round-trips
- Lower memory footprint
- Better performance at scale
- Supports both exact and prefix search types
- Works with both database and Elasticsearch backends

Test Coverage:
- Added 13 comprehensive tests (BatchQueryTest.php)
- Tests cover OR/AND logic, edge cases, empty inputs
- Performance comparison test validates optimization
- Tests confirm minimum prefix length compliance
- All 89 tests passing (161 assertions)

This addresses performance optimization requirement #1:
batch queries for multiple fields in complex search scenarios.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants