Commit 50ca270
committed
Update m4 check for libpcre2 version
The pcre extension automake configuration only requires libpcre2 10.30. PHP 8.2
requires 10.42 else on startup one would encounter:
Warning: PHP Startup: ^(text/|application/xhtml\+xml) (offset=0): unrecognised
compile-time option bit(s) in Unknown on line 0
Most people use the bundled libpcre2. When one uses a dynamically linked version
of libpcre2, the pcre extension has an outdated version requirement:
ext/pcre/config0.m4: PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.30])
That was introduced by a5bc5ae (released with
php 7.30) which came with libpcre2 10.30.
If one backports php 8.3 to an older version of Debian (Bullseye has 10.36),
the compilation configuration checks pass but the PHP startup warning will
appear.
The bundled version of libpcre2 has been updated several time and the version
check was never kept in sync:
| PHP | libpcre2 | commit
|-------|----------|-------
| 7.3.0 | 10.30 | a5bc5ae
| 7.3.0 | 10.31 | 703e037
| 7.4.0 | 10.32 | d918e07
| 7.4.0 | 10.33 | aa9433e
| 8.0.0 | 10.34 | 52d0783
| 8.0.0 | 10.35 | b419f96
| 8.1.0 | 10.37 | 5d42900
| 8.1.1 | 10.39 | 6008a75
| 8.2.0 | 10.40 | 32cceb7
| 8.3.0 | 10.42 | c4e8f65
| 8.4.0 | 10.43 | ae5beff
| 8.4.0 | 10.44 | d1f14a4
| 8.5.x | 10.45 | e928487
The requirement did not:
```
$ git grep libpcre {PHP-{7.4,8.0,8.1,8.2,8.3,8.4},master} ext/pcre/config0.m4
PHP-7.4:ext/pcre/config0.m4: PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.30])
PHP-8.0:ext/pcre/config0.m4: PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.30])
PHP-8.1:ext/pcre/config0.m4: PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.30])
PHP-8.2:ext/pcre/config0.m4: PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.30])
PHP-8.3:ext/pcre/config0.m4: PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.30])
PHP-8.4:ext/pcre/config0.m4: PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.30])
master:ext/pcre/config0.m4: PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.30])
```
Update the m4 macro libpre2-8 requirement from 1.30 to 10.42.
References:
* https://phabricator.wikimedia.org/T398245#11010808
* https://phabricator.wikimedia.org/T4006931 parent 6b0a809 commit 50ca270
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments