Skip to content

Commit

Permalink
Add support for PHP 8.3 and update JBZoo dependencies to v7.1 (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
SmetDenis committed Jan 28, 2024
1 parent 22b64c1 commit f987173
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
JBZOO_COMPOSER_UPDATE_FLAGS: ${{ matrix.composer_flags }}
strategy:
matrix:
php-version: [ 8.1, 8.2 ]
php-version: [ 8.1, 8.2, 8.3 ]
coverage: [ xdebug, none ]
composer_flags: [ "--prefer-lowest", "" ]
steps:
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ 8.1, 8.2 ]
php-version: [ 8.1, 8.2, 8.3 ]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ 8.1, 8.2 ]
php-version: [ 8.1, 8.2, 8.3 ]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
"ext-exif" : "*",
"ext-ctype" : "*",

"jbzoo/utils" : "^7.0",
"jbzoo/data" : "^7.0"
"jbzoo/utils" : "^7.1",
"jbzoo/data" : "^7.1"
},

"require-dev" : {
"jbzoo/toolbox-dev" : "^7.0"
"jbzoo/toolbox-dev" : "^7.1"
},

"autoload" : {
Expand Down
8 changes: 4 additions & 4 deletions src/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ final class Image
private ?string $orient;
private ?string $mime;

public function __construct(\GdImage|string|null $filename = null, bool $strict = false)
public function __construct(null|\GdImage|string $filename = null, bool $strict = false)
{
Helper::checkGD();

Expand Down Expand Up @@ -227,7 +227,7 @@ public function loadString(?string $imageString, bool $strict = false): self
* Load image resource.
* @param null|\GdImage|string $imageRes Image GD Resource
*/
public function loadResource(\GdImage|string|null $imageRes = null): self
public function loadResource(null|\GdImage|string $imageRes = null): self
{
if (!$imageRes instanceof \GdImage) {
throw new Exception('Image is not GD resource!');
Expand Down Expand Up @@ -280,7 +280,7 @@ public function isSquare(): bool
* @param null|array|string $color Hex color string, array(red, green, blue) or array(red, green, blue, alpha).
* Where red, green, blue - integers 0-255, alpha - integer 0-127
*/
public function create(int $width, ?int $height = null, array|string|null $color = null): self
public function create(int $width, ?int $height = null, null|array|string $color = null): self
{
$this->cleanup();

Expand Down Expand Up @@ -810,7 +810,7 @@ private function renderImageByFormat(
* Get metadata of image or base64 string.
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*/
private function loadMeta(\GdImage|string|null $image = null, bool $strict = false): self
private function loadMeta(null|\GdImage|string $image = null, bool $strict = false): self
{
// Gather meta data
if ($image === null && $this->filename !== null && $this->filename !== '') {
Expand Down

0 comments on commit f987173

Please sign in to comment.