Skip to content

Commit 3924387

Browse files
committed
add console patch to remove normalizer dependnecy
1 parent 0246f99 commit 3924387

File tree

2 files changed

+40
-3
lines changed

2 files changed

+40
-3
lines changed

composer.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"require": {
99
"php": ">=8.2",
1010
"composer/semver": "^3.4",
11-
"illuminate/container": "^11.35",
11+
"illuminate/container": "^11.38",
1212
"nette/robot-loader": "^4.0",
1313
"nette/utils": "^4.0",
1414
"nikic/php-parser": "^5.4",
@@ -18,14 +18,15 @@
1818
"webmozart/assert": "^1.11"
1919
},
2020
"require-dev": {
21-
"symfony/config": "^5.3|^6.4",
22-
"symfony/dependency-injection": "^5.3|^6.4",
2321
"phpstan/extension-installer": "^1.4",
2422
"phpstan/phpstan": "^2.0",
2523
"phpunit/phpunit": "^11.5",
2624
"rector/rector": "^2.0",
2725
"shipmonk/composer-dependency-analyser": "^1.8",
26+
"symfony/config": "^5.3|^6.4",
27+
"symfony/dependency-injection": "^5.3|^6.4",
2828
"symplify/easy-coding-standard": "^12.5",
29+
"symplify/vendor-patches": "*",
2930
"tomasvotruba/class-leak": "^2.0",
3031
"tracy/tracy": "^2.10"
3132
},
@@ -51,6 +52,7 @@
5152
"sort-packages": true,
5253
"platform-check": false,
5354
"allow-plugins": {
55+
"cweagans/composer-patches": true,
5456
"phpstan/extension-installer": true
5557
}
5658
},
@@ -59,5 +61,12 @@
5961
"fix-cs": "vendor/bin/ecs check --fix --ansi",
6062
"phpstan": "vendor/bin/phpstan analyse --ansi",
6163
"rector": "vendor/bin/rector process --ansi"
64+
},
65+
"extra": {
66+
"patches": {
67+
"symfony/console": [
68+
"patches/symfony-console-helper-helper-php.patch"
69+
]
70+
}
6271
}
6372
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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);

0 commit comments

Comments
 (0)