-
Notifications
You must be signed in to change notification settings - Fork 53
Discussion: APC vs APCU #47
Comments
If no BC break exists I think we can modify APC class for make internal calls to APCU. At a second step we could rename the class with the correct "APCU" name and deprecate the old name. However there is no real wins of this so this could be do later. |
I have to code ready on my computer, I'm waiting to ba able to run the test suite, before submitting a PR |
@remicollet @Maks3w I would prefer to add an Apcu adapter and make the Apc adapter as deprecated as I noticed that HHVM only supports the old APC methods. I already worked on an Apcu adapter but currently I get some strange failures on travis that I don't get on my local machine. |
Link to the other discussion : #23 |
I understand, even if I will prefer something transparent for users... |
To summarize as I understand:
So for me it would be 100% transparent introducing a new Apcu adapter wrapping only the new APCu extension and leaving the Apc extension as is But mark it as deprecated to inform that this adapter could be dropped in the future but not before there exists an alternative for the minimum PHP version + HHVM. So the only question I have should the new Apcu adapter support the APCu extension including the |
I whink there are possible two choices:
|
…PHP 7 and APCu 5.1)
…PHP 7 and APCu 5.1)
closed by 2cd809d |
About Zend\Cache\Storage\Adapter\Apc
Starting with PHP 7, APCU won't provide the apc_* fonction by default. So the test in __construct will pass, and later other methods will fail with undefined function.
For "legacy" branch
For current branch which requires PHP >= 5.5, as no APC version exists I think It could make sense to use APCU by default, and switch all call to apcu_* functions.
Another way could be to create an Zend\Cache\Storage\Adapter\Apcu adapter, and mark the previous as deprecated. But it will require code changes in all consumer of this library.
Comments ?
P.S. notice, for now, apcu 5.0.0-dev segfaults during the test suite.... under investigation.
The text was updated successfully, but these errors were encountered: