fix:修复BUG/升级1.1.6版本
This commit is contained in:
6
vendor/bacon/bacon-qr-code/composer.json
vendored
6
vendor/bacon/bacon-qr-code/composer.json
vendored
@@ -34,5 +34,11 @@
|
||||
"allow-plugins": {
|
||||
"ocramius/package-versions": true
|
||||
}
|
||||
},
|
||||
"archive": {
|
||||
"exclude": [
|
||||
"/test",
|
||||
"/phpunit.xml.dist"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
13
vendor/bacon/bacon-qr-code/phpunit.xml.dist
vendored
Normal file
13
vendor/bacon/bacon-qr-code/phpunit.xml.dist
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true">
|
||||
<coverage processUncoveredFiles="true">
|
||||
<include>
|
||||
<directory suffix=".php">src</directory>
|
||||
</include>
|
||||
</coverage>
|
||||
<testsuites>
|
||||
<testsuite name="BaconQrCode Tests">
|
||||
<directory>./test</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
||||
@@ -89,6 +89,9 @@ final class CharacterSetEci extends AbstractEnum
|
||||
*/
|
||||
private static $nameToEci;
|
||||
|
||||
/**
|
||||
* @param int[] $values
|
||||
*/
|
||||
public function __construct(array $values, string ...$otherEncodingNames)
|
||||
{
|
||||
$this->values = $values;
|
||||
|
||||
@@ -62,7 +62,7 @@ class FormatInformation
|
||||
/**
|
||||
* Offset i holds the number of 1 bits in the binary representation of i.
|
||||
*
|
||||
* @var array
|
||||
* @var int[]
|
||||
*/
|
||||
private const BITS_SET_IN_HALF_BYTE = [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4];
|
||||
|
||||
|
||||
@@ -42,6 +42,9 @@ final class Mode extends AbstractEnum
|
||||
*/
|
||||
private $bits;
|
||||
|
||||
/**
|
||||
* @param int[] $characterCountBitsForVersions
|
||||
*/
|
||||
protected function __construct(array $characterCountBitsForVersions, int $bits)
|
||||
{
|
||||
$this->characterCountBitsForVersions = $characterCountBitsForVersions;
|
||||
|
||||
@@ -37,7 +37,7 @@ final class Encoder
|
||||
/**
|
||||
* Codec cache.
|
||||
*
|
||||
* @var array
|
||||
* @var array<string,ReedSolomonCodec>
|
||||
*/
|
||||
private static $codecs = [];
|
||||
|
||||
|
||||
@@ -334,7 +334,7 @@ final class SvgImageBackEnd implements ImageBackEndInterface
|
||||
$this->xmlWriter->writeAttribute('stop-color', $this->getColorString($startColor));
|
||||
|
||||
if ($startColor instanceof Alpha) {
|
||||
$this->xmlWriter->writeAttribute('stop-opacity', $startColor->getAlpha());
|
||||
$this->xmlWriter->writeAttribute('stop-opacity', (string) $startColor->getAlpha());
|
||||
}
|
||||
|
||||
$this->xmlWriter->endElement();
|
||||
@@ -344,7 +344,7 @@ final class SvgImageBackEnd implements ImageBackEndInterface
|
||||
$this->xmlWriter->writeAttribute('stop-color', $this->getColorString($endColor));
|
||||
|
||||
if ($endColor instanceof Alpha) {
|
||||
$this->xmlWriter->writeAttribute('stop-opacity', $endColor->getAlpha());
|
||||
$this->xmlWriter->writeAttribute('stop-opacity', (string) $endColor->getAlpha());
|
||||
}
|
||||
|
||||
$this->xmlWriter->endElement();
|
||||
|
||||
@@ -41,7 +41,7 @@ final class EdgeIterator implements IteratorAggregate
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Edge[]
|
||||
* @return Traversable<Edge>
|
||||
*/
|
||||
public function getIterator() : Traversable
|
||||
{
|
||||
|
||||
@@ -136,7 +136,7 @@ final class EllipticArc implements OperationInterface
|
||||
/**
|
||||
* @return Curve[]
|
||||
*/
|
||||
private function createCurves(float $fromX, $fromY) : array
|
||||
private function createCurves(float $fromX, float $fromY) : array
|
||||
{
|
||||
$xAngle = deg2rad($this->xAxisAngle);
|
||||
list($centerX, $centerY, $radiusX, $radiusY, $startAngle, $deltaAngle) =
|
||||
|
||||
@@ -17,10 +17,16 @@ use BaconQrCode\Writer;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Spatie\Snapshots\MatchesSnapshots;
|
||||
|
||||
/**
|
||||
* @group integration
|
||||
*/
|
||||
final class ImagickRenderingTest extends TestCase
|
||||
{
|
||||
use MatchesSnapshots;
|
||||
|
||||
/**
|
||||
* @requires extension imagick
|
||||
*/
|
||||
public function testGenericQrCode() : void
|
||||
{
|
||||
$renderer = new ImageRenderer(
|
||||
@@ -35,6 +41,9 @@ final class ImagickRenderingTest extends TestCase
|
||||
unlink($tempName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires extension imagick
|
||||
*/
|
||||
public function testIssue79() : void
|
||||
{
|
||||
$eye = SquareEye::instance();
|
||||
|
||||
Reference in New Issue
Block a user