- Remove search engine-agnostic feature
- Merge
AlgoliaEngine
andIndexManager
classes intoSearchService
class - Updated signatures for the
SearchClient
class to reflect changes between versions 1 and 2 of the Algolia PHP API client
algolia/search-bundle
dependency from ^3.4
to 4.0.0
in your composer.json
file and run:
Improved developer experience with the Algolia PHP client version 2
With the version upgrade, you can benefit from these new capabilities of the PHP API client:- Copy a whole index
- Copy all rules from an index
- Replace all data in an index
- Generate secured API keys
PHP
IndexManager
renamed to SearchService
IndexManager
has been renamed to SearchService
.
This is the only service you need to interact with Algolia.
PHP
Renamed methods
The following methods are renamed in version 4:getSearchableEntities()
PHP
getFullIndexName()
PHP
Method signature changes
The following methods have their signatures changed in version 4:index()
PHP
remove()
PHP
clear()
PHP
delete()
PHP
search()
PHP
rawSearch()
PHP
count()
PHP
Waitable operations
Methods from theSearchService
are now waitable.
You can use the wait()
method to wait for your task to be completely handled by the engine before moving on, instead of handling this logic yourself.
Examples:
PHP
AbstractResponse
. Please update your code accordingly.
Add any options to your operations
The methods follow these rules:- Required parameters have their own argument
- Optional arguments are passed in an array or as
RequestOptions
object as the last argument - The client never sets any default values
$requestOptions
parameter, available in all SearchService
methods. For example, you can add filters, choose which facets to retrieve, change the number of hits per page, or pass new headers.
For example:
PHP
PHP
Changes in fully qualified namespaces
Algolia\SearchBundle\Engine\AlgoliaEngine
Removed in version 4.
Algolia\SearchBundle\IndexManager
PHP
Algolia\SearchBundle\IndexManagerInterface
PHP
Algolia\SearchBundle\Engine\NullEngine
PHP
Algolia\SearchBundle\SearchService
by mocking or extending it,
and override the search.service
in your test configuration.
For more information, see:
Classes made internal
These classes are internal in version 4:Algolia\SearchBundle\Command\SearchClearCommand
Algolia\SearchBundle\Command\SearchImportCommand
Algolia\SearchBundle\Command\SearchSettingsBackupCommand
Algolia\SearchBundle\Command\SearchSettingsCommand
Algolia\SearchBundle\Command\SearchSettingsPushCommand
Algolia\SearchBundle\DependencyInjection\AlgoliaSearchExtension
Algolia\SearchBundle\DependencyInjection\Configuration
Algolia\SearchBundle\EventListener\SearchIndexerSubscriber
Algolia\SearchBundle\SearchableEntity
Algolia\SearchBundle\SettingsManager
Deleted interfaces and final classes you should use instead
Algolia\SearchBundle\Settings\SettingsManagerInterface
PHP
Algolia\SearchBundle\Engine\EngineInterface
Deleted without replacement.
Renamed public services names
search.index_manager
PHP
algolia_client
PHP