PHPackages                             tzhmbtv/php-dmtx - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tzhmbtv/php-dmtx

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tzhmbtv/php-dmtx
================

Datamatrix reader/writer based on libdmtx with support for PHP 8.x

022PHP

Since Mar 12Pushed 1y agoCompare

[ Source](https://github.com/tzhmbtv/php-dmtx)[ Packagist](https://packagist.org/packages/tzhmbtv/php-dmtx)[ RSS](/packages/tzhmbtv-php-dmtx/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

php-dmtx
========

[](#php-dmtx)

> **Note**: This is a fork of the original [ptachoire/php-dmtx](https://github.com/ptachoire/php-dmtx) project with added support for newer PHP versions and PHPUnit 10.x compatibility.

Datamatrix reader/writer based on [libdmtx](https://github.com/dmtx).

⚠️ The installation of [dmtx-utils](https://github.com/dmtx/dmtx-utils) is required to use the lib.

Install
-------

[](#install)

```
composer require "tzhmbtv/php-dmtx:*"
```

Usage
-----

[](#usage)

```
use Dmtx\Writer;

$writer = new Writer();

//encode message into file
$writer->encode('this is a message')
    ->saveAs('/tmp/image.png');

//encode message and output image
echo $writer->encode('this is a message')
    ->dump();
```

```
use Dmtx\Reader;

$reader = new Reader();

//decode message from data
$reader->decode($encoded_value);

//decode message from file
echo $reader->decodeFile('/tmp/image.png');
```

Test
----

[](#test)

```
composer install
./vendor/bin/phpunit
```

Compatibility
-------------

[](#compatibility)

This fork is compatible with:

- PHP 8.2 or higher
- PHPUnit 10.x
- Symfony 3.4, 4.x, 5.x, 6.x, and 7.x packages

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- [dmtx-utils](https://github.com/dmtx/dmtx-utils) must be installed on your system

Credits
-------

[](#credits)

Project structure inspired by [Negotiation](https://github.com/willdurand/Negotiation) by [willdurand](https://github.com/willdurand).

Original package created by [ptachoire](https://github.com/ptachoire).

Maintained by [elnur9924 @tzhmbtv](https://github.com/tzhmbtv).

License
-------

[](#license)

php-dmtx is released under the MIT License. See the bundled LICENSE file for details.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 78.9% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9fdb8e9cbf5c9fe6aa01bbc1943ec0cdadb97256c8e6560ead6b8e1181072049?d=identicon)[tzhmbtv](/maintainers/tzhmbtv)

---

Top Contributors

[![krichprollsch](https://avatars.githubusercontent.com/u/562696?v=4)](https://github.com/krichprollsch "krichprollsch (15 commits)")[![kamicloud](https://avatars.githubusercontent.com/u/10206616?v=4)](https://github.com/kamicloud "kamicloud (1 commits)")[![pmaselkowski](https://avatars.githubusercontent.com/u/520283?v=4)](https://github.com/pmaselkowski "pmaselkowski (1 commits)")[![silasrm](https://avatars.githubusercontent.com/u/197187?v=4)](https://github.com/silasrm "silasrm (1 commits)")[![zippex](https://avatars.githubusercontent.com/u/7262177?v=4)](https://github.com/zippex "zippex (1 commits)")

### Embed Badge

![Health badge](/badges/tzhmbtv-php-dmtx/health.svg)

```
[![Health](https://phpackages.com/badges/tzhmbtv-php-dmtx/health.svg)](https://phpackages.com/packages/tzhmbtv-php-dmtx)
```

PHPackages © 2026

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