diff --git a/composer.json b/composer.json index 8ef83744..12445d44 100644 --- a/composer.json +++ b/composer.json @@ -86,7 +86,7 @@ "doctrine/doctrine-fixtures-bundle": "^3.5", "doctrine/doctrine-migrations-bundle": "^3.1", "doctrine/sql-formatter": "^1.1", - "endroid/qr-code": "^5.0", + "endroid/qr-code": "^6.0", "ext-pcntl": "*", "firebase/php-jwt": "^6.1", "monolog/monolog": "^3.5.0", @@ -305,4 +305,4 @@ }, "minimum-stability": "dev", "prefer-stable": true -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 72521489..2cdf825a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2e16170f5bfc04c02b26951a3ee44c06", + "content-hash": "b9e90d690c46fee1828994ef64f01633", "packages": [ { "name": "aws/aws-crt-php", @@ -13553,21 +13553,21 @@ }, { "name": "endroid/qr-code", - "version": "5.1.0", + "version": "6.0.3", "source": { "type": "git", "url": "https://github.com/endroid/qr-code.git", - "reference": "393fec6c4cbdc1bd65570ac9d245704428010122" + "reference": "bdbb06e767efe9abe3c00461662b4059a6cd0b55" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/endroid/qr-code/zipball/393fec6c4cbdc1bd65570ac9d245704428010122", - "reference": "393fec6c4cbdc1bd65570ac9d245704428010122", + "url": "https://api.github.com/repos/endroid/qr-code/zipball/bdbb06e767efe9abe3c00461662b4059a6cd0b55", + "reference": "bdbb06e767efe9abe3c00461662b4059a6cd0b55", "shasum": "" }, "require": { "bacon/bacon-qr-code": "^3.0", - "php": "^8.1" + "php": "^8.2" }, "require-dev": { "endroid/quality": "dev-main", @@ -13584,7 +13584,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "5.x-dev" + "dev-main": "6.x-dev" } }, "autoload": { @@ -13613,7 +13613,7 @@ ], "support": { "issues": "https://github.com/endroid/qr-code/issues", - "source": "https://github.com/endroid/qr-code/tree/5.1.0" + "source": "https://github.com/endroid/qr-code/tree/6.0.3" }, "funding": [ { @@ -13621,7 +13621,7 @@ "type": "github" } ], - "time": "2024-09-08T08:52:55+00:00" + "time": "2024-10-29T19:28:52+00:00" }, { "name": "firebase/php-jwt", @@ -15566,7 +15566,7 @@ ], "aliases": [], "minimum-stability": "dev", - "stability-flags": {}, + "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, "platform": { diff --git a/packages/sonata-integration-bundle/composer.json b/packages/sonata-integration-bundle/composer.json index 1aa08285..0b7dad32 100644 --- a/packages/sonata-integration-bundle/composer.json +++ b/packages/sonata-integration-bundle/composer.json @@ -28,7 +28,7 @@ "phpunit/phpunit": "^11.3", "scheb/2fa-bundle": "^6.0", "scheb/2fa-email": "^6.0", - "endroid/qr-code": "^5.0", + "endroid/qr-code": "^6.0", "scheb/2fa-totp": "^6.0" }, "minimum-stability": "dev", diff --git a/packages/user-bundle/Security/TwoFactorAuthentication/QrCodeGenerator.php b/packages/user-bundle/Security/TwoFactorAuthentication/QrCodeGenerator.php index 510b3d13..d1949fe9 100644 --- a/packages/user-bundle/Security/TwoFactorAuthentication/QrCodeGenerator.php +++ b/packages/user-bundle/Security/TwoFactorAuthentication/QrCodeGenerator.php @@ -3,9 +3,7 @@ namespace Draw\Bundle\UserBundle\Security\TwoFactorAuthentication; use Endroid\QrCode\Builder\Builder; -use Endroid\QrCode\Encoding\Encoding; use Endroid\QrCode\ErrorCorrectionLevel; -use Endroid\QrCode\RoundBlockSizeMode; use Endroid\QrCode\Writer\Result\ResultInterface; use Endroid\QrCode\Writer\SvgWriter; @@ -13,16 +11,12 @@ class QrCodeGenerator { public function getTotpQrCode(string $qrCodeContent): ResultInterface { - return Builder::create() - ->writer(new SvgWriter()) - ->writerOptions([]) - ->data($qrCodeContent) - ->encoding(new Encoding('UTF-8')) - ->errorCorrectionLevel(ErrorCorrectionLevel::High) - ->size(200) - ->margin(0) - ->roundBlockSizeMode(RoundBlockSizeMode::Margin) - ->build() - ; + return (new Builder( + new SvgWriter(), + data: $qrCodeContent, + errorCorrectionLevel: ErrorCorrectionLevel::High, + size: 200, + margin: 0, + ))->build(); } } diff --git a/packages/user-bundle/composer.json b/packages/user-bundle/composer.json index 792cc82f..943f7abd 100644 --- a/packages/user-bundle/composer.json +++ b/packages/user-bundle/composer.json @@ -29,7 +29,7 @@ "draw/messenger": "^0.15", "draw/security": "^0.15", "draw/tester": "^0.15", - "endroid/qr-code": "^5.0", + "endroid/qr-code": "^6.0", "firebase/php-jwt": "^6.1", "phpunit/phpunit": "^11.3", "scheb/2fa-bundle": "^6.0",