PHPackages                             phpextra/silex-algolia-provider - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. phpextra/silex-algolia-provider

AbandonedArchivedLibrary

phpextra/silex-algolia-provider
===============================

Algolia Silex service provider

24551PHP

Since Jan 5Pushed 10y ago1 watchersCompare

[ Source](https://github.com/phpextra/silex-algolia-provider)[ Packagist](https://packagist.org/packages/phpextra/silex-algolia-provider)[ RSS](/packages/phpextra-silex-algolia-provider/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

\#Silex Service Provider for Algolia Search
-------------------------------------------

[](#silex-service-provider-for-algolia-search)

This library integrates official [Algolia client](https://github.com/algolia/algoliasearch-client-php) into [Silex](http://silex.sensiolabs.org/).
[Algolia](https://www.algolia.com/) is a hosted Search API.

1. [Installation](#installation)
2. [Usage](#usage)
    1. [Service registration](#service-registration)
    2. [Using provided trait](#using-provided-trait)
3. [Useful links](#useful-links)
4. [Author](#author)

\##Installation

Installation is done using [Composer](https://getcomposer.org/):

```
composer require phpextra/silex-algolia-provider

```

You can test the library using `phpunit` by running the following command (assuming that you have `phpunit` command available):

```
phpunit ./tests

```

\##Usage

\###Service registration:

```
$app = new Application();
$app->register(new AlgoliaSearchServiceProvider());

$app['algolia.application_id'] = 'dummy';
$app['algolia.api_key'] = 'dummy';
$app['algolia.index.name'] = 'dummy';

/* ... */

$app->get(function(Request $request) use ($app){
    return new JsonResponse($app['algolia.index']->search($request->get('q')));
});
```

\###Using provided trait:

```
class MyApplication extends Application
{
    use AlgoliaSearchTrait;

    public function __construct()
    {
        $this->register(new AlgoliaSearchServiceProvider());
        parent::__construct();
    }
}

$app = new MyApplication();

/* ... */

$app->algolia(); // gives you access to Algolia Client instance
$app->search('query'); // performs search
```

\##Useful links

- [Algolia **REST API** documentation](https://www.algolia.com/doc/rest)
- [Algolia PHP Client documentation &amp; integration instructions](https://www.algolia.com/doc/php)
- [Algolia on GitHub](https://github.com/algolia/algoliasearch-client-php)

\##Author

- Jacek Kobus

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/85f3695da9474a49d00d00449442d8f8bcbc21abfcae1c9d51a2762d0cad87f7?d=identicon)[jkobus](/maintainers/jkobus)

### Embed Badge

![Health badge](/badges/phpextra-silex-algolia-provider/health.svg)

```
[![Health](https://phpackages.com/badges/phpextra-silex-algolia-provider/health.svg)](https://phpackages.com/packages/phpextra-silex-algolia-provider)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
