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

4.0.0(2w ago)36183.9k↓66.3%10[1 issues](https://github.com/estratocloud/edifact/issues)Apache-2.0PHPPHP ^8.0CI passing

Since Aug 24Pushed 2w 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 2d ago

READMEChangelogDependencies (19)Versions (22)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/actions/workflows/buildcheck.yaml/badge.svg)](https://github.com/estratocloud/edifact/actions/workflows/buildcheck.yaml?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

63

—

FairBetter than 99% of packages

Maintenance96

Actively maintained with recent releases

Popularity46

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 95.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 ~303 days

Recently: every ~219 days

Total

14

Last Release

17d 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

3.2.1 → 4.0.02026-06-16

PHP version history (5 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

4.0.0PHP ^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 (92 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 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.4k954.1M2.5k](/packages/nikic-php-parser)[doctrine/lexer

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

11.2k959.4M160](/packages/doctrine-lexer)[masterminds/html5

An HTML5 parser and serializer.

1.8k269.7M321](/packages/masterminds-html5)[erusev/parsedown

Parser for Markdown.

15.1k156.8M870](/packages/erusev-parsedown)[league/commonmark

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

3.0k437.5M1.0k](/packages/league-commonmark)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k211.0M75](/packages/sabberworm-php-css-parser)

PHPackages © 2026

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