PHPackages                             arsengoian/commerce-ml - 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. [API Development](/categories/api)
4. /
5. arsengoian/commerce-ml

ActiveLibrary[API Development](/categories/api)

arsengoian/commerce-ml
======================

Easy-peasy CommerceML 2.10 PHP library

1015.7k↑1192.9%14[1 issues](https://github.com/arsengoian/commerce-ml/issues)PHPCI failing

Since Nov 27Pushed 5y ago2 watchersCompare

[ Source](https://github.com/arsengoian/commerce-ml)[ Packagist](https://packagist.org/packages/arsengoian/commerce-ml)[ RSS](/packages/arsengoian-commerce-ml/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP CommerceML
==============

[](#php-commerceml)

Simple and requirements-free SimpleXML-based CommerceML parser and builder.

Features
--------

[](#features)

Usage:

```
 composer require arsengoian/commerce-ml

```

Parse CommerceML:

```
use CommerceML\Client;
/**
 * @var string $input
 */
$commercialInformation = Client::toCommerceML($input);
```

Build CommerceML string from CommerceML object:

```
use CommerceML\Client;
/**
 * @var CommerceML\Implementation\CommercialInformation $commercialInformation
 */
$output = Client::toString($commercialInformation);
```

Namespaces:

- `CommerceML\Nodes` - abstract classes representing nodes. May have a custom implementation, including database storage
- `CommerceML\Implementation` - simplest implementations storing variables in protected fields. This implementation will be returned while parsing. Nodes collecting arrays also implement `ArrayAccess`, `IteratorAggregate` and `Countable`.
- `CommerceML\Constructors` - implementations with constructors, extend those from `CommerceML\Implementation`. Use these while building a custom CommerceML tree.

Advanced:
---------

[](#advanced)

To use custom classes while parsing, before calling `Client::toString()`, do:

```
use CommerceML\Node\Node

Node::overrideImplementations([
    ProductCustomImplementation::class, // Must inherit from CommerceML\Implementations\Product
]);
```

Contributions
-------------

[](#contributions)

Current implementation of the library doesn't cover all possible CommerceML nodes. E.g. product import nodes aren't covered.

Also complete test coverage would be welcomed.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d8ab20cc931cdd85e854b1c05e2064aaf36d9ca92d300db89c06a0f89f1c6ac?d=identicon)[arsengoian](/maintainers/arsengoian)

---

Top Contributors

[![mavsan](https://avatars.githubusercontent.com/u/5114650?v=4)](https://github.com/mavsan "mavsan (6 commits)")[![arsengoian](https://avatars.githubusercontent.com/u/18646968?v=4)](https://github.com/arsengoian "arsengoian (4 commits)")[![riv-snst](https://avatars.githubusercontent.com/u/34107712?v=4)](https://github.com/riv-snst "riv-snst (3 commits)")[![ryabininea](https://avatars.githubusercontent.com/u/4019866?v=4)](https://github.com/ryabininea "ryabininea (1 commits)")

### Embed Badge

![Health badge](/badges/arsengoian-commerce-ml/health.svg)

```
[![Health](https://phpackages.com/badges/arsengoian-commerce-ml/health.svg)](https://phpackages.com/packages/arsengoian-commerce-ml)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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