Skip to content

Fixed bug in Apcu driver with abstract getStats() method#635

Merged
Geolim4 merged 1 commit intoTruCopilot:masterfrom
afdaniele:patch-1
Jul 23, 2018
Merged

Fixed bug in Apcu driver with abstract getStats() method#635
Geolim4 merged 1 commit intoTruCopilot:masterfrom
afdaniele:patch-1

Conversation

@afdaniele
Copy link
Copy Markdown
Contributor

@afdaniele afdaniele commented Jul 23, 2018

Proposed changes

The Apcu driver passes $stats['mem_size'] to the function setSize() of DriverStatistic. This generates an error due to type mismatch. The function setSize() expects and integer while $stats['mem_size'] is a float.

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

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

The Apcu driver passes `$stats['mem_size']` to the function `setSize()` of `DriverStatistic`. This generates an error due to type mismatch. The function `setSize()` expects and integer while `$stats['mem_size']` is a float.
@Geolim4
Copy link
Copy Markdown
Member

Geolim4 commented Jul 23, 2018

Hello,

Please keep the PR template next time, thanks :)

You are using Apcu on php7 right ?
Is it working well ?

I'm asking you that because I was unable to test it after php 5.6.

Cheers,
Georges.

@Geolim4
Copy link
Copy Markdown
Member

Geolim4 commented Jul 23, 2018

Bump @afdaniele :)

@afdaniele
Copy link
Copy Markdown
Contributor Author

afdaniele commented Jul 23, 2018

@Geolim4 , I'm sorry for the template, I'll use it next time.

Yes, I'm using Apcu on PHP7 and so far so good, I didn't have to use any trick to make it work and didn't have any issue either. I'll let you know if I have any issue in the future.

Cheers,
Andrea

@Geolim4
Copy link
Copy Markdown
Member

Geolim4 commented Jul 23, 2018

Okay I didn't known that they have ported Apcu extension to php7.
Good to know I'll update the readme asap.

Thanks for your contribution,
Cheers,
Georges

@Geolim4 Geolim4 merged commit f2260a1 into TruCopilot:master Jul 23, 2018
@Geolim4 Geolim4 changed the title fixed bug in Apcu driver. Fixed bug in Apcu driver with abstract getStats() method Jul 23, 2018
@afdaniele
Copy link
Copy Markdown
Contributor Author

Sure!

Cheers,
Andrea

@afdaniele afdaniele deleted the patch-1 branch July 23, 2018 16:14
@Geolim4
Copy link
Copy Markdown
Member

Geolim4 commented Jul 24, 2018

FYI 7.0.2 has been released :)

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.

2 participants