algolia/algolia-search-bundle
Note: This minor release contains breaking changes due to the underlying Algolia PHP SDK upgrade from v3 to v4. We chose to include these in a minor rather than a new major because v8.0.0 was released recently to add Symfony 8 support, and we want to keep the bundle's major version aligned with Symfony's.
SearchClient moved from Algolia\AlgoliaSearch\SearchClient to Algolia\AlgoliaSearch\Api\SearchClient$requestOptions no longer auto-detects flat HTTP headers — wrap under ['headers' => [...]]SearchServiceResponse::wait() no longer accepts parametersSearchServiceResponse no longer extends Algolia\AlgoliaSearch\Response\AbstractResponseSee UPGRADE-8.1.md for the full migration guide.
Full Changelog: https://github.com/algolia/search-bundle/compare/8.0.0...8.1.0
Full Changelog: https://github.com/algolia/search-bundle/compare/7.0.0...8.0.0
Full Changelog: https://github.com/algolia/search-bundle/compare/6.0.1...7.0.0
Full Changelog: https://github.com/algolia/search-bundle/compare/6.0.0...6.0.1
Full Changelog: https://github.com/algolia/search-bundle/compare/5.1.2...6.0.0
Fix bug in IndexManager::count to take parameters into account - PR #260
Note that this bug fix is backward compatible but should be clean up when we release a next major version.
📕 This is beta release to install it, make sure your composer.json has the following
"prefer-stable": true,
"minimum-stability": "beta" (or dev or alpha)
📝 Version 2.x is officially not supported BUT all bug fixes related to the PR merged between 2.2 and 2.3 will still be merged.
Add a DataCollector with debug toolbar integration - PR #57
Note: I'll add this feature to the 3.x branch as well, this is great.
Add disable Algolia call feature (part of previous PR)
Fix entity discovery for discriminated entities - PR #133
Allow skipping non Algolia entities in commands - PR #109
Catch exception when indexing which allows you to index entities with soft-deleted relationship - PR #119
Make Algolia Client lazy - PR #251
If you didn't set the ALGOLIA_APP_ID and ALGOLIA_API_KEY env variables
you will only get an error message when the client is used (a method is called),
not when its injected and not used.
Note: This requires that you install ocramius/proxy-manager and
symfony/proxy-manager-bridge packages
Removed connection attribute for Doctrine Event Subscribers - PR #248
Support JMS Serializer - PR #225
If you'd rather use the JMS Serializer instead of the default Symfony serializer,
you can set serializer: jms_serializer in config/packages/algolia_search.yaml.
Note that the @Groups annotation isn't supported.
NullEngine was improved to remove warning - Issue #234
The entire test suite was refactored - PR #236
Lazy load commands - PR #218
Symfony 3.4 introduced an easy way to lazy load all commands. We can avoid instantiating the Algolia Client if it's not necessary. This should fix #199
Do not register Event Subscriber if there are no event to listen to - PR #219
If you don't listen to any doctrine event using doctrineSubscribedEvents: [],
the subscriber will not be registered to avoid instantiation the IndexManager and
the Algolia client.
Introduce batchSize config key (default: 500) - PR #208
This config allow you create smaller or bigger batch calls to Algolia. The same config is used by doctrine in the ImportCommand.
Feature: Index entities conditionally (using a dedicated method) - PR #210
Add new index_if configuration key for indices. This should be the path to a property in the entity which evaluates to true if the item should be indexed and false to bypass indexing or remove existing object from the index.
- indices:
- name: posts
class: App\Entity\Post
index_if: isPublished
Symfony released a new major version today (4.0), along with the new LTS version (3.4). To support these 2 versions, we’re introducing a new major version of our existing Symfony bundle
The main reason we wanted to create a new version was to create a better developer experience. You can now define a simple yaml file to configure which entity get indexed in which index and you’re done.
This new package is compatibly with both 3.4 and 4.0 version (and will be with all future version).
If your app is running on 2.8 or a 3.x, you use our previous version of the bundle on the 2.x branch.
If you already use our bundle in version 2, you can continue to do so. It will be maintained until the 2.8 LTS branch is officially abandoned (November 2018).
The upgrade guide will be published in the repository. The main thing is that you will need to convert your annotations and custom methods into a Normalizer.
You can also expect a new patch release with some bug fixes soon.
NOTE: The GitHub repo was renamed but it’s the same as before.
While rewriting it, I thought it would be great for the community if anyone could use this package with another search engine.
There is a driver for Algolia, that ships with the bundle, but you can write your own: to better match your business case or to use another search engine.
Feel free to create many new drivers and publish them on Packagist. :tada:
Feel free to open issues on GitHub if you want to share something. Any feedback is more that welcome.
IndexingManagerInterface and SearchManagerInterface into IndexManagerInterface [BC Break]Algolia\SearchBundle\IndexManagerInterface to the index manager class so it can be autowired by Symfony. The IndexManager should be inject if necessary since the Sf4 has a lighter container and the search.index_manager service is not availble.See #186 and #184
Read release note here: https://discourse.algolia.com/t/introducing-the-new-algolia-search-bundle-for-symfony/3842
This new version is not backward compatible but migrating should be easy (upgrade guide coming up).
algolia.connection_timeout parameter to override default timeout of the Algolia PHP clientsearchableAttributes instead of attributesToIndexreplicas instead of slavesAdd support for symfony 3
Upgrade php algolia client
NEW: Ability to change the default field for objectID
Fix proxies + getter issues
How can I help you explore Laravel packages today?