PHPackages                             aschmelyun/basic-feeds - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. aschmelyun/basic-feeds

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

aschmelyun/basic-feeds
======================

A simple PHP library to generate RSS and Atom feeds

v1.0.0(4y ago)43541MITPHPPHP ^7.4|^8

Since Apr 2Pushed 4y ago1 watchersCompare

[ Source](https://github.com/aschmelyun/basic-feeds)[ Packagist](https://packagist.org/packages/aschmelyun/basic-feeds)[ Docs](https://github.com/aschmelyun/basic-feeds)[ RSS](/packages/aschmelyun-basic-feeds/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Basic Feeds
===========

[](#basic-feeds)

This package provides a basic way of generating RSS 2 and Atom XML feeds in PHP using a simplified syntax. There are no external dependencies as this package relies on the built-in [SimpleXMLElement](https://www.php.net/manual/en/class.simplexmlelement.php) class.

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

[](#installation)

```
composer require aschmelyun/basic-feeds
```

Usage
-----

[](#usage)

Initialize a feed by using the `Feed::create()` method, passing in an array of attributes needed to set up your feed's base.

```
use Aschmelyun\BasicFeeds\Feed;

$feed = Feed::create([
    'link' => 'https://example.com/blog',
    'authors' => 'Andrew Schmelyun',
    'title' => 'My Example Blog',
    'feed' => 'https://example.com/feed.xml',
]);
```

Then use the `entry()` method on the Feed object to attach entries to your feed.

```
$feed->entry([
    'title' => 'Post One',
    'link' => 'https://example.com/blog/post-one',
    'summary' => 'This is my summary',
    'content' => 'This is my example content!'
]);
```

The `entry()` method can also expect multiple items at once, using a nested array.

```
$feed->entry([
    'title' => 'Post Two',
    'link' => 'https://example.com/blog/post-two',
    'summary' => 'This is my second summary',
    'content' => 'This is my second example content!'
], [
    'title' => 'Post Three',
    'link' => 'https://example.com/blog/post-three',
    'summary' => 'This is my third summary',
    'content' => 'This is my third example content!'
]);
```

You can then use either the `asAtom()` or `asRss()` method to compile the feed to the requested format and return it as an XML string:

```
$xml = $feed->asAtom();
// $xml = $feed->asRss();
```

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

[](#requirements)

There are a few required attributes, and they change based on the format(s) you choose.

For `Feed::create()` they are:

- **RSS**: `title`, `link`, `description`
- **Atom**: `title`, `link`, `authors`, `feed`

For `entry()` they are:

- **RSS**: `title`, `link`, `description`
- **Atom**: `title`, `link`, `summary`, `content`

Extending
---------

[](#extending)

This package comes with an [interface](https://github.com/aschmelyun/basic-feeds/blob/main/src/Contracts/Generator.php) that you can use to help extend off of this package to create your own feed generator.

Check out the [Atom](https://github.com/aschmelyun/basic-feeds/blob/main/src/Generators/Atom.php) and [RSS](https://github.com/aschmelyun/basic-feeds/blob/main/src/Generators/Rss.php) classes to see how the included feed generators are structured.

Testing
-------

[](#testing)

If you don't already have PHPUnit required in your current project, install this package with dev dependencies:

```
composer require aschmelyun/basic-feeds --dev
```

Then run the PHPUnit tests:

```
./vendor/bin/phpunit
```

License
-------

[](#license)

This package is licensed under the The MIT License. See [LICENSE](https://github.com/aschmelyun/basic-feeds/blob/main/LICENSE) for more details.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community8

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

Unknown

Total

1

Last Release

1507d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/89d40a36efd670c752d8d6e488192d9ae78b9ff49503cf6b671f46d17cb67768?d=identicon)[aschmelyun](/maintainers/aschmelyun)

---

Top Contributors

[![aschmelyun](https://avatars.githubusercontent.com/u/3395980?v=4)](https://github.com/aschmelyun "aschmelyun (9 commits)")

---

Tags

atomphprssxmlphpxmlatomrssfeeds

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aschmelyun-basic-feeds/health.svg)

```
[![Health](https://phpackages.com/badges/aschmelyun-basic-feeds/health.svg)](https://phpackages.com/packages/aschmelyun-basic-feeds)
```

###  Alternatives

[simplepie/simplepie

A simple Atom/RSS parsing library for PHP

1.6k8.7M69](/packages/simplepie-simplepie)[bnomei/kirby3-feed

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

7224.8k](/packages/bnomei-kirby3-feed)[goetas/xsd2php-runtime

Convert XSD (XML Schema) definitions into PHP classes

493.3k](/packages/goetas-xsd2php-runtime)[bupy7/xml-constructor

The array-like constructor of XML document structure.

1337.9k](/packages/bupy7-xml-constructor)[sabre/xml-atom

A reader and writer for the Atom format

123.4k](/packages/sabre-xml-atom)

PHPackages © 2026

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