PHPackages                             tsterker/solarium-collection-manager - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tsterker/solarium-collection-manager

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tsterker/solarium-collection-manager
====================================

Rudimentary SolrCloud collection management helper

v2.1.0(10mo ago)18.8k↓50%1[4 issues](https://github.com/tsterker/Solarium-Collection-Manager/issues)MITPHPCI passing

Since Sep 6Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/tsterker/Solarium-Collection-Manager)[ Packagist](https://packagist.org/packages/tsterker/solarium-collection-manager)[ RSS](/packages/tsterker-solarium-collection-manager/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (8)Used By (0)

tsterker/solarium-collection-manager
------------------------------------

[](#tsterkersolarium-collection-manager)

Manage Solr collections via [Solarium](https://github.com/solariumphp/solarium).

Usage
=====

[](#usage)

Code shows a basic example on how to instantiate the `CollectionManager` and create a collection.

For more information:

- See the [`CollectionManagerInterface`](src/CollectionManagerInterface.php) for all available management methods.
- See the integration [`TestCase`](tests/Integration/TestCase.php) on how you could use the `CollectionManager` to clear your Solr collections/aliases for test setups.

**Example:**

```
use Solarium\Client;
use Solarium\Core\Client\Adapter\Curl;
use Symfony\Component\EventDispatcher\EventDispatcher;
use TSterker\SolariumCollectionManager\CollectionManager;

// Create Solarium client (https://solarium.readthedocs.io/en/stable/client-and-adapters/)
$solariumClient = new Client(new Curl, new EventDispatcher, [
    'endpoint' => [
        'default' => ['host' => '127.0.0.1', 'port' => 8983, 'path' =>  '/']
    ],
]);

$collectionManager = new CollectionManager($client);

$collectionManager->hasCollection('foo');  // false
$collectionManager->create('foo', ['num_shards' => 2, 'nrt_replicas' => 2]);
$collectionManager->hasCollection('foo');  // true
```

**Configuration options during collection creation:**

OptionDefaultDescription`nrt_replicas``1`The number of NRT (Near-Real-Time) replicas to create for this collection.`num_shards``1`The number of shards to be created as part of the collection.`pull_replicas``0`The number of PULL replicas to create for this collection.`router_name``compositeId`The router name that will be used. The router defines how documents will be distributed among the shards. Possible values are implicit or compositeId.`tlog_replicas``0`The number of TLOG replicas to create for this collection.`wait_for_final_state``false`Whether the request should complete only when all affected replicas become active.See the [Solr documentation](https://solr.apache.org/guide/solr/latest/deployment-guide/collection-management.html) for details.

Development
===========

[](#development)

```
# Fresh install
rm composer.lock && composer install

# Start multi-node Solr setup:
docker-compose up -d --wait

# Run tests
./vendor/bin/phpunit

# Lint code
./vendor/bin/phpstan analyse --memory-limit=2G
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90% 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.

###  Release Activity

Cadence

Every ~353 days

Recently: every ~428 days

Total

6

Last Release

309d ago

Major Versions

v0.1.1 → v1.0.02024-01-04

v1.0.0 → v2.0.02024-01-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/fc9ad31e44017264b78ad979be44da3b6156d0508130d0e881bf89edd2c0596d?d=identicon)[tsterker](/maintainers/tsterker)

---

Top Contributors

[![tsterker](https://avatars.githubusercontent.com/u/1156230?v=4)](https://github.com/tsterker "tsterker (9 commits)")[![d4r1as](https://avatars.githubusercontent.com/u/2236155?v=4)](https://github.com/d4r1as "d4r1as (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tsterker-solarium-collection-manager/health.svg)

```
[![Health](https://phpackages.com/badges/tsterker-solarium-collection-manager/health.svg)](https://phpackages.com/packages/tsterker-solarium-collection-manager)
```

###  Alternatives

[demi/seo

Library for working with SEO parameters of models

131.6k](/packages/demi-seo)

PHPackages © 2026

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