File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change 2222 "rector/rector" : " ^2.0" ,
2323 "symplify/easy-coding-standard" : " ^12.4" ,
2424 "symplify/phpstan-extensions" : " ^12.0" ,
25+ "symplify/vendor-patches" : " ^11.3" ,
2526 "tomasvotruba/unused-public" : " ^2.0" ,
2627 "tracy/tracy" : " ^2.10"
2728 },
4344 "sort-packages" : true ,
4445 "platform-check" : false ,
4546 "allow-plugins" : {
47+ "cweagans/composer-patches" : true ,
4648 "phpstan/extension-installer" : true
4749 }
4850 },
5153 "fix-cs" : " vendor/bin/ecs check --fix --ansi" ,
5254 "phpstan" : " vendor/bin/phpstan analyse --ansi" ,
5355 "rector" : " vendor/bin/rector process --dry-run --ansi"
56+ },
57+ "extra" : {
58+ "patches" : {
59+ "symfony/console" : [
60+ " patches/symfony-console-helper-helper-php.patch"
61+ ]
62+ }
5463 }
55- }
64+ }
Original file line number Diff line number Diff line change 1+ --- /dev/null
2+ +++ ../Helper/Helper.php
3+ @@ -47,9 +47,9 @@
4+ {
5+ $string ??= '';
6+
7+ - // if (preg_match('//u', $string)) {
8+ - // return (new UnicodeString($string))->width(false);
9+ - // }
10+ + if (preg_match('//u', $string)) {
11+ + return (new UnicodeString($string))->width(false);
12+ + }
13+
14+ if (false === $encoding = mb_detect_encoding($string, null, true)) {
15+ return \strlen($string);
16+ @@ -66,9 +66,9 @@
17+ {
18+ $string ??= '';
19+
20+ - // if (preg_match('//u', $string)) {
21+ - // return (new UnicodeString($string))->length();
22+ - // }
23+ + if (preg_match('//u', $string)) {
24+ + return (new UnicodeString($string))->length();
25+ + }
26+
27+ if (false === $encoding = mb_detect_encoding($string, null, true)) {
28+ return \strlen($string);
You can’t perform that action at this time.
0 commit comments