PHPackages                             flaviovs/yii2-composite-dataprovider - 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. [Database &amp; ORM](/categories/database)
4. /
5. flaviovs/yii2-composite-dataprovider

ActiveYii2-extension[Database &amp; ORM](/categories/database)

flaviovs/yii2-composite-dataprovider
====================================

Composite data provider for Yii2

0.0.5(7y ago)01.3kMITPHPPHP &gt;=5.6.0

Since Nov 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/flaviovs/yii2-composite-dataprovider)[ Packagist](https://packagist.org/packages/flaviovs/yii2-composite-dataprovider)[ RSS](/packages/flaviovs-yii2-composite-dataprovider/feed)WikiDiscussions master Synced yesterday

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

Yii2 Composite Data Provider
============================

[](#yii2-composite-data-provider)

Composite Data Provider (CDP) is a [yii\\data\\DataProviderInterface](https://www.yiiframework.com/doc/api/2.0/yii-data-dataproviderinterface)implementation that allows you to compose and browser several standard Yii2 data providers as if they were just one.

CDP takes care of properly paginating source data providers, so you can use any combination of pagination (or no pagination) on them -- CDPs will always paginate using the composite pagination configuration (if any).

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

[](#installation)

```
composer require flaviovs/yii2-composite-dataprovider

```

Usage
-----

[](#usage)

```
$cdp = new \fv\yii\data\CompositeDataProvider([
    'dataProviders' => [

		// A \yii\data\DataProviderInterface instance.
		$data_provider1,

		// Object configuration is also supported.
		[
			'class' => \yii\data\ActiveDataProvider::class,
			'query' => $my_model->find();
		],
	],
]);
```

CDPs also acceps a `pagination` property that works the same as in regular Yii2 data providers.

Additionally, you can use the `addDataProvider($value)` to add new data providers to a CDP.

Important
---------

[](#important)

- CDPs cannot be sorted. Of course, source data providers can be sorted normally.
- Models and keys returned by CDPs come straight from the source data providers. That means that your data provider consumer (for example, `GridView` column configuration) must be prepared to handle models of varied type in case your source data providers return different models.

Issues
------

[](#issues)

Visit

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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 ~314 days

Recently: every ~471 days

Total

7

Last Release

833d ago

Major Versions

0.0.5 → 1.0.0-beta12024-01-30

PHP version history (2 changes)0.0.1PHP &gt;=5.6.0

1.0.0-beta1PHP &gt;=8.2.0

### Community

Maintainers

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

---

Top Contributors

[![flaviovs](https://avatars.githubusercontent.com/u/1832699?v=4)](https://github.com/flaviovs "flaviovs (17 commits)")

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/flaviovs-yii2-composite-dataprovider/health.svg)

```
[![Health](https://phpackages.com/badges/flaviovs-yii2-composite-dataprovider/health.svg)](https://phpackages.com/packages/flaviovs-yii2-composite-dataprovider)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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