PHPackages                             estrato/edifact - 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. estrato/edifact

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

estrato/edifact
===============

Parser and Serializer for UN/EDIFACT messages

3.2.1(1y ago)36159.4k↓30.6%10[1 PRs](https://github.com/estratocloud/edifact/pulls)Apache-2.0PHPPHP ^7.3 || ^8.0CI passing

Since Aug 24Pushed 1y ago3 watchersCompare

[ Source](https://github.com/estratocloud/edifact)[ Packagist](https://packagist.org/packages/estrato/edifact)[ Docs](https://github.com/estratocloud/edifact)[ RSS](/packages/estrato-edifact/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (10)Versions (20)Used By (0)

edifact
=======

[](#edifact)

A PHP library to parse and serialize UN/EDIFACT messages.

Full documentation is available at
PHPDoc API documentation is also available at [http://estratocloud.github.io/edifact/api/](http://estratocloud.github.io/edifact/api/namespaces/Estrato.Edifact.html)

[![release](https://camo.githubusercontent.com/7d30542ac91a64693bf3db060748a6413896b3f2ddc75f2d1cfa8c430b374872/68747470733a2f2f706f7365722e707567782e6f72672f6573747261746f2f656469666163742f76657273696f6e2e737667)](https://packagist.org/packages/estrato/edifact)[![build](https://github.com/estratocloud/edifact/workflows/buildcheck/badge.svg?branch=main)](https://github.com/estratocloud/edifact/actions/workflows/buildcheck.yml?query=branch%3Amain)[![coverage](https://camo.githubusercontent.com/e41f61182c3413708bed5d4b3b89bf9efb36e0cc49ac730de5759b35726b8172/68747470733a2f2f636f6465636f762e696f2f67682f6573747261746f636c6f75642f656469666163742f67726170682f62616467652e737667)](https://codecov.io/gh/estratocloud/edifact)

Quick Examples
--------------

[](#quick-examples)

Read an EDI message from a file

```
$message = \Estrato\Edifact\Message::fromFile("/tmp/order.edi");

foreach ($message->getAllSegments() as $segment) {
    echo $segment->getSegmentCode() . "\n";
}
```

Create an EDI message

```
$message = new \Estrato\Edifact\Message;

$message->addSegment(new Segment("QTY", ["21", "8"]));

echo $message->serialize() . "\n";
```

*Read more at *

Changelog
---------

[](#changelog)

A [Changelog](CHANGELOG.md) has been available since the beginning of time

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance45

Moderate activity, may be stable

Popularity46

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 96.3% 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 ~291 days

Total

13

Last Release

425d ago

Major Versions

0.1.1 → 1.0.02018-02-06

1.1.0 → 2.0.02019-03-08

2.2.1 → 3.0.02022-01-22

PHP version history (4 changes)0.1.0PHP &gt;=5.6.0

0.1.1PHP ^5.6|^7.0

2.0.0PHP ^7.2

2.2.0PHP ^7.3 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/11dc66042513f11d1c99b1e6763f25dca84a3ff31cdbea3972b9b804a3d3d5e9?d=identicon)[duncan3dc](/maintainers/duncan3dc)

---

Top Contributors

[![duncan3dc](https://avatars.githubusercontent.com/u/546811?v=4)](https://github.com/duncan3dc "duncan3dc (78 commits)")[![mathielen](https://avatars.githubusercontent.com/u/1571485?v=4)](https://github.com/mathielen "mathielen (1 commits)")[![sydgren](https://avatars.githubusercontent.com/u/11387613?v=4)](https://github.com/sydgren "sydgren (1 commits)")[![themasch](https://avatars.githubusercontent.com/u/170171?v=4)](https://github.com/themasch "themasch (1 commits)")

---

Tags

parserserializerediedifact

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/estrato-edifact/health.svg)

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

###  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)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[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)[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)
