From 95fbe45bccd2e0d47d7fa7639654b0d625c206ce Mon Sep 17 00:00:00 2001 From: Philipp Date: Fri, 10 Dec 2021 23:42:30 +0100 Subject: [PATCH] Bump bacon/bacon-qr-code to 2.0.4 --- composer.json | 2 +- composer.lock | 68 ++++++++++++++++++++---- src/Module/Settings/TwoFactor/Verify.php | 7 +-- 3 files changed, 62 insertions(+), 15 deletions(-) diff --git a/composer.json b/composer.json index d4433b9b7f..c2cfa61b24 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "ext-simplexml": "*", "ext-xml": "*", "asika/simple-console": "^1.0", - "bacon/bacon-qr-code": "^1.0", + "bacon/bacon-qr-code": "^2.0.0", "divineomega/password_exposed": "^2.8", "ezyang/htmlpurifier": "^4.7", "friendica/json-ld": "^1.0", diff --git a/composer.lock b/composer.lock index cbe26a08f1..70658b5f6b 100644 --- a/composer.lock +++ b/composer.lock @@ -41,32 +41,35 @@ }, { "name": "bacon/bacon-qr-code", - "version": "1.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/Bacon/BaconQrCode.git", - "reference": "5a91b62b9d37cee635bbf8d553f4546057250bee" + "reference": "f73543ac4e1def05f1a70bcd1525c8a157a1ad09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/5a91b62b9d37cee635bbf8d553f4546057250bee", - "reference": "5a91b62b9d37cee635bbf8d553f4546057250bee", + "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/f73543ac4e1def05f1a70bcd1525c8a157a1ad09", + "reference": "f73543ac4e1def05f1a70bcd1525c8a157a1ad09", "shasum": "" }, "require": { + "dasprid/enum": "^1.0.3", "ext-iconv": "*", - "php": "^5.4|^7.0" + "php": "^7.1 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.8" + "phly/keep-a-changelog": "^1.4", + "phpunit/phpunit": "^7 | ^8 | ^9", + "squizlabs/php_codesniffer": "^3.4" }, "suggest": { - "ext-gd": "to generate QR code images" + "ext-imagick": "to generate QR code images" }, "type": "library", "autoload": { - "psr-0": { - "BaconQrCode": "src/" + "psr-4": { + "BaconQrCode\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -77,13 +80,13 @@ { "name": "Ben Scholzen 'DASPRiD'", "email": "mail@dasprids.de", - "homepage": "http://www.dasprids.de", + "homepage": "https://dasprids.de/", "role": "Developer" } ], "description": "BaconQrCode is a QR code generator for PHP.", "homepage": "https://github.com/Bacon/BaconQrCode", - "time": "2017-10-17T09:59:25+00:00" + "time": "2021-06-18T13:26:35+00:00" }, { "name": "bower-asset/Chart-js", @@ -380,6 +383,49 @@ ], "time": "2021-10-28T20:44:15+00:00" }, + { + "name": "dasprid/enum", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/DASPRiD/Enum.git", + "reference": "5abf82f213618696dda8e3bf6f64dd042d8542b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/5abf82f213618696dda8e3bf6f64dd042d8542b2", + "reference": "5abf82f213618696dda8e3bf6f64dd042d8542b2", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "^7 | ^8 | ^9", + "squizlabs/php_codesniffer": "^3.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "DASPRiD\\Enum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Ben Scholzen 'DASPRiD'", + "email": "mail@dasprids.de", + "homepage": "https://dasprids.de/", + "role": "Developer" + } + ], + "description": "PHP 7.1 enum implementation", + "keywords": [ + "enum", + "map" + ], + "time": "2020-10-02T16:03:48+00:00" + }, { "name": "divineomega/do-file-cache", "version": "v2.0.6", diff --git a/src/Module/Settings/TwoFactor/Verify.php b/src/Module/Settings/TwoFactor/Verify.php index 8b2f1e54fe..26a1b37529 100644 --- a/src/Module/Settings/TwoFactor/Verify.php +++ b/src/Module/Settings/TwoFactor/Verify.php @@ -110,9 +110,10 @@ class Verify extends BaseSettings $otpauthUrl = (new Google2FA())->getQRCodeUrl($company, $holder, $secret); - $renderer = (new \BaconQrCode\Renderer\Image\Svg()) - ->setHeight(256) - ->setWidth(256); + $renderer = new ImageRenderer( + new RendererStyle(256), + new SvgImageBackEnd() + ); $writer = new Writer($renderer);