What type of issue is this?
Exception/Error/Warning/Notice/Deprecation
Operating system + version
ubuntu 20.04
PHP version
8.4
Connector/Database version (if applicable)
mysql
Phpfastcache version
9.2.0 ✅
Describe the issue you're facing
Deprecated warnings in PHP 8.4 when creating RedisConfig (v9.2.4)
Summary
Using phpFastCache v9.2.4 with PHP 8.4 triggers deprecation warnings when creating a RedisConfig instance, even though the public API is being used as documented.
Environment
- phpFastCache: 9.2.4
- PHP: 8.4.x
- Driver: Redis
Code
use Phpfastcache\CacheManager;
use Phpfastcache\Drivers\Redis\Config as RedisConfig;
$config = new RedisConfig([
'host' => '127.0.0.1',
'port' => 6379,
'password' => '',
'database' => 0,
]);
$pool = CacheManager::getInstance('redis', $config);
Actual behavior
The following deprecation warning is emitted:
Deprecated: This method is deprecated and will be soon moved to IOConfigurationOption class, which means they will only be available for `IO` drivers.
The warning points to:
Phpfastcache\Config\ConfigurationOption
Expected behavior
Creating a RedisConfig object using the documented constructor should not trigger deprecation warnings.
Notes
It appears that RedisConfig internally calls deprecated setter methods defined in ConfigurationOption during construction. While these methods are marked as deprecated for future migration to IOConfigurationOption, using the current public API still results in deprecation notices.
Could the constructor be updated to avoid calling deprecated methods internally, or is there a new recommended way to configure Redis that avoids these warnings?
Thank you!
Expected behavior
No response
Code sample (optional)
No response
Suggestion to fix the issue (optional)
No response
References (optional)
No response
Do you have anything more you want to share? (optional)
No response
Have you searched in our Wiki before posting ?
What type of issue is this?
Exception/Error/Warning/Notice/Deprecation
Operating system + version
ubuntu 20.04
PHP version
8.4
Connector/Database version (if applicable)
mysql
Phpfastcache version
9.2.0 ✅
Describe the issue you're facing
Deprecated warnings in PHP 8.4 when creating RedisConfig (v9.2.4)
Summary
Using phpFastCache v9.2.4 with PHP 8.4 triggers deprecation warnings when creating a
RedisConfiginstance, even though the public API is being used as documented.Environment
Code
Actual behavior
The following deprecation warning is emitted:
The warning points to:
Expected behavior
Creating a
RedisConfigobject using the documented constructor should not trigger deprecation warnings.Notes
It appears that
RedisConfiginternally calls deprecated setter methods defined inConfigurationOptionduring construction. While these methods are marked as deprecated for future migration toIOConfigurationOption, using the current public API still results in deprecation notices.Could the constructor be updated to avoid calling deprecated methods internally, or is there a new recommended way to configure Redis that avoids these warnings?
Thank you!
Expected behavior
No response
Code sample (optional)
No response
Suggestion to fix the issue (optional)
No response
References (optional)
No response
Do you have anything more you want to share? (optional)
No response
Have you searched in our Wiki before posting ?