Skip to content

Commit 632ab54

Browse files
authored
Merge pull request #31 from chadicus/master
Implicit conversion from float to int loses precision
2 parents bd1598d + 5823531 commit 632ab54

File tree

5 files changed

+8
-3
lines changed

5 files changed

+8
-3
lines changed

.github/workflows/php.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
14+
php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
1515
steps:
1616
- name: Checkout
1717
uses: actions/checkout@v2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
/nbproject/private/
55
composer.lock
66
phpunit.xml
7+
.*

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"traderinteractive/util": "^3.0||^4.0"
1313
},
1414
"require-dev": {
15-
"phpunit/phpunit": ">=6.5",
15+
"phpunit/phpunit": ">=6.5 <11.0",
1616
"squizlabs/php_codesniffer": "^3.2"
1717
},
1818
"autoload": {

phpunit.xml.dist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<phpunit colors="true" forceCoversAnnotation="true">
2+
<php>
3+
<ini name="error_reporting" value="E_ALL"/>
4+
<ini name="display_errors" value="On"/>
5+
</php>
26
<testsuites>
37
<testsuite name="TraderInteractive Library Test Suite">
48
<directory suffix="Test.php">tests</directory>

src/Image.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ public static function resizeMulti(\Imagick $source, array $boxSizes, array $opt
386386

387387
//put image in box
388388
$canvas = self::getBackgroundCanvas($source, $color, $blurBackground, $blurValue, $boxWidth, $boxHeight);
389-
if ($canvas->compositeImage($clone, \Imagick::COMPOSITE_ATOP, $targetX, $targetY) !== true) {
389+
if ($canvas->compositeImage($clone, \Imagick::COMPOSITE_ATOP, (int)$targetX, (int)$targetY) !== true) {
390390
//cumbersome to test
391391
throw new \Exception('Imagick::compositeImage() did not return true');//@codeCoverageIgnore
392392
}

0 commit comments

Comments
 (0)