From 5ae43c1ce4ae167f45d3b36ca16b663129d3c804 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Fri, 9 Apr 2021 12:46:40 +0545 Subject: [PATCH 1/3] fix for border and border radius not working together --- composer.lock | 356 ++++++++++++++++++++++++++------------------ src/Image/Image.php | 40 ++++- 2 files changed, 240 insertions(+), 156 deletions(-) diff --git a/composer.lock b/composer.lock index 3f81624..2262fdf 100644 --- a/composer.lock +++ b/composer.lock @@ -245,12 +245,12 @@ "source": { "type": "git", "url": "https://github.com/amphp/byte-stream.git", - "reference": "f813a658f0446192c5e17f96727070ee9342b93a" + "reference": "7a64a9ad336fc5e1e70b1c1fc1e9618a7027332e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/f813a658f0446192c5e17f96727070ee9342b93a", - "reference": "f813a658f0446192c5e17f96727070ee9342b93a", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/7a64a9ad336fc5e1e70b1c1fc1e9618a7027332e", + "reference": "7a64a9ad336fc5e1e70b1c1fc1e9618a7027332e", "shasum": "" }, "require": { @@ -315,7 +315,7 @@ "type": "github" } ], - "time": "2020-08-30T19:23:04+00:00" + "time": "2021-04-05T20:23:22+00:00" }, { "name": "composer/package-versions-deprecated", @@ -475,16 +475,16 @@ }, { "name": "composer/xdebug-handler", - "version": "1.4.5", + "version": "1.4.x-dev", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "f28d44c286812c714741478d968104c5e604a1d4" + "reference": "f27e06cd9675801df441b3656569b328e04aa37c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f28d44c286812c714741478d968104c5e604a1d4", - "reference": "f28d44c286812c714741478d968104c5e604a1d4", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f27e06cd9675801df441b3656569b328e04aa37c", + "reference": "f27e06cd9675801df441b3656569b328e04aa37c", "shasum": "" }, "require": { @@ -492,7 +492,8 @@ "psr/log": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8" + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", "autoload": { @@ -518,7 +519,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/1.4.5" + "source": "https://github.com/composer/xdebug-handler/tree/1.4.6" }, "funding": [ { @@ -534,7 +535,7 @@ "type": "tidelift" } ], - "time": "2020-11-13T08:04:11+00:00" + "time": "2021-03-25T17:01:18+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -693,12 +694,12 @@ "source": { "type": "git", "url": "https://github.com/felixfbecker/php-language-server-protocol.git", - "reference": "85e83cacd2ed573238678c6875f8f0d7ec699541" + "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/85e83cacd2ed573238678c6875f8f0d7ec699541", - "reference": "85e83cacd2ed573238678c6875f8f0d7ec699541", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730", "shasum": "" }, "require": { @@ -740,9 +741,9 @@ ], "support": { "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", - "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.0" + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1" }, - "time": "2020-10-23T13:55:30+00:00" + "time": "2021-02-22T14:02:09+00:00" }, { "name": "myclabs/deep-copy", @@ -1026,16 +1027,16 @@ }, { "name": "phar-io/version", - "version": "3.0.4", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "e4782611070e50613683d2b9a57730e9a3ba5451" + "reference": "bae7c545bef187884426f042434e561ab1ddb182" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/e4782611070e50613683d2b9a57730e9a3ba5451", - "reference": "e4782611070e50613683d2b9a57730e9a3ba5451", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", "shasum": "" }, "require": { @@ -1071,9 +1072,9 @@ "description": "Library for handling version information and constraints", "support": { "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.0.4" + "source": "https://github.com/phar-io/version/tree/3.1.0" }, - "time": "2020-12-13T23:18:30+00:00" + "time": "2021-02-23T14:00:09+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -1135,12 +1136,12 @@ "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "e3324ecbde7319b0bbcf0fd7ca4af19469c38da9" + "reference": "f8d350d8514ff60b5993dd0121c62299480c989c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e3324ecbde7319b0bbcf0fd7ca4af19469c38da9", - "reference": "e3324ecbde7319b0bbcf0fd7ca4af19469c38da9", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/f8d350d8514ff60b5993dd0121c62299480c989c", + "reference": "f8d350d8514ff60b5993dd0121c62299480c989c", "shasum": "" }, "require": { @@ -1184,7 +1185,7 @@ "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" }, - "time": "2020-11-18T14:27:38+00:00" + "time": "2021-03-07T11:12:25+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -1238,16 +1239,16 @@ }, { "name": "phpspec/prophecy", - "version": "1.12.2", + "version": "1.13.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "245710e971a030f42e08f4912863805570f23d39" + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/245710e971a030f42e08f4912863805570f23d39", - "reference": "245710e971a030f42e08f4912863805570f23d39", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", "shasum": "" }, "require": { @@ -1299,9 +1300,9 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.12.2" + "source": "https://github.com/phpspec/prophecy/tree/1.13.0" }, - "time": "2020-12-19T10:15:11+00:00" + "time": "2021-03-17T13:42:18+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1309,12 +1310,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ad069801f3d0cdb7102e58afd5f9f32834ec7160" + "reference": "f6293e1b30a2354e8428e004689671b83871edde" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ad069801f3d0cdb7102e58afd5f9f32834ec7160", - "reference": "ad069801f3d0cdb7102e58afd5f9f32834ec7160", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde", + "reference": "f6293e1b30a2354e8428e004689671b83871edde", "shasum": "" }, "require": { @@ -1370,7 +1371,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" }, "funding": [ { @@ -1378,7 +1379,7 @@ "type": "github" } ], - "time": "2021-02-08T09:55:27+00:00" + "time": "2021-03-28T07:26:59+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1386,12 +1387,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "05fa32de35b15c94838d22482cc59d99860a706f" + "reference": "97eb187efc3560da69c5b501235cd3eb1ebfec86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/05fa32de35b15c94838d22482cc59d99860a706f", - "reference": "05fa32de35b15c94838d22482cc59d99860a706f", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/97eb187efc3560da69c5b501235cd3eb1ebfec86", + "reference": "97eb187efc3560da69c5b501235cd3eb1ebfec86", "shasum": "" }, "require": { @@ -1439,7 +1440,7 @@ "type": "github" } ], - "time": "2021-02-14T06:52:34+00:00" + "time": "2021-04-02T08:22:03+00:00" }, { "name": "phpunit/php-invoker", @@ -1447,12 +1448,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "7bba8d62fc6140730c268d5ff7fbf9c3a54996a8" + "reference": "de89b92643f75d97135fd0f895d4369630952c95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/7bba8d62fc6140730c268d5ff7fbf9c3a54996a8", - "reference": "7bba8d62fc6140730c268d5ff7fbf9c3a54996a8", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/de89b92643f75d97135fd0f895d4369630952c95", + "reference": "de89b92643f75d97135fd0f895d4369630952c95", "shasum": "" }, "require": { @@ -1503,7 +1504,7 @@ "type": "github" } ], - "time": "2021-02-14T06:52:42+00:00" + "time": "2021-04-02T08:22:12+00:00" }, { "name": "phpunit/php-text-template", @@ -1511,12 +1512,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "bca9f27936ccd6d7450f16f1ee3f125b755b7905" + "reference": "f46a87d94ad351b46c836f6cdda98795e8a6c979" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/bca9f27936ccd6d7450f16f1ee3f125b755b7905", - "reference": "bca9f27936ccd6d7450f16f1ee3f125b755b7905", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/f46a87d94ad351b46c836f6cdda98795e8a6c979", + "reference": "f46a87d94ad351b46c836f6cdda98795e8a6c979", "shasum": "" }, "require": { @@ -1563,7 +1564,7 @@ "type": "github" } ], - "time": "2021-02-14T06:53:15+00:00" + "time": "2021-04-02T08:22:46+00:00" }, { "name": "phpunit/php-timer", @@ -1571,12 +1572,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "e3125d0dc516e7f7ab23d54ddefbce67627fd608" + "reference": "bd80d581ad411a5a4b7e613541a7f4cd09cf0da9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e3125d0dc516e7f7ab23d54ddefbce67627fd608", - "reference": "e3125d0dc516e7f7ab23d54ddefbce67627fd608", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/bd80d581ad411a5a4b7e613541a7f4cd09cf0da9", + "reference": "bd80d581ad411a5a4b7e613541a7f4cd09cf0da9", "shasum": "" }, "require": { @@ -1623,7 +1624,7 @@ "type": "github" } ], - "time": "2021-02-14T06:52:50+00:00" + "time": "2021-04-02T08:22:20+00:00" }, { "name": "phpunit/phpunit", @@ -1631,12 +1632,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "2c62dbeda8fc2542b18de64dfd47f7aff6224471" + "reference": "108b2c4bd6b08619c4eeb31fe0a2288b83f01ee4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2c62dbeda8fc2542b18de64dfd47f7aff6224471", - "reference": "2c62dbeda8fc2542b18de64dfd47f7aff6224471", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/108b2c4bd6b08619c4eeb31fe0a2288b83f01ee4", + "reference": "108b2c4bd6b08619c4eeb31fe0a2288b83f01ee4", "shasum": "" }, "require": { @@ -1726,32 +1727,26 @@ "type": "github" } ], - "time": "2021-02-14T07:37:58+00:00" + "time": "2021-03-28T07:37:40+00:00" }, { "name": "psr/container", - "version": "dev-master", + "version": "1.1.x-dev", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "381524e8568e07f31d504a945b88556548c8c42e" + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/381524e8568e07f31d504a945b88556548c8c42e", - "reference": "381524e8568e07f31d504a945b88556548c8c42e", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", "shasum": "" }, "require": { "php": ">=7.2.0" }, - "default-branch": true, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -1778,9 +1773,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/master" + "source": "https://github.com/php-fig/container/tree/1.1.x" }, - "time": "2020-10-13T07:07:53+00:00" + "time": "2021-03-05T17:36:06+00:00" }, { "name": "psr/log", @@ -1788,12 +1783,12 @@ "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "dd738d0b4491f32725492cf345f6b501f5922fec" + "reference": "a18c1e692e02b84abbafe4856c3cd7cc6903908c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/dd738d0b4491f32725492cf345f6b501f5922fec", - "reference": "dd738d0b4491f32725492cf345f6b501f5922fec", + "url": "https://api.github.com/repos/php-fig/log/zipball/a18c1e692e02b84abbafe4856c3cd7cc6903908c", + "reference": "a18c1e692e02b84abbafe4856c3cd7cc6903908c", "shasum": "" }, "require": { @@ -1831,7 +1826,7 @@ "support": { "source": "https://github.com/php-fig/log/tree/master" }, - "time": "2020-09-18T06:44:51+00:00" + "time": "2021-03-02T15:02:34+00:00" }, { "name": "sebastian/cli-parser", @@ -1839,12 +1834,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "5a6fc83d266e0fcbf890d4475bfbb713dbb4d202" + "reference": "e59dfbeeaf6ccdff168c537427cbc9f7fed6b160" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/5a6fc83d266e0fcbf890d4475bfbb713dbb4d202", - "reference": "5a6fc83d266e0fcbf890d4475bfbb713dbb4d202", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/e59dfbeeaf6ccdff168c537427cbc9f7fed6b160", + "reference": "e59dfbeeaf6ccdff168c537427cbc9f7fed6b160", "shasum": "" }, "require": { @@ -1888,7 +1883,7 @@ "type": "github" } ], - "time": "2021-02-14T06:53:40+00:00" + "time": "2021-04-02T08:23:11+00:00" }, { "name": "sebastian/code-unit", @@ -1952,12 +1947,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "96fc758350a824cf96f9e7847ecdf9bb82c87083" + "reference": "f7ee1d817bdd8a8bdfb76b11fa851204132ef6d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/96fc758350a824cf96f9e7847ecdf9bb82c87083", - "reference": "96fc758350a824cf96f9e7847ecdf9bb82c87083", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/f7ee1d817bdd8a8bdfb76b11fa851204132ef6d9", + "reference": "f7ee1d817bdd8a8bdfb76b11fa851204132ef6d9", "shasum": "" }, "require": { @@ -2000,7 +1995,7 @@ "type": "github" } ], - "time": "2021-02-14T06:51:27+00:00" + "time": "2021-04-02T08:20:56+00:00" }, { "name": "sebastian/comparator", @@ -2008,12 +2003,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "3b943ec66244e5d0a5252708d1c9073ae6d3efc9" + "reference": "604de433dd3e1467ded9a92414b3561a812554c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/3b943ec66244e5d0a5252708d1c9073ae6d3efc9", - "reference": "3b943ec66244e5d0a5252708d1c9073ae6d3efc9", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/604de433dd3e1467ded9a92414b3561a812554c5", + "reference": "604de433dd3e1467ded9a92414b3561a812554c5", "shasum": "" }, "require": { @@ -2075,7 +2070,7 @@ "type": "github" } ], - "time": "2021-02-14T06:51:35+00:00" + "time": "2021-04-02T08:21:05+00:00" }, { "name": "sebastian/complexity", @@ -2140,12 +2135,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "1895a1a29e197f7d31099a320b2a3ae9e428b21d" + "reference": "3fa178cf5772d7a09bcfe01bfb7acc13edcf8aec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/1895a1a29e197f7d31099a320b2a3ae9e428b21d", - "reference": "1895a1a29e197f7d31099a320b2a3ae9e428b21d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3fa178cf5772d7a09bcfe01bfb7acc13edcf8aec", + "reference": "3fa178cf5772d7a09bcfe01bfb7acc13edcf8aec", "shasum": "" }, "require": { @@ -2199,7 +2194,7 @@ "type": "github" } ], - "time": "2021-02-14T06:51:43+00:00" + "time": "2021-04-02T08:21:13+00:00" }, { "name": "sebastian/environment", @@ -2207,12 +2202,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "7f8f2720df4d03d4368edadac24c3a7950b6cdc5" + "reference": "1fe23c75ca20a9cfe5ef8af473c726f9ef7e9465" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/7f8f2720df4d03d4368edadac24c3a7950b6cdc5", - "reference": "7f8f2720df4d03d4368edadac24c3a7950b6cdc5", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1fe23c75ca20a9cfe5ef8af473c726f9ef7e9465", + "reference": "1fe23c75ca20a9cfe5ef8af473c726f9ef7e9465", "shasum": "" }, "require": { @@ -2263,7 +2258,7 @@ "type": "github" } ], - "time": "2021-02-14T06:51:52+00:00" + "time": "2021-04-02T08:21:21+00:00" }, { "name": "sebastian/exporter", @@ -2271,12 +2266,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "c6819d6edff3496f28c29a9ed61c564a9fdae27b" + "reference": "31abe95278f9b406051b4a26faf2677fbcc01755" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c6819d6edff3496f28c29a9ed61c564a9fdae27b", - "reference": "c6819d6edff3496f28c29a9ed61c564a9fdae27b", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/31abe95278f9b406051b4a26faf2677fbcc01755", + "reference": "31abe95278f9b406051b4a26faf2677fbcc01755", "shasum": "" }, "require": { @@ -2341,7 +2336,7 @@ "type": "github" } ], - "time": "2021-02-14T06:52:00+00:00" + "time": "2021-04-02T08:21:30+00:00" }, { "name": "sebastian/global-state", @@ -2349,12 +2344,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "a912746c9e31610f52b8e6977107e745c758cfd8" + "reference": "8684de2d84cd6a819f5e22a1292cd3b2e1f26487" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a912746c9e31610f52b8e6977107e745c758cfd8", - "reference": "a912746c9e31610f52b8e6977107e745c758cfd8", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/8684de2d84cd6a819f5e22a1292cd3b2e1f26487", + "reference": "8684de2d84cd6a819f5e22a1292cd3b2e1f26487", "shasum": "" }, "require": { @@ -2406,7 +2401,7 @@ "type": "github" } ], - "time": "2021-02-14T06:52:09+00:00" + "time": "2021-04-02T08:21:38+00:00" }, { "name": "sebastian/lines-of-code", @@ -2471,12 +2466,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "79f258bf9b9f9f1aff7ec27fa3e0d5d7ef344088" + "reference": "b331fc5975a2225e6b93c7e6cd9fce0a57f0fddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/79f258bf9b9f9f1aff7ec27fa3e0d5d7ef344088", - "reference": "79f258bf9b9f9f1aff7ec27fa3e0d5d7ef344088", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/b331fc5975a2225e6b93c7e6cd9fce0a57f0fddc", + "reference": "b331fc5975a2225e6b93c7e6cd9fce0a57f0fddc", "shasum": "" }, "require": { @@ -2521,7 +2516,7 @@ "type": "github" } ], - "time": "2021-02-14T06:52:17+00:00" + "time": "2021-04-02T08:21:47+00:00" }, { "name": "sebastian/object-reflector", @@ -2529,12 +2524,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "232add5a51167e359e1dd03334ebffaddfb95795" + "reference": "297a334e3ae78670a7633e36569d7362bb7397bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/232add5a51167e359e1dd03334ebffaddfb95795", - "reference": "232add5a51167e359e1dd03334ebffaddfb95795", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/297a334e3ae78670a7633e36569d7362bb7397bf", + "reference": "297a334e3ae78670a7633e36569d7362bb7397bf", "shasum": "" }, "require": { @@ -2577,7 +2572,7 @@ "type": "github" } ], - "time": "2021-02-14T06:52:26+00:00" + "time": "2021-04-02T08:21:54+00:00" }, { "name": "sebastian/recursion-context", @@ -2585,12 +2580,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "d6cde15be46e8e5cc8671ceb41b63b69dfd7bd5a" + "reference": "78526ace5bac7c10048020f0317c58fd310a14ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/d6cde15be46e8e5cc8671ceb41b63b69dfd7bd5a", - "reference": "d6cde15be46e8e5cc8671ceb41b63b69dfd7bd5a", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/78526ace5bac7c10048020f0317c58fd310a14ec", + "reference": "78526ace5bac7c10048020f0317c58fd310a14ec", "shasum": "" }, "require": { @@ -2641,7 +2636,7 @@ "type": "github" } ], - "time": "2021-02-14T06:52:58+00:00" + "time": "2021-04-02T08:22:30+00:00" }, { "name": "sebastian/resource-operations", @@ -2705,12 +2700,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "8abc9c1947c9f928da999be28778a0ba48cdf5b4" + "reference": "17fc98bb3c75a02a1a99ffdd022e84ac6d22bd51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/8abc9c1947c9f928da999be28778a0ba48cdf5b4", - "reference": "8abc9c1947c9f928da999be28778a0ba48cdf5b4", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/17fc98bb3c75a02a1a99ffdd022e84ac6d22bd51", + "reference": "17fc98bb3c75a02a1a99ffdd022e84ac6d22bd51", "shasum": "" }, "require": { @@ -2754,7 +2749,7 @@ "type": "github" } ], - "time": "2021-02-14T06:53:07+00:00" + "time": "2021-04-02T08:36:52+00:00" }, { "name": "sebastian/version", @@ -2815,16 +2810,17 @@ "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "2a6f75224a537ee506e9fa1e6fc4200ad411ffd9" + "reference": "72c693916f81df954f3721327de8e6b7433fc6e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/2a6f75224a537ee506e9fa1e6fc4200ad411ffd9", - "reference": "2a6f75224a537ee506e9fa1e6fc4200ad411ffd9", + "url": "https://api.github.com/repos/symfony/console/zipball/72c693916f81df954f3721327de8e6b7433fc6e3", + "reference": "72c693916f81df954f3721327de8e6b7433fc6e3", "shasum": "" }, "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", "symfony/polyfill-php80": "^1.15", @@ -2905,7 +2901,75 @@ "type": "tidelift" } ], - "time": "2021-02-17T15:27:35+00:00" + "time": "2021-04-08T10:31:48+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/main" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-23T23:28:01+00:00" }, { "name": "symfony/polyfill-ctype", @@ -3405,17 +3469,17 @@ "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "bf99754c6182a126968b1c2709d18548489f27eb" + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/bf99754c6182a126968b1c2709d18548489f27eb", - "reference": "bf99754c6182a126968b1c2709d18548489f27eb", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", "shasum": "" }, "require": { "php": ">=7.2.5", - "psr/container": "^1.0" + "psr/container": "^1.1" }, "suggest": { "symfony/service-implementation": "" @@ -3424,7 +3488,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.3-dev" + "dev-main": "2.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -3477,7 +3541,7 @@ "type": "tidelift" } ], - "time": "2021-01-27T16:27:53+00:00" + "time": "2021-04-01T10:43:52+00:00" }, { "name": "symfony/string", @@ -3485,12 +3549,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "6d830fae00e2bb336074eae141bb00db36cd3551" + "reference": "01454c66c88a6bb4449dcdeb913e463e075f331b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/6d830fae00e2bb336074eae141bb00db36cd3551", - "reference": "6d830fae00e2bb336074eae141bb00db36cd3551", + "url": "https://api.github.com/repos/symfony/string/zipball/01454c66c88a6bb4449dcdeb913e463e075f331b", + "reference": "01454c66c88a6bb4449dcdeb913e463e075f331b", "shasum": "" }, "require": { @@ -3561,7 +3625,7 @@ "type": "tidelift" } ], - "time": "2021-02-17T15:27:35+00:00" + "time": "2021-03-17T17:12:23+00:00" }, { "name": "theseer/tokenizer", @@ -3720,20 +3784,20 @@ }, { "name": "webmozart/assert", - "version": "dev-master", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "9c89b265ccc4092d58e66d72af5d343ee77a41ae" + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/9c89b265ccc4092d58e66d72af5d343ee77a41ae", - "reference": "9c89b265ccc4092d58e66d72af5d343ee77a41ae", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", + "php": "^5.3.3 || ^7.0 || ^8.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { @@ -3741,15 +3805,9 @@ "vimeo/psalm": "<3.9.1" }, "require-dev": { - "phpunit/phpunit": "^8.5.13" + "phpunit/phpunit": "^4.8.36 || ^7.5.13" }, - "default-branch": true, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -3773,9 +3831,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/master" + "source": "https://github.com/webmozarts/assert/tree/1.9.1" }, - "time": "2021-01-18T12:52:36+00:00" + "time": "2020-07-08T17:02:28+00:00" }, { "name": "webmozart/glob", @@ -3783,12 +3841,12 @@ "source": { "type": "git", "url": "https://github.com/webmozarts/glob.git", - "reference": "207f0ffb6d76e76bf045c09b273280daf1d60c49" + "reference": "2dfaf22a3cf77f96e79ec89a1b5302913a2ce6d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/glob/zipball/207f0ffb6d76e76bf045c09b273280daf1d60c49", - "reference": "207f0ffb6d76e76bf045c09b273280daf1d60c49", + "url": "https://api.github.com/repos/webmozarts/glob/zipball/2dfaf22a3cf77f96e79ec89a1b5302913a2ce6d1", + "reference": "2dfaf22a3cf77f96e79ec89a1b5302913a2ce6d1", "shasum": "" }, "require": { @@ -3826,7 +3884,7 @@ "issues": "https://github.com/webmozarts/glob/issues", "source": "https://github.com/webmozarts/glob/tree/4.4.x" }, - "time": "2021-02-01T06:06:23+00:00" + "time": "2021-03-01T07:12:40+00:00" }, { "name": "webmozart/path-util", diff --git a/src/Image/Image.php b/src/Image/Image.php index ffea3a5..a302dc8 100644 --- a/src/Image/Image.php +++ b/src/Image/Image.php @@ -15,6 +15,12 @@ class Image private int $height; + private int $cornerRadius = 0; + + private int $borderWidth = 0; + + private String $borderColor = ''; + /** * @param string $data * @@ -81,9 +87,12 @@ public function crop(int $width, int $height) */ public function setBorder(int $borderWidth, string $borderColor): self { - $width = $height = $borderWidth; - - $this->image->borderImage($borderColor, $width, $height); + $this->borderWidth = $borderWidth; + $this->borderColor = $borderColor; + + // if cornerRadius is set, border is handled in the setBorderRadius functions + if(!empty($this->cornerRadius)) return $this; + $this->image->borderImage($borderColor, $borderWidth, $borderWidth); return $this; } @@ -101,13 +110,30 @@ public function setBorderRadius(int $cornerRadius): self $mask = new Imagick(); $mask->newImage($this->width, $this->height, new ImagickPixel('transparent'), 'png'); + $rectwidth = ($this->borderWidth>0?($this->width-($this->borderWidth+1)):$this->width-1); + $rectheight = ($this->borderWidth>0?($this->height-($this->borderWidth+1)):$this->height-1); + + $shape = new ImagickDraw(); $shape->setFillColor(new ImagickPixel('black')); - $shape->roundRectangle(0, 0, $this->width, $this->height, $cornerRadius, $cornerRadius); - + $shape->roundRectangle($this->borderWidth, $this->borderWidth, $rectwidth, $rectheight, $cornerRadius, $cornerRadius); + $mask->drawImage($shape); - - $this->image->compositeImage($mask, Imagick::COMPOSITE_DSTIN, 0, 0); + $this->image->compositeImage($mask, Imagick::COMPOSITE_DSTIN, 0, 0); + + if($this->borderWidth > 0) { + $bc = new ImagickPixel(); + $bc->setColor($this->borderColor); + + $strokeCanvas = new Imagick(); + $strokeCanvas->newImage($this->width, $this->height, new ImagickPixel('transparent'),'png'); + $shape2 = new ImagickDraw(); + $shape2->setFillColor($bc); + $shape2->roundRectangle(0,0,$this->width, $this->height, $cornerRadius, $cornerRadius); + $strokeCanvas->drawImage($shape2); + $strokeCanvas->compositeImage($this->image, Imagick::COMPOSITE_DEFAULT, 0,0); + $this->image = $strokeCanvas; + } return $this; } From 9274a7754ccfa3ae0331f93f711c2f4a4f7d1868 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Fri, 9 Apr 2021 13:27:34 +0545 Subject: [PATCH 2/3] fix opacity issue --- src/Image/Image.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Image/Image.php b/src/Image/Image.php index a302dc8..fc53dd8 100644 --- a/src/Image/Image.php +++ b/src/Image/Image.php @@ -90,7 +90,6 @@ public function setBorder(int $borderWidth, string $borderColor): self $this->borderWidth = $borderWidth; $this->borderColor = $borderColor; - // if cornerRadius is set, border is handled in the setBorderRadius functions if(!empty($this->cornerRadius)) return $this; $this->image->borderImage($borderColor, $borderWidth, $borderWidth); @@ -127,11 +126,16 @@ public function setBorderRadius(int $cornerRadius): self $strokeCanvas = new Imagick(); $strokeCanvas->newImage($this->width, $this->height, new ImagickPixel('transparent'),'png'); + $shape2 = new ImagickDraw(); - $shape2->setFillColor($bc); - $shape2->roundRectangle(0,0,$this->width, $this->height, $cornerRadius, $cornerRadius); + $shape2->setFillColor(new ImagickPixel('transparent')); + $shape2->setStrokeWidth($this->borderWidth); + $shape2->setStrokeColor($bc); + $shape2->roundRectangle($this->borderWidth, $this->borderWidth, $rectwidth, $rectheight, $cornerRadius, $cornerRadius); + $strokeCanvas->drawImage($shape2); $strokeCanvas->compositeImage($this->image, Imagick::COMPOSITE_DEFAULT, 0,0); + $this->image = $strokeCanvas; } return $this; From ae2e55eaddd7c723061cd6d65d845d28c6ea2dfe Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Mon, 12 Apr 2021 06:24:26 +0545 Subject: [PATCH 3/3] handle opacity 0 --- src/Image/Image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Image/Image.php b/src/Image/Image.php index fc53dd8..60b4ad9 100644 --- a/src/Image/Image.php +++ b/src/Image/Image.php @@ -150,7 +150,7 @@ public function setBorderRadius(int $cornerRadius): self */ public function setOpacity(float $opacity): self { - if(empty($opacity) || $opacity == 1) { + if((empty($opacity) && $opacity !== 0) || $opacity == 1) { return $this; } $this->image->setImageAlpha($opacity);