Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Commit

Permalink
Update qr code library to version 1.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Schäfli committed Sep 12, 2017
1 parent ee3ba13 commit d75f9a7
Show file tree
Hide file tree
Showing 9 changed files with 104 additions and 82 deletions.
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -35,10 +35,10 @@
"prefer-stable": true,
"require": {
"php" : "^5.5.9 || ^7.0",
"endroid/qrcode": "^1.7"
"endroid/qrcode": "^1.9"
},
"require-dev": {
"endroid/qrcode": "^1.7"
"endroid/qrcode": "^1.9"
},
"autoload": {
"classmap": ["./classes/"]
Expand Down
26 changes: 13 additions & 13 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions vendor/composer/installed.json
@@ -1,27 +1,27 @@
[
{
"name": "symfony/options-resolver",
"version": "v3.2.1",
"version_normalized": "3.2.1.0",
"version": "v3.3.9",
"version_normalized": "3.3.9.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/options-resolver.git",
"reference": "45940bcad6388b3b6058107eca67ced738d205bb"
"reference": "ee4e22978fe885b54ee5da8c7964f0a5301abfb6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/45940bcad6388b3b6058107eca67ced738d205bb",
"reference": "45940bcad6388b3b6058107eca67ced738d205bb",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/ee4e22978fe885b54ee5da8c7964f0a5301abfb6",
"reference": "ee4e22978fe885b54ee5da8c7964f0a5301abfb6",
"shasum": ""
},
"require": {
"php": ">=5.5.9"
"php": "^5.5.9|>=7.0.8"
},
"time": "2016-05-13T18:13:23+00:00",
"time": "2017-07-29T21:54:42+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev"
"dev-master": "3.3-dev"
}
},
"installation-source": "dist",
Expand Down Expand Up @@ -57,17 +57,17 @@
},
{
"name": "endroid/qrcode",
"version": "1.9.1",
"version_normalized": "1.9.1.0",
"version": "1.9.3",
"version_normalized": "1.9.3.0",
"source": {
"type": "git",
"url": "https://github.com/endroid/QrCode.git",
"reference": "ab09b42778ad67cfe850f9c23165f8d08b756680"
"reference": "c9644bec2a9cc9318e98d1437de3c628dcd1ef93"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/endroid/QrCode/zipball/ab09b42778ad67cfe850f9c23165f8d08b756680",
"reference": "ab09b42778ad67cfe850f9c23165f8d08b756680",
"url": "https://api.github.com/repos/endroid/QrCode/zipball/c9644bec2a9cc9318e98d1437de3c628dcd1ef93",
"reference": "c9644bec2a9cc9318e98d1437de3c628dcd1ef93",
"shasum": ""
},
"require": {
Expand All @@ -82,7 +82,7 @@
"symfony/framework-bundle": "^2.3|^3.0",
"symfony/http-kernel": "^2.3|^3.0"
},
"time": "2017-01-03T11:02:14+00:00",
"time": "2017-04-08T09:13:59+00:00",
"type": "library",
"extra": {
"branch-alias": {
Expand Down
17 changes: 14 additions & 3 deletions vendor/endroid/qrcode/src/QrCode.php
Expand Up @@ -1397,7 +1397,10 @@ public function create()
++$i;
}

$mib = $max_modules_1side + 8;
$mib = $max_modules_1side;
if ($this->draw_quiet_zone) {
$mib += 8;
}

if ($this->size == 0) {
$this->size = $mib * $qrcode_module_size;
Expand Down Expand Up @@ -1458,7 +1461,7 @@ public function create()
if ($this->draw_quiet_zone == true) {
imagecopyresampled($output_image, $base_image, $this->padding, $this->padding, 0, 0, $this->size, $this->size, $mib, $mib);
} else {
imagecopyresampled($output_image, $base_image, $this->padding, $this->padding, 4, 4, $this->size, $this->size, $mib - 8, $mib - 8);
imagecopyresampled($output_image, $base_image, $this->padding, $this->padding, 4, 4, $this->size, $this->size, $mib, $mib);
}

if ($this->draw_border == true) {
Expand Down Expand Up @@ -1559,7 +1562,15 @@ public function create()
$output_image = imagecreatetruecolor($image_width, $image_height);
imagecopy($output_image, $output_image_org, 0, 0, 0, 0, $image_width, $image_height);

$logo_image = call_user_func('imagecreatefrom'.$this->image_type, $this->logo);
$image_info = getimagesize($this->logo);

if ($image_info !== false) {
$image_type = strtolower(substr(image_type_to_extension($image_info [2]), 1));
$logo_image = call_user_func('imagecreatefrom'.$image_type, $this->logo);
} else {
$logo_image = call_user_func('imagecreatefrom'.$this->image_type, $this->logo);
}

if (!$logo_image) {
throw new ImageFunctionFailedException('imagecreatefrom'.$this->image_type.' '.$this->logo.' failed');
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/symfony/options-resolver/LICENSE
@@ -1,4 +1,4 @@
Copyright (c) 2004-2016 Fabien Potencier
Copyright (c) 2004-2017 Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
22 changes: 11 additions & 11 deletions vendor/symfony/options-resolver/OptionsResolver.php
Expand Up @@ -145,7 +145,7 @@ class OptionsResolver implements Options
* @param string $option The name of the option
* @param mixed $value The default value of the option
*
* @return OptionsResolver This instance
* @return $this
*
* @throws AccessException If called from a lazy option or normalizer
*/
Expand Down Expand Up @@ -208,7 +208,7 @@ public function setDefault($option, $value)
*
* @param array $defaults The default values to set
*
* @return OptionsResolver This instance
* @return $this
*
* @throws AccessException If called from a lazy option or normalizer
*/
Expand Down Expand Up @@ -241,7 +241,7 @@ public function hasDefault($option)
*
* @param string|string[] $optionNames One or more option names
*
* @return OptionsResolver This instance
* @return $this
*
* @throws AccessException If called from a lazy option or normalizer
*/
Expand Down Expand Up @@ -322,7 +322,7 @@ public function getMissingOptions()
*
* @param string|string[] $optionNames One or more option names
*
* @return OptionsResolver This instance
* @return $this
*
* @throws AccessException If called from a lazy option or normalizer
*/
Expand Down Expand Up @@ -389,7 +389,7 @@ public function getDefinedOptions()
* @param string $option The option name
* @param \Closure $normalizer The normalizer
*
* @return OptionsResolver This instance
* @return $this
*
* @throws UndefinedOptionsException If the option is undefined
* @throws AccessException If called from a lazy option or normalizer
Expand Down Expand Up @@ -432,7 +432,7 @@ public function setNormalizer($option, \Closure $normalizer)
* @param string $option The option name
* @param mixed $allowedValues One or more acceptable values/closures
*
* @return OptionsResolver This instance
* @return $this
*
* @throws UndefinedOptionsException If the option is undefined
* @throws AccessException If called from a lazy option or normalizer
Expand Down Expand Up @@ -477,7 +477,7 @@ public function setAllowedValues($option, $allowedValues)
* @param string $option The option name
* @param mixed $allowedValues One or more acceptable values/closures
*
* @return OptionsResolver This instance
* @return $this
*
* @throws UndefinedOptionsException If the option is undefined
* @throws AccessException If called from a lazy option or normalizer
Expand Down Expand Up @@ -522,7 +522,7 @@ public function addAllowedValues($option, $allowedValues)
* @param string $option The option name
* @param string|string[] $allowedTypes One or more accepted types
*
* @return OptionsResolver This instance
* @return $this
*
* @throws UndefinedOptionsException If the option is undefined
* @throws AccessException If called from a lazy option or normalizer
Expand Down Expand Up @@ -561,7 +561,7 @@ public function setAllowedTypes($option, $allowedTypes)
* @param string $option The option name
* @param string|string[] $allowedTypes One or more accepted types
*
* @return OptionsResolver This instance
* @return $this
*
* @throws UndefinedOptionsException If the option is undefined
* @throws AccessException If called from a lazy option or normalizer
Expand Down Expand Up @@ -599,7 +599,7 @@ public function addAllowedTypes($option, $allowedTypes)
*
* @param string|string[] $optionNames One or more option names
*
* @return OptionsResolver This instance
* @return $this
*
* @throws AccessException If called from a lazy option or normalizer
*/
Expand All @@ -620,7 +620,7 @@ public function remove($optionNames)
/**
* Removes all options.
*
* @return OptionsResolver This instance
* @return $this
*
* @throws AccessException If called from a lazy option or normalizer
*/
Expand Down

0 comments on commit d75f9a7

Please sign in to comment.