Skip to content

Commit dc06167

Browse files
committed
chore: update dependencies
1 parent d7a6c06 commit dc06167

6 files changed

Lines changed: 15 additions & 27 deletions

File tree

.github/workflows/check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
os: [ubuntu-latest]
2929
coverage-extension: [pcov]
3030
steps:
31-
- uses: actions/checkout@v6
31+
- uses: actions/checkout@v7
3232
- name: Use php ${{ matrix.php-version }}
3333
uses: shivammathur/setup-php@v2
3434
with:
@@ -41,7 +41,7 @@ jobs:
4141
- name: List php modules using "no php ini" mode
4242
run: php -m -n
4343
- name: Cache module
44-
uses: actions/cache@v5
44+
uses: actions/cache@v6
4545
with:
4646
path: ~/.composer/cache/
4747
key: composer-cache
@@ -52,7 +52,7 @@ jobs:
5252
- name: Run all tests
5353
run: make qa
5454
- name: Send coverage
55-
uses: codecov/codecov-action@v6
55+
uses: codecov/codecov-action@v7
5656
with:
5757
flags: php-${{ matrix.php-version }}-${{ matrix.os }}
5858
name: php-${{ matrix.php-version }}-${{ matrix.os }}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ COMPOSER=$(PHP) -d "apc.enable_cli=0" $(shell which composer)
9393
PHPDOC=$(shell which phpDocumentor)
9494

9595
# Mago version
96-
MAGOVERSION=1.40.2
96+
MAGOVERSION=1.42.0
9797

9898
# --- MAKE TARGETS ---
9999

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.14.1
1+
2.14.2

resources/debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ Vcs-Browser: https://github.com/~#VENDOR#~/~#PROJECT#~
1212
Package: ~#PKGNAME#~
1313
Provides: php-~#PROJECT#~
1414
Architecture: all
15-
Depends: php (>= 8.2.0), php-zip, php-tecnickcom-tc-lib-color (<< 3.0.0), php-tecnickcom-tc-lib-color (>= 2.12.2), php-tecnickcom-tc-lib-pdf-encrypt (<< 3.0.0), php-tecnickcom-tc-lib-pdf-encrypt (>= 2.8.1), ${misc:Depends}
15+
Depends: php (>= 8.2.0), php-zip, php-tecnickcom-tc-lib-color (<< 3.0.0), php-tecnickcom-tc-lib-color (>= 2.12.3), php-tecnickcom-tc-lib-pdf-encrypt (<< 3.0.0), php-tecnickcom-tc-lib-pdf-encrypt (>= 2.8.2), ${misc:Depends}
1616
Description: PHP PDF Graph Library
1717
PHP library containing PDF graphic and geometric methods.

resources/rpm/rpm.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ BuildArch: noarch
1717
Requires: php(language) >= 8.2.0
1818
Requires: php-zlib
1919
Requires: php-composer(%{c_vendor}/tc-lib-color) < 3.0.0
20-
Requires: php-composer(%{c_vendor}/tc-lib-color) >= 2.12.2
20+
Requires: php-composer(%{c_vendor}/tc-lib-color) >= 2.12.3
2121
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) < 3.0.0
22-
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 2.8.1
22+
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 2.8.2
2323

2424
Provides: php-composer(%{c_vendor}/%{gh_project}) = %{version}
2525
Provides: php-%{gh_project} = %{version}

src/Draw.php

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -484,28 +484,16 @@ public function getStarPolygon(
484484
$out .= $this->getCircle($posx, $posy, $radius, 0, 360, $cirmode, $cirstyle);
485485
}
486486

487-
$points2 = [];
488-
$visited = [];
489-
for ($idx = 0; $idx < $nvert; ++$idx) {
490-
$angrad = $this->degToRad($angle + (($idx * 360) / $nvert));
491-
$points2[] = $posx + ($radius * \sin($angrad));
492-
$points2[] = $posy + ($radius * \cos($angrad));
493-
$visited[] = false;
494-
}
495-
496487
$points = [];
488+
$visited = [];
497489
$idx = 0;
498-
do {
499-
if (($points2[$idx * 2] ?? null) === null || ($points2[($idx * 2) + 1] ?? null) === null) {
500-
break;
501-
}
502-
503-
$points[] = $points2[$idx * 2] ?? 0.0;
504-
$points[] = $points2[($idx * 2) + 1] ?? 0.0;
490+
while ($idx >= 0 && !isset($visited[$idx])) {
505491
$visited[$idx] = true;
506-
$idx += $ngaps;
507-
$idx %= $nvert;
508-
} while (($visited[$idx] ?? null) !== null && !$visited[$idx]);
492+
$angrad = $this->degToRad($angle + (($idx * 360) / $nvert));
493+
$points[] = $posx + ($radius * \sin($angrad));
494+
$points[] = $posy + ($radius * \cos($angrad));
495+
$idx = ($idx + $ngaps) % $nvert;
496+
}
509497

510498
if (\count($points) < 6) {
511499
return $out;

0 commit comments

Comments
 (0)