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

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sylapi/feeds
============

Merchant feeds

v1.0.0(2mo ago)05.8k↓50%7MITPHPPHP &gt;=8.0.0

Since Jul 14Pushed 2mo ago1 watchersCompare

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

READMEChangelogDependencies (13)Versions (6)Used By (7)

Sylapi/Feeds
============

[](#sylapifeeds)

Create Product
--------------

[](#create-product)

### Shipping

[](#shipping)

```
$shipping = new Sylapi\Feeds\Models\Shipping();
$shipping->setCountry('PL')
        ->setRegion('Lubuskie')
        ->setService('COURIER_PICKUP')
        ->setCurrency('PLN')
        ->setPrice(12.00)
        ->setPriceCod(15.95)
        ->setMinHandlingTime(1)
        ->setMaxHandlingTime(4)
        ->setMinTransitTime(2)
        ->setMaxTransitTime(5);
```

### Tax

[](#tax)

```
$tax = new Sylapi\Feeds\Models\Tax;
$tax->setCountry('PL')
        ->setRegion('Lubuskie')
        ->setRate(5.00)
        ->setTaxShip(true);
```

### ProductDetail

[](#productdetail)

```
$productDetails = [];

$productDetail = new \Sylapi\Feeds\Models\ProductDetail();
$productDetail->setSectionName('Main')
        ->setAttributeName('name')
        ->setAttributeValue('Value');

$productDetails[] = $productDetail;
```

### Product

[](#product)

```
$product = new \Sylapi\Feeds\Models\Product();
$product->setId('id-1234567890')
        ->setTitle('Product title')
        ->setDescription('Product description...')
        ->setLink('https://url.exmaple.com/products/id-1234567890/')
        ->setMobileLink('https://mobile.url.exmaple.com/products/id-1234567890/')
        ->setImageLink('https://url.exmaple.com/storage/images/products/id-1234567890/main.jpg')
        ->setAdditionalImageLinks([
            'https://url.exmaple.com/storage/images/products/id-1234567890/1.jpg',
            'https://url.exmaple.com/storage/images/products/id-1234567890/2.jpg',
            'https://url.exmaple.com/storage/images/products/id-1234567890/3.jpg'
        ])
        ->setAvailability('in_stock')
        ->setAvailabilityDate('2021-12-25T13:00-0800')
        ->setCurrency('PLN')
        ->setCostOfGoodsSold(9.00)
        ->setExpirationDate('2021-12-31T13:00-0800')
        ->setPrice(11.00)
        ->setNetPrice(9.00)
        ->setSalePrice(9.95)
        ->setNetSalePrice(9.95)
        ->setSalePriceEffectiveDateStart('2021-12-28T13:00-0800')
        ->setSalePriceEffectiveDateEnd('2021-12-31T13:00-0800')
        ->setUnitPricingMeasure('750 ml')
        ->setUnitPricingBaseMeasure('100 ml')
        ->setProductCategory([
            \Sylapi\Feeds\Example1\Feed::NAME => '2271',
            \Sylapi\Feeds\Example2\Feed::NAME => 'Gifts / Toys'
        ])
        ->setProductTypes([
            \Sylapi\Feeds\Example1\Feed::NAME => [
                '2271',
                '1123'
            ],
            \Sylapi\Feeds\Example2\Feed::NAME => [
                'Gifts / Toys',
            ]
        ])
        ->setCanonicalLink('https://url.exmaple.com/products/id-1234567890/')
        ->setManufacturer('ABC Manufacturer')
        ->setBrand('Brand XYZ')
        ->setGtin('9876543210')
        ->setMpn('M1234599PN')
        ->setIdentifierExists(true)
        ->setCondition('new')
        ->setAdult(true)
        ->setMultipack(6)
        ->setBundle(false)
        ->setAgeGroup('toddler')
        ->setColor('black')
        ->setSizeTypes([
            'petite',
            'maternity'
        ])
        ->setCustomLabels([
            'summer',
            'sale',
            'test'
        ])
        ->setExcludedDestinations([
            'Buy on listings',
            'Local inventory ads'
        ])
        ->setIncludedDestinations([
            'Shopping ads',
            'Free local listings'
        ])
        ->setTaxCategory('Clothes')
        ->setShoppingAdsExcludedCountry([
            'CH',
            'AT'
        ])
        ->setShipsFromCountry('PL')
        ->setProductHighlights([
            'Product highlight #1',
            'Product highlight #2',
            'Product highlight #3'
        ])
        ->setShipping($shipping)
        ->setShippingWeight(3.50)
        ->setShippingWeightUnit('kg')
        ->setTax($tax)
        ->setProductDetails([
            \Sylapi\Feeds\Example1\Feed::NAME => $productDetails,
            \Sylapi\Feeds\Example2\Feed::NAME => $productDetails
        ])
        ->setMinHandlingTime(3)
        ->setMaxHandlingTime(14)
        ->setItemGroupId('gid-12345')
        ->setQuantity(3)
        ->setWarranty('24 months');
```

FeedGenerator
-------------

[](#feedgenerator)

```
$feedGenerator = new FeedGenerator();
$feedGenerator->setStoragePath('/home/xml/path/');

$feed->appendProduct($product);
$feed->appendProduct($product);
//...
$feed->appendProduct($product);
echo $feed->filePath();
```

```
$feedExample1 = new FeedGenerator();
$feedExample1->setFeed(new Sylapi\Feeds\Example1\Feed(
    \Sylapi\Feeds\Parameters::create([])
));

$feedExample2 = new FeedGenerator();
$feedExample2->setFeed(new Sylapi\Feeds\Example2\Feed(
    \Sylapi\Feeds\Parameters::create([])
));

$feedReader = new FeedReader($feed->filePath());
while($product = $feedReader->getProduct()) {
    $feedExample1->appendProduct($product);
    $feedExample2->appendProduct($product);
}
$feedExample1->save();
$feedExample2->save();
```

Commands
--------

[](#commands)

COMMANDDESCRIPTIONcomposer testsTestycomposer phpstanPHPStancomposer coveragePHPUnit Coveragecomposer coverage-htmlPHPUnit Coverage HTML (DIR: ./coverage/)

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance86

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community14

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

Total

4

Last Release

74d ago

Major Versions

v0.1.2 → v1.0.02026-03-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/8284e979dcbb9e6ff013f3e04f2c3f0a3de8f62fad97e12383155779b0adee23?d=identicon)[sylapi](/maintainers/sylapi)

---

Top Contributors

[![dserafinski](https://avatars.githubusercontent.com/u/73796476?v=4)](https://github.com/dserafinski "dserafinski (2 commits)")

---

Tags

merchantfeeds

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[winzou/state-machine

A very lightweight yet powerful PHP state machine

52113.7M18](/packages/winzou-state-machine)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

52664.9k12](/packages/solspace-craft-freeform)[verbb/formie

The most user-friendly forms plugin for Craft.

101372.9k40](/packages/verbb-formie)[sensiolabs/insight

SymfonyInsight SDK

8117.8k](/packages/sensiolabs-insight)[pubsubhubbub/subscriber

pubsubhubbub implementation of subscriber.

32100.2k](/packages/pubsubhubbub-subscriber)[eliashaeussler/typo3-form-consent

Extension for TYPO3 CMS that adds double opt-in functionality to EXT:form

1481.0k](/packages/eliashaeussler-typo3-form-consent)

PHPackages © 2026

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