Skip to content
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

Add PHP 8.4 fixes #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions patches/cli_checks_84.patch
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,6 @@ index 8d45b2ae41..35e9403a31 100644
|| strcmp(sapi_module.name, "phpdbg") == 0);

if (!sapi_requires_preload_user) {
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index ac0ad2c378..ac1381a4ee 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -305,7 +305,7 @@ static PHP_GINIT_FUNCTION(pcre) /* {{{ */

/* If we're on the CLI SAPI, there will only be one request, so we don't need the
* cache to survive after RSHUTDOWN. */
- pcre_globals->per_request_cache = strcmp(sapi_module.name, "cli") == 0;
+ pcre_globals->per_request_cache = strcmp(sapi_module.name, "cli") == 0 || strcmp(sapi_module.name, "micro") == 0;
if (!pcre_globals->per_request_cache) {
zend_hash_init(&pcre_globals->pcre_cache, 0, NULL, php_free_pcre_cache, 1);
}
diff --git a/ext/pdo_sqlite/pdo_sqlite.c b/ext/pdo_sqlite/pdo_sqlite.c
index 49a477998b..18fe71cce4 100644
--- a/ext/pdo_sqlite/pdo_sqlite.c
Expand Down
File renamed without changes.
23 changes: 23 additions & 0 deletions patches/macos_iconv_81.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/build/php.m4 b/build/php.m4
index 01b8250598..0a8c5fba53 100644
--- a/build/php.m4
+++ b/build/php.m4
@@ -1963,9 +1963,7 @@ AC_DEFUN([PHP_SETUP_ICONV], [

dnl Check libc first if no path is provided in --with-iconv.
if test "$PHP_ICONV" = "yes"; then
- dnl Reset LIBS temporarily as it may have already been included -liconv in.
- LIBS_save="$LIBS"
- LIBS=
+ LIBS="$LIBS -liconv"
AC_CHECK_FUNC(iconv, [
found_iconv=yes
],[
@@ -1974,7 +1972,6 @@ AC_DEFUN([PHP_SETUP_ICONV], [
found_iconv=yes
])
])
- LIBS="$LIBS_save"
fi

dnl Check external libs for iconv funcs.
23 changes: 23 additions & 0 deletions patches/macos_iconv_82.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/build/php.m4 b/build/php.m4
index 01b8250598..0a8c5fba53 100644
--- a/build/php.m4
+++ b/build/php.m4
@@ -1963,9 +1963,7 @@ AC_DEFUN([PHP_SETUP_ICONV], [

dnl Check libc first if no path is provided in --with-iconv.
if test "$PHP_ICONV" = "yes"; then
- dnl Reset LIBS temporarily as it may have already been included -liconv in.
- LIBS_save="$LIBS"
- LIBS=
+ LIBS="$LIBS -liconv"
AC_CHECK_FUNC(iconv, [
found_iconv=yes
],[
@@ -1974,7 +1972,6 @@ AC_DEFUN([PHP_SETUP_ICONV], [
found_iconv=yes
])
])
- LIBS="$LIBS_save"
fi

dnl Check external libs for iconv funcs.
23 changes: 23 additions & 0 deletions patches/macos_iconv_83.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/build/php.m4 b/build/php.m4
index 01b8250598..0a8c5fba53 100644
--- a/build/php.m4
+++ b/build/php.m4
@@ -1963,9 +1963,7 @@ AC_DEFUN([PHP_SETUP_ICONV], [

dnl Check libc first if no path is provided in --with-iconv.
if test "$PHP_ICONV" = "yes"; then
- dnl Reset LIBS temporarily as it may have already been included -liconv in.
- LIBS_save="$LIBS"
- LIBS=
+ LIBS="$LIBS -liconv"
AC_CHECK_FUNC(iconv, [
found_iconv=yes
],[
@@ -1974,7 +1972,6 @@ AC_DEFUN([PHP_SETUP_ICONV], [
found_iconv=yes
])
])
- LIBS="$LIBS_save"
fi

dnl Check external libs for iconv funcs.
21 changes: 21 additions & 0 deletions patches/macos_iconv_84.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/build/php.m4 b/build/php.m4
index e45b22b766..506be904f1 100644
--- a/build/php.m4
+++ b/build/php.m4
@@ -1821,15 +1821,12 @@ AC_DEFUN([PHP_SETUP_ICONV], [

dnl Check libc first if no path is provided in --with-iconv.
AS_VAR_IF([PHP_ICONV], [yes], [
- dnl Reset LIBS temporarily as it may have already been included -liconv in.
- LIBS_save=$LIBS
- LIBS=
+ LIBS="$LIBS -liconv"
AC_CHECK_FUNC([iconv], [found_iconv=yes],
[AC_CHECK_FUNC([libiconv], [
AC_DEFINE([HAVE_LIBICONV], [1])
found_iconv=yes
])])
- LIBS=$LIBS_save
])

dnl Check external libs for iconv funcs.
20 changes: 11 additions & 9 deletions patches/static_extensions_win32_84.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,23 @@ index c7d897c1ca..d6f7cec5e2 100644
ADD_SOURCES(configure_module_dirname + '\\libmagic', LIBMAGIC_SOURCES, "fileinfo");
}
diff --git a/ext/openssl/config.w32 b/ext/openssl/config.w32
index 76e3079e50..b6fd2c7755 100644
index 24064ec2a5..87ff31618c 100644
--- a/ext/openssl/config.w32
+++ b/ext/openssl/config.w32
@@ -1,12 +1,12 @@
@@ -1,6 +1,6 @@
// vim:ft=javascript

-ARG_WITH("openssl", "OpenSSL support", "no,shared");
+ARG_WITH("openssl", "OpenSSL support", "no");

if (PHP_OPENSSL != "no") {
ARG_WITH("openssl-legacy-provider", "OPENSSL: Load legacy algorithm provider in addition to default provider", "no");

@@ -10,7 +10,7 @@ if (PHP_OPENSSL != "no") {
var ret = SETUP_OPENSSL("openssl", PHP_OPENSSL);

if (ret > 0) {
- EXTENSION("openssl", "openssl.c xp_ssl.c");
+ EXTENSION("openssl", "openssl.c xp_ssl.c", PHP_OPENSSL_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
AC_DEFINE("HAVE_OPENSSL_EXT", 1, "Define to 1 if the openssl extension is available.");
}
}
if (ret >= 2) {
- EXTENSION("openssl", "openssl.c openssl_pwhash.c xp_ssl.c");
+ EXTENSION("openssl", "openssl.c openssl_pwhash.c xp_ssl.c", PHP_OPENSSL_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
AC_DEFINE("HAVE_OPENSSL_EXT", 1, "Define to 1 if the PHP extension 'openssl' is available.");
if (PHP_OPENSSL_LEGACY_PROVIDER != "no") {
AC_DEFINE("LOAD_OPENSSL_LEGACY_PROVIDER", 1, "Define to 1 to load the OpenSSL legacy algorithm provider in addition to the default provider.");