Skip to content

Commit ec54c53

Browse files
Update dependency chillerlan/php-qrcode to v5.0.4
1 parent 9c9ed33 commit ec54c53

File tree

11 files changed

+60
-42
lines changed

11 files changed

+60
-42
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"homepage": "https://github.com/ZoeyVid/booking",
66
"require": {
77
"phpmailer/phpmailer": "6.10.0",
8-
"chillerlan/php-qrcode": "5.0.3",
8+
"chillerlan/php-qrcode": "5.0.4",
99
"google/recaptcha": "1.3.1",
1010
"ext-sqlite3": "*",
1111
"ext-curl": "*",

composer.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/chillerlan/php-qrcode/composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@
5454
"require-dev": {
5555
"ext-fileinfo": "*",
5656
"chillerlan/php-authenticator": "^4.3.1 || ^5.2.1",
57-
"phan/phan": "^5.4.5",
57+
"phan/phan": "^5.5.1",
5858
"phpcompatibility/php-compatibility": "10.x-dev",
5959
"phpunit/phpunit": "^9.6",
6060
"phpmd/phpmd": "^2.15",
6161
"setasign/fpdf": "^1.8.2",
62-
"slevomat/coding-standard": "^8.15",
63-
"squizlabs/php_codesniffer": "^3.11"
62+
"slevomat/coding-standard": "^8.23.0",
63+
"squizlabs/php_codesniffer": "^4.0.0"
6464
},
6565
"suggest": {
6666
"chillerlan/php-authenticator": "Yet another Google authenticator! Also creates URIs for mobile apps.",

vendor/chillerlan/php-qrcode/src/Data/AlphaNum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function getLengthInBits():int{
4444
* @inheritDoc
4545
*/
4646
public static function validateString(string $string):bool{
47-
return (bool)preg_match('/^[A-Z\d %$*+-.:\/]+$/', $string);
47+
return (bool)preg_match('/^[A-Z\d %$*+\-.:\/]+$/', $string);
4848
}
4949

5050
/**

vendor/chillerlan/php-qrcode/src/Data/Hanzi.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use chillerlan\QRCode\Common\{BitBuffer, Mode};
1414
use Throwable;
1515
use function chr, implode, intdiv, is_string, mb_convert_encoding, mb_detect_encoding,
16-
mb_detect_order, mb_internal_encoding, mb_strlen, ord, sprintf, strlen;
16+
mb_internal_encoding, mb_strlen, ord, sprintf, strlen;
1717

1818
/**
1919
* Hanzi (simplified Chinese) mode, GBT18284-2000: 13-bit double-byte characters from the GB2312/GB18030 character set
@@ -67,9 +67,12 @@ public function getLengthInBits():int{
6767
* @throws \chillerlan\QRCode\Data\QRCodeDataException
6868
*/
6969
public static function convertEncoding(string $string):string{
70-
mb_detect_order([mb_internal_encoding(), 'UTF-8', 'GB2312', 'GB18030', 'CP936', 'EUC-CN', 'HZ']);
7170

72-
$detected = mb_detect_encoding($string, null, true);
71+
$detected = mb_detect_encoding(
72+
$string,
73+
[mb_internal_encoding(), 'UTF-8', 'GB2312', 'GB18030', 'CP936', 'EUC-CN', 'HZ'],
74+
true,
75+
);
7376

7477
if($detected === false){
7578
throw new QRCodeDataException('mb_detect_encoding error');

vendor/chillerlan/php-qrcode/src/Data/Kanji.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use chillerlan\QRCode\Common\{BitBuffer, Mode};
1414
use Throwable;
1515
use function chr, implode, intdiv, is_string, mb_convert_encoding, mb_detect_encoding,
16-
mb_detect_order, mb_internal_encoding, mb_strlen, ord, sprintf, strlen;
16+
mb_internal_encoding, mb_strlen, ord, sprintf, strlen;
1717

1818
/**
1919
* Kanji mode: 13-bit double-byte characters from the Shift-JIS character set
@@ -60,9 +60,7 @@ public function getLengthInBits():int{
6060
* @throws \chillerlan\QRCode\Data\QRCodeDataException
6161
*/
6262
public static function convertEncoding(string $string):string{
63-
mb_detect_order([mb_internal_encoding(), 'UTF-8', 'SJIS', 'SJIS-2004']);
64-
65-
$detected = mb_detect_encoding($string, null, true);
63+
$detected = mb_detect_encoding($string, [mb_internal_encoding(), 'UTF-8', 'SJIS', 'SJIS-2004'], true);
6664

6765
if($detected === false){
6866
throw new QRCodeDataException('mb_detect_encoding error');

vendor/chillerlan/php-qrcode/src/Decoder/Decoder.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ final class Decoder{
2929
private ?EccLevel $eccLevel = null;
3030
private ?MaskPattern $maskPattern = null;
3131
private BitBuffer $bitBuffer;
32+
private Detector $detector;
3233

3334
/**
3435
* Decodes a QR Code represented as a BitMatrix.
@@ -37,7 +38,8 @@ final class Decoder{
3738
* @throws \Throwable|\chillerlan\QRCode\Decoder\QRCodeDecoderException
3839
*/
3940
public function decode(LuminanceSourceInterface $source):DecoderResult{
40-
$matrix = (new Detector($source))->detect();
41+
$this->detector = new Detector($source);
42+
$matrix = $this->detector->detect();
4143

4244
try{
4345
// clone the BitMatrix to avoid errors in case we run into mirroring
@@ -148,6 +150,7 @@ private function decodeBitStream(BitBuffer $bitBuffer):DecoderResult{
148150
'data' => $result,
149151
'version' => $this->version,
150152
'eccLevel' => $this->eccLevel,
153+
'finderPatterns' => $this->detector->getFinderPatterns(),
151154
'maskPattern' => $this->maskPattern,
152155
'structuredAppendParity' => $parityData,
153156
'structuredAppendSequence' => $symbolSequence,

vendor/chillerlan/php-qrcode/src/Decoder/DecoderResult.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@
2020
* applies to 2D barcode formats. For now, it contains the raw bytes obtained
2121
* as well as a String interpretation of those bytes, if applicable.
2222
*
23-
* @property \chillerlan\QRCode\Common\BitBuffer $rawBytes
24-
* @property string $data
25-
* @property \chillerlan\QRCode\Common\Version $version
26-
* @property \chillerlan\QRCode\Common\EccLevel $eccLevel
27-
* @property \chillerlan\QRCode\Common\MaskPattern $maskPattern
28-
* @property int $structuredAppendParity
29-
* @property int $structuredAppendSequence
23+
* @property \chillerlan\QRCode\Common\BitBuffer $rawBytes
24+
* @property string $data
25+
* @property \chillerlan\QRCode\Common\Version $version
26+
* @property \chillerlan\QRCode\Common\EccLevel $eccLevel
27+
* @property \chillerlan\QRCode\Common\MaskPattern $maskPattern
28+
* @property int $structuredAppendParity
29+
* @property int $structuredAppendSequence
30+
* @property \chillerlan\QRCode\Detector\FinderPattern[] $finderPatterns
3031
*/
3132
final class DecoderResult{
3233

@@ -37,6 +38,8 @@ final class DecoderResult{
3738
private string $data = '';
3839
private int $structuredAppendParity = -1;
3940
private int $structuredAppendSequence = -1;
41+
/** @var \chillerlan\QRCode\Detector\FinderPattern[] */
42+
private array $finderPatterns = [];
4043

4144
/**
4245
* DecoderResult constructor.

vendor/chillerlan/php-qrcode/src/Detector/Detector.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
final class Detector{
2626

2727
private BitMatrix $matrix;
28+
/** @var \chillerlan\QRCode\Detector\FinderPattern[] */
29+
private array $finderPatterns = [];
2830

2931
/**
3032
* Detector constructor.
@@ -33,11 +35,20 @@ public function __construct(LuminanceSourceInterface $source){
3335
$this->matrix = (new Binarizer($source))->getBlackMatrix();
3436
}
3537

38+
/**
39+
* @return \chillerlan\QRCode\Detector\FinderPattern[]
40+
*/
41+
public function getFinderPatterns():array{
42+
return $this->finderPatterns;
43+
}
44+
3645
/**
3746
* Detects a QR Code in an image.
3847
*/
3948
public function detect():BitMatrix{
40-
[$bottomLeft, $topLeft, $topRight] = (new FinderPatternFinder($this->matrix))->find();
49+
$this->finderPatterns = (new FinderPatternFinder($this->matrix))->find();
50+
51+
[$bottomLeft, $topLeft, $topRight] = $this->finderPatterns;
4152

4253
$moduleSize = $this->calculateModuleSize($topLeft, $topRight, $bottomLeft);
4354
$dimension = $this->computeDimension($topLeft, $topRight, $bottomLeft, $moduleSize);

vendor/composer/installed.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
"packages": [
33
{
44
"name": "chillerlan/php-qrcode",
5-
"version": "5.0.3",
6-
"version_normalized": "5.0.3.0",
5+
"version": "5.0.4",
6+
"version_normalized": "5.0.4.0",
77
"source": {
88
"type": "git",
99
"url": "https://github.com/chillerlan/php-qrcode.git",
10-
"reference": "42e215640e9ebdd857570c9e4e52245d1ee51de2"
10+
"reference": "390393e97a6e42ccae0e0d6205b8d4200f7ddc43"
1111
},
1212
"dist": {
1313
"type": "zip",
14-
"url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/42e215640e9ebdd857570c9e4e52245d1ee51de2",
15-
"reference": "42e215640e9ebdd857570c9e4e52245d1ee51de2",
14+
"url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/390393e97a6e42ccae0e0d6205b8d4200f7ddc43",
15+
"reference": "390393e97a6e42ccae0e0d6205b8d4200f7ddc43",
1616
"shasum": ""
1717
},
1818
"require": {
@@ -23,20 +23,20 @@
2323
"require-dev": {
2424
"chillerlan/php-authenticator": "^4.3.1 || ^5.2.1",
2525
"ext-fileinfo": "*",
26-
"phan/phan": "^5.4.5",
26+
"phan/phan": "^5.5.1",
2727
"phpcompatibility/php-compatibility": "10.x-dev",
2828
"phpmd/phpmd": "^2.15",
2929
"phpunit/phpunit": "^9.6",
3030
"setasign/fpdf": "^1.8.2",
31-
"slevomat/coding-standard": "^8.15",
32-
"squizlabs/php_codesniffer": "^3.11"
31+
"slevomat/coding-standard": "^8.23.0",
32+
"squizlabs/php_codesniffer": "^4.0.0"
3333
},
3434
"suggest": {
3535
"chillerlan/php-authenticator": "Yet another Google authenticator! Also creates URIs for mobile apps.",
3636
"setasign/fpdf": "Required to use the QR FPDF output.",
3737
"simple-icons/simple-icons": "SVG icons that you can use to embed as logos in the QR Code"
3838
},
39-
"time": "2024-11-21T16:12:34+00:00",
39+
"time": "2025-09-19T17:30:27+00:00",
4040
"type": "library",
4141
"installation-source": "dist",
4242
"autoload": {

0 commit comments

Comments
 (0)