PHPackages                             balrok/yii2-rss - 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. balrok/yii2-rss

ActiveYii2-extension

balrok/yii2-rss
===============

Yii2 RSS extension adds RSS-feed to your site

0.1.3(7y ago)0130MITPHP

Since Jul 5Pushed 7y ago1 watchersCompare

[ Source](https://github.com/balrok/yii2-rss)[ Packagist](https://packagist.org/packages/balrok/yii2-rss)[ Docs](https://github.com/balrok/yii2-rss)[ RSS](/packages/balrok-yii2-rss/feed)WikiDiscussions master Synced 2mo ago

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

Yii2 RSS extension
==================

[](#yii2-rss-extension)

[Yii2](http://www.yiiframework.com) RSS extension adds RSS-feed to your site

This is a fork of  because the original author abandoned it and there was a bug with sending headers.

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

[](#installation)

### Composer

[](#composer)

The preferred way to install this extension is through [Composer](http://getcomposer.org/).

Either run

```
php composer.phar require balrok/yii2-rss "~0.1"

```

or add

```
"balrok/yii2-rss": "~0.1"

```

to the require section of your `composer.json`

Usage
-----

[](#usage)

Add action to your controller:

```
public function actionRss()
{
    $dataProvider = new ActiveDataProvider([
        'query' => Post::find()->with(['user']),
        'pagination' => [
            'pageSize' => 10
        ],
    ]);

    $response = Yii::$app->getResponse();
    $headers = $response->getHeaders();

    $headers->set('Content-Type', 'application/rss+xml; charset=utf-8');

    echo \balrok\yii\extensions\Rss\RssView::widget([
        'dataProvider' => $dataProvider,
        'channel' => [
            'title' => function ($widget, \balrok\Feed $feed) {
                    $feed->addChannelTitle(Yii::$app->name);
            },
            'link' => Url::toRoute('/', true),
            'description' => 'Posts ',
            'language' => function ($widget, \balrok\Feed $feed) {
                return Yii::$app->language;
            },
            'image'=> function ($widget, \balrok\Feed $feed) {
                $feed->addChannelImage('http://example.com/channel.jpg', 'http://example.com', 88, 31, 'Image description');
            },
        ],
        'items' => [
            'title' => function ($model, $widget, \balrok\Feed $feed) {
                    return $model->name;
                },
            'description' => function ($model, $widget, \balrok\Feed $feed) {
                    return StringHelper::truncateWords($model->content, 50);
                },
            'link' => function ($model, $widget, \balrok\Feed $feed) {
                    return Url::toRoute(['post/view', 'id' => $model->id], true);
                },
            'author' => function ($model, $widget, \balrok\Feed $feed) {
                    return $model->user->email . ' (' . $model->user->username . ')';
                },
            'guid' => function ($model, $widget, \balrok\Feed $feed) {
                    $date = \DateTime::createFromFormat('Y-m-d H:i:s', $model->updated_at);
                    return Url::toRoute(['post/view', 'id' => $model->id], true) . ' ' . $date->format(DATE_RSS);
                },
            'pubDate' => function ($model, $widget, \balrok\Feed $feed) {
                    $date = \DateTime::createFromFormat('Y-m-d H:i:s', $model->updated_at);
                    return $date->format(DATE_RSS);
                }
        ]
    ]);
}
```

Authors
-------

[](#authors)

- [Aleksandr Zelenin](https://github.com/zelenin/), e-mail:
- [Carl Mai](https://github.com/balrok/), e-mail:

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.5% 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 ~241 days

Recently: every ~323 days

Total

7

Last Release

2882d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5a6b077d453e2915198002fd26d2eabadf7efbed82af2503b2fdd53a4c3a0705?d=identicon)[balrok](/maintainers/balrok)

---

Top Contributors

[![zelenin](https://avatars.githubusercontent.com/u/1427885?v=4)](https://github.com/zelenin "zelenin (8 commits)")[![balrok](https://avatars.githubusercontent.com/u/29128?v=4)](https://github.com/balrok "balrok (4 commits)")[![beowulfenator](https://avatars.githubusercontent.com/u/5413344?v=4)](https://github.com/beowulfenator "beowulfenator (1 commits)")

---

Tags

feedrssyii2

### Embed Badge

![Health badge](/badges/balrok-yii2-rss/health.svg)

```
[![Health](https://phpackages.com/badges/balrok-yii2-rss/health.svg)](https://phpackages.com/packages/balrok-yii2-rss)
```

###  Alternatives

[bnomei/kirby3-feed

Generate a Atom/JSON/RSS-Feed and XML-Sitemap from Pages-Collections

7224.8k](/packages/bnomei-kirby3-feed)

PHPackages © 2026

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