Skip to content

Commit 30c2d46

Browse files
committed
:octocat: dependency & CI updates
1 parent f701ae4 commit 30c2d46

File tree

6 files changed

+37
-24
lines changed

6 files changed

+37
-24
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/.build export-ignore
22
/.github export-ignore
3+
/.idea export-ignore
34
/.phan export-ignore
45
/.phpdoc export-ignore
56
/docs export-ignore

.github/workflows/ci.yml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2-
# https://github.com/sebastianbergmann/phpunit/blob/master/.github/workflows/ci.yml
1+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
2+
# https://github.com/sebastianbergmann/phpunit/blob/main/.github/workflows/ci.yaml
33

44
on:
55
push:
@@ -11,6 +11,10 @@ on:
1111

1212
name: "Continuous Integration"
1313

14+
env:
15+
PHP_EXTENSIONS: fileinfo, gd, imagick, json, mbstring
16+
PHP_INI_VALUES: memory_limit=-1, error_reporting=-1, display_errors=On
17+
1418
jobs:
1519

1620
static-code-analysis:
@@ -33,18 +37,18 @@ jobs:
3337

3438
steps:
3539
- name: "Checkout"
36-
uses: actions/checkout@v3
40+
uses: actions/checkout@v4
3741

3842
- name: "Install PHP"
3943
uses: shivammathur/setup-php@v2
4044
with:
4145
php-version: ${{ matrix.php-version }}
46+
extensions: ast, ${{ env.PHP_EXTENSIONS }}
47+
ini-values: ${{ env.PHP_INI_VALUES }}
4248
coverage: none
43-
tools: pecl
44-
extensions: ast, fileinfo, gd, imagick, json, mbstring
4549

46-
- name: "Update dependencies with composer"
47-
uses: ramsey/composer-install@v2
50+
- name: "Install dependencies with composer"
51+
uses: ramsey/composer-install@v3
4852

4953
- name: "Run phan"
5054
run: php vendor/bin/phan --target-php-version=${{ matrix.php-version }}
@@ -70,26 +74,28 @@ jobs:
7074

7175
steps:
7276
- name: "Checkout"
73-
uses: actions/checkout@v3
77+
uses: actions/checkout@v4
7478

7579
- name: "Install PHP with extensions"
7680
uses: shivammathur/setup-php@v2
7781
with:
7882
php-version: ${{ matrix.php-version }}
83+
extensions: ${{ env.PHP_EXTENSIONS }}
84+
ini-values: ${{ env.PHP_INI_VALUES }}
7985
coverage: pcov
8086
tools: pecl
81-
extensions: fileinfo, gd, imagick, json, mbstring
8287

8388
- name: "Install dependencies with composer"
84-
uses: ramsey/composer-install@v2
89+
uses: ramsey/composer-install@v3
8590

86-
- name: "Run tests with phpunit"
91+
- name: "Run tests with PHPUnit"
8792
run: php vendor/bin/phpunit --colors=always --configuration=phpunit.xml.dist
8893

8994
- name: "Send code coverage report to Codecov.io"
90-
uses: codecov/codecov-action@v3
95+
uses: codecov/codecov-action@v4
9196
with:
92-
files: .build/coverage/clover.xml
97+
token: ${{ secrets.CODECOV_TOKEN }}
98+
files: .build/coverage/clover.xml
9399

94100
- name: "Send code coverage report to Codacy"
95101
uses: codacy/codacy-coverage-reporter-action@v1

.idea/codeStyles/Project.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chillerlan/php-qrcode",
3-
"description": "A QR code generator and reader with a user friendly API. PHP 7.4+",
3+
"description": "A QR Code generator and reader with a user-friendly API. PHP 7.4+",
44
"homepage": "https://github.com/chillerlan/php-qrcode",
55
"license": [
66
"MIT", "Apache-2.0"
@@ -42,15 +42,15 @@
4242
"require": {
4343
"php": "^7.4 || ^8.0",
4444
"ext-mbstring": "*",
45-
"chillerlan/php-settings-container": "^2.1.4 || ^3.1"
45+
"chillerlan/php-settings-container": "^2.1.4 || ^3.2"
4646
},
4747
"require-dev": {
4848
"chillerlan/php-authenticator": "^4.1 || ^5.1",
4949
"phan/phan": "^5.4",
5050
"phpunit/phpunit": "^9.6",
5151
"phpmd/phpmd": "^2.15",
5252
"setasign/fpdf": "^1.8.2",
53-
"squizlabs/php_codesniffer": "^3.8"
53+
"squizlabs/php_codesniffer": "^3.9"
5454
},
5555
"suggest": {
5656
"chillerlan/php-authenticator": "Yet another Google authenticator! Also creates URIs for mobile apps.",

docs/qroptions-doc.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
* @license MIT
99
*/
1010

11-
use chillerlan\QRCode\QROptionsTrait;
11+
use chillerlan\QRCode\QROptions;
1212

1313
require_once __DIR__.'/../vendor/autoload.php';
1414

1515
$file = 'Usage/Configuration-settings.md';
1616
$content = [
1717
'# Configuration settings',
18-
'<!-- This file is auto generated from the source of QROptionsTrait.php -->',
18+
'<!-- This file is auto generated from the source of QROptions.php -->',
1919
];
2020

21-
$reflectionClass = new ReflectionClass(QROptionsTrait::class);
21+
$reflectionClass = new ReflectionClass(QROptions::class);
2222

2323
foreach($reflectionClass->getProperties(ReflectionProperty::IS_PROTECTED) as $reflectionProperty){
2424
$docblock = $reflectionProperty->getDocComment();
@@ -71,7 +71,7 @@
7171
}
7272
// php.net documentation
7373
elseif(str_starts_with($line, '\\') && !str_contains($line, 'chillerlan')){
74-
$path = str_replace(['\\', '::', '()'], ['', '.', ''], strtolower($line));
74+
$path = str_replace(['\\', '::', '()', '_'], ['', '.', '', '-'], strtolower($line));
7575

7676
if(!str_contains($line, '::')){
7777
$path = 'function.'.$path;
@@ -93,6 +93,6 @@
9393

9494
file_put_contents(__DIR__.'/'.$file, implode("\n", $content));
9595

96-
printf('Built "%s" from "%s"', $file, QROptionsTrait::class);
96+
printf('Built "%s" from "%s"', $file, QROptions::class);
9797

9898
exit(0);

phpunit.xml.dist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<?xml version="1.0"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
44
bootstrap="vendor/autoload.php"
55
cacheResultFile=".build/phpunit.result.cache"
66
colors="true"
77
verbose="true"
88
>
99
<testsuites>
1010
<testsuite name="php-qrcode test suite">
11-
<directory suffix=".php">./tests/</directory>
11+
<directory>./tests/</directory>
1212
<exclude>./tests/Performance</exclude>
1313
</testsuite>
1414
</testsuites>
1515
<coverage processUncoveredFiles="true">
1616
<include>
17-
<directory suffix=".php">./src</directory>
17+
<directory>./src</directory>
1818
</include>
1919
<report>
2020
<clover outputFile=".build/coverage/clover.xml"/>

0 commit comments

Comments
 (0)