Skip to content

Replacing old phputf8 with symfony mbstring polyfill #55

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

Open
wants to merge 2 commits into
base: 4.x-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Tests/StringHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,11 @@ public function seedTestStrrev(): \Generator
public function seedTestStrspn(): \Generator
{
yield ['A321 Main Street', '0123456789', 1, 2, 2];
yield ['321 Main Street', '0123456789', null, 2, 2];
yield ['321 Main Street', '0123456789', null, 2, 3];
yield ['A321 Main Street', '0123456789', null, 10, 0];
yield ['321 Main Street', '0123456789', null, null, 3];
yield ['Main Street 321', '0123456789', null, -3, 0];
yield ['321 Main Street', '0123456789', null, -13, 2];
yield ['321 Main Street', '0123456789', null, -13, 3];
yield ['321 Main Street', '0123456789', null, -12, 3];
yield ['A321 Main Street', '0123456789', 0, null, 0];
yield ['A321 Main Street', '0123456789', 1, 10, 3];
Expand Down
25 changes: 5 additions & 20 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"license": "GPL-2.0-or-later",
"require": {
"php": "^8.1.0",
"symfony/deprecation-contracts": "^2|^3"
"symfony/deprecation-contracts": "^2|^3",
"symfony/polyfill-mbstring": "^1.31.0"
},
"require-dev": {
"doctrine/inflector": "^1.2",
Expand All @@ -28,24 +29,7 @@
"autoload": {
"psr-4": {
"Joomla\\String\\": "src/"
},
"files": [
"src/phputf8/utf8.php",
"src/phputf8/ord.php",
"src/phputf8/str_ireplace.php",
"src/phputf8/str_pad.php",
"src/phputf8/str_split.php",
"src/phputf8/strcasecmp.php",
"src/phputf8/strcspn.php",
"src/phputf8/stristr.php",
"src/phputf8/strrev.php",
"src/phputf8/strspn.php",
"src/phputf8/trim.php",
"src/phputf8/ucfirst.php",
"src/phputf8/ucwords.php",
"src/phputf8/utils/ascii.php",
"src/phputf8/utils/validation.php"
]
}
},
"autoload-dev": {
"psr-4": {
Expand All @@ -56,7 +40,8 @@
"extra": {
"branch-alias": {
"dev-2.0-dev": "2.0-dev",
"dev-3.x-dev": "3.0-dev"
"dev-3.x-dev": "3.x-dev",
"dev-4.x-dev": "4.x-dev"
}
}
}
Loading