PHPackages                             jcshoww/query-collection - 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. jcshoww/query-collection

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

jcshoww/query-collection
========================

Query collection library for query continious building

1.2.2(2y ago)0347MITPHPPHP ^7.0 || ^8.0

Since Sep 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/jcshoww/query-collection)[ Packagist](https://packagist.org/packages/jcshoww/query-collection)[ Docs](https://github.com/jcshoww/query-collection)[ RSS](/packages/jcshoww-query-collection/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (20)Used By (0)

Query collection
================

[](#query-collection)

This is query collection library. Query collection could be used as storage-collection for different Query objects, that could be used for DB/API/etc queries dynamic building and manipulation.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require jcshoww/query-collection
```

Usage
-----

[](#usage)

Create your own query collection and extend it from base QueryCollection class. Add custom basic collection generation in \_\_construct of custom collection.

Look example below:

```
...
use Jcshoww\QueryCollection\QueryCollection;

class TestQueryCollection extends QueryCollection
{
    /**
     * {@inheritDoc}
     */
    public function __construct(array $fields = [])
    {
        $this->push(new CustomFilter('status', $fields['status']));
    }
}
```

Create your own custom query objects and extend them from Query class. Look example below:

```
...
use Jcshoww\QueryCollection\Builder\Builder;
use Jcshoww\QueryCollection\Query\Query;

class Join extends Query
{
    /**
     * {@inheritDoc}
     */
    protected $type = 'Join';

    /**
     * table name
     *
     * @var string
     */
    protected $table;

    /**
     * owner column to join
     *
     * @var string
     */
    protected $ownerColumn;

    /**
     * foreign column to join
     *
     * @var string
     */
    protected $foreignColumn;

    /**
     * @param string $table
     * @param string $ownerColumn
     * @param string $foreignColumn
     */
    public function __construct(string $table, string $ownerColumn, string $foreignColumn)
    {
        $this->table = $table;
        $this->ownerColumn = $ownerColumn;
        $this->foreignColumn = $foreignColumn;
    }

    /**
     * @param LaravelBuilder $builder
     *
     * @return Query
     */
    public function apply(Builder $builder): Query
    {
        $builder->join($this->table, $this->ownerColumn, Where::EQUAL, $this->foreignColumn);
        return $builder;
    }
}
```

Create your own custom builder objects and extend them from Builder class to customize finishing operations between queries and applied system itself.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~47 days

Recently: every ~168 days

Total

19

Last Release

844d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3401f057a4929c611ecfcea902d01b0e20870f865896c0b7e93db6812aec7c29?d=identicon)[jcshoww](/maintainers/jcshoww)

---

Top Contributors

[![jcshoww](https://avatars.githubusercontent.com/u/34167059?v=4)](https://github.com/jcshoww "jcshoww (13 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jcshoww-query-collection/health.svg)

```
[![Health](https://phpackages.com/badges/jcshoww-query-collection/health.svg)](https://phpackages.com/packages/jcshoww-query-collection)
```

###  Alternatives

[torann/registry

Laravel registry manager for application configurations

222.0k](/packages/torann-registry)[arubacao/aws-ip-range-middleware

Laravel Middleware for Amazon Web Services (AWS) IP Address Range

172.3k](/packages/arubacao-aws-ip-range-middleware)

PHPackages © 2026

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