Closed hsnfirdaus closed 2 years ago
Hello curious contributor ! Since it seems to be your first contribution, make sure that you've been:
Hello,
I have pushed a fix for Phpfastcache 8.1 (with PHP 8.1), but I strongly encourage you to upgrade to Phpfastcache 9.0.
I won't release a new version immediately so you might want to use "v8.x-dev" channel on composer.
Cheers, Georges.
@Geolim4 Unfortunately this issue still reproduced, please add #[\ReturnTypeWillChange]
https://github.com/PHPSocialNetwork/phpfastcache/issues/846#issuecomment-1004766170
@Geolim4 please check this https://php.watch/versions/8.1/ReturnTypeWillChange https://php.watch/versions/8.1/internal-method-return-types#ReturnTypeWillChange
php 7.4 is still most popular version
I just pushed fixes today, see commit above !
Thanks, I see. Waiting for new release with this fixes
I won't make a new release soon, use "v8.x-dev"
meanwhile.
Sadly, the issue still persisting with Php v8.1 and PhpFastCache v7
<br />
<b>Deprecated</b>: Return type of Phpfastcache\Util\ArrayObject::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 <b>/var/www/server/public_html/includes/vendor/cache/lib/Phpfastcache/Util/ArrayObject.php</b> on line <b>106</b><br />
<br />
<b>Deprecated</b>: Return type of Phpfastcache\Util\ArrayObject::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 <b>/var/www/server/public_html/includes/vendor/cache/lib/Phpfastcache/Util/ArrayObject.php</b> on line <b>115</b><br />
<br />
<b>Deprecated</b>: Return type of Phpfastcache\Util\ArrayObject::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 <b>/var/www/server/public_html/includes/vendor/cache/lib/Phpfastcache/Util/ArrayObject.php</b> on line <b>130</b><br />
<br />
<b>Deprecated</b>: Return type of Phpfastcache\Util\ArrayObject::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in <b>/var/www/server/public_html/includes/vendor/cache/lib/Phpfastcache/Util/ArrayObject.php</b> on line <b>48</b><br />
<br />
<b>Deprecated</b>: Return type of Phpfastcache\Util\ArrayObject::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in <b>/var/www/server/public_html/includes/vendor/cache/lib/Phpfastcache/Util/ArrayObject.php</b> on line <b>56</b><br />
<br />
<b>Deprecated</b>: Return type of Phpfastcache\Util\ArrayObject::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in <b>/var/www/server/public_html/includes/vendor/cache/lib/Phpfastcache/Util/ArrayObject.php</b> on line <b>80</b><br />
<br />
<b>Deprecated</b>: Return type of Phpfastcache\Drivers\Redis\Item::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in <b>/var/www/server/public_html/includes/vendor/cache/lib/Phpfastcache/Core/Item/ItemExtendedTrait.php</b> on line <b>438</b><br />
<br />
Sadly, the issue still persisting with Php v8.1 and PhpFastCache v7
<br /> <b>Deprecated</b>: Return type of Phpfastcache\Util\ArrayObject::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 <b>/var/www/server/public_html/includes/vendor/cache/lib/Phpfastcache/Util/ArrayObject.php</b> on line <b>106</b><br /> <br /> <b>Deprecated</b>: Return type of Phpfastcache\Util\ArrayObject::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 <b>/var/www/server/public_html/includes/vendor/cache/lib/Phpfastcache/Util/ArrayObject.php</b> on line <b>115</b><br /> <br /> <b>Deprecated</b>: Return type of Phpfastcache\Util\ArrayObject::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 <b>/var/www/server/public_html/includes/vendor/cache/lib/Phpfastcache/Util/ArrayObject.php</b> on line <b>130</b><br /> <br /> <b>Deprecated</b>: Return type of Phpfastcache\Util\ArrayObject::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in <b>/var/www/server/public_html/includes/vendor/cache/lib/Phpfastcache/Util/ArrayObject.php</b> on line <b>48</b><br /> <br /> <b>Deprecated</b>: Return type of Phpfastcache\Util\ArrayObject::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in <b>/var/www/server/public_html/includes/vendor/cache/lib/Phpfastcache/Util/ArrayObject.php</b> on line <b>56</b><br /> <br /> <b>Deprecated</b>: Return type of Phpfastcache\Util\ArrayObject::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in <b>/var/www/server/public_html/includes/vendor/cache/lib/Phpfastcache/Util/ArrayObject.php</b> on line <b>80</b><br /> <br /> <b>Deprecated</b>: Return type of Phpfastcache\Drivers\Redis\Item::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in <b>/var/www/server/public_html/includes/vendor/cache/lib/Phpfastcache/Core/Item/ItemExtendedTrait.php</b> on line <b>438</b><br /> <br />
That's normal, v7 is no longer supported, please upgrade at least to v8.1.
@Geolim4 weird but I have PHP 8.1 and phpfastcahe 8.1.X and I got the same issues above, lots of deprecated functions in PHP8.1 as an example: Deprecated: mb_strlen(): Passing null to parameter #1 ($string) of type string is deprecated
mb_strlen
Which version are you using ?
I've solved. My bad... I'm using 8.1.4 and I've cleaned my sentry plataforma for this project and I didn't catch anymore any deprecated function. Thanks.
Configuration
Describe the bug
Getting this deprecated message: