-
Notifications
You must be signed in to change notification settings - Fork 17
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
PHP v5.4+ Codebase Enhancements #635
Comments
|
|
@raamdev Regarding this item listed above...
Can you please give us an OK on Multibyte String support in ZenCache? i.e., is it OK for us to absolutely require every site to be running the |
|
@kristineds @renzms @raamdev Whoever takes Step 3 should probably the let the others know :-) |
@jaswsinc writes...
Hmm, that sounds like it's asking for trouble. PHP.net says:
If I understand the reason for adding Multibyte String support to ZenCache, it's to improve support for sites that use languages with multibyte character encoding, correct? If so, that does not sound like a high priority to me, certainly not something high enough to warrant the inconvenience of not being able to run ZenCache if your web host happened to not enable the My vote is that we either postpone requiring |
I vote in the other direction, but I understand your concern. If we don't require the
The reason that I vote in the other direction is because:
You can note that some UTF-8 symbols (e.g., ™, ®, accents, emojis, etc), can cause highly unexpected results whenever we parse strings with functions that are not UTF-8-friendly. This goes by unnoticed for the most part, but there is the chance of random corruption and/or blank pages until we update the codebase in ways that will allow for proper parsing of UTF-8 chars in all scenarios. |
Right, but if it isn't enabled then ZenCache becomes unusable. If we're going to require it to run ZenCache, then we need to do the same thing we did with the PHP 5.4 requirement: come up with a plan for announcing the change to anyone who is currently running ZenCache on a site that doesn't have Collecting that information via the stats logger to see how many people don't have The other option would be to leave a fallback in place, so that we use it if it's available. Maybe we could create a wrapper function that uses the appropriate call depending on the availability of |
@jaswsinc Ping. ↑ |
My opinion is that we need to use See: http://www.phpwact.org/php/i18n/utf-8 As it exists at the moment, this is a design flaw in ZenCache. So, if you don't have
I don't have anything against this if you'd like to do that. I'll let you make the call on this.
That's what WordPress does in a few places also. However, the behavior of the plugin will not be what is expected if you don't have If it were 2009 I'd be for this approach; i.e., failing gracefully; but, I vote against taking that route today, because nearly all hosting companies include Another option would be to add this as a required extension. The WP PHP RV checks already support checking for required PHP extensions, so I think we could just add |
Example implementation of websharks/wp-php-rv where we require specific PHP extensions also. |
I agree. Since the plugin simply won't behave as expected in some scenarios where it should behave properly, making My only concern is not knowing how much of our userbase is currently happily using ZenCache without the If there is a significant percentage of our userbase that fits that description and we do a release that suddenly prevents ZenCache from working unless they have that extension installed, that's not very user-friendly and could lead to a lot of frustration. On the other hand, if we just enforce this requirement over the course of 2 releases, we can do a release that shows a warning notice to site owners running ZenCache on servers without the That would be acceptable to me. I just don't like knowingly introducing something that might prevent a large percentage of our userbase from using the plugin without some sort of warning ahead of time. So, my vote is for delaying this |
Sounds good. I think a notice and warning is fair enough. I don't see this impacting very many people at all; so running through stats to check the percentages may not be worth the time. However, running stats wouldn't hurt anything either. Whatever you feel best about is fine with me. As long as we can start using If we add this to the WP PHP RV check, then it's not like it will bring down a site anyway. It just won't allow the new version of the plugin to be used until they satisfy that dependency. |
@jaswsinc I'm getting ready to add that notice for today's GA release. Doing a check if |
Checking off this line item above:
PR wpsharks/comet-cache-pro#222 (Convert to PHP Traits) has been merged into |
Checking off this line item above:
PR wpsharks/comet-cache-pro#222 fixes that. |
Noting that we can now continue with the conversion to utilize
|
There are three occurrences of
@jaswsinc Do these need to be updated? |
Nope. Those all look good. False-alarm on that one. Looks like no changes are necessary with respect to |
@jaswsinc A new issue has been opened to add support for Multibyte Strings: #703 Unless there's anything else you feel needs to be done as part of this GitHub issue, I'm going to close this as done. |
Great! :-) |
Next Release Changelog:
|
Comet Cache v160416 has been released and includes changes from this GitHub Issue. See the v160416 announcement for further details. This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one (#635). |
Starting with the next release of ZenCache, PHP v5.4+ will be a requirement. I'm opening this issue so that we have a place to list and work on PHP v5.4 improvements; i.e., changes to the codebase that will reduce complexity, improve performance, dependability, and make it easier to maintain.
Referencing: http://php.net/manual/en/migration54.new-features.php
Referencing: http://php.net/manual/en/migration54.functions.php
Referencing: http://php.net/manual/en/migration54.incompatible.php
TODO List
array()
into[]
for cleaner formatting and less code in memory.ob_start()
(the heart of ZC) and update any unnecessary 5.3 fallbacks.$_this
references for closure callback handlers.http_response_code()
.Also Suggested...
Forked to #703.
The text was updated successfully, but these errors were encountered: