Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Add apcu compatibility #93

Merged
merged 3 commits into from
Jul 30, 2018

Conversation

Spea
Copy link
Contributor

@Spea Spea commented Jul 27, 2018

We wanted to use the APC fragmentation/memory checks, but since we use apcu I always received the error APC extension is not available, thus I added a version check and based on that I use the correct method (apc_sma_info vs apcu_sma_info).

@@ -90,11 +90,12 @@ public function check()
return new Skip('APC has not been enabled in CLI.');
}

if (! function_exists('apc_sma_info')) {
$memoryAllocationMethod = \PHP_VERSION_ID < 70000 ? 'apc_sma_info' : 'apcu_sma_info';
Copy link
Member

Choose a reason for hiding this comment

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

In attempting to test this on PHP 5.6, I discovered that APC cannot compile against PHP 5.5 and later! Since this project only supports 5.6 and up, we can check here for only existence of the APCu extension. I'll make that change during merge.

@weierophinney weierophinney changed the base branch from master to develop July 30, 2018 20:07
Add apcu compatibility

Conflicts:
	CHANGELOG.md
@weierophinney weierophinney merged commit b4593b8 into zendframework:develop Jul 30, 2018
weierophinney added a commit that referenced this pull request Jul 30, 2018
@weierophinney
Copy link
Member

Thanks, @Spea!

@Spea Spea deleted the apcu-compatibility branch July 30, 2018 22:04
@Spea
Copy link
Contributor Author

Spea commented Jul 30, 2018

You're welcome, thanks for merging this so quickly :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants