PHPackages                             tomcan/feed-importer - 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. tomcan/feed-importer

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

tomcan/feed-importer
====================

Package to download and parse csv product feeds

v0.2.0(1y ago)025proprietaryPHP

Since Nov 22Pushed 1y ago1 watchersCompare

[ Source](https://github.com/TomCan/feed-importer)[ Packagist](https://packagist.org/packages/tomcan/feed-importer)[ RSS](/packages/tomcan-feed-importer/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (3)Used By (0)

Tom's Feed Importer
===================

[](#toms-feed-importer)

Because everybody loves importing csv files...

Why?
----

[](#why)

Importing data from csv feeds can be hard. Often you'll end up with a custom implementation, closely coupling the downloading, reading, processing of the data. Each of them comes with their own difficulties and complexity. Is it on disk, http or a SSL authenticated ftp? Do you even have enough memory or diskspace available to download and extract that 2GB large gzipped, 12GB unzipped products.csv.gz?

The result is often a mess of control code mixed in with your business logic. And then you need to do the same but differently for another feed, and you end up duplicating half of your code and rewriting the rest. I have been there too! And I was feed up with it (pun intended).

What
----

[](#what)

What if I told you that you now can just define the feed, write your logic to process a single record and be done?

Tom's Feed Importer abstracts all the feed handling parts away and just gives you the records one by one, so that you can process them in small, sizeable parts.

You can either use a foreach / generator approach, or a callback function. Whichever suits your needs the best.

### With foreach / generator

[](#with-foreach--generator)

```
    // define the feed
    $feed = new FeedDefinition(['url' => 'https://raw.githubusercontent.com/TomCan/feed-importer/refs/heads/main/samples/toms-favorite-names.csv']);

    // instantiate processor without callback
    $processor = new FeedProcessorCsv($feed);
    // instantiate downloader
    $downloader = new FeedDownloader($feed, $processor);
    // use ->generate function
    foreach ($downloader->generate() as $row) {
        echo 'Got a record: '.str_replace(PHP_EOL, ' ', print_r($row, true)).PHP_EOL;
    }
    // profit

```

### With callback function

[](#with-callback-function)

```
    // define the feed
    $feed = new FeedDefinition(['url' => 'https://raw.githubusercontent.com/TomCan/feed-importer/refs/heads/main/samples/toms-favorite-names.csv']);

    // write your callback
    $callback = function (array $row) {
        echo 'Got a record: '.str_replace(PHP_EOL, ' ', print_r($row, true)).PHP_EOL;
    };

    // instantiate processor with callback
    $processor = new FeedProcessorCsv($feed, $callback);
    // instantiate downloader
    $downloader = new FeedDownloader($feed, $processor);
    // use ->download function
    $downloader->download();
    // profit

```

It mostly comes down to defining your feed parameters with a `FeedDefinition`. See the [`options`](docs/options.md) page in the docs for a reference of the available options.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

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

Total

2

Last Release

585d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2892620?v=4)[TomCan](/maintainers/TomCan)[@TomCan](https://github.com/TomCan)

---

Top Contributors

[![TomCan](https://avatars.githubusercontent.com/u/2892620?v=4)](https://github.com/TomCan "TomCan (8 commits)")

### Embed Badge

![Health badge](/badges/tomcan-feed-importer/health.svg)

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

###  Alternatives

[mck89/peast

Peast is PHP library that generates AST for JavaScript code

19139.2M47](/packages/mck89-peast)[sauladam/shipment-tracker

Parses tracking information for several carriers, like UPS, USPS, DHL and GLS by simply scraping the data. No need for any kind of API access.

9843.5k](/packages/sauladam-shipment-tracker)[jstewmc/rtf

Read and write Rich Text Format (RTF) documents with PHP

45153.1k6](/packages/jstewmc-rtf)[tcds-io/php-jackson

A lightweight, flexible object serializer for PHP, inspired by FasterXML/jackson

113.2k10](/packages/tcds-io-php-jackson)

PHPackages © 2026

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