Sybio / ImageWorkshop

ImageWorkshop is a PHP5.3+ library that helps you to manage images based on GD library
http://phpimageworkshop.com/
Other
862 stars 189 forks source link

Problems with php 8.1 #138

Closed guisaldanha closed 2 years ago

guisaldanha commented 2 years ago
Q A
Bug report? yes
Feature request? no
Usage question? no
PHP version used 8.1

Problems with php 8.1

When running with php 8.1 it presents several problems like the ones below:

Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in vendor/sybio/image-workshop/src/Core/ImageWorkshopLib.php on line 80 Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in vendor/sybio/image-workshop/src/Core/ImageWorkshopLib.php on line 81 Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in vendor/sybio/image-workshop/src/Core/ImageWorkshopLib.php on line 82 Deprecated: Implicit conversion from float 113.5 to int loses precision in vendor/sybio/image-workshop/src/Core/ImageWorkshopLib.php on line 271 Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in vendor/sybio/image-workshop/src/Core/ImageWorkshopLib.php on line 80 Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in vendor/sybio/image-workshop/src/Core/ImageWorkshopLib.php on line 81 Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in vendor/sybio/image-workshop/src/Core/ImageWorkshopLib.php on line 82

jdecool commented 2 years ago

Hi @guisaldanha,

Thanks for your feedback.

ImageWorkshop isn't currently actively maintained. Its core code base began to be a little old and doesn't have strong typing. That's why, if the package isn't properly used, this kind of warning can occur.

If we refer to the phpdoc of somes lines you indicate in your issue, it specify the correct type to be used.

jdecool commented 2 years ago

The project would benefit from a technical update.

But unfortunately, there are no active contributors interested in this work.

guisaldanha commented 2 years ago

Hello @jdecool

Ok, thanks for the reply