Skip to content

Commit fdd6aa2

Browse files
committed
Update ext/session spl dependency
The spl dependency is configured so the spl_autoload_register is available when session_start() is used, meaning the spl extension needs to be loaded before the session. It is marked as optional to be more explicit as spl is not directly used nor required in the session extension.
1 parent 9f89ada commit fdd6aa2

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

ext/session/config.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ if test "$PHP_SESSION" != "no"; then
1616
PHP_PREAD_TEST
1717
PHP_NEW_EXTENSION(session, mod_user_class.c session.c mod_files.c mod_mm.c mod_user.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
1818
PHP_ADD_EXTENSION_DEP(session, hash, true)
19-
PHP_ADD_EXTENSION_DEP(session, spl)
19+
dnl https://bugs.php.net/53141
20+
PHP_ADD_EXTENSION_DEP(session, spl, true)
2021
PHP_SUBST(SESSION_SHARED_LIBADD)
2122
PHP_INSTALL_HEADERS([ext/session], [php_session.h mod_files.h mod_user.h])
2223
AC_DEFINE(HAVE_PHP_SESSION,1,[ ])

ext/session/config.w32

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ ARG_ENABLE("session", "session support", "yes");
44

55
if (PHP_SESSION == "yes") {
66
EXTENSION("session", "mod_user_class.c session.c mod_files.c mod_mm.c mod_user.c", false /* never shared */, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
7+
// https://bugs.php.net/53141
8+
ADD_EXTENSION_DEP('session', 'spl', true);
79
AC_DEFINE("HAVE_PHP_SESSION", 1, "Session support");
810
PHP_INSTALL_HEADERS("ext/session", "mod_mm.h php_session.h mod_files.h mod_user.h");
911
}

ext/session/session.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2999,7 +2999,7 @@ static PHP_MINFO_FUNCTION(session) /* {{{ */
29992999

30003000
static const zend_module_dep session_deps[] = { /* {{{ */
30013001
ZEND_MOD_OPTIONAL("hash")
3002-
ZEND_MOD_REQUIRED("spl")
3002+
ZEND_MOD_OPTIONAL("spl")
30033003
ZEND_MOD_END
30043004
};
30053005
/* }}} */

0 commit comments

Comments
 (0)