Skip to content
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

Improved Phalcon\Cache\Backend\Apc #12664

Closed
wants to merge 3 commits into from
Closed

Improved Phalcon\Cache\Backend\Apc #12664

wants to merge 3 commits into from

Conversation

sergeyklay
Copy link
Contributor

@sergeyklay sergeyklay commented Feb 27, 2017

Hello!

In raising this pull request, I confirm the following:

  • I have read and understood the Contributing Guidelines?
  • I have checked that another pull request for this purpose does not exist.
  • I wrote some tests for this PR.

Small description of change:

  • Improved Phalcon\Cache\Backend\Apc by introducing support of APCu
  • Improved Phalcon\Annotations\Adapter\Apc by introducing support of APCu

Thanks

@Jurigag
Copy link
Contributor

Jurigag commented Feb 27, 2017

I don't like this. Why just not introduce new apcu classes and later remove apc in phalcon 4?

@sergeyklay
Copy link
Contributor Author

Why don't like?

@Jurigag
Copy link
Contributor

Jurigag commented Feb 28, 2017

Cuz as i wrote - i would like much more just seperated classes. I don't like one class to be adapter for both apc and apcu.

@sergeyklay
Copy link
Contributor Author

Yes, I'm understand. But could you please elaborate on that. In order to discuss something, we need a reason. "I don't like" not reason.

@Jurigag
Copy link
Contributor

Jurigag commented Feb 28, 2017

Well we will remove necessary to have checks, conditions etc, also code will be much cleaner. As i saw in other frameworks if they had support for both apc and apcu - it was done in seperated classes.

@andresgutierrez
Copy link
Contributor

We can have this for BC reasons and fully deprecate apc in Phalcon 4, what do you think?

@Jurigag
Copy link
Contributor

Jurigag commented Feb 28, 2017

Not deprecate - just remove apc more likely, but then we would need imho change apc classes names to apcu cuz it will no longer work with apc obviously. That's why seperated classes seems more suitable - someone could just switch to apcu in 3.1 and he would need to do less stuff in phalcon 4.

@Jurigag
Copy link
Contributor

Jurigag commented Feb 28, 2017

Also notice that atm if someone is already using php7 + apcu + phallcon he needed to install apcu_bc. So this classes work for him anyway and he will not notice any difference, except those additional checks.

And if someone would like to use apcu + php7 + phalcon then he would need to change to new class in phalcon 4, cuz there is no point having it named as Apc when it will be working only with Apcu, just that's why i would like to introduce seperated classes, cuz there will be really no difference from developer point of view, but he will have less to do when switching to new version.

@dschissler

This comment was marked as abuse.

@dschissler

This comment was marked as abuse.

@Jurigag
Copy link
Contributor

Jurigag commented Feb 28, 2017

Php5 apcu already have apc emulation builtin so apc_fetch function will just call apcu function for php 5 users this change will be totally useless

@Jurigag
Copy link
Contributor

Jurigag commented Feb 28, 2017

How this combined have advantage of being compatible in the next years like if someone who already wants to use apcu is already using old class and in phalcon 4 he would need needs to change name anyway? Just separated classes are way to go, new developers could use then new classes and have less things to care about when switch to phalcon 4, old would need to change anyway.

@dschissler

This comment was marked as abuse.

@Jurigag
Copy link
Contributor

Jurigag commented Feb 28, 2017

I think yes - it needs to change, cuz it no longer will work in phalcon 4 with APC, just only with APCU, so why keep old APC name? NO, apcu always uses apcu_ functions internally in php 5, even when you will use apc_ functions.

https://github.com/krakjoe/apcu/blob/PHP5/php_apc.c#L1534

Just order of extension will matter i think, if you have loaded apcu after apc in php5 then apcu will be always used i think. Anyway - you should use only one.

@dschissler

This comment was marked as abuse.

@Jurigag
Copy link
Contributor

Jurigag commented Feb 28, 2017

I just don't see really why we can't have both adapters. In all known major frameworks they have apcu classes.

@niden
Copy link
Sponsor Member

niden commented Feb 28, 2017

I think we should have 2 adapters.

We can deprecate Apc at a later stage without having to touch the adapter to remove the apc related code from a common adapter.

My 2 cents

@dschissler

This comment was marked as abuse.

@sergeyklay sergeyklay force-pushed the 3.1.x branch 9 times, most recently from 4d3c73f to 6ef079c Compare April 5, 2017 15:25
@sergeyklay
Copy link
Contributor Author

#12788, #12786

@sergeyklay sergeyklay closed this Apr 13, 2017
@sergeyklay sergeyklay deleted the feature/support/apcu branch April 13, 2017 06:22
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.

5 participants