Skip to content

Portable UTF-8 #38

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

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
141ca21
Library - Replace phputf8 with Portable UTF-8
nibra Sep 22, 2021
5ca4344
Docs - Add inline changelog
nibra Sep 22, 2021
15fa71a
Docs - Revise inline documentation
nibra Sep 22, 2021
2a8bc6c
Chore - Remove polyfill replacement
nibra Sep 22, 2021
ec6b672
Refactor - Try to_utf8() instead of to_utf8_string(); the former is o…
nibra Sep 22, 2021
3c9609d
Merge remote-tracking branch 'joomla/refactoring' into portable-utf8
nibra Sep 23, 2021
db20f8b
Chore - Provide locales to CI environment
nibra Sep 23, 2021
d1da205
Chore - Provide locales to CI environment (cont'd)
nibra Sep 23, 2021
449b8c9
Chore - Provide locales to CI environment (cont'd)
nibra Sep 23, 2021
0664c5f
Chore - Provide locales to CI environment (cont'd)
nibra Sep 23, 2021
113daa6
Chore - Provide locales to CI environment (cont'd)
nibra Sep 23, 2021
29ecc02
Chore - Provide locales to CI environment (cont'd)
nibra Sep 23, 2021
d82e1e5
Chore - Provide locales to CI environment (cont'd)
nibra Sep 23, 2021
774f52e
Chore - Provide locales to CI environment (cont'd)
nibra Sep 23, 2021
29fc579
Chore - Provide locales to CI environment (cont'd)
nibra Sep 23, 2021
70effe2
Chore - Provide locales to CI environment (cont'd)
nibra Sep 23, 2021
1332a10
Chore - Provide locales to CI environment (cont'd)
nibra Sep 23, 2021
de8f18a
Chore - Provide locales to CI environment (cont'd)
nibra Sep 23, 2021
5f84210
Chore - Provide locales to CI environment (cont'd)
nibra Sep 23, 2021
d81a9e8
Chore - Provide locales to CI environment (cont'd)
nibra Sep 23, 2021
3bf06f3
Style - Remove @noinspection annotations
nibra Sep 24, 2021
3dc0056
Fix - Set default value for locale to null in strcmp
nibra Sep 24, 2021
701baca
Merge branch 'refactoring' into portable-utf8
nibra Sep 24, 2021
b571471
Fix - Remove b/c incompatibilities
nibra Sep 24, 2021
9c10eb8
Style - CS fix
nibra Sep 24, 2021
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
9 changes: 8 additions & 1 deletion .drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@ local phpunit(phpversion) = {
name: "PHPUnit",
image: "joomlaprojects/docker-images:php" + phpversion,
[if phpversion == "8.1" then "failure"]: "ignore",
commands: ["vendor/bin/phpunit"]
commands: [
"apt-get clean && apt-get --allow-releaseinfo-change update && apt-get install -y locales",
"locale -a",
"localedef -c -i fr_FR -f UTF-8 fr_FR.UTF-8",
"localedef -c -i ru_RU -f CP1251 ru_RU.CP1251",
"locale -a",
"vendor/bin/phpunit"
]
};

local pipeline(name, phpversion, params) = {
Expand Down
32 changes: 31 additions & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ steps:
- name: PHPUnit
image: joomlaprojects/docker-images:php7.2
commands:
- apt-get clean && apt-get --allow-releaseinfo-change update && apt-get install -y locales
- locale -a
- localedef -c -i fr_FR -f UTF-8 fr_FR.UTF-8
- localedef -c -i ru_RU -f CP1251 ru_RU.CP1251
- locale -a
- vendor/bin/phpunit

volumes:
Expand Down Expand Up @@ -105,6 +110,11 @@ steps:
- name: PHPUnit
image: joomlaprojects/docker-images:php7.2
commands:
- apt-get clean && apt-get --allow-releaseinfo-change update && apt-get install -y locales
- locale -a
- localedef -c -i fr_FR -f UTF-8 fr_FR.UTF-8
- localedef -c -i ru_RU -f CP1251 ru_RU.CP1251
- locale -a
- vendor/bin/phpunit

volumes:
Expand Down Expand Up @@ -133,6 +143,11 @@ steps:
- name: PHPUnit
image: joomlaprojects/docker-images:php7.3
commands:
- apt-get clean && apt-get --allow-releaseinfo-change update && apt-get install -y locales
- locale -a
- localedef -c -i fr_FR -f UTF-8 fr_FR.UTF-8
- localedef -c -i ru_RU -f CP1251 ru_RU.CP1251
- locale -a
- vendor/bin/phpunit

volumes:
Expand Down Expand Up @@ -161,6 +176,11 @@ steps:
- name: PHPUnit
image: joomlaprojects/docker-images:php7.4
commands:
- apt-get clean && apt-get --allow-releaseinfo-change update && apt-get install -y locales
- locale -a
- localedef -c -i fr_FR -f UTF-8 fr_FR.UTF-8
- localedef -c -i ru_RU -f CP1251 ru_RU.CP1251
- locale -a
- vendor/bin/phpunit

volumes:
Expand Down Expand Up @@ -189,6 +209,11 @@ steps:
- name: PHPUnit
image: joomlaprojects/docker-images:php8.0
commands:
- apt-get clean && apt-get --allow-releaseinfo-change update && apt-get install -y locales
- locale -a
- localedef -c -i fr_FR -f UTF-8 fr_FR.UTF-8
- localedef -c -i ru_RU -f CP1251 ru_RU.CP1251
- locale -a
- vendor/bin/phpunit

volumes:
Expand Down Expand Up @@ -217,6 +242,11 @@ steps:
- name: PHPUnit
image: joomlaprojects/docker-images:php8.1
commands:
- apt-get clean && apt-get --allow-releaseinfo-change update && apt-get install -y locales
- locale -a
- localedef -c -i fr_FR -f UTF-8 fr_FR.UTF-8
- localedef -c -i ru_RU -f CP1251 ru_RU.CP1251
- locale -a
- vendor/bin/phpunit
failure: ignore

Expand All @@ -227,6 +257,6 @@ volumes:

---
kind: signature
hmac: 4af173bc17cfa22a3f0fcef83a9535adb76d5b3727ab33d8d3c4a51f994525a3
hmac: 7a94947f6defafe4679795a1b288940c9aff85ef981a9d6e47b7df2fb4addf8f

...
3 changes: 0 additions & 3 deletions Tests/InflectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
/**
* @copyright Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*
* @noinspection PhpDeprecationInspection
* @noinspection SpellCheckingInspection
*/

namespace Joomla\String\Tests;
Expand Down
3 changes: 1 addition & 2 deletions Tests/StringHelperTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php /** @noinspection SpellCheckingInspection */

<?php
/**
* @copyright Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
Expand Down
37 changes: 13 additions & 24 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@
"name": "joomla/string",
"type": "joomla-package",
"description": "Joomla String Package",
"keywords": ["joomla", "framework", "string"],
"homepage": "https://github.com/joomla-framework/string",
"keywords": [
"joomla",
"framework",
"string"
],
"homepage": "https://github.com/joomla-framework/string",
"license": "GPL-2.0-or-later",
"require": {
"php": "^7.2.5|^8.0",
"symfony/deprecation-contracts": "^2.1"
"php": "^7.2.5|^8.0",
"symfony/deprecation-contracts": "^2.1",
"voku/portable-utf8": "^4.0|^5.0"
},
"require-dev": {
"doctrine/inflector": "^1.2",
Expand All @@ -19,30 +24,14 @@
"doctrine/inflector": "<1.2"
},
"suggest": {
"ext-mbstring": "For improved processing",
"doctrine/inflector": "To use the string inflector"
"ext-mbstring": "For improved performance",
"ext-iconv": "For improved performance",
"doctrine/inflector": "To use the string inflector"
},
"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 Down
Loading