PHPackages                             jp3cki/yii2-feed - 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. jp3cki/yii2-feed

ActiveYii2-extension

jp3cki/yii2-feed
================

Zend Feed Writer wrapper for Yii Framework 2

v0.2.0(7y ago)084MITPHPPHP &gt;= 7.1

Since Aug 20Pushed 7y ago1 watchersCompare

[ Source](https://github.com/fetus-hina/yii2-feed)[ Packagist](https://packagist.org/packages/jp3cki/yii2-feed)[ RSS](/packages/jp3cki-yii2-feed/feed)WikiDiscussions master Synced 1mo ago

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

jp3cki/yii2-feed
================

[](#jp3ckiyii2-feed)

This is a zend feed writer wrapper for Yii 2.
You can put RSS and Atom feeds easy.

License
-------

[](#license)

[MIT License](LICENSE.md).
Copyright © 2018 AIZAWA Hina

Requirements
------------

[](#requirements)

- PHP 7.1+

Install
-------

[](#install)

`composer.phar install jp3cki/yii2-feed`

Example
-------

[](#example)

```
namespace app\controllers;

use Yii;
use yii\data\ActiveDataProvider;
use yii\helpers\Url;
use yii\web\Controller;
use yii\web\Response;

use jp3cki\yii2\feed\Feed;

class FeedController extends Controller
{
    public function actionRss()
    {
        return $this->feedResponse(
            Feed::TYPE_RSS,
            'application/rss+xml'
        );
    }

    public function actionAtom()
    {
        return $this->feedResponse(
            Feed::TYPE_ATOM,
            'application/atom+xml'
        );
    }

    private function feedResponse(string $type, string $contentType)
    {
        Yii::$app->timeZone = 'Etc/UTC'; // recommended

        $resp = Yii::$app->response;
        $resp->format = Response::FORMAT_XML;
        $resp->formatters[Response::FORMAT_XML]['contentType'] = $contentType;
        $resp->data = Feed::widget([
            // feed type.
            'type' => $type, // Feed::TYPE_RSS or Feed::TYPE_ATOM

            // main data.
            'dataProvider' => new ActiveDataProvider([
                'query' => Article::find()->orderBy(['id' => SORT_DESC]),
                'pagination' => [
                    'pageSize' => 10,
                ],
            ]),

            // channel data.
            'title' => Yii::$app->name,
            'description' => 'Bla bra bla...',
            'copyright' => 'Copyright (C) 2018 AIZAWA Hina',
            'link' => Url::home(true),
            'rssLink' => Url::to(['feed/rss'], true),
            'atomLink' => Url::to(['feed/atom'], true),
            'author' => [
                'name' => 'AIZAWA Hina',
                'email' => 'hina@bouhime.com',
                'uri' => 'https://fetus.jp/',
            ],
            'generator' => [
                'name' => Yii::$app->name,
                'version' => Yii::$app->version,
                'uri' => Url::home(true),
            ],
            'dateCreated' => null, // null means "now"
            'dateModified' => null,
            'lastBuildDate' => null,

            // entry formatters. (like GridView::$columns)
            'entry' => [
                // 'attrName' => 'value' or
                // 'attrName' => callback function
                //
                // all callback prototype:
                //   function ($model, $key, $feedEntry, $widget):  { }
                'title' => function ($model): string {
                    return $model['title'];
                },
                'link' => function ($model): string {
                    return $model['link'];
                },
                'dateModified' => function ($model) {
                    return $model['dateModified'] ?? null;
                },
                'dateCreated' => function ($model) {
                    return $model['dateCreated'] ?? null;
                },
                'description' => function ($model): string {
                    return $model['description'];
                },
                'content' => function ($model): string {
                    return $model['content'];
                },
            ],
        ]);
        return $resp;
    }
}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Total

2

Last Release

2818d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c07587f82c7761e4445d95292041d543aeda609e74cb366517bb80c4423d729f?d=identicon)[AIZAWA Hina](/maintainers/AIZAWA%20Hina)

---

Top Contributors

[![fetus-hina](https://avatars.githubusercontent.com/u/848666?v=4)](https://github.com/fetus-hina "fetus-hina (5 commits)")

---

Tags

atomphprssyii2yii2-extension

### Embed Badge

![Health badge](/badges/jp3cki-yii2-feed/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)

PHPackages © 2026

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