Note: This is a fork of the original ptachoire/php-dmtx project with added support for newer PHP versions and PHPUnit 10.x compatibility.
Datamatrix reader/writer based on libdmtx.
composer require "tzhmbtv/php-dmtx:*"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');composer install
./vendor/bin/phpunitThis 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
- PHP 8.2 or higher
- dmtx-utils must be installed on your system
Project structure inspired by Negotiation by willdurand.
Original package created by ptachoire.
Maintained by elnur9924 @tzhmbtv.
php-dmtx is released under the MIT License. See the bundled LICENSE file for details.