PHPackages                             lireincore/ymlparser - 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. lireincore/ymlparser

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

lireincore/ymlparser
====================

YML (Yandex Market Language) parser

3.2.7(7y ago)2429.6k↓43.3%14[4 PRs](https://github.com/lireincore/ymlparser/pulls)1MITPHPPHP &gt;=5.5

Since Sep 2Pushed 4y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (15)Used By (1)

YML (Yandex Market Language) parser
===================================

[](#yml-yandex-market-language-parser)

[![Latest Stable Version](https://camo.githubusercontent.com/54237e3295cf09ce4046dd89897454bb7d688c9e069018972b64c12a3c095404/68747470733a2f2f706f7365722e707567782e6f72672f6c697265696e636f72652f796d6c7061727365722f762f737461626c65)](https://packagist.org/packages/lireincore/ymlparser)[![Total Downloads](https://camo.githubusercontent.com/f0e505c6d3479f7c208df3f453e87d539ddfc7ca109d53c316e607b10896cb2a/68747470733a2f2f706f7365722e707567782e6f72672f6c697265696e636f72652f796d6c7061727365722f646f776e6c6f616473)](https://packagist.org/packages/lireincore/ymlparser)[![License](https://camo.githubusercontent.com/4af3b6500f0cfa6bcca67fcdfc7ad1f8d0f367ced908ce1c205c5d0d68677a2b/68747470733a2f2f706f7365722e707567782e6f72672f6c697265696e636f72652f796d6c7061727365722f6c6963656e7365)](https://packagist.org/packages/lireincore/ymlparser)

About
-----

[](#about)

[YML (Yandex Market Language)](https://yandex.ru/support/partnermarket/yml/about-yml.xml) streaming parser with validation. Based on XMLReader. Suitable for large files.

Install
-------

[](#install)

Add the `"lireincore/ymlparser": "^3.2"` package to your `require` section in the `composer.json` file

or

```
$ php composer.phar require lireincore/ymlparser
```

Usage
-----

[](#usage)

```
use LireinCore\YMLParser\YML;

$yml = new YML();
try {
    $yml->parse($filepath);
    $date = $yml->getDate();
    $shop = $yml->getShop();
    if ($shop->isValid()) {
        $offersCount = $shop->getOffersCount();
        $shopData = $shop->getData();
        //...
        foreach ($yml->getOffers() as $offer) {
            if ($offer->isValid()) {
                $offerCategoryHierarchy = $shop->getCategoryHierarchy($offer->getCategoryId());
                $offerData = $offer->getData();
                //...
            } else {
                var_dump($offer->getErrors());
                //...
            }
        }
    } else {
        var_dump($shop->getErrors());
        //...
    }
} catch (\Exception $e) {
    echo $e->getMessage();
    //...
}
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 93.8% 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 ~52 days

Recently: every ~115 days

Total

14

Last Release

2865d ago

Major Versions

1.0.0 → 2.0.02016-09-12

2.1.0 → 3.0.02016-09-28

PHP version history (2 changes)1.0.0PHP &gt;=5.4

2.0.0PHP &gt;=5.5

### Community

Maintainers

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

---

Top Contributors

[![lireincore](https://avatars.githubusercontent.com/u/21308223?v=4)](https://github.com/lireincore "lireincore (15 commits)")[![urfinjuezz](https://avatars.githubusercontent.com/u/6779688?v=4)](https://github.com/urfinjuezz "urfinjuezz (1 commits)")

---

Tags

parserphpyandexyandex-market-languageymlparserymlyandexmarket

### Embed Badge

![Health badge](/badges/lireincore-ymlparser/health.svg)

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

###  Alternatives

[nikic/php-parser

A PHP parser written in PHP

17.4k902.6M1.8k](/packages/nikic-php-parser)[doctrine/lexer

PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.

11.2k910.8M118](/packages/doctrine-lexer)[erusev/parsedown

Parser for Markdown.

15.0k151.8M732](/packages/erusev-parsedown)[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

3.0k404.0M702](/packages/league-commonmark)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)

PHPackages © 2026

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