BoldGrid / w3-total-cache

GNU General Public License v2.0
152 stars 85 forks source link

PHP 8 deprecated errors #793

Closed cssjoe closed 5 months ago

cssjoe commented 10 months ago

PHP 8.1:

"wp-admin/upload.php" -- Change media when an Amazon Cloudfront CDN is configured.

PHP Deprecated:  Aws\Credentials\Credentials implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/Credentials/Credentials.php on line 8
PHP Deprecated:  Return type of Aws\HandlerList::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/HandlerList.php on line 308
PHP Deprecated:  Return type of Aws\Api\AbstractModel::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/Api/AbstractModel.php on line 41
PHP Deprecated:  Return type of Aws\Api\AbstractModel::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/Api/AbstractModel.php on line 30
PHP Deprecated:  Return type of Aws\Api\AbstractModel::offsetSet($offset, $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 wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/Api/AbstractModel.php on line 36
PHP Deprecated:  Return type of Aws\Api\AbstractModel::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/Api/AbstractModel.php on line 46
PHP Deprecated:  Return type of Aws\Endpoint\Partition::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/HasDataTrait.php on line 41
PHP Deprecated:  Return type of & Aws\Endpoint\Partition::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/HasDataTrait.php on line 26
PHP Deprecated:  Return type of Aws\Endpoint\Partition::offsetSet($offset, $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 wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/HasDataTrait.php on line 36
PHP Deprecated:  Return type of Aws\Endpoint\Partition::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/HasDataTrait.php on line 46
PHP Deprecated:  Use of "self" in callables is deprecated in wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/EndpointDiscovery/ConfigurationProvider.php on line 86
PHP Deprecated:  Use of "self" in callables is deprecated in wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/Retry/ConfigurationProvider.php on line 88
PHP Deprecated:  Use of "self" in callables is deprecated in wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/ClientSideMonitoring/ConfigurationProvider.php on line 90
PHP Deprecated:  Return type of Aws\Command::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/HasDataTrait.php on line 41
PHP Deprecated:  Return type of & Aws\Command::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/HasDataTrait.php on line 26
PHP Deprecated:  Return type of Aws\Command::offsetSet($offset, $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 wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/HasDataTrait.php on line 36
PHP Deprecated:  Return type of Aws\Command::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/HasDataTrait.php on line 46
PHP Deprecated:  Return type of Aws\Command::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/HasDataTrait.php on line 56
PHP Deprecated:  Return type of Aws\Command::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/HasDataTrait.php on line 13
PHP Deprecated:  Return type of Aws\Api\DateTimeResult::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/Api/DateTimeResult.php on line 97

"wp-admin/admin.php?page=w3tc_fragmentcache" -- Click "Test" to test Redis.

PHP Deprecated:  Redis::connect(): Passing null to parameter #3 ($timeout) of type float is deprecated in wp-content/plugins/w3-total-cache/Cache_Redis.php on line 525
PHP Deprecated:  Redis::connect(): Passing null to parameter #5 of type int is deprecated in wp-content/plugins/w3-total-cache/Cache_Redis.php on line 525
PHP Deprecated:  Redis::connect(): Passing null to parameter #6 of type float is deprecated in wp-content/plugins/w3-total-cache/Cache_Redis.php on line 525

PHP 8.2:

PHP Deprecated:  Creation of dynamic property W3TCL\Minify\Minify_Cache_File::$_flush_path is deprecated in wp-content/plugins/w3-total-cache/lib/Minify/Minify/Cache/File.php on line 21
PHP Deprecated:  Creation of dynamic property W3TCL\Minify\Minify_HTML::$_html is deprecated in wp-content/plugins/w3-total-cache/lib/Minify/Minify/HTML.php on line 73
PHP Deprecated:  Creation of dynamic property W3TC\UserExperience_LazyLoad_Mutator_Unmutable::$placeholder_base is deprecated in wp-content/plugins/w3-total-cache/UserExperience_LazyLoad_Mutator_Unmutable.php on line 10
PHP Deprecated:  Creation of dynamic property W3TCL\Minify\Minify_CSS_Compressor::$_replacementHash is deprecated in wp-content/plugins/w3-total-cache/lib/Minify/Minify/CSS/Compressor.php on line 70
PHP Deprecated:  Creation of dynamic property W3TCL\Minify\Minify_CSS_Compressor::$_placeholders is deprecated in wp-content/plugins/w3-total-cache/lib/Minify/Minify/CSS/Compressor.php on line 71
michaelw85 commented 10 months ago

I've created a PR to resolve the dynamic property warnings for PHP 8.2.

cssjoe commented 6 months ago

@michaelw85 Thank you for your pull request. We will be looking into updating dependencies, which depend on the PHP versions supported.