diff --git a/.gitattributes b/.gitattributes
index 8add556f5..e2090ce38 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,5 +1,6 @@
/.build export-ignore
/.github export-ignore
+/.idea export-ignore
/.phan export-ignore
/.phpdoc export-ignore
/docs export-ignore
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4668efab9..41a362078 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,5 +1,5 @@
-# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
-# https://github.com/sebastianbergmann/phpunit/blob/master/.github/workflows/ci.yml
+# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
+# https://github.com/sebastianbergmann/phpunit/blob/main/.github/workflows/ci.yaml
on:
push:
@@ -11,6 +11,10 @@ on:
name: "Continuous Integration"
+env:
+ PHP_EXTENSIONS: fileinfo, gd, imagick, json, mbstring
+ PHP_INI_VALUES: memory_limit=-1, error_reporting=-1, display_errors=On
+
jobs:
static-code-analysis:
@@ -33,18 +37,18 @@ jobs:
steps:
- name: "Checkout"
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
+ extensions: ast, ${{ env.PHP_EXTENSIONS }}
+ ini-values: ${{ env.PHP_INI_VALUES }}
coverage: none
- tools: pecl
- extensions: ast, fileinfo, gd, imagick, json, mbstring
- - name: "Update dependencies with composer"
- uses: ramsey/composer-install@v2
+ - name: "Install dependencies with composer"
+ uses: ramsey/composer-install@v3
- name: "Run phan"
run: php vendor/bin/phan --target-php-version=${{ matrix.php-version }}
@@ -70,26 +74,28 @@ jobs:
steps:
- name: "Checkout"
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: "Install PHP with extensions"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
+ extensions: ${{ env.PHP_EXTENSIONS }}
+ ini-values: ${{ env.PHP_INI_VALUES }}
coverage: pcov
tools: pecl
- extensions: fileinfo, gd, imagick, json, mbstring
- name: "Install dependencies with composer"
- uses: ramsey/composer-install@v2
+ uses: ramsey/composer-install@v3
- - name: "Run tests with phpunit"
+ - name: "Run tests with PHPUnit"
run: php vendor/bin/phpunit --colors=always --configuration=phpunit.xml.dist
- name: "Send code coverage report to Codecov.io"
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v4
with:
- files: .build/coverage/clover.xml
+ token: ${{ secrets.CODECOV_TOKEN }}
+ files: .build/coverage/clover.xml
- name: "Send code coverage report to Codacy"
uses: codacy/codacy-coverage-reporter-action@v1
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index e618763df..0a882fcb2 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -295,8 +295,14 @@
+
+
+
+
+
+
diff --git a/composer.json b/composer.json
index 7e74be558..f893f9f4f 100644
--- a/composer.json
+++ b/composer.json
@@ -1,6 +1,6 @@
{
"name": "chillerlan/php-qrcode",
- "description": "A QR code generator and reader with a user friendly API. PHP 7.4+",
+ "description": "A QR Code generator and reader with a user-friendly API. PHP 7.4+",
"homepage": "https://github.com/chillerlan/php-qrcode",
"license": [
"MIT", "Apache-2.0"
@@ -42,7 +42,7 @@
"require": {
"php": "^7.4 || ^8.0",
"ext-mbstring": "*",
- "chillerlan/php-settings-container": "^2.1.4 || ^3.1"
+ "chillerlan/php-settings-container": "^2.1.4 || ^3.2"
},
"require-dev": {
"chillerlan/php-authenticator": "^4.1 || ^5.1",
@@ -50,7 +50,7 @@
"phpunit/phpunit": "^9.6",
"phpmd/phpmd": "^2.15",
"setasign/fpdf": "^1.8.2",
- "squizlabs/php_codesniffer": "^3.8"
+ "squizlabs/php_codesniffer": "^3.9"
},
"suggest": {
"chillerlan/php-authenticator": "Yet another Google authenticator! Also creates URIs for mobile apps.",
diff --git a/docs/qroptions-doc.php b/docs/qroptions-doc.php
index 6f75380bd..fb0c5f200 100644
--- a/docs/qroptions-doc.php
+++ b/docs/qroptions-doc.php
@@ -8,17 +8,17 @@
* @license MIT
*/
-use chillerlan\QRCode\QROptionsTrait;
+use chillerlan\QRCode\QROptions;
require_once __DIR__.'/../vendor/autoload.php';
$file = 'Usage/Configuration-settings.md';
$content = [
'# Configuration settings',
- '',
+ '',
];
-$reflectionClass = new ReflectionClass(QROptionsTrait::class);
+$reflectionClass = new ReflectionClass(QROptions::class);
foreach($reflectionClass->getProperties(ReflectionProperty::IS_PROTECTED) as $reflectionProperty){
$docblock = $reflectionProperty->getDocComment();
@@ -71,7 +71,7 @@ foreach($reflectionClass->getProperties(ReflectionProperty::IS_PROTECTED) as $re
}
// php.net documentation
elseif(str_starts_with($line, '\\') && !str_contains($line, 'chillerlan')){
- $path = str_replace(['\\', '::', '()'], ['', '.', ''], strtolower($line));
+ $path = str_replace(['\\', '::', '()', '_'], ['', '.', '', '-'], strtolower($line));
if(!str_contains($line, '::')){
$path = 'function.'.$path;
@@ -93,6 +93,6 @@ foreach($reflectionClass->getProperties(ReflectionProperty::IS_PROTECTED) as $re
file_put_contents(__DIR__.'/'.$file, implode("\n", $content));
-printf('Built "%s" from "%s"', $file, QROptionsTrait::class);
+printf('Built "%s" from "%s"', $file, QROptions::class);
exit(0);
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index b08ed7f39..3a783fb4a 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -1,6 +1,6 @@
- ./tests/
+ ./tests/
./tests/Performance
- ./src
+ ./src