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

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

larafull/ymlparser
==================

YML (Yandex XML format) parser for Laravel

v1.2.0(7y ago)43.5k—0%MITPHPPHP &gt;=7.1

Since Apr 29Pushed 7y agoCompare

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

READMEChangelogDependencies (1)Versions (5)Used By (0)

Laravel YML (Yandex XML format) Parser
======================================

[](#laravel-yml-yandex-xml-format-parser)

Parser for yml(yandex.market.ru) files adapted for Laravel 5.5+.

Forked from

Thanks for Serkin Alexander!

YMLParser out of box have two drivers for different file sizes:

- XMLReader - for medium and large xml files
- SimpleXML - for small xml files

Laravel YML parsing notice:
---------------------------

[](#laravel-yml-parsing-notice)

On current step Laravel is not required, but development of this package is going inside Laravel project.

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

[](#installation)

Package requires php-xmlrpc and php-mbstring

```
sudo apt-get install php-xmlrpc php-mbstring

```

---

Require package via Composer:

```
composer require larafull/ymlparser:dev-master

```

Usage
-----

[](#usage)

### Remote YML parsing in Laravel etc

[](#remote-yml-parsing-in-laravel-etc)

Since v1.2 remote parsing is available:

```
use YMLParser\YMLParser;
use YMLParser\Driver\XMLReader;

$url = 'https://somedomain/somefolder/somefile.yml.xml';

$parser = new YMLParser(new XMLReader);

$parser->open($url);

$offers = $parsers->getOffers(); // etc
```

### Getting all offers from file

[](#getting-all-offers-from-file)

```
use YMLParser\YMLParser;
use YMLParser\Driver\XMLReader;

$filename = '/path/to/file/file.xml';

//   User XMLReader driver large xml files or SimpleXML driver for small xml files.

$parser = new YMLParser(new XMLReader);
$parser->open($filename); // throws \Exception if $filename doesn't exist or empty
foreach($parser->getOffers() as $offer): // YMLParser::getOffers() returns \Generator
    echo $offer['url'];
endforeach;
```

### Using filters for offers:

[](#using-filters-for-offers)

YMLParser::getOffers() can take filter function as an argument. Filter should be an anonymous function which returns true or false

```
use YMLParser\YMLParser;
use YMLParser\Driver\SimpleXML;

$filename = '/path/to/file/file.xml';

$parser = new YMLParser(new SimpleXML);
$parser->open($filename);

// Anonnymous filter function example:

$filter = function($element) {
    return !empty($element['url']);
};

$offers = iterator_to_array($parser->getOffers($filter));

// Let's dump first offer via Laravel dump():

dump($offers[0]['params']);
```

Dependencies
------------

[](#dependencies)

- PHP: &gt;= 7.1
- xmlrpc extension
- mbstring extension

Modifications after fork
------------------------

[](#modifications-after-fork)

DriverInterface can be changed. For capability check static variables will be added.

Migrations to create models from YML will be available later.

Contribution and your ideas
---------------------------

[](#contribution-and-your-ideas)

Create pull requests or/and message me here:

Telegram: @vvmspace

Twitter: @vvmspace

VK:

Instagram:

E-mail:

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 94.5% 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 ~627 days

Total

3

Last Release

2775d ago

PHP version history (2 changes)v1.1.1PHP &gt;=5.5

v1.2.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a69e2e20ba9b94b7f8fa5279346aefcc4ca9b97819a8985fb0306c32ed95711?d=identicon)[larafull](/maintainers/larafull)

---

Top Contributors

[![serkin](https://avatars.githubusercontent.com/u/1589686?v=4)](https://github.com/serkin "serkin (69 commits)")[![vvmspace](https://avatars.githubusercontent.com/u/21310372?v=4)](https://github.com/vvmspace "vvmspace (4 commits)")

---

Tags

laravelparsingxmlyandexymlymlyandexlarafull

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[mustangostang/spyc

A simple YAML loader/dumper class for PHP

73240.3M171](/packages/mustangostang-spyc)[hassankhan/config

Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files

97513.5M169](/packages/hassankhan-config)[t1gor/robots-txt-parser

PHP class to parse robots.txt rules according to Google, Yandex, W3C and The Web Robots Pages specifications.

85494.6k4](/packages/t1gor-robots-txt-parser)[lireincore/ymlparser

YML (Yandex Market Language) parser

2429.6k1](/packages/lireincore-ymlparser)[bopoda/robots-txt-parser

PHP Class for parsing robots.txt files according to Google, Yandex specifications.

48266.4k1](/packages/bopoda-robots-txt-parser)[m1/vars

Vars is a simple to use and easily extendable configuration loader with in built loaders for ini, json, PHP, toml, XML and yaml/yml file types. It also comes with in built support for Silex and more frameworks to come soon.

69124.2k1](/packages/m1-vars)

PHPackages © 2026

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