deprecated support for mbstring.func_overload != 0

This commit is contained in:
Fabien Potencier
2016-11-19 11:35:44 -08:00
parent 2436915b46
commit 6668d475d6
6 changed files with 14 additions and 8 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
* 1.28.3 (2016-XX-XX)
* 1.29.0 (2016-XX-XX)
* n/a
* deprecated support for mbstring.func_overload != 0
* 1.28.2 (2016-11-23)
+1 -1
View File
@@ -40,7 +40,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.28-dev"
"dev-master": "1.29-dev"
}
}
}
+1 -1
View File
@@ -15,7 +15,7 @@
#ifndef PHP_TWIG_H
#define PHP_TWIG_H
#define PHP_TWIG_VERSION "1.28.3-DEV"
#define PHP_TWIG_VERSION "1.29.0-DEV"
#include "php.h"
+2
View File
@@ -216,6 +216,8 @@ class Twig_Compiler implements Twig_CompilerInterface
// mb_substr_count() replaces substr_count()
// but they have different signatures!
if (((int) ini_get('mbstring.func_overload')) & 2) {
@trigger_error('Support for having "mbstring.func_overload" different from 0 is deprecated version 1.29 and will be removed in 2.0.', E_USER_DEPRECATED);
// this is much slower than the "right" version
$this->sourceLine += mb_substr_count(mb_substr($this->source, $this->sourceOffset), "\n");
} else {
+4 -4
View File
@@ -16,11 +16,11 @@
*/
class Twig_Environment
{
const VERSION = '1.28.3';
const VERSION_ID = 12803;
const VERSION = '1.29.0-DEV';
const VERSION_ID = 12900;
const MAJOR_VERSION = 1;
const MINOR_VERSION = 28;
const RELEASE_VERSION = 3;
const MINOR_VERSION = 20;
const RELEASE_VERSION = 0;
const EXTRA_VERSION = 'DEV';
protected $charset;
+4
View File
@@ -85,6 +85,10 @@ class Twig_Lexer implements Twig_LexerInterface
$source = $code;
}
if (((int) ini_get('mbstring.func_overload')) & 2) {
@trigger_error('Support for having "mbstring.func_overload" different from 0 is deprecated version 1.29 and will be removed in 2.0.', E_USER_DEPRECATED);
}
if (function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2) {
$mbEncoding = mb_internal_encoding();
mb_internal_encoding('ASCII');