Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Proposal Detecting pcre2 #5625

Closed
fundawang opened this issue Dec 16, 2024 · 3 comments
Closed

Proposal Detecting pcre2 #5625

fundawang opened this issue Dec 16, 2024 · 3 comments

Comments

@fundawang
Copy link
Contributor

当前 swoole 仍然在检查和使用 pcre 这个库,也即 pcre 1.x。这个库现在已经很少有软件再依赖它了,希望将有关函数引用尽快升级到 pcre2。

@fundawang
Copy link
Contributor Author

fundawang commented Dec 16, 2024

php 自己的有关链接:
https://wiki.php.net/rfc/pcre2-migration
php/php-src#2857

@matyhtf
Copy link
Member

matyhtf commented Dec 17, 2024

swoole 并不依赖和使用 pcre,这实际上是 php-src 自身的问题,它没有处理好编译配置。swoole 的部分类实现了 iterator、arrayaccess 等接口,这些接口的 php 头文件依赖了 pcre,而 php-src 又没有处理好依赖关系,导致 swoole 编译时出现 pcre_match 函数不存在的编译错误,因此在 swoole 中必须检测系统是否有 pcre 库才能开启相关的特性。

@fundawang
Copy link
Contributor Author

fundawang commented Dec 18, 2024

不,我的意思是 php 自 7.3 起已经不再使用 pcre 1.x 了,swoole 6并没有php 8.0.x 或更低版本的兼容性包袱。应该和 php 一样,检测 pcre2 而不是 pcre 1.x。

你所说的:

iterator、arrayaccess 等接口,这些接口的 php 头文件依赖了 pcre

你所说的是ext/spl/config.m4这个吧。我没有发现它必须使用 pcre 1.x 啊

@fundawang fundawang changed the title Proposal using pcre2 Proposal Detcting pcre2 Dec 23, 2024
@fundawang fundawang changed the title Proposal Detcting pcre2 Proposal Detecting pcre2 Dec 23, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants