update barcode and qrcode libs
This commit is contained in:
@@ -29,6 +29,9 @@
|
|||||||
|
|
||||||
namespace Espo\Tools\Pdf\Dompdf;
|
namespace Espo\Tools\Pdf\Dompdf;
|
||||||
|
|
||||||
|
use chillerlan\QRCode\Common\EccLevel;
|
||||||
|
use chillerlan\QRCode\Output\QRMarkupSVG;
|
||||||
|
use chillerlan\QRCode\Output\QROutputInterface;
|
||||||
use Espo\Core\Htmlizer\TemplateRendererFactory;
|
use Espo\Core\Htmlizer\TemplateRendererFactory;
|
||||||
use Espo\Core\Utils\Config;
|
use Espo\Core\Utils\Config;
|
||||||
use Espo\Core\Utils\Log;
|
use Espo\Core\Utils\Log;
|
||||||
@@ -40,6 +43,8 @@ use Espo\Tools\Pdf\Template;
|
|||||||
use Picqer\Barcode\BarcodeGeneratorSVG;
|
use Picqer\Barcode\BarcodeGeneratorSVG;
|
||||||
use chillerlan\QRCode\QRCode;
|
use chillerlan\QRCode\QRCode;
|
||||||
use chillerlan\QRCode\QROptions;
|
use chillerlan\QRCode\QROptions;
|
||||||
|
use Picqer\Barcode\Exceptions\UnknownTypeException;
|
||||||
|
use RuntimeException;
|
||||||
|
|
||||||
class HtmlComposer
|
class HtmlComposer
|
||||||
{
|
{
|
||||||
@@ -265,8 +270,11 @@ class HtmlComposer
|
|||||||
|
|
||||||
$options = new QROptions();
|
$options = new QROptions();
|
||||||
|
|
||||||
$options->outputType = QRCode::OUTPUT_MARKUP_SVG;
|
// @todo Revise and test after updating the lib.
|
||||||
$options->eccLevel = QRCode::ECC_H;
|
/** @phpstan-ignore-next-line property.protected */
|
||||||
|
$options->outputType = QROutputInterface::MARKUP_SVG;
|
||||||
|
/** @phpstan-ignore-next-line property.protected */
|
||||||
|
$options->eccLevel = EccLevel::H;
|
||||||
|
|
||||||
$code = (new QRCode($options))->render($value);
|
$code = (new QRCode($options))->render($value);
|
||||||
|
|
||||||
@@ -286,7 +294,11 @@ class HtmlComposer
|
|||||||
$height = $data['height'] ?? 30;
|
$height = $data['height'] ?? 30;
|
||||||
$color = $data['color'] ?? '#000';
|
$color = $data['color'] ?? '#000';
|
||||||
|
|
||||||
$code = (new BarcodeGeneratorSVG())->getBarcode($value, $type, 2, $height, $color);
|
try {
|
||||||
|
$code = (new BarcodeGeneratorSVG())->getBarcode($value, $type, 2, $height, $color);
|
||||||
|
} catch (UnknownTypeException $e) {
|
||||||
|
throw new RuntimeException("Barcode print error.", previous: $e);
|
||||||
|
}
|
||||||
|
|
||||||
$encoded = base64_encode($code);
|
$encoded = base64_encode($code);
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -16,6 +16,7 @@
|
|||||||
"ext-curl": "*",
|
"ext-curl": "*",
|
||||||
"ext-exif": "*",
|
"ext-exif": "*",
|
||||||
"ext-pdo": "*",
|
"ext-pdo": "*",
|
||||||
|
"ext-ctype": "*",
|
||||||
"psr/log": "~3",
|
"psr/log": "~3",
|
||||||
"psr/http-message": "^1.0",
|
"psr/http-message": "^1.0",
|
||||||
"psr/container": "^1.1",
|
"psr/container": "^1.1",
|
||||||
@@ -47,9 +48,8 @@
|
|||||||
"openspout/openspout": "^5.0",
|
"openspout/openspout": "^5.0",
|
||||||
"dompdf/dompdf": "^3.1",
|
"dompdf/dompdf": "^3.1",
|
||||||
"brick/phonenumber": "^0.5.0",
|
"brick/phonenumber": "^0.5.0",
|
||||||
"picqer/php-barcode-generator": "^2.4",
|
"picqer/php-barcode-generator": "^3.2",
|
||||||
"chillerlan/php-qrcode": "^4.4",
|
"chillerlan/php-qrcode": "^5.0",
|
||||||
"ext-ctype": "*",
|
|
||||||
"lasserafn/php-initial-avatar-generator": "^4.4",
|
"lasserafn/php-initial-avatar-generator": "^4.4",
|
||||||
"tholu/php-cidr-match": "^0.5",
|
"tholu/php-cidr-match": "^0.5",
|
||||||
"league/oauth2-client": "^2.9",
|
"league/oauth2-client": "^2.9",
|
||||||
|
|||||||
Generated
+43
-33
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "62ee507d0936a0b75a0515075ec292ea",
|
"content-hash": "68047b8bb5fec096f3a5bae9593892bf",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "async-aws/core",
|
"name": "async-aws/core",
|
||||||
@@ -321,16 +321,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "chillerlan/php-qrcode",
|
"name": "chillerlan/php-qrcode",
|
||||||
"version": "4.4.2",
|
"version": "5.0.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/chillerlan/php-qrcode.git",
|
"url": "https://github.com/chillerlan/php-qrcode.git",
|
||||||
"reference": "345ed8e4ffb56e6b3fcd9f42e3970b9026fa6ce4"
|
"reference": "7b66282572fc14075c0507d74d9837dab25b38d6"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/345ed8e4ffb56e6b3fcd9f42e3970b9026fa6ce4",
|
"url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/7b66282572fc14075c0507d74d9837dab25b38d6",
|
||||||
"reference": "345ed8e4ffb56e6b3fcd9f42e3970b9026fa6ce4",
|
"reference": "7b66282572fc14075c0507d74d9837dab25b38d6",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -339,11 +339,15 @@
|
|||||||
"php": "^7.4 || ^8.0"
|
"php": "^7.4 || ^8.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phan/phan": "^5.4.5",
|
"chillerlan/php-authenticator": "^4.3.1 || ^5.2.1",
|
||||||
|
"ext-fileinfo": "*",
|
||||||
|
"phan/phan": "^5.5.2",
|
||||||
|
"phpcompatibility/php-compatibility": "10.x-dev",
|
||||||
"phpmd/phpmd": "^2.15",
|
"phpmd/phpmd": "^2.15",
|
||||||
"phpunit/phpunit": "^9.6",
|
"phpunit/phpunit": "^9.6",
|
||||||
"setasign/fpdf": "^1.8.2",
|
"setasign/fpdf": "^1.8.2",
|
||||||
"squizlabs/php_codesniffer": "^3.11"
|
"slevomat/coding-standard": "^8.23.0",
|
||||||
|
"squizlabs/php_codesniffer": "^4.0.0"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"chillerlan/php-authenticator": "Yet another Google authenticator! Also creates URIs for mobile apps.",
|
"chillerlan/php-authenticator": "Yet another Google authenticator! Also creates URIs for mobile apps.",
|
||||||
@@ -353,17 +357,26 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"chillerlan\\QRCode\\": "src/"
|
"chillerlan\\QRCode\\": "src"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT",
|
||||||
|
"Apache-2.0"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Kazuhiko Arase",
|
"name": "Kazuhiko Arase",
|
||||||
"homepage": "https://github.com/kazuhikoarase"
|
"homepage": "https://github.com/kazuhikoarase/qrcode-generator"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ZXing Authors",
|
||||||
|
"homepage": "https://github.com/zxing/zxing"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Ashot Khanamiryan",
|
||||||
|
"homepage": "https://github.com/khanamiryan/php-qrcode-detector-decoder"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Smiley",
|
"name": "Smiley",
|
||||||
@@ -375,26 +388,29 @@
|
|||||||
"homepage": "https://github.com/chillerlan/php-qrcode/graphs/contributors"
|
"homepage": "https://github.com/chillerlan/php-qrcode/graphs/contributors"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "A QR code generator with a user friendly API. PHP 7.4+",
|
"description": "A QR Code generator and reader with a user-friendly API. PHP 7.4+",
|
||||||
"homepage": "https://github.com/chillerlan/php-qrcode",
|
"homepage": "https://github.com/chillerlan/php-qrcode",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"phpqrcode",
|
"phpqrcode",
|
||||||
"qr",
|
"qr",
|
||||||
"qr code",
|
"qr code",
|
||||||
|
"qr-reader",
|
||||||
"qrcode",
|
"qrcode",
|
||||||
"qrcode-generator"
|
"qrcode-generator",
|
||||||
|
"qrcode-reader"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
|
"docs": "https://php-qrcode.readthedocs.io",
|
||||||
"issues": "https://github.com/chillerlan/php-qrcode/issues",
|
"issues": "https://github.com/chillerlan/php-qrcode/issues",
|
||||||
"source": "https://github.com/chillerlan/php-qrcode/tree/4.4.2"
|
"source": "https://github.com/chillerlan/php-qrcode"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"url": "https://ko-fi.com/codemasher",
|
"url": "https://ko-fi.com/codemasher",
|
||||||
"type": "ko_fi"
|
"type": "Ko-Fi"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-11-15T15:36:24+00:00"
|
"time": "2025-11-23T23:51:44+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "chillerlan/php-settings-container",
|
"name": "chillerlan/php-settings-container",
|
||||||
@@ -4439,21 +4455,21 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "picqer/php-barcode-generator",
|
"name": "picqer/php-barcode-generator",
|
||||||
"version": "v2.4.2",
|
"version": "v3.2.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/picqer/php-barcode-generator.git",
|
"url": "https://github.com/picqer/php-barcode-generator.git",
|
||||||
"reference": "e9d39681f617705492b609fc3fc58465ef88e8fd"
|
"reference": "fbb1de7454fcc8600133818bc1103abeb86479a4"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/picqer/php-barcode-generator/zipball/e9d39681f617705492b609fc3fc58465ef88e8fd",
|
"url": "https://api.github.com/repos/picqer/php-barcode-generator/zipball/fbb1de7454fcc8600133818bc1103abeb86479a4",
|
||||||
"reference": "e9d39681f617705492b609fc3fc58465ef88e8fd",
|
"reference": "fbb1de7454fcc8600133818bc1103abeb86479a4",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-mbstring": "*",
|
"ext-mbstring": "*",
|
||||||
"php": "^8.1"
|
"php": "^8.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpstan/phpstan": "^1.10",
|
"phpstan/phpstan": "^1.10",
|
||||||
@@ -4475,15 +4491,15 @@
|
|||||||
"LGPL-3.0-or-later"
|
"LGPL-3.0-or-later"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
|
||||||
"name": "Nicola Asuni",
|
|
||||||
"email": "info@tecnick.com",
|
|
||||||
"homepage": "http://nicolaasuni.tecnick.com"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "Casper Bakker",
|
"name": "Casper Bakker",
|
||||||
"email": "info@picqer.com",
|
"email": "info@picqer.com",
|
||||||
"homepage": "https://picqer.com"
|
"homepage": "https://picqer.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Nicola Asuni",
|
||||||
|
"email": "info@tecnick.com",
|
||||||
|
"homepage": "http://nicolaasuni.tecnick.com"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "An easy to use, non-bloated, barcode generator in PHP. Creates SVG, PNG, JPG and HTML images from the most used 1D barcode standards.",
|
"description": "An easy to use, non-bloated, barcode generator in PHP. Creates SVG, PNG, JPG and HTML images from the most used 1D barcode standards.",
|
||||||
@@ -4514,15 +4530,9 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/picqer/php-barcode-generator/issues",
|
"issues": "https://github.com/picqer/php-barcode-generator/issues",
|
||||||
"source": "https://github.com/picqer/php-barcode-generator/tree/v2.4.2"
|
"source": "https://github.com/picqer/php-barcode-generator/tree/v3.2.3"
|
||||||
},
|
},
|
||||||
"funding": [
|
"time": "2025-07-29T07:15:20+00:00"
|
||||||
{
|
|
||||||
"url": "https://github.com/casperbakker",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"time": "2024-09-18T08:09:33+00:00"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/cache",
|
"name": "psr/cache",
|
||||||
|
|||||||
Reference in New Issue
Block a user