PHPackages                             yurkinx/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. yurkinx/yii2-rss

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

yurkinx/yii2-rss
================

Yii2 Framework extension to provide functionality for consuming RSS and Atom feeds using zend-feed library.

1.0.2(8y ago)64.1k↓100%10[2 issues](https://github.com/yurkinx/yii2-rss/issues)[1 PRs](https://github.com/yurkinx/yii2-rss/pulls)BSD-3-ClausePHPPHP &gt;=5.4.0

Since Nov 15Pushed 8y ago2 watchersCompare

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

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

yii2-rss
========

[](#yii2-rss)

Yii2 Framework extension to provide functionality for consuming RSS and Atom feeds using zend-feed library.

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

[](#installation)

```
{
	"require":
	{
  		"yurkinx/yii2-rss": "dev-master"
	}
}

```

Configuration
-------------

[](#configuration)

In config file

```
/config/web.php

```

Add feed component

```
'components' => array(
        ...
        'feed' => array(
        	 	'class' => 'yii\feed\FeedDriver',
        		),
		    )

```

Simple usage
------------

[](#simple-usage)

**Read Rss feed:**

```
$feed=Yii::$app->feed->reader()->import('http://exapmple.com/feed.rss');
```

This will get RSS feed, parse it and return feed object. For more details you can read the official Zend-feed extention documentaion:

**Create Rss feed:**

Create action Rss in controller

```
public function actionRss(){

     $feed=Yii::$app->feed->writer();

    $feed->setTitle(Yii::$app->params['title']);
		$feed->setLink('http://example.com');
		$feed->setFeedLink('http://example.com/rss', 'rss');
		$feed->setDescription(Yii::t('app','Recent headlines'));
		$feed->setGenerator('http://example.com/rss');
		$feed->setDateModified(time());
		/**
		* Add one or more entries. Note that entries must
		* be manually added once created.
		*/
		$posts=Post::find()->orderBy('id DESC')->limit(20)->all();
		foreach($posts as $post){
				$entry = $feed->createEntry();
				$entry->setTitle($post->title);
				$entry->setLink(Yii::$app->urlManager->createAbsoluteUrl('/post/view',['id'=>$post->id]));
				$entry->setDateModified(intval($post->created));
				$entry->setDateCreated(intval($post->created));
				$entry->setContent(
				   $post->content
				);
				$entry->setEnclosure(
					[
					 'uri'=>$post->image,
					 'type'=>'image/jpeg',
					 'length'=>filesize(Yii::getAlias('@webroot').$post->image)
					 ]
				);
				$feed->addEntry($entry);
		}
		/**
		* Render the resulting feed to Atom 1.0 and assign to $out.
		* You can substitute "atom" with "rss" to generate an RSS 2.0 feed.
		*/
		$out = $feed->export('rss');
		header('Content-type: text/xml');
		echo $out;
		die();
	}
```

Then it's better to cache it with cache component:

```
public function behaviors() {
		return [
			....
			'cache'=> [
				'only'=>['rss'],
				'class'=>PageCache::className(),
				'duration'=>0,
				'dependency'=>[
					       'class' => 'yii\caching\DbDependency',
					       'sql' => 'SELECT max(time_updated) as max FROM tbl_post',

					      ],
			]
		];
	}
```

Take a look at Zend-feed writer official documentaion for more advanced usage of Zend-feed

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

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

Total

3

Last Release

2968d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b0e315b96bdf9d4683885cf79656a05500b850d4905a8552a011d7303c0bb50?d=identicon)[yurkinx](/maintainers/yurkinx)

---

Top Contributors

[![yurkinx](https://avatars.githubusercontent.com/u/1325711?v=4)](https://github.com/yurkinx "yurkinx (18 commits)")

---

Tags

atomfeedrssyii2extension

### Embed Badge

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

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

###  Alternatives

[rumenx/php-feed

Framework-agnostic PHP Feed generator for Laravel, Symfony, and more.

3652.3k](/packages/rumenx-php-feed)[fkr/simplepie-bundle

Integrates SimplePie into Symfony

11137.5k](/packages/fkr-simplepie-bundle)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

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