Skip to content

ext/Intl: Implement a compatibility layer for ICU version-specific API difference#22446

Open
LamentXU123 wants to merge 3 commits into
php:masterfrom
LamentXU123:intl-refactor
Open

ext/Intl: Implement a compatibility layer for ICU version-specific API difference#22446
LamentXU123 wants to merge 3 commits into
php:masterfrom
LamentXU123:intl-refactor

Conversation

@LamentXU123

@LamentXU123 LamentXU123 commented Jun 25, 2026

Copy link
Copy Markdown
Member

It is quite annoying to deal with ICU version guards here and there throughout the whole extension. However, the guards are on the other hand important for the extension to work as we must check for ICU compatibility for some of our features. But that doesn't mean we need to write all these shitty #if stuff everywhere.

I therefore wrote this PR to implement several internal APIs to check for compatibility. This very much enhance readability and reduce the possibility of making mistakes in the future when we are adding guards to new stuffs.

@devnexen please take a look if you have time, very much appreciated!!

@devnexen

Copy link
Copy Markdown
Member

I ll have a look later this week, not urgent by any mean. I understand well what it tried to solve though.

Comment thread ext/intl/intl_icu_compat.c Outdated
@devnexen

Copy link
Copy Markdown
Member

I had a quick glance, the unconditional forward typedefs might collide with ICU's.

@LamentXU123

Copy link
Copy Markdown
Member Author

Indeed. Let's directly include them I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants