PHPackages                             rulerz-php/solarium - 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. [API Development](/categories/api)
4. /
5. rulerz-php/solarium

ActiveLibrary[API Development](/categories/api)

rulerz-php/solarium
===================

Solarium compilation target for RulerZ

11PHPCI failing

Since Jan 3Pushed 6y ago1 watchersCompare

[ Source](https://github.com/rulerz-php/solarium)[ Packagist](https://packagist.org/packages/rulerz-php/solarium)[ RSS](/packages/rulerz-php-solarium/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Solarium compilation target for RulerZ [![Build Status](https://camo.githubusercontent.com/3ea9f68456773e1d4daff60af2d96a308a51610a3783fd98c625b4f5ca8f9fea/68747470733a2f2f7472617669732d63692e6f72672f72756c65727a2d7068702f736f6c617269756d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/rulerz-php/solarium)
===============================================================================================================================================================================================================================================================================================================================

[](#solarium-compilation-target-for-rulerz-)

Solarium compilation target for [RulerZ](https://github.com/K-Phoen/rulerz).

Usage
-----

[](#usage)

[solarium/solarium](https://github.com/solariumphp/solarium) is one of the targets supported by RulerZ. It allows the engine to query an Solr server.

This cookbook will show you how to retrieve objects using solarium/solarium and RulerZ.

Here is a summary of what you will have to do:

- [configure solarium](#configure-solarium);
- [configure RulerZ](#configure-rulerz);
- [filter your target](#filter-your-target).

Configure solarium
------------------

[](#configure-solarium)

This subject won't be directly treated here. You can either follow the [official documentation](https://solarium.readthedocs.io/en/stable/)or use a bundle/module/whatever the framework you're using promotes.

Configure RulerZ
----------------

[](#configure-rulerz)

Once solarium/solarium is installed and configured we can the RulerZ engine:

```
$rulerz = new RulerZ(
    $compiler, [
        new \RulerZ\Solarium\Target\Solarium(), // this line is Solarium-specific
        // other compilation targets...
    ]
);
```

The only Solarium-related configuration is the `Solarium` target being added to the list of the known compilation targets.

Filter your target
------------------

[](#filter-your-target)

Now that both solarium/solarium and RulerZ are ready, you can use them to retrieve data.

The `Solarium` instance that we previously injected into the RulerZ engine only knows how to use `Solarium\Client` objects, so the first step is to create one:

```
$config = [
    'endpoint' => [
        'localhost' => [
            'host' => '127.0.0.1',
            'port' => 8983,
            'path' => '/solr/',
        ]
    ]
];
$client = new \Solarium\Client($config);
```

And as usual, we call RulerZ with our target (the `\Solarium\Client` object) and our rule. RulerZ will build the right executor for the given target and use it to filter the data, or in our case to retrieve data from Solr.

```
$rule  = 'gender = :gender and points > :points';
$parameters = [
    'points' => 30,
    'gender' => 'M',
];

var_dump(
    iterator_to_array($rulerz->filter($client, $rule, $parameters))
);
```

License
-------

[](#license)

This library is under the [MIT](LICENSE) license.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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://avatars.githubusercontent.com/u/66958?v=4)[Kévin Gomez](/maintainers/K-Phoen)[@K-Phoen](https://github.com/K-Phoen)

---

Top Contributors

[![K-Phoen](https://avatars.githubusercontent.com/u/66958?v=4)](https://github.com/K-Phoen "K-Phoen (10 commits)")

### Embed Badge

![Health badge](/badges/rulerz-php-solarium/health.svg)

```
[![Health](https://phpackages.com/badges/rulerz-php-solarium/health.svg)](https://phpackages.com/packages/rulerz-php-solarium)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k12](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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