-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[TEMP][DRAFT] Re-bundle oniguruma #19258
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
base: master
Are you sure you want to change the base?
Conversation
Maintenance of Oniguruma has ended, so I'll temporarily bundle it
Considering that Niels already added thumbs down, it needs RFC. |
I created a Draft RFC. @alexdowad |
@youkidearitai Thanks very much for drawing attention to this issue! Many thanks to @kkos for his work on maintaining Oniguruma over the years. I'm sure it has been challenging. I think our only options are 1) fork Oniguruma and maintain it ourselves, or 2) drop the Since PHP already has a built-in extension which bundles PCRE2, dropping Oniguruma would mean that PHP only includes one regex engine, rather than two. From a maintenance perspective, that seems desirable. At the same time, it seems that Oniguruma does have some features which PCRE2 doesn't. From a quick, online search, it appears that OG:
Looking at the history of OG, it appears there were a number of CVEs in 2019, but since then there have been few. Code size: ~75,000 lines of C. About 25,000 are for the regexp engine; about 40,000 are Unicode data tables, and another 10,000 to support various text encodings. @youkidearitai Do you have any ideas about how to find how many users are relying on |
@alexdowad Thank you very much for investigation!
For example, One idea is search to GitHub: https://github.com/search?q=mb_ereg+language%253APHP&type=code&l=PHP |
Just using Claude to analyze the OG repository and figure out where the key parts are and how they work. Here's what it came up with: https://gist.github.com/alexdowad/b976a927aa908ca6f2bf76afe3d1a302 |
@youkidearitai As a suggestion, instead of re-bundling the Oniguruma source into php-src, what if we forked OG into the |
@alexdowad Indeed, Forks Oniguruma in PHP organization is one way. |
Related: #18467
Maintenance of Oniguruma has ended, so I'll temporarily bundle it.
This pull request is one way of doing it, and this method may not always be adopted.