Thanks to visit codestin.com
Credit goes to github.com

Skip to content

v2 PHP 8.2 Compatibility#412

Merged
g105b merged 1 commit intophpgt:v2-devfrom
sidolov:82-compatibility
Feb 1, 2023
Merged

v2 PHP 8.2 Compatibility#412
g105b merged 1 commit intophpgt:v2-devfrom
sidolov:82-compatibility

Conversation

@sidolov
Copy link

@sidolov sidolov commented Jan 31, 2023

No description provided.

@sidolov sidolov marked this pull request as ready for review January 31, 2023 18:59
@sidolov sidolov closed this Jan 31, 2023
@sidolov sidolov reopened this Jan 31, 2023
@g105b
Copy link
Member

g105b commented Jan 31, 2023

Hi @sidolov,

This looks great, thank you for your contribution.

I would like to understand more about the significance of the change to mb_encode_numericentity from mb_convert_encoding as this is something that might benefit the repository as a whole. It's new to me so I'll read up how the function works, but if you could enlighten me that would be fantastic.

I'll merge this tomorrow after coffee and make a new v2 release.

Thanks,
Greg.

@g105b g105b merged commit 329882e into phpgt:v2-dev Feb 1, 2023
@sidolov
Copy link
Author

sidolov commented Feb 1, 2023

Hi @g105b!
Thank you for your quick response and the new release!

While upgrading to PHP8.2 we found that usage of HTML-ENTITIES is deprecated in mb_convert_encoding, suggested solution is to use htmlspecialchars and htmlentities instead but we faced a couple of issues by using these functions - some of the special chars weren't properly decoded like ©, ™, some currency symbols, etc.

After some investigation, we decided to switch to mb_encode_numericentity function and map with code area to convert.
Usage of this function helped us to get identical results we had with mb_convert_encoding

I hope it helps!

@g105b
Copy link
Member

g105b commented Feb 2, 2023

Fantastic, thanks for the info. I had read similar stories in the notes on the docs page but it's good to understand how it's really being used. Have a great day.

@glo71317 glo71317 mentioned this pull request Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants