Skip to content

Redis config cannot accept null values as the given example#774

Merged
Geolim4 merged 3 commits intoTruCopilot:masterfrom
GeoSot:fix-redis-config
Nov 27, 2020
Merged

Redis config cannot accept null values as the given example#774
Geolim4 merged 3 commits intoTruCopilot:masterfrom
GeoSot:fix-redis-config

Conversation

@GeoSot
Copy link
Copy Markdown
Contributor

@GeoSot GeoSot commented Nov 26, 2020

Proposed changes

According to this example, password and database options can be nullable.

$InstanceCache = CacheManager::getInstance('redis', new Config([
  'host' => '127.0.0.1', //Default value
  'port' => 6379, //Default value
  'password' => null, //Default value
  'database' => null, //Default value
]));

For a given server setup I need these values to be null but, the Config setters didn't accept null values and thrown exception.

Types of changes

What types of changes does your code introduce to Phpfastcache?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves an existing code/behavior)
  • Deprecated third party dependency update
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation/Typo/Resource update that does not involve any code modification

Agreement

I have read the CONTRIBUTING and CODING GUIDELINE docs

Copy link
Copy Markdown
Member

@Geolim4 Geolim4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,

Don't forget to also change the properties declarations and theirs annotation.

Thanks :)

@Geolim4 Geolim4 merged commit 5b47240 into TruCopilot:master Nov 27, 2020
@Geolim4 Geolim4 self-assigned this Nov 27, 2020
@GeoSot GeoSot deleted the fix-redis-config branch November 28, 2020 18:30
@GeoSot
Copy link
Copy Markdown
Contributor Author

GeoSot commented Nov 30, 2020

@Geolim4 can you update the version, on packagist?

@Geolim4
Copy link
Copy Markdown
Member

Geolim4 commented Nov 30, 2020

Hello,

Sadly I already updated the version last week (8.0.3) so you have to be patient until next month or use dev-master until the next release 👍🏼

Cheers,
Georges.

@Geolim4
Copy link
Copy Markdown
Member

Geolim4 commented Dec 21, 2020

8.0.4 release is out 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants