Skip to content

Commit f987173

Browse files
authored
Add support for PHP 8.3 and update JBZoo dependencies to v7.1 (#31)
1 parent 22b64c1 commit f987173

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
JBZOO_COMPOSER_UPDATE_FLAGS: ${{ matrix.composer_flags }}
3535
strategy:
3636
matrix:
37-
php-version: [ 8.1, 8.2 ]
37+
php-version: [ 8.1, 8.2, 8.3 ]
3838
coverage: [ xdebug, none ]
3939
composer_flags: [ "--prefer-lowest", "" ]
4040
steps:
@@ -77,7 +77,7 @@ jobs:
7777
runs-on: ubuntu-latest
7878
strategy:
7979
matrix:
80-
php-version: [ 8.1, 8.2 ]
80+
php-version: [ 8.1, 8.2, 8.3 ]
8181
steps:
8282
- name: Checkout code
8383
uses: actions/checkout@v3
@@ -111,7 +111,7 @@ jobs:
111111
runs-on: ubuntu-latest
112112
strategy:
113113
matrix:
114-
php-version: [ 8.1, 8.2 ]
114+
php-version: [ 8.1, 8.2, 8.3 ]
115115
steps:
116116
- name: Checkout code
117117
uses: actions/checkout@v3

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@
4242
"ext-exif" : "*",
4343
"ext-ctype" : "*",
4444

45-
"jbzoo/utils" : "^7.0",
46-
"jbzoo/data" : "^7.0"
45+
"jbzoo/utils" : "^7.1",
46+
"jbzoo/data" : "^7.1"
4747
},
4848

4949
"require-dev" : {
50-
"jbzoo/toolbox-dev" : "^7.0"
50+
"jbzoo/toolbox-dev" : "^7.1"
5151
},
5252

5353
"autoload" : {

src/Image.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ final class Image
5757
private ?string $orient;
5858
private ?string $mime;
5959

60-
public function __construct(\GdImage|string|null $filename = null, bool $strict = false)
60+
public function __construct(null|\GdImage|string $filename = null, bool $strict = false)
6161
{
6262
Helper::checkGD();
6363

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

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

0 commit comments

Comments
 (0)