guikingone / meili-search-bundle
A Symfony bundle that enable MeiliSearch
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 11
Watchers: 2
Forks: 2
Open Issues: 8
Type:symfony-bundle
Requires
- php: >=7.2
- ext-json: *
- meilisearch/meilisearch-php: ^0.15
- psr/log: ^1.1
- symfony/config: ^4.4|^5.0
- symfony/console: ^4.4|^5.0
- symfony/dependency-injection: ^4.4|^5.0
- symfony/filesystem: ^4.4|^5.0
- symfony/finder: ^4.4|^5.0
- symfony/http-kernel: ^4.4|^5.0
- symfony/options-resolver: ^4.4|^5.0
- symfony/property-access: ^4.4|^5.0
- symfony/serializer: ^5.0
Requires (Dev)
- api-platform/core: ^2.5
- doctrine/common: ^2.13
- doctrine/orm: ^2.7
- friendsofphp/php-cs-fixer: ^2.16
- infection/infection: 0.15
- phpstan/phpstan: ^0.12
- phpunit/phpunit: ^8.5
- ramsey/uuid: ^3.8
- rector/rector: ^0.8.40
- symfony/cache: ^4.4|^5.0
- symfony/event-dispatcher: ^4.4|^5.0
- symfony/expression-language: ^4.4|^5.0
- symfony/form: ^4.4|^5.0
- symfony/http-client: ^4.4|^5.0
- symfony/messenger: ^4.4|^5.0
- twig/extensions: >=1.5
- twig/twig: >=2.7
Suggests
- doctrine/common: Allow to use the Document annotation
- doctrine/orm: Allow to listen to entity events and trigger related MeiliSearch actions
- symfony/cache: Allow to use the CachedSearchEntryPoint to improve performances
- symfony/form: Allow to use custom types which brings search features
- symfony/messenger: Allow to dispatch messages and delay some actions (like index|documents creation)
- twig/extensions: Allow to lazy-load the SearchExtension
- twig/twig: Allow to use the search features in Twig templates
This package is auto-updated.
Last update: 2024-10-23 21:52:56 UTC
README
MeiliSearchBundle is an opiniated Symfony bundle which configure and enable MeiliSearch.
The core logic act as a wrapper around the official MeiliSearch PHP SDK.
Main features
- DTO support (thanks to
Symfony/Serializer
) for documents - Mapping via YAML/XML/PHP/Annotation
- Document definition via Annotations or custom providers
Symfony/Messenger
integrationSymfony/HttpClient
supportSymfony/Cache
integration (fallback, search, CRUD)Symfony/ExpressionLanguage
support for building queries- Twig integration
- Custom form type
- Support for PHP 7.2 to 7.4 (8.0 not supported for now)
- Support for
Ramsey/uuid
Installation
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
composer require guikingone/meili-search-bundle
Once installed, time to update the config/bundles.php
:
// config/bundles.php return [ // ... MeiliSearchBundle\MeiliSearchBundle::class => ['all' => true], ];
Once done, just add a config/packages/meili_search.yaml
:
# config/packages/meili_search.yaml meili_search: host: '%env(MEILI_HOST)%' # Default to http://127.0.0.1 api_key: '%env(MEILI_API_KEY)%' # Optional but recommended in development mode
Usage
For a full breakdown of how to use this bundle, please refer to the documentation.
Contributing
For a full breakdown of how to contribute to this bundle, please refer to CONTRIBUTING.md.