Skip to content

Replace UTF8 with UTF-8 (correct name)#689

Merged
kylekatarnls merged 1 commit intomasterfrom
fix/utf-8-typo
Nov 26, 2023
Merged

Replace UTF8 with UTF-8 (correct name)#689
kylekatarnls merged 1 commit intomasterfrom
fix/utf-8-typo

Conversation

@kylekatarnls
Copy link
Member

@kylekatarnls kylekatarnls commented Nov 21, 2023

Type: bugfix
Issue: Fix #688
Breaking change: no

Precedent behavior had inconsistent behavior depending on system, as iconv with IGNORE actually remove non-ASCII character even for a UTF-8 valid string which is not equivalent with utf8_encode and the previous polyfill.

Also many strings in previous implementation would be incorrectly considered as latin1.

Added tests fails when using the previous iconv but pass with the new implementation.

They also pass even when mbstring is disabled thanks to Symfony polyfill (that is already an intermediate dependency of the project anyway).

@kylekatarnls kylekatarnls added this to the 2.16.0 milestone Nov 21, 2023
@codecov
Copy link

codecov bot commented Nov 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a44ec55) 84.55% compared to head (3f78c79) 84.76%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #689      +/-   ##
============================================
+ Coverage     84.55%   84.76%   +0.20%     
+ Complexity     3467     3455      -12     
============================================
  Files           154      154              
  Lines          9417     9399      -18     
============================================
+ Hits           7963     7967       +4     
+ Misses         1454     1432      -22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kylekatarnls kylekatarnls force-pushed the fix/utf-8-typo branch 2 times, most recently from 1505440 to 1760029 Compare November 21, 2023 14:08
@kylekatarnls kylekatarnls force-pushed the fix/utf-8-typo branch 3 times, most recently from b7c9fe4 to 2b2e3d9 Compare November 25, 2023 21:33
Dependency to symfony/polyfill-mbstring already existed via symfony/filesystem (when >=5), it's now made explicit

It was not in the PHAR (due to prefer-lowest setup) but size increase is minor: 368 KB => 369 KB
@kylekatarnls kylekatarnls merged commit d57e1c5 into master Nov 26, 2023
@kylekatarnls kylekatarnls deleted the fix/utf-8-typo branch November 26, 2023 00:09
renovate bot added a commit to line/line-bot-sdk-php that referenced this pull request Dec 11, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [phpmd/phpmd](https://phpmd.org/)
([source](https://togithub.com/phpmd/phpmd)) | `2.14.1` -> `2.15.0` |
[![age](https://developer.mend.io/api/mc/badges/age/packagist/phpmd%2fphpmd/2.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/packagist/phpmd%2fphpmd/2.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/packagist/phpmd%2fphpmd/2.14.1/2.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/packagist/phpmd%2fphpmd/2.14.1/2.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>phpmd/phpmd (phpmd/phpmd)</summary>

###
[`v2.15.0`](https://togithub.com/phpmd/phpmd/blob/HEAD/CHANGELOG#phpmd-2150-20231211)

[Compare
Source](https://togithub.com/phpmd/phpmd/compare/2.14.1...2.15.0)

\========================

- Added [#&#8203;1036](https://togithub.com/phpmd/phpmd/issues/1036)
\[CLI] Allow option and value separated with equal sign
-   Require pdepend/pdepend 2.16.1
- Support PHP 8.3
[pdepend/pdepend#699](https://togithub.com/pdepend/pdepend/issues/699)
- Support Symfony 7
[pdepend/pdepend#692](https://togithub.com/pdepend/pdepend/issues/692)
- Fixed
[pdepend/pdepend#691](https://togithub.com/pdepend/pdepend/issues/691)
Float parsing for number starting with 0.
- Fixed
[pdepend/pdepend#689](https://togithub.com/pdepend/pdepend/issues/689)
Handle conversion to/detection of UTF-8 encoding using either mbstring
PHP extension or the polyfill provided by Symfony
- Fixed
[pdepend/pdepend#687](https://togithub.com/pdepend/pdepend/issues/687)
Parsing the correct comment for method doc-block (Allow correct
SuppressWarnings annotation handling on PHPMD)
([https://github.com/phpmd/phpmd/issues/914](https://togithub.com/phpmd/phpmd/issues/914))
- Fixed
[pdepend/pdepend#694](https://togithub.com/pdepend/pdepend/issues/694)
Handle yield termination depending on context
([https://github.com/phpmd/phpmd/issues/804](https://togithub.com/phpmd/phpmd/issues/804))
- Fixed [#&#8203;1044](https://togithub.com/phpmd/phpmd/issues/1044)
strict option on applyOnClassMethods
- Documented
[#&#8203;1041](https://togithub.com/phpmd/phpmd/issues/1041) Mention
public key used for signing the Phars
- Documented
[#&#8203;1042](https://togithub.com/phpmd/phpmd/issues/1042) Document
installation with PHIVE

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/line/line-bot-sdk-php).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44Ny4yIiwidXBkYXRlZEluVmVyIjoiMzcuODcuMiIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

Typo in encoding name

2 participants