Skip to content

[Apcu] Load APCUIterator only when APCIterator exists #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 3, 2016
Merged

[Apcu] Load APCUIterator only when APCIterator exists #40

merged 1 commit into from
Mar 3, 2016

Conversation

nicolas-grekas
Copy link
Member

Fixes #39

@stof
Copy link
Member

stof commented Mar 3, 2016

👍

1 similar comment
@fgrandjean
Copy link

👍

@nicolas-grekas nicolas-grekas merged commit 3b7100b into symfony:master Mar 3, 2016
nicolas-grekas added a commit that referenced this pull request Mar 3, 2016
…s-grekas)

This PR was merged into the 1.1-dev branch.

Discussion
----------

[Apcu] Load APCUIterator only when APCIterator exists

Fixes #39

Commits
-------

3b7100b [Apcu] Load APCUIterator only when APCIterator exists
@nicolas-grekas nicolas-grekas deleted the fix-39 branch March 3, 2016 15:33
@@ -26,3 +26,13 @@ function apcu_inc($key, $step = 1, &$success = false) { return apc_inc($key, $st
function apcu_sma_info($limited = false) { return apc_sma_info($limited); }
function apcu_store($key, $var = null, $ttl = 0) { return apc_store($key, $var, $ttl); }
}

if (!class_exists('APCUIterator', false)) {
Copy link
Member

Choose a reason for hiding this comment

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

Actually, the condition should also check for APCIterator, otherwise it does not fix the bug (and makes it more widespread as this is not autoloaded anymore but eagerly loaded)

Copy link
Member Author

Choose a reason for hiding this comment

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

I though that the existing check in https://github.com/symfony/polyfill/pull/40/files#diff-af8f2afac0a67b224b25386b2a75cc16R12 would be enough.
I don't get why, but it looks like it's not true... hhvm?

Copy link
Member

Choose a reason for hiding this comment

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

also, APCIterator is available from PECL apc >= 3.1.1, so it doesn't exist on 3.0 for example

@nicolas-grekas nicolas-grekas mentioned this pull request Mar 10, 2016
fabpot added a commit that referenced this pull request Mar 10, 2016
This PR was merged into the 1.1-dev branch.

Discussion
----------

Add CHANGELOG

Fixes #32

* v1.1.1

 * bug #40 [Apcu] Load APCUIterator only when APCIterator exists (nicolas-grekas)
 * bug #37 [Iconv] Fix wrong use in bootstrap.php (tucksaun)
 * bug #31 Fix class_uses polyfill (WouterJ)

* v1.1.0

 * feature #22 [APCu] A new polyfill for the legacy APC users (nicolas-grekas)
 * bug #28 [Php70] Workaround https://bugs.php.net/63206 (nicolas-grekas)

* v1.0.1

 * bug #14 ldap_escape does not encode leading/trailing spaces. (ChadSikorra)
 * bug #17 Fix #16 - gzopen() / gzopen64() - 32 bit builds of Ubuntu 14.04 (fisharebest)

* v1.0.0

 * Hello symfony/polyfill

Commits
-------

1781007 Add CHANGELOG
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.

4 participants