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

Add APCu adapter as feature replacement for Apc #23

Closed
ghost opened this issue Oct 25, 2015 · 7 comments
Closed

Add APCu adapter as feature replacement for Apc #23

ghost opened this issue Oct 25, 2015 · 7 comments
Milestone

Comments

@ghost
Copy link

ghost commented Oct 25, 2015

As of the old PHP extension APC seems inactive and doesn't compile with PHP-5.6 / PHP-7 (PHP-5.4 should work but PHP-5.5 not tested) we can drop the adapter for it.

In fact the APC extension is inactive because of the PHP opcache and the possibility to store user data in the cache has been moved to APCu long time ago.

APC and APCu is nearly compatible on storing user data but in some cases it's not. The differences are already part of the Apc adapter.

To simplify the adapter a little bit and because it's no longer possible to use the old APC extension with the minimal required PHP version it makes sense to completely drop support for it.

Renaming the adapter from Apc to Apcu:
If I only take a look what the optimal way would look like it would make sense to also rename the Apc adapter to Apcu. With a deeper look the there are two cases where it could make confusion.

  • The APCu extension comes with a BC safe version (the version that the current adapter supports only)
    • Even if it's compiled with BC to APC all APCu functionalities are available
    • -> from this POV it's fine
  • HHVM comes with APC support for the old APC extension.
    • Does someone now if HHVM also supports APCu?

@weierophinney @ezimuel @Ocramius @Maks3w Thoughts?

@Ocramius
Copy link
Member

The point of APCu is to make the switch to it transparent: do not change
the APC adapter unless there is an actual need for it, and the current
adapter works just fine with APCu.
On Oct 25, 2015 16:49, "Marc Bennewitz" notifications@github.com wrote:

As of the old PHP extension APC http://pecl.php.net/package/APC seems
inactive and doesn't compile with PHP-5.6 / PHP-7 (PHP-5.4 should work but
PHP-5.5 not tested) we can drop the adapter for it.

In fact the APC extension is inactive because of the PHP opcache and the
possibility to store user data in the cache has been moved to APCu
http://pecl.php.net/package/APCu long time ago.

APC and APCu is nearly compatible on storing user data but in some cases
it's not. The differences are already part of the Apc adapter.

To simplify the adapter a little bit and because it's no longer possible
to use the old APC extension with the minimal required PHP version it makes
sense to completely drop support for it.

Renaming the adapter from Apc to Apcu:
If I only take a look what the optimal way would look like it would make
sense to also rename the Apc adapter to Apcu. With a deeper look the there
are two cases where it could make confusion.

  • The APCu extension comes with a BC safe version (the version that
    the current adapter supports only)
    • Even if it's compiled with BC to APC all APCu functionalities are
      available
    • -> from this POV it's fine
  • HHVM comes with APC support for the old APC extension.
    • Does someone now if HHVM also supports APCu?

@weierophinney https://github.com/weierophinney @ezimuel
https://github.com/ezimuel @Maks3w https://github.com/Maks3w Thoughts?


Reply to this email directly or view it on GitHub
#23.

@marc-mabe
Copy link
Member

@Ocramius The current adapter only works with APCu if compiled with the flag --enable-apc-bc

@Ocramius
Copy link
Member

@marc-mabe which is the only reason why somebody would use APCu anyway? :|

@marc-mabe
Copy link
Member

@Ocramius The APC extension is dead and it doesn't work with our out min requirements. The most common way to cache user data into shared memory is APCu but we only support APCu if it was compiled with the BC flag. I think it would be very good if we completely support APCu - not only in one outdated case.

Btw. the default option for this flag is to not compile it with for BC ;)

@Ocramius
Copy link
Member

Btw. the default option for this flag is to not compile it with for BC ;)

Yes, but no APCu installation that I saw so far uses APCu specific stuff: everyone just wants the BC compliant interface.

I think it would be very good if we completely support APCu - not only in one outdated case.

I'd rather ask @krakjoe what his plans are for 7.0 and APCu: he went for a full rewrite (multiple times, IIRC), so we better wait for something stable before jumping at it.

@krakjoe
Copy link

krakjoe commented Oct 25, 2015

At some point, the APC compat stuff might be dropped, it's not so easy to improve, or document APCu because of the compatibility requirements. Currently there is a bc mode for 7, but it probably would be a good idea to switch to the apcu_* API functions in preparation for the time when the apc compat module is removed ...

@marc-mabe marc-mabe added this to the 3.0.0 milestone Oct 31, 2015
@marc-mabe marc-mabe changed the title [ZF3] Remove APC adapter and add APCu adapter [ZF3] Deprecate APC adapter and add APCu adapter Nov 14, 2015
@marc-mabe marc-mabe changed the title [ZF3] Deprecate APC adapter and add APCu adapter [ZF3] Deprecate APC adapter & add APCu adapter Nov 14, 2015
@marc-mabe marc-mabe removed this from the 3.0.0 milestone Mar 14, 2016
@marc-mabe marc-mabe changed the title [ZF3] Deprecate APC adapter & add APCu adapter Add APCu adapter as feature replacement for Apc Mar 14, 2016
@marc-mabe
Copy link
Member

closed by 2cd809d

@marc-mabe marc-mabe added this to the 2.7.0 milestone Mar 14, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants