Skip to content

Commit

Permalink
Upgrade simpleimage
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier authored and distantnative committed Nov 23, 2024
1 parent 0e4b415 commit abeb351
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"ext-mbstring": "*",
"ext-openssl": "*",
"christian-riesen/base32": "1.6.0",
"claviska/simpleimage": "4.2.0",
"claviska/simpleimage": "4.2.1",
"composer/semver": "3.4.3",
"filp/whoops": "2.16.0",
"getkirby/composer-installer": "^1.2.1",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions vendor/claviska/simpleimage/src/claviska/SimpleImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ public function fromString(string $string): SimpleImage|static
*
* @throws Exception Thrown when WEBP support is not enabled or unsupported format.
*/
public function generate(string $mimeType = null, array|int $options = 100): array
public function generate(string|null $mimeType = null, array|int $options = 100): array
{
// Format defaults to the original mime type
$mimeType = $mimeType ?: $this->mimeType;
Expand Down Expand Up @@ -473,7 +473,7 @@ public function generate(string $mimeType = null, array|int $options = 100): arr
*
* @throws Exception
*/
public function toDataUri(string $mimeType = null, array|int $options = 100): string
public function toDataUri(string|null $mimeType = null, array|int $options = 100): string
{
$image = $this->generate($mimeType, $options);

Expand All @@ -490,7 +490,7 @@ public function toDataUri(string $mimeType = null, array|int $options = 100): st
*
* @throws Exception
*/
public function toDownload(string $filename, string $mimeType = null, array|int $options = 100): static
public function toDownload(string $filename, string|null $mimeType = null, array|int $options = 100): static
{
$image = $this->generate($mimeType, $options);

Expand All @@ -517,7 +517,7 @@ public function toDownload(string $filename, string $mimeType = null, array|int
*
* @throws Exception Thrown if failed write to file.
*/
public function toFile(string $file, string $mimeType = null, array|int $options = 100): static
public function toFile(string $file, string|null $mimeType = null, array|int $options = 100): static
{
$image = $this->generate($mimeType, $options);

Expand All @@ -538,7 +538,7 @@ public function toFile(string $file, string $mimeType = null, array|int $options
*
* @throws Exception
*/
public function toScreen(string $mimeType = null, array|int $options = 100): static
public function toScreen(string|null $mimeType = null, array|int $options = 100): static
{
$image = $this->generate($mimeType, $options);

Expand All @@ -557,7 +557,7 @@ public function toScreen(string $mimeType = null, array|int $options = 100): sta
*
* @throws Exception
*/
public function toString(string $mimeType = null, array|int $options = 100): string
public function toString(string|null $mimeType = null, array|int $options = 100): string
{
return $this->generate($mimeType, $options)['data'];
}
Expand Down Expand Up @@ -975,7 +975,7 @@ public function overlay(string|SimpleImage $overlay, string $anchor = 'center',
* @param int|null $height The new image height.
* @return SimpleImage
*/
public function resize(int $width = null, int $height = null): static
public function resize(int|null $width = null, int|null $height = null): static
{
// No dimensions specified
if (! $width && ! $height) {
Expand Down Expand Up @@ -1027,7 +1027,7 @@ public function resize(int $width = null, int $height = null): static
* @param int|null $res_y The vertical resolution in DPI
* @return SimpleImage
*/
public function resolution(int $res_x, int $res_y = null): static
public function resolution(int $res_x, int|null $res_y = null): static
{
if (is_null($res_y)) {
imageresolution($this->image, $res_x);
Expand Down Expand Up @@ -1087,7 +1087,7 @@ public function rotate(int $angle, string|array $backgroundColor = 'transparent'
*
* @throws Exception
*/
public function text(string $text, array $options, array &$boundary = null): static
public function text(string $text, array $options, array|null &$boundary = null): static
{
// Check for freetype support
if (! function_exists('imagettftext')) {
Expand Down Expand Up @@ -2196,7 +2196,7 @@ public static function darkenColor(string|array $color, int $amount): array
*
* @throws Exception Thrown if library \League\ColorExtractor is missing.
*/
public function extractColors(int $count = 5, string|array $backgroundColor = null): array
public function extractColors(int $count = 5, string|array|null $backgroundColor = null): array
{
// Check for required library
if (! class_exists('\\'.ColorExtractor::class)) {
Expand Down
14 changes: 7 additions & 7 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,17 @@
},
{
"name": "claviska/simpleimage",
"version": "4.2.0",
"version_normalized": "4.2.0.0",
"version": "4.2.1",
"version_normalized": "4.2.1.0",
"source": {
"type": "git",
"url": "https://github.com/claviska/SimpleImage.git",
"reference": "dfbe53c01dae8467468ef2b817c09b786a7839d2"
"reference": "ec6d5021e5a7153a2520d64c59b86b6f3c4157c5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/claviska/SimpleImage/zipball/dfbe53c01dae8467468ef2b817c09b786a7839d2",
"reference": "dfbe53c01dae8467468ef2b817c09b786a7839d2",
"url": "https://api.github.com/repos/claviska/SimpleImage/zipball/ec6d5021e5a7153a2520d64c59b86b6f3c4157c5",
"reference": "ec6d5021e5a7153a2520d64c59b86b6f3c4157c5",
"shasum": ""
},
"require": {
Expand All @@ -86,7 +86,7 @@
"laravel/pint": "^1.5",
"phpstan/phpstan": "^1.10"
},
"time": "2024-04-15T16:07:16+00:00",
"time": "2024-11-22T13:25:03+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand All @@ -108,7 +108,7 @@
"description": "A PHP class that makes working with images as simple as possible.",
"support": {
"issues": "https://github.com/claviska/SimpleImage/issues",
"source": "https://github.com/claviska/SimpleImage/tree/4.2.0"
"source": "https://github.com/claviska/SimpleImage/tree/4.2.1"
},
"funding": [
{
Expand Down
6 changes: 3 additions & 3 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
'dev_requirement' => false,
),
'claviska/simpleimage' => array(
'pretty_version' => '4.2.0',
'version' => '4.2.0.0',
'reference' => 'dfbe53c01dae8467468ef2b817c09b786a7839d2',
'pretty_version' => '4.2.1',
'version' => '4.2.1.0',
'reference' => 'ec6d5021e5a7153a2520d64c59b86b6f3c4157c5',
'type' => 'library',
'install_path' => __DIR__ . '/../claviska/simpleimage',
'aliases' => array(),
Expand Down

0 comments on commit abeb351

Please sign in to comment.