# SimplePie for PHP feed parsing, PSR integration, and cache control

> SimplePie is a PHP library for parsing Atom and RSS feeds, with optional PSR-18 HTTP client and PSR-16 cache integrations. Its documentation presents a focused library with explicit runtime requirements and a sporadic maintenance model.

**simplepie/simplepie** — A simple Atom/RSS parsing library for PHP.

- Repository: https://github.com/simplepie/simplepie
- Website: http://simplepie.org/
- Stars: 1,579 · Forks: 399
- Language: PHP
- License: not declared
- Published: 2026-10-16 · Updated: 2026-10-16 · Language: en
- Canonical page: https://hysenlabs.com/projects/simplepie-simplepie

## SimplePie’s PHP feed parsing role

SimplePie addresses a narrow but common PHP task: reading syndicated feeds such as Atom and RSS. It is aimed at developers who want feed handling as a library rather than a complete reader application. The package includes parser classes under `src/`, a standalone `autoloader.php`, a `demo/`, a compatibility test, and a unit test suite. That layout separates the reusable library from the example reader and development tooling.

The project is not described as a general HTTP framework, feed aggregation service, or publishing system. Its scope is centered on parsing syndicated content. The README lists PHP 7.2 or newer as required for SimplePie 1.8.0 and later, alongside `libxml2`, one of `iconv`, `mbstring` or `intl`, PCRE support, and either cURL or `fsockopen()`. Internationalized domain name support is optional and depends on the `intl` extension, `symfony/polyfill-intl-idn`, or a cURL build with IDN support.

That dependency list matters when evaluating adoption. A PHP application may already satisfy most requirements, but an older hosting setup or restricted PHP build can require changes before SimplePie is usable. The compatibility test in the package is intended to check required server settings, which gives operators a concrete first verification step.

## How SimplePie moves from a feed source to parsed data

Based on the repository layout, SimplePie separates reusable classes from the separate autoloader and from the demo. The library receives feed data through its PHP API and exposes parsing behavior through the SimplePie class hierarchy. The README does not document a command-line interface, a database schema for feed processing, or a required background worker, so the package should be treated as an in-process PHP dependency rather than a feed service.

The repository includes `src/` for classes used with an autoloader and `autoloader.php` for applications that want the separate-file version. Since SimplePie 1.3, the monolithic `simplepie.inc` file has been split into separate files. Applications that require one distributable file can use a release asset or generate `SimplePie.compiled.php` with the build script. This is a packaging choice, not a different parsing architecture.

SimplePie can also delegate transport or caching concerns to interfaces. Since version 1.9.0, `set_http_client()` accepts a PSR-18 client with PSR-17 request and URI factories. Since version 1.8.0, `set_cache()` accepts a PSR-16 cache. These integrations keep feed parsing separate from the application’s HTTP implementation and cache implementation, although the caller must provide compatible dependencies.

## Installing SimplePie and checking the runtime

The README does not provide a Composer installation command or a package version constraint. It points to the project releases and the SimplePie wiki for setup and installation documentation, and it identifies `composer.json` as a repository file without documenting its contents. A prospective adopter should obtain the appropriate release or package through the project’s documented distribution path, then confirm the runtime before integrating it.

The first concrete check described by the README is the bundled compatibility test. It is included under `compatibility_test/` and is intended to inspect required server settings. The documentation also requires `libxml2`, one character-conversion extension, PCRE support, and cURL or `fsockopen()`. These are prerequisites, not optional recommendations.

For applications that need a single compiled file, the documented build command is:

```bash
php build/compile.php
```

The README says this generates `SimplePie.compiled.php`. It does not state that the command installs the library or configures a PHP application. Applications using the separate files should follow the repository’s autoloader arrangement instead.

## Connecting a PSR-18 client for SimplePie requests

SimplePie 1.9.0 adds support for a PSR-18 HTTP client. The README names Guzzle as an example, but also links to other PSR HTTP client implementations. The documented setup passes the client and two PSR-17 factories to `set_http_client()`. One factory is used for the request side and the other for URI creation, matching the interfaces required by the integration.

The documented example is:

```php
$simplepie = new \SimplePie\SimplePie();
$simplepie->set_http_client(
    new \GuzzleHttp\Client(),
    new \GuzzleHttp\Psr7\HttpFactory(),
    new \GuzzleHttp\Psr7\HttpFactory(),
);
```

This example demonstrates dependency injection rather than a complete feed request. It does not include a feed URL, feed loading call, error handling, timeout configuration, or response validation. Those steps are not documented in the README and should not be inferred from this snippet. The important integration constraint is that a PSR-18 client alone is insufficient for this example. The application also needs PSR-17 `RequestFactoryInterface` and `UriFactoryInterface` implementations.

For an application already built around Guzzle, this arrangement can fit existing infrastructure. For an application with a different HTTP abstraction, the project documentation points to other PSR-18 implementations. The integration does not remove the need to decide how feed URLs, redirects, timeouts, failures, and response policies should be handled.

## Using PSR-16 caching without replacing the feed parser

SimplePie 1.8.0 supports PSR-16 caches. The README’s example uses Symfony’s cache component with a filesystem adapter. The application creates `SimplePie`, builds a `Psr16Cache` around `FilesystemAdapter`, and passes that cache to `set_cache()`.

The documented example is:

```php
$simplepie = new \SimplePie\SimplePie();
$simplepie->set_cache(
    new \Symfony\Component\Cache\Psr16Cache(
        new \Symfony\Component\Cache\Adapter\FilesystemAdapter()
    ),
);
```

This separates cache storage from feed parsing through a standard interface. A different PSR-16 implementation can be used, but the README does not define cache keys, cache duration, invalidation rules, or the exact data cached by SimplePie. Those details therefore need to be checked in the API documentation or implementation before assuming that a cache will meet application requirements.

Caching can be particularly relevant for applications that repeatedly fetch the same feed, but the repository documentation does not quantify performance gains or describe concurrency behavior. The cache example is configuration evidence, not a benchmark. It shows how to connect a cache, not whether a given Symfony adapter is appropriate for a multi-process or distributed deployment.

## SimplePie’s maintenance and upgrade boundaries

The repository is not archived, and its last push was on 2026-07-04. The README describes maintenance as sporadic and says that feature requests may not be fulfilled straight away because time must be prioritized. That maintenance statement matters more than the release list alone when planning dependency updates.

The documented branch policy separates requirements by PHP generation. The `master` branch requires PHP 7.2.0 or newer, `one-dot-seven` requires PHP 5.6.0 or newer, and `one-dot-three` requires PHP 5.2.0 or newer. The README says the main development for the next minor release happens in `master`, and asks contributors to target that branch.

The project also states that it does not actively provide bug fixes or security fixes for older versions, while allowing contributors to submit backport pull requests for older PHP requirements. This is a release policy, not a promise that every older line remains suitable for a new deployment. Upgrades should therefore be checked against PHP version, extension availability, PSR interface changes, and the application’s cache and HTTP dependencies.

The package contains `CHANGELOG.md`, `phpstan.dist.neon`, `phpunit.xml.dist`, and the `test/` directory. These files indicate development and validation resources, but the README does not give their command-line invocation, so no test command should be assumed.

## Where SimplePie is the wrong fit

SimplePie is a poor fit when the application needs a complete feed reader with a user interface, browser-based subscriptions, or feed discovery. The `demo/` directory provides a basic feed reader demo, but the repository describes that demo as an example rather than a full application product. The library package does not document user accounts, subscription persistence, delivery scheduling, or an administrative interface.

It is also the wrong choice when the runtime cannot satisfy the documented requirements. PHP 7.2 or newer, `libxml2`, PCRE, a character conversion extension, and cURL or `fsockopen()` are not optional for the documented versions. An environment that only permits a restricted extension set may require a different parser or an environment change before SimplePie can be considered.

For applications that already have a complete feed-reading stack, the integration surface matters. Replacing an HTTP client or cache can add PSR-17 and PSR-16 dependencies. SimplePie’s design is appropriate for code that specifically needs feed parsing and can accept those integration choices. It is less suitable when a single-file dependency, no external interfaces, or a fully managed feed service is a hard requirement.

The documented `demo/cli_test.php` and `demo/test.php` files indicate demo and test entry points, but the README does not explain their command-line behavior. They should be examined directly before being treated as a supported operational interface.

## Conclusion

Adopt SimplePie when a PHP application needs a dedicated Atom and RSS parser and its HTTP or cache interfaces fit your architecture. Do not choose it without checking PHP extension availability, feed sources, caching requirements, and the version-specific support policy. For current deployments, first verify that the installed SimplePie release supports the required PHP version and that its documented PSR implementations are compatible.

## FAQ

### What PHP version does SimplePie require?

The README states that PHP 7.2 or newer is required for SimplePie 1.8.0 and later. It also lists `libxml2`, one of `iconv`, `mbstring` or `intl`, PCRE support, and either cURL or `fsockopen()` as requirements.

### Can SimplePie use Guzzle for HTTP requests?

Yes. Since SimplePie 1.9.0, the README documents PSR-18 HTTP client support and gives an example using `GuzzleHttp\Client` with two `GuzzleHttp\Psr7\HttpFactory` instances. PSR-17 request and URI factory implementations are also required.

### How does SimplePie support caching?

Since SimplePie 1.8.0, SimplePie accepts a PSR-16 cache through `set_cache()`. The README demonstrates Symfony’s `Psr16Cache` with `FilesystemAdapter`, while also pointing to other PSR-16 implementations.

## Sources

- [Issues](https://github.com/simplepie/simplepie/issues)
- [Project website](http://simplepie.org/)
- [README](https://github.com/simplepie/simplepie/blob/master/README.md)
- [Releases](https://github.com/simplepie/simplepie/releases)
- [simplepie/simplepie on GitHub](https://github.com/simplepie/simplepie)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/simplepie-simplepie
