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

use a string wrapper to support intl, mbstring and iconv extension #131

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@sandrokeil
Copy link

sandrokeil commented Dec 28, 2015

Since the PHP intl extension is available, there is no need to use mbstring anymore. Websites uses UTF-8 and PHP intl extension is more comfortable than mbstring. I've replaced all mb_* functions with the grapheme_* functions.

@beberlei What do you think about a new major version which uses the PHP intl extension?

@beberlei

This comment has been minimized.

Copy link
Owner

beberlei commented Mar 22, 2016

@sandrokeil I am unsure, it must be a new major version that is for sure, but i don't know if intl is as widespread as mbstring.

@@ -76,7 +76,6 @@
* @method static void nullOrChoicesNotEmpty($values, $choices, $message = null, $propertyPath = null)
* @method static void nullOrMethodExists($value, $object, $message = null, $propertyPath = null)
* @method static void nullOrIsObject($value, $message = null, $propertyPath = null)
* @method static void nullOrDate($value, $format, $message = null, $propertyPath = null)

This comment has been minimized.

@stof

stof Mar 22, 2016

this removal looks suspicious to me

*
* @link http://php.net/manual/function.date.php#refsect1-function.date-parameters
*/
public static function date($value, $format, $message = null, $propertyPath = null)

This comment has been minimized.

@stof

stof Mar 22, 2016

Why removing this feature ?

@sandrokeil sandrokeil force-pushed the sandrokeil:php-intl branch from 100abc6 to 3783e2d Mar 23, 2016

@sandrokeil

This comment has been minimized.

Copy link

sandrokeil commented Mar 23, 2016

@stof I'm not sure why this was happened. I've restored it. Thanks.

@beberlei I thought that the Intl extension replaces mbstring and is mainly used, if projects uses i18n. In my case I didn't need mbstring because I rely on the Intl extension. I don't know which one is more widespread.

@sandrokeil

This comment has been minimized.

Copy link

sandrokeil commented Mar 29, 2016

@beberlei We can use a simple String Wrapper like Zend and we have a WinWin solution and can bring a new minor release.

Maybe even simpler, check for the extensions on the appropriate functions and call the correct method. What do you think? The order is intl, mbstring and iconv.

I will update the PR if you accept this.

@sandrokeil sandrokeil changed the title use PHP intl extension instead of mbstring use a string wrapper to support intl, mbstring and iconv extension Apr 21, 2016

@sandrokeil

This comment has been minimized.

Copy link

sandrokeil commented Apr 21, 2016

ping @beberlei +1 for string wrapper and full backward compatibility? We will support intl, mbstring, iconv and native. No method signature will be changed, but the encoding is only used by mbstring and iconv.

@bweston92

This comment has been minimized.

Copy link

bweston92 commented Jul 14, 2016

👍

@@ -132,7 +132,6 @@
* @method static void allChoicesNotEmpty($values, $choices, $message = null, $propertyPath = null)
* @method static void allMethodExists($value, $object, $message = null, $propertyPath = null)
* @method static void allIsObject($value, $message = null, $propertyPath = null)
* @method static void allDate($value, $format, $message = null, $propertyPath = null)

This comment has been minimized.

@rquadling

rquadling Jul 14, 2016

Collaborator

Another removal?

Are you using bin/generate_method_docs.php to update the docblocks?

@bweston92

This comment has been minimized.

Copy link

bweston92 commented Jun 26, 2018

any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment