algolia/algoliasearch-client-php
Official Algolia Search API client for PHP (8.0+). A thin, low-level HTTP SDK to index, update, and search records, manage indices, and interact with Algolia’s APIs. Install via Composer and start using SearchClient with your App ID and API key.
ModelSaved events).indexName, objectID). Reduces edge-case failures in Laravel’s dynamic search queries (e.g., user-generated filters).destination payload (PR #6320) eliminates silent indexing failures, critical for Laravel apps relying on automated ingestion (e.g., scout:import or custom queue jobs).algolia/scout setups remain unaffected.Validator::sometimes()).feedsOrder, recommendations) remain intact.algolia/algoliasearch-php-api) may see improved reliability.null or empty strings for required fields (e.g., objectID) may now fail explicitly instead of silently corrupting data. Audit Laravel models with nullable fields mapped to Algolia.symfony/http-client). No CVEs introduced; monitor Algolia’s security advisories.feedsOrder misconfiguration, rate limiting) remain. Validate fallback mechanisms for Composition API failures.IngestionClient::sendTasks) that could be affected by the destination payload fix (PR #6320)? Test with a sample payload:
$client->ingestion()->sendTasks([
'tasks' => [
[
'action' => 'addObject',
'index' => 'products',
'objectID' => '123',
'data' => ['name' => 'Test'],
],
],
]);
objectID, indexName)? Example:
// Risky: Empty string for required field
Scout::searchable(function ($model) {
return [
'objectID' => '', // Will now throw ValidationException
'name' => $model->name,
];
});
feedsOrder rollout) or pause pending further stability testing?// app/Jobs/IndexModelWithIngestion.php
public function handle() {
$client->ingestion()->sendTasks([
'tasks' => [
[
'action' => 'addObject',
'index' => $this->model->searchableAs,
'objectID' => $this->model->id,
'data' => $this->model->toSearchableArray(),
],
],
]);
}
// app/Http/Requests/StoreProductRequest.php
public function rules() {
return [
'algolia_object_id' => 'required|string|min:1', // Reject empty strings
];
}
AlgoliaCompositionService).php artisan scout:import and monitor for ValidationException errors.composer.json and run:
composer update algolia/algoliasearch-client-php:^4.43.1
composer why-not algolia/algoliasearch-client-php
algolia/algoliasearch-php-api may need testing for Ingestion API calls.objectID).composer update in a staging environment first.ModelSaved listeners, scout:import).feedsOrder implementation) if no issues arise.^4.43.1 to avoid unexpected Ingestion API changes. Monitor for Algolia’s next minor release.composer why-not to track transitive dependency updates:
composer why-not symfony/http-client
try {
$response = $client->ingestion()->sendTasks($tasks);
Log::debug('Ingestion success', ['response' => $response]);
} catch (Exception $e) {
Log::error('Ingestion failed', ['error' => $e->getMessage(), 'tasks' => $tasks]);
}
ValidationException stack traces will point to the source of empty strings.How can I help you explore Laravel packages today?