summaryrefslogtreecommitdiff
path: root/vendor/chillerlan
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-11-15 18:33:35 +0300
committerAndrew Dolgov <[email protected]>2021-11-15 18:33:35 +0300
commit4c37fa4b41b0cab50a4fc192e9120042dbe36872 (patch)
treed7ca7cbd65de0cea9806870c8fb646ed15d978ae /vendor/chillerlan
parent109b702ed0cd31a0dc8466b8127882d263705d8d (diff)
update phpstan to 1.1.2; update php-qrcode to 3.4.1
Diffstat (limited to 'vendor/chillerlan')
-rw-r--r--vendor/chillerlan/php-qrcode/.github/workflows/tests.yml76
-rw-r--r--vendor/chillerlan/php-qrcode/.travis.yml5
-rw-r--r--vendor/chillerlan/php-qrcode/composer.json5
-rw-r--r--vendor/chillerlan/php-qrcode/examples/QRImageWithLogo.php12
-rw-r--r--vendor/chillerlan/php-qrcode/examples/imageWithLogo.php13
-rw-r--r--vendor/chillerlan/php-qrcode/src/Data/QRMatrix.php6
-rw-r--r--vendor/chillerlan/php-qrcode/tests/Output/QRImageTest.php10
-rw-r--r--vendor/chillerlan/php-settings-container/.travis.yml4
-rw-r--r--vendor/chillerlan/php-settings-container/README.md13
-rw-r--r--vendor/chillerlan/php-settings-container/composer.json4
10 files changed, 97 insertions, 51 deletions
diff --git a/vendor/chillerlan/php-qrcode/.github/workflows/tests.yml b/vendor/chillerlan/php-qrcode/.github/workflows/tests.yml
index 5dd343abd..991e6503c 100644
--- a/vendor/chillerlan/php-qrcode/.github/workflows/tests.yml
+++ b/vendor/chillerlan/php-qrcode/.github/workflows/tests.yml
@@ -1,5 +1,4 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
-# https://github.com/localheinz/php-library-template/blob/master/.github/workflows/continuous-integration.yml
# https://github.com/sebastianbergmann/phpunit/blob/master/.github/workflows/ci.yml
on:
@@ -10,46 +9,69 @@ name: "Continuous Integration"
jobs:
- tests:
- name: "Unit Tests"
+ static-code-analysis:
+ name: "Static Code Analysis"
+
runs-on: ubuntu-latest
- strategy:
- matrix:
- php-binary:
- - php7.2
- - php7.3
- - php7.4
+ env:
+ PHAN_ALLOW_XDEBUG: 0
+ PHAN_DISABLE_XDEBUG_WARN: 1
steps:
- name: "Checkout"
- uses: actions/[email protected]
+ uses: actions/checkout@v2
- - name: "Install dependencies with composer"
- run: ${{ matrix.php-binary }} $(which composer) update --no-interaction --no-progress --no-suggest
+ - name: "Install PHP"
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: "7.4"
+ coverage: none
+ tools: pecl
+ extensions: ast, gd, imagick, json, mbstring
- - name: "Run unit tests with phpunit"
- run: ${{ matrix.php-binary }} vendor/bin/phpunit --configuration=phpunit.xml --no-coverage
+ - name: "Update dependencies with composer"
+ run: composer update --no-interaction --no-ansi --no-progress --no-suggest
+ - name: "Run phan"
+ run: php vendor/bin/phan
- code-coverage:
- name: "Code Coverage"
- runs-on: ubuntu-latest
+ tests:
+ name: "Unit Tests"
+
+ runs-on: ${{ matrix.os }}
+
+ strategy:
+ fail-fast: false
+ matrix:
+ os:
+ - ubuntu-latest
+# - windows-latest
+ php-version:
+ - "7.2"
+ - "7.3"
+ - "7.4"
+ - "8.0"
steps:
- name: "Checkout"
- uses: actions/[email protected]
+ uses: actions/checkout@v2
- - name: "Install locked dependencies with composer"
- run: php7.4 $(which composer) install --no-interaction --no-progress --no-suggest
+ - name: "Install PHP with extensions"
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php-version }}
+ coverage: pcov
+ tools: pecl
+ extensions: gd, imagick, json, mbstring
- - name: "Dump Xdebug filter with phpunit/phpunit"
- run: php7.4 vendor/bin/phpunit --configuration=phpunit.xml --dump-xdebug-filter=.build/phpunit/xdebug-filter.php
+ - name: "Install dependencies with composer"
+ run: composer update --no-ansi --no-interaction --no-progress --no-suggest
- - name: "Collect code coverage with Xdebug and phpunit/phpunit"
- run: php7.4 vendor/bin/phpunit --configuration=phpunit.xml --prepend=.build/phpunit/xdebug-filter.php
+ - name: "Run tests with phpunit"
+ run: php vendor/phpunit/phpunit/phpunit --configuration=phpunit.xml
- name: "Send code coverage report to Codecov.io"
- env:
- CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- run: bash <(curl -s https://codecov.io/bash)
+ uses: codecov/codecov-action@v1
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
diff --git a/vendor/chillerlan/php-qrcode/.travis.yml b/vendor/chillerlan/php-qrcode/.travis.yml
index 78b8d79e9..7b2377fd8 100644
--- a/vendor/chillerlan/php-qrcode/.travis.yml
+++ b/vendor/chillerlan/php-qrcode/.travis.yml
@@ -1,3 +1,8 @@
+branches:
+ only:
+ - main
+ - v3.2.x
+
addons:
apt:
packages:
diff --git a/vendor/chillerlan/php-qrcode/composer.json b/vendor/chillerlan/php-qrcode/composer.json
index c2299a350..625149ce7 100644
--- a/vendor/chillerlan/php-qrcode/composer.json
+++ b/vendor/chillerlan/php-qrcode/composer.json
@@ -24,12 +24,13 @@
}
],
"require": {
- "php": "^7.2",
+ "php": "^7.2 || ^8.0",
"ext-mbstring": "*",
- "chillerlan/php-settings-container": "^1.2"
+ "chillerlan/php-settings-container": "^1.2.2"
},
"require-dev": {
"phpunit/phpunit": "^8.5",
+ "phan/phan": "^3.2.2",
"setasign/fpdf": "^1.8.2"
},
"suggest": {
diff --git a/vendor/chillerlan/php-qrcode/examples/QRImageWithLogo.php b/vendor/chillerlan/php-qrcode/examples/QRImageWithLogo.php
index f9d94ae34..76aa5ced7 100644
--- a/vendor/chillerlan/php-qrcode/examples/QRImageWithLogo.php
+++ b/vendor/chillerlan/php-qrcode/examples/QRImageWithLogo.php
@@ -41,9 +41,9 @@ class QRImageWithLogo extends QRImage{
}
$this->matrix->setLogoSpace(
- $this->options->logoWidth,
- $this->options->logoHeight
- // not utilizing the position here
+ $this->options->logoSpaceWidth,
+ $this->options->logoSpaceHeight
+ // not utilizing the position here
);
// there's no need to save the result of dump() into $this->image here
@@ -55,9 +55,9 @@ class QRImageWithLogo extends QRImage{
$w = imagesx($im);
$h = imagesy($im);
- // set new logo size, leave a border of 1 module
- $lw = ($this->options->logoWidth - 2) * $this->options->scale;
- $lh = ($this->options->logoHeight - 2) * $this->options->scale;
+ // set new logo size, leave a border of 1 module (no proportional resize/centering)
+ $lw = ($this->options->logoSpaceWidth - 2) * $this->options->scale;
+ $lh = ($this->options->logoSpaceHeight - 2) * $this->options->scale;
// get the qrcode size
$ql = $this->matrix->size() * $this->options->scale;
diff --git a/vendor/chillerlan/php-qrcode/examples/imageWithLogo.php b/vendor/chillerlan/php-qrcode/examples/imageWithLogo.php
index 987e10c11..36f63d503 100644
--- a/vendor/chillerlan/php-qrcode/examples/imageWithLogo.php
+++ b/vendor/chillerlan/php-qrcode/examples/imageWithLogo.php
@@ -16,14 +16,15 @@ require_once __DIR__.'/../vendor/autoload.php';
$data = 'https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s';
/**
- * @property int $logoWidth
- * @property int $logoHeight
+ * @property int $logoSpaceWidth
+ * @property int $logoSpaceHeight
*
* @noinspection PhpIllegalPsrClassPathInspection
*/
class LogoOptions extends QROptions{
- protected $logoWidth;
- protected $logoHeight;
+ // size in QR modules, multiply with QROptions::$scale for pixel size
+ protected $logoSpaceWidth;
+ protected $logoSpaceHeight;
}
$options = new LogoOptions;
@@ -31,8 +32,8 @@ $options = new LogoOptions;
$options->version = 7;
$options->eccLevel = QRCode::ECC_H;
$options->imageBase64 = false;
-$options->logoWidth = 13;
-$options->logoHeight = 13;
+$options->logoSpaceWidth = 13;
+$options->logoSpaceHeight = 13;
$options->scale = 5;
$options->imageTransparent = false;
diff --git a/vendor/chillerlan/php-qrcode/src/Data/QRMatrix.php b/vendor/chillerlan/php-qrcode/src/Data/QRMatrix.php
index a6d8b09e2..5b4487a40 100644
--- a/vendor/chillerlan/php-qrcode/src/Data/QRMatrix.php
+++ b/vendor/chillerlan/php-qrcode/src/Data/QRMatrix.php
@@ -589,12 +589,12 @@ class QRMatrix{
throw new QRCodeDataException('ECC level "H" required to add logo space');
}
- // we need uneven sizes, adjust if needed
- if(($width % 2) === 0){
+ // we need uneven sizes to center the logo space, adjust if needed
+ if($startX === null && ($width % 2) === 0){
$width++;
}
- if(($height % 2) === 0){
+ if($startY === null && ($height % 2) === 0){
$height++;
}
diff --git a/vendor/chillerlan/php-qrcode/tests/Output/QRImageTest.php b/vendor/chillerlan/php-qrcode/tests/Output/QRImageTest.php
index 34ecf4f91..c4466a658 100644
--- a/vendor/chillerlan/php-qrcode/tests/Output/QRImageTest.php
+++ b/vendor/chillerlan/php-qrcode/tests/Output/QRImageTest.php
@@ -13,6 +13,7 @@
namespace chillerlan\QRCodeTest\Output;
use chillerlan\QRCode\{QRCode, Output\QRImage};
+use const PHP_MAJOR_VERSION;
class QRImageTest extends QROutputTestAbstract{
@@ -63,7 +64,14 @@ class QRImageTest extends QROutputTestAbstract{
$this->setOutputInterface();
- $this::assertIsResource($this->outputInterface->dump());
+ $data = $this->outputInterface->dump();
+
+ if(PHP_MAJOR_VERSION >= 8){
+ $this::assertInstanceOf('\\GdImage', $data);
+ }
+ else{
+ $this::assertIsResource($data);
+ }
}
}
diff --git a/vendor/chillerlan/php-settings-container/.travis.yml b/vendor/chillerlan/php-settings-container/.travis.yml
index 208cdeb6a..c2ad210ed 100644
--- a/vendor/chillerlan/php-settings-container/.travis.yml
+++ b/vendor/chillerlan/php-settings-container/.travis.yml
@@ -4,10 +4,10 @@ matrix:
include:
- php: 7.2
- php: 7.3
- - php: 7.4snapshot
+ - php: 7.4
+ - php: 8.0
- php: nightly
allow_failures:
- - php: 7.4snapshot
- php: nightly
diff --git a/vendor/chillerlan/php-settings-container/README.md b/vendor/chillerlan/php-settings-container/README.md
index 7d0ccf09d..f3bb26c5e 100644
--- a/vendor/chillerlan/php-settings-container/README.md
+++ b/vendor/chillerlan/php-settings-container/README.md
@@ -51,8 +51,8 @@ Profit!
## Usage
-The `SettingsContainerInterface` (wrapped in`SettingsContainerAbstract` ) provides plug-in functionality for immutable object variables and adds some fancy, like loading/saving JSON, arrays etc.
-It takes iterable as the only constructor argument and calls a method with the trait's name on invocation (`MyTrait::MyTrait()`) for each used trait.
+The `SettingsContainerInterface` (wrapped in`SettingsContainerAbstract` ) provides plug-in functionality for immutable object properties and adds some fancy, like loading/saving JSON, arrays etc.
+It takes an `iterable` as the only constructor argument and calls a method with the trait's name on invocation (`MyTrait::MyTrait()`) for each used trait.
### Simple usage
```php
@@ -61,6 +61,13 @@ class MyContainer extends SettingsContainerAbstract{
protected $bar;
}
```
+Typed properties in PHP 7.4+:
+```php
+class MyContainer extends SettingsContainerAbstract{
+ protected string $foo;
+ protected string $bar;
+}
+```
```php
// use it just like a \stdClass
@@ -78,6 +85,8 @@ $container->fromJSON('{"foo": "what", "bar": "foo"}');
$container->toArray(); // -> ['foo' => 'what', 'bar' => 'foo']
// or JSON
$container->toJSON(); // -> {"foo": "what", "bar": "foo"}
+// JSON via JsonSerializable
+$json = json_encode($container); // -> {"foo": "what", "bar": "foo"}
//non-existing properties will be ignored:
$container->nope = 'what';
diff --git a/vendor/chillerlan/php-settings-container/composer.json b/vendor/chillerlan/php-settings-container/composer.json
index 4dc758665..4464e6e8a 100644
--- a/vendor/chillerlan/php-settings-container/composer.json
+++ b/vendor/chillerlan/php-settings-container/composer.json
@@ -20,11 +20,11 @@
"source": "https://github.com/chillerlan/php-settings-container"
},
"require": {
- "php": "^7.2",
+ "php": "^7.2 || ^8.0",
"ext-json": "*"
},
"require-dev": {
- "phpunit/phpunit": "^8.3"
+ "phpunit/phpunit": "^8.4"
},
"autoload": {
"psr-4": {