Interfacelab / ilab-media-tools

https://mediacloud.press/
GNU General Public License v3.0
114 stars 37 forks source link

PHP version 8.2.10 compatibility #223

Closed ravimallya closed 1 year ago

ravimallya commented 1 year ago

Describe the bug null type checking, defining types and declare dynamic variables inside classes.

To Reproduce Steps to reproduce the behavior:

  1. Activate and enable cloud storage. In this case it's Google Cloud Storage.
  2. Go to plugin settings and you'll get these errors:

Expected behavior Deprecation warnings should not come.

Error messages

   Deprecated: Creation of dynamic property MediaCloud\Plugin\Tools\Vision\Driver\Rekognition\RekognitionDriver::$bucket is deprecated in /var/www/html/wp-content/plugins/ilab-media-tools/classes/Tools/Vision/Driver/Rekognition/RekognitionDriver.php on line 66

Deprecated: strncmp(): Passing null to parameter #1 ($string1) of type string is deprecated in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/support/Str.php on line 649

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/view/Compilers/BladeCompiler.php on line 445

Deprecated: Return type of MediaCloud\Vendor\Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/support/Collection.php on line 1349

Deprecated: Return type of MediaCloud\Vendor\Illuminate\Support\Collection::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/support/Collection.php on line 1360

Deprecated: Return type of MediaCloud\Vendor\Illuminate\Support\Collection::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/support/Collection.php on line 1372

Deprecated: Return type of MediaCloud\Vendor\Illuminate\Support\Collection::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/support/Collection.php on line 1387

Deprecated: Return type of MediaCloud\Vendor\Illuminate\Support\Collection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/support/Collection.php on line 1304

Deprecated: Return type of MediaCloud\Vendor\Illuminate\Support\Collection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/support/Collection.php on line 1294

Deprecated: Return type of MediaCloud\Vendor\Illuminate\Support\Collection::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/support/Traits/EnumeratesValues.php on line 768

Deprecated: strncmp(): Passing null to parameter #1 ($string1) of type string is deprecated in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/support/Str.php on line 649

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/view/Compilers/BladeCompiler.php on line 445

Deprecated: strncmp(): Passing null to parameter #1 ($string1) of type string is deprecated in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/support/Str.php on line 649

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/view/Compilers/BladeCompiler.php on line 445

Server (please complete the following information)

How did you install the plugin? wordpress.org

jawngee commented 1 year ago

We don't support 8.2. WordPress itself doesn't either. It's impossible for us to be 100% 8.2 compatible while still supporting 7.4 which a good many of Media Cloud users are still running. You can blame WordPress for this.

https://make.wordpress.org/core/handbook/references/php-compatibility-and-wordpress-versions/

I'm also not sure why your logging level is set so high on a production system. You should really turn off E_NOTICE on production.

On Sep 24, 2023, at 4:03 PM, Ravi Mallya @.***> wrote:

Describe the bug null type checking, defining types and declare dynamic variables inside classes.

To Reproduce Steps to reproduce the behavior:

Activate and enable cloud storage. In this case it's Google Cloud Storage. Go to plugin settings and you'll get these errors: Expected behavior Deprecation warnings should not come.

Error messages

Deprecated: Creation of dynamic property MediaCloud\Plugin\Tools\Vision\Driver\Rekognition\RekognitionDriver::$bucket is deprecated in /var/www/html/wp-content/plugins/ilab-media-tools/classes/Tools/Vision/Driver/Rekognition/RekognitionDriver.php on line 66

Deprecated: strncmp(): Passing null to parameter #1 ($string1) of type string is deprecated in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/support/Str.php on line 649

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/view/Compilers/BladeCompiler.php on line 445

Deprecated: Return type of MediaCloud\Vendor\Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/support/Collection.php on line 1349

Deprecated: Return type of MediaCloud\Vendor\Illuminate\Support\Collection::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/support/Collection.php on line 1360

Deprecated: Return type of MediaCloud\Vendor\Illuminate\Support\Collection::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/support/Collection.php on line 1372

Deprecated: Return type of MediaCloud\Vendor\Illuminate\Support\Collection::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/support/Collection.php on line 1387

Deprecated: Return type of MediaCloud\Vendor\Illuminate\Support\Collection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/support/Collection.php on line 1304

Deprecated: Return type of MediaCloud\Vendor\Illuminate\Support\Collection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/support/Collection.php on line 1294

Deprecated: Return type of MediaCloud\Vendor\Illuminate\Support\Collection::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/support/Traits/EnumeratesValues.php on line 768

Deprecated: strncmp(): Passing null to parameter #1 ($string1) of type string is deprecated in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/support/Str.php on line 649

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/view/Compilers/BladeCompiler.php on line 445

Deprecated: strncmp(): Passing null to parameter #1 ($string1) of type string is deprecated in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/support/Str.php on line 649

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/wp-content/plugins/ilab-media-tools/lib/mcloud-illuminate/view/Compilers/BladeCompiler.php on line 445 Server (please complete the following information)

Operating System: Ubuntu 20.04 PHP Version: PHP 8.2.10 (cli) (built: Sep 2 2023 06:58:59) (NTS) Web Server: Apache Using PHP-FPM? NA Using WordPress Cron? NA How did you install the plugin? wordpress.org

— Reply to this email directly, view it on GitHub https://github.com/Interfacelab/ilab-media-tools/issues/223, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAK3IKIKUCMZIZPHOAO2JLX37ZNLANCNFSM6AAAAAA5EZRP4Q. You are receiving this because you are subscribed to this thread.